Skip to main content
POST
/
stream
Try API
curl --request POST \
  --url https://portal.sqd.dev/datasets/mode-mainnet/stream \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "evm",
  "fromBlock": 20000000,
  "toBlock": 20001000,
  "fields": {
    "block": {
      "number": true,
      "timestamp": true,
      "hash": true,
      "gasUsed": true
    }
  }
}
'
[
  {
    "header": {
      "number": 20000000,
      "hash": "0xfd4bbbf25056e2750b6b61a7ab5076c53f2cd69dc5c03bc00366023a8fae543c",
      "timestamp": 1740167583,
      "gasUsed": "0xab6f"
    }
  },
  {
    "header": {
      "number": 20001000,
      "hash": "0x71f77827c310c59af67ac667aefad3d8fef8e6e901bdfdeb90ae85621ed6ff61",
      "timestamp": 1740169583,
      "gasUsed": "0x2fcd2"
    }
  }
]

Body

application/json

Data query to filter and retrieve blocks

fromBlock
integer<int64>
default:20000000
required

The block number to start fetching from (inclusive).

type
enum<string>
default:evm

The type of blockchain data (fixed to EVM for this API).

Available options:
evm
toBlock
integer<int64>
default:20001000

The block number to fetch up to (inclusive). Optional; if omitted, streams until dataset height or timeout.

parentBlockHash
string

Expected hash of the parent of the first requested block.

includeAllBlocks
boolean
default:false

If true, includes blocks with no matching data in the response.

fields
object

Field selector for data items to retrieve.

logs
object[]

Log data requests.

transactions
object[]

Transaction data requests.

traces
object[]

Trace data requests.

stateDiffs
object[]

State diff data requests.

Response

A stream of blocks in JSON lines format, optionally gzipped. Can be empty if the data query has a bounded range and all blocks in the range have been skipped. May include X-Sqd-Finalized-Head-Number and X-Sqd-Finalized-Head-Hash headers, indicating the latest finalized block that's on the same chain as the returned blocks.

header
object
required
transactions
object[]
logs
object[]
traces
object[]
stateDiffs
object[]
Last modified on November 17, 2025