From May 19, gateways will require an API key. Read the announcement
curl --compressed -X POST 'https://portal.sqd.dev/datasets/polkadot/stream' \
-H 'Content-Type: application/json' \
-d '{
"type": "substrate",
"fromBlock": 20000000,
"toBlock": 20000100,
"fields": {
"block": {
"number": true,
"timestamp": true
},
"event": {
"name": true,
"args": true
}
},
"events": [{
"name": ["Balances.Transfer"]
}]
}'[
{
"header": {
"number": 20000050,
"hash": "0xabc123def456789abc123def456789abc123def456789abc123def456789abcd",
"parentHash": "0x789012abc345678901234567890123456789012345678901234567890123abcd",
"timestamp": 1700000000000
},
"events": [
{
"index": 3,
"extrinsicIndex": 1,
"name": "Balances.Transfer",
"phase": "ApplyExtrinsic",
"args": {
"from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqWrztPu9BFKHEtaqry",
"to": "14E5nqKAp3oAJcg4aM6hEYyLT2JAPi6ixST1VRkNg8wAKPe",
"amount": "10000000000"
}
}
]
}
]Returns blocks matching the query. Response is a JSON array of blocks containing the requested fields. Set toBlock to limit the range, or omit it to stream up to the dataset height. Supports gzip compression via Accept-Encoding and Content-Encoding headers.
curl --compressed -X POST 'https://portal.sqd.dev/datasets/polkadot/stream' \
-H 'Content-Type: application/json' \
-d '{
"type": "substrate",
"fromBlock": 20000000,
"toBlock": 20000100,
"fields": {
"block": {
"number": true,
"timestamp": true
},
"event": {
"name": true,
"args": true
}
},
"events": [{
"name": ["Balances.Transfer"]
}]
}'[
{
"header": {
"number": 20000050,
"hash": "0xabc123def456789abc123def456789abc123def456789abc123def456789abcd",
"parentHash": "0x789012abc345678901234567890123456789012345678901234567890123abcd",
"timestamp": 1700000000000
},
"events": [
{
"index": 3,
"extrinsicIndex": 1,
"name": "Balances.Transfer",
"phase": "ApplyExtrinsic",
"args": {
"from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqWrztPu9BFKHEtaqry",
"to": "14E5nqKAp3oAJcg4aM6hEYyLT2JAPi6ixST1VRkNg8wAKPe",
"amount": "10000000000"
}
}
]
}
]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 blocks
The number of the first block to fetch. If unsure how far into the past this can go consult /metadata
substrate The number of the last block to fetch (inclusive)
Expected hash of the parent of the first requested block
If true, includes blocks with no matching data
Field selector. See the HTTP 200 response description for details on fields that aren't self-explanatory
Show child attributes
Event data requests. An empty object matches all events; an empty array matches no events
Show child attributes
Call data requests. An empty object matches all calls; an empty array matches no calls
Show child attributes
EVM.Log event requests for Frontier EVM parachains (e.g. Moonbeam, Astar). Filters on EVM.Log events specifically
Show child attributes
Ethereum.transact call requests for Frontier EVM parachains. Filters on Ethereum.transact calls specifically
Show child attributes
Contracts.ContractEmitted event requests for ink! smart contracts. Contract addresses must be hexadecimal (decoded from SS58) and lowercase
Show child attributes
Gear.UserMessageEnqueued event requests for Gear/Vara networks
Show child attributes
Gear.UserMessageSent event requests for Gear/Vara networks
Show child attributes
Revive.ContractEmitted event requests for Revive smart contracts
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.
Was this page helpful?