From May 19, gateways will require an API key. Read the announcement
curl --compressed -X POST 'https://portal.sqd.dev/datasets/ethereum-mainnet/finalized-stream' \
-H 'Content-Type: application/json' \
-d '{
"type": "evm",
"fromBlock": 21000000,
"toBlock": 21000100,
"fields": {
"block": {
"number": true,
"timestamp": true
},
"log": {
"address": true,
"topics": true,
"data": true,
"transactionHash": true,
"logIndex": true
}
},
"logs": [{
"address": ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"],
"topic0": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
}]
}'[
{
"header": {
"number": 21000042,
"hash": "0x1a2b3c4d5e6f...",
"parentHash": "0x9a8b7c6d5e4f...",
"timestamp": 1728000000
},
"logs": [
{
"logIndex": 127,
"transactionIndex": 45,
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000ab5801a7d398351b8be11c439e05c5b3259aec9b",
"0x00000000000000000000000061edcdf5bb737adffe5043706e7c5bb1f1a56eea"
],
"data": "0x00000000000000000000000000000000000000000000000000000000003d0900",
"transactionHash": "0xabc123..."
}
],
"transactions": [],
"traces": [],
"stateDiffs": []
}
]Returns only finalized blocks matching the query. Same request format as /stream but never returns unfinalized blocks, so there are no chain reorganizations to handle (no 409 responses).
curl --compressed -X POST 'https://portal.sqd.dev/datasets/ethereum-mainnet/finalized-stream' \
-H 'Content-Type: application/json' \
-d '{
"type": "evm",
"fromBlock": 21000000,
"toBlock": 21000100,
"fields": {
"block": {
"number": true,
"timestamp": true
},
"log": {
"address": true,
"topics": true,
"data": true,
"transactionHash": true,
"logIndex": true
}
},
"logs": [{
"address": ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"],
"topic0": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
}]
}'[
{
"header": {
"number": 21000042,
"hash": "0x1a2b3c4d5e6f...",
"parentHash": "0x9a8b7c6d5e4f...",
"timestamp": 1728000000
},
"logs": [
{
"logIndex": 127,
"transactionIndex": 45,
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000ab5801a7d398351b8be11c439e05c5b3259aec9b",
"0x00000000000000000000000061edcdf5bb737adffe5043706e7c5bb1f1a56eea"
],
"data": "0x00000000000000000000000000000000000000000000000000000000003d0900",
"transactionHash": "0xabc123..."
}
],
"transactions": [],
"traces": [],
"stateDiffs": []
}
]Documentation Index
Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt
Use this file to discover all available pages before exploring further.
Data query to filter and retrieve finalized blocks
The type of blockchain data (fixed to EVM for this API).
evm The block number to start fetching from (inclusive).
The block number to fetch up to (inclusive). Optional; if omitted, streams until dataset height or timeout.
Expected hash of the parent of the first requested block.
If true, includes blocks with no matching data in the response.
Field selector for data items to retrieve.
Show child attributes
Log data requests.
Show child attributes
Transaction data requests.
Show child attributes
Trace data requests.
Show child attributes
State diff data requests.
Show child attributes
A stream of finalized 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.
Block header data. Fields are conditionally returned based on the fields.block parameter in the request. Only requested fields will be included in the response.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?