Substreams WebSockets service — stream decoded blocks, swaps & transfers in real time.
    Read-only preview
    You're browsing the public WebSockets reference. Sign in to open a live stream with your team's API key.

    EVTblock payload

    One payload per (network, table) per block. A package that emits both swaps and transfers produces two per-table broadcasts each block. Event-row values are strings on the wire per DatabaseChanges proto — numeric parsing is the consumer's job.

    Message
    {
      "network": "solana",
      "table": "swaps",
      "block_num": 350000000,
      "block_hash": "Gsk6…",
      "timestamp": "2026-05-13 17:00:00",
      "module_hash": "bd388f2e…",
      "events": [
        {
          "protocol": "raydium_cpmm",
          "user": "F2MUE…",
          "input_mint": "So11111111111111111111111111111111111111112",
          "output_mint": "13muFY…",
          "input_amount": "1287000000",
          "output_amount": "6848381008732"
        }
      ]
    }

    Fields

    networkstring

    Chain identifier — solana, mainnet, base, …

    tablestring

    DatabaseChanges table emitted by the package's db_out. Together with network identifies the channel.

    block_numnumber

    Block height. Use block_num + 1 as the resume cursor on reconnect.

    module_hashstring

    40-hex SHA-1 of the Substreams output module. Mismatch with the welcome value means the operator deployed a new package.

    eventsarray

    Rows for this table only, in source order. Per-event @table is dropped since the parent payload carries table. Upstream ordinal, operation, pk, composite_pk, update_op are never surfaced.

    Trimmed columns & _raw arrays

    Event rows are stripped of ClickHouse-backfill provenance columns at decode time, so the wire carries only meaningful data. Dropped on EVM: tx_index, tx_nonce, tx_gas_price, tx_gas_limit, tx_gas_used, tx_value, log_index, log_block_index, log_topics, log_data, and all call_*. Dropped on SVM: compute_units_consumed, stack_height, and the SVM transaction fee (only when compute_units_consumed is in the same row, so EVM swap_fee.fee survives).

    Kept by design: tx_hash, tx_from, tx_to, log_ordinal (the canonical EVM event-ordering key), log_address, signature, fee_payer, program_id.

    _raw → array. Any field whose key ends in _raw is split on , and re-emitted as a JSON array under the suffix-stripped key — signers_raw: "a,b,c" becomes signers: ["a", "b", "c"]. An empty string becomes [].