Skip to main content
POST
/
finalized-stream
Stream Finalized Blocks
curl --request POST \
  --url https://portal.sqd.dev/datasets/ethereum-mainnet/finalized-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>"
      }
    ]
  }
]

Body

application/json

Data query to filter and retrieve finalized blocks

type
enum<string>
default:evm
required

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

Available options:
evm
fromBlock
integer<int64>
required

The block number to start fetching from (inclusive).

toBlock
integer<int64>

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 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.

header
object

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.

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