curl --request POST \
--url https://portal.sqd.dev/datasets/ethereum-mainnet/stream \
--header 'Content-Type: application/json' \
--data '
{
"type": "evm",
"fromBlock": 123,
"toBlock": 123,
"parentBlockHash": "<string>",
"includeAllBlocks": false,
"fields": {
"block": {
"hash": true,
"number": true,
"parentHash": true
},
"transaction": {
"hash": true
},
"log": {
"topics": true
},
"trace": {
"transactionIndex": true,
"traceAddress": true,
"type": true,
"subtraces": true,
"error": true,
"createFrom": true,
"createValue": true,
"createGas": true,
"createInit": true,
"createResultGasUsed": true,
"createResultCode": true,
"createResultAddress": true,
"callFrom": true,
"callTo": true,
"callValue": true,
"callGas": true,
"callSighash": true,
"callInput": true,
"callResultGasUsed": true,
"callResultOutput": true,
"suicideAddress": true,
"suicideRefundAddress": true,
"suicideBalance": true,
"rewardAuthor": true,
"rewardValue": true,
"rewardType": true
},
"stateDiff": {
"transactionIndex": true,
"address": true,
"key": true,
"kind": true,
"prev": true,
"next": true
}
},
"logs": [
{
"address": [
"<string>"
],
"topic0": [
"<string>"
],
"topic1": [
"<string>"
],
"topic2": [
"<string>"
],
"topic3": [
"<string>"
],
"transaction": true,
"transactionTraces": true,
"transactionLogs": true
}
],
"transactions": [
{
"from": [
"<string>"
],
"to": [
"<string>"
],
"sighash": [
"<string>"
],
"logs": true,
"traces": true,
"stateDiffs": true
}
],
"traces": [
{
"type": [
"create"
],
"createFrom": [
"<string>"
],
"callFrom": [
"<string>"
],
"callTo": [
"<string>"
],
"callSighash": [
"<string>"
],
"suicideRefundAddress": [
"<string>"
],
"rewardAuthor": [
"<string>"
],
"transaction": true,
"transactionLogs": true,
"subtraces": true,
"parents": true
}
],
"stateDiffs": [
{
"address": [
"<string>"
],
"key": [
"<string>"
],
"kind": [
"="
],
"transaction": true
}
]
}
'[
{
"header": {
"number": 123,
"height": 123,
"hash": "<string>",
"parentHash": "<string>",
"timestamp": 123,
"nonce": "<string>",
"sha3Uncles": "<string>",
"logsBloom": "<string>",
"transactionsRoot": "<string>",
"stateRoot": "<string>",
"receiptsRoot": "<string>",
"mixHash": "<string>",
"miner": "<string>",
"difficulty": 123,
"totalDifficulty": 123,
"extraData": "<string>",
"size": 123,
"gasLimit": 123,
"gasUsed": 123,
"baseFeePerGas": 123,
"l1BlockNumber": 123
},
"transactions": [
{
"transactionIndex": 123,
"from": "<string>",
"to": "<string>",
"hash": "<string>",
"gas": 123,
"gasPrice": 123,
"maxFeePerGas": 123,
"maxPriorityFeePerGas": 123,
"input": "<string>",
"nonce": 123,
"value": 123,
"v": 123,
"r": "<string>",
"s": "<string>",
"yParity": 123,
"chainId": 123,
"gasUsed": 123,
"cumulativeGasUsed": 123,
"effectiveGasPrice": 123,
"contractAddress": "<string>",
"type": 123,
"status": 123,
"sighash": "<string>",
"l1Fee": 123,
"l1FeeScalar": 123,
"l1GasPrice": 123,
"l1GasUsed": 123,
"l1BlobBaseFee": 123,
"l1BlobBaseFeeScalar": 123,
"l1BaseFeeScalar": 123
}
],
"logs": [
{
"logIndex": 123,
"transactionIndex": 123,
"address": "<string>",
"data": "<string>",
"topics": [
"<string>"
],
"transactionHash": "<string>"
}
],
"traces": [
{
"transactionIndex": 123,
"traceAddress": [
123
],
"type": "create",
"subtraces": 123,
"error": "<string>",
"action": {
"from": "<string>",
"value": 123,
"gas": 123,
"init": "<string>",
"to": "<string>",
"sighash": "<string>",
"input": "<string>",
"address": "<string>",
"refundAddress": "<string>",
"balance": 123,
"author": "<string>",
"rewardType": "<string>"
},
"result": {
"gasUsed": 123,
"code": "<string>",
"address": "<string>",
"output": "<string>"
}
}
],
"stateDiffs": [
{
"transactionIndex": 123,
"address": "<string>",
"key": "<string>",
"kind": "=",
"prev": "<string>",
"next": "<string>"
}
]
}
]Streams a list of blocks matching the provided data query, potentially including real-time data. Required request headers: Content-Type: application/json; optional request headers: Accept-Encoding: gzip, Content-Encoding: gzip.
curl --request POST \
--url https://portal.sqd.dev/datasets/ethereum-mainnet/stream \
--header 'Content-Type: application/json' \
--data '
{
"type": "evm",
"fromBlock": 123,
"toBlock": 123,
"parentBlockHash": "<string>",
"includeAllBlocks": false,
"fields": {
"block": {
"hash": true,
"number": true,
"parentHash": true
},
"transaction": {
"hash": true
},
"log": {
"topics": true
},
"trace": {
"transactionIndex": true,
"traceAddress": true,
"type": true,
"subtraces": true,
"error": true,
"createFrom": true,
"createValue": true,
"createGas": true,
"createInit": true,
"createResultGasUsed": true,
"createResultCode": true,
"createResultAddress": true,
"callFrom": true,
"callTo": true,
"callValue": true,
"callGas": true,
"callSighash": true,
"callInput": true,
"callResultGasUsed": true,
"callResultOutput": true,
"suicideAddress": true,
"suicideRefundAddress": true,
"suicideBalance": true,
"rewardAuthor": true,
"rewardValue": true,
"rewardType": true
},
"stateDiff": {
"transactionIndex": true,
"address": true,
"key": true,
"kind": true,
"prev": true,
"next": true
}
},
"logs": [
{
"address": [
"<string>"
],
"topic0": [
"<string>"
],
"topic1": [
"<string>"
],
"topic2": [
"<string>"
],
"topic3": [
"<string>"
],
"transaction": true,
"transactionTraces": true,
"transactionLogs": true
}
],
"transactions": [
{
"from": [
"<string>"
],
"to": [
"<string>"
],
"sighash": [
"<string>"
],
"logs": true,
"traces": true,
"stateDiffs": true
}
],
"traces": [
{
"type": [
"create"
],
"createFrom": [
"<string>"
],
"callFrom": [
"<string>"
],
"callTo": [
"<string>"
],
"callSighash": [
"<string>"
],
"suicideRefundAddress": [
"<string>"
],
"rewardAuthor": [
"<string>"
],
"transaction": true,
"transactionLogs": true,
"subtraces": true,
"parents": true
}
],
"stateDiffs": [
{
"address": [
"<string>"
],
"key": [
"<string>"
],
"kind": [
"="
],
"transaction": true
}
]
}
'[
{
"header": {
"number": 123,
"height": 123,
"hash": "<string>",
"parentHash": "<string>",
"timestamp": 123,
"nonce": "<string>",
"sha3Uncles": "<string>",
"logsBloom": "<string>",
"transactionsRoot": "<string>",
"stateRoot": "<string>",
"receiptsRoot": "<string>",
"mixHash": "<string>",
"miner": "<string>",
"difficulty": 123,
"totalDifficulty": 123,
"extraData": "<string>",
"size": 123,
"gasLimit": 123,
"gasUsed": 123,
"baseFeePerGas": 123,
"l1BlockNumber": 123
},
"transactions": [
{
"transactionIndex": 123,
"from": "<string>",
"to": "<string>",
"hash": "<string>",
"gas": 123,
"gasPrice": 123,
"maxFeePerGas": 123,
"maxPriorityFeePerGas": 123,
"input": "<string>",
"nonce": 123,
"value": 123,
"v": 123,
"r": "<string>",
"s": "<string>",
"yParity": 123,
"chainId": 123,
"gasUsed": 123,
"cumulativeGasUsed": 123,
"effectiveGasPrice": 123,
"contractAddress": "<string>",
"type": 123,
"status": 123,
"sighash": "<string>",
"l1Fee": 123,
"l1FeeScalar": 123,
"l1GasPrice": 123,
"l1GasUsed": 123,
"l1BlobBaseFee": 123,
"l1BlobBaseFeeScalar": 123,
"l1BaseFeeScalar": 123
}
],
"logs": [
{
"logIndex": 123,
"transactionIndex": 123,
"address": "<string>",
"data": "<string>",
"topics": [
"<string>"
],
"transactionHash": "<string>"
}
],
"traces": [
{
"transactionIndex": 123,
"traceAddress": [
123
],
"type": "create",
"subtraces": 123,
"error": "<string>",
"action": {
"from": "<string>",
"value": 123,
"gas": 123,
"init": "<string>",
"to": "<string>",
"sighash": "<string>",
"input": "<string>",
"address": "<string>",
"refundAddress": "<string>",
"balance": 123,
"author": "<string>",
"rewardType": "<string>"
},
"result": {
"gasUsed": 123,
"code": "<string>",
"address": "<string>",
"output": "<string>"
}
}
],
"stateDiffs": [
{
"transactionIndex": 123,
"address": "<string>",
"key": "<string>",
"kind": "=",
"prev": "<string>",
"next": "<string>"
}
]
}
]Data query to filter and retrieve 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 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.
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?