🐉 Soldexer is in Open Beta!
curl --request POST \
--url https://portal.sqd.dev/datasets/solana-mainnet/stream \
--header 'Content-Type: application/json' \
--data '
{
"fromBlock": 317617480,
"type": "solana",
"toBlock": 317617482,
"parentBlockHash": "<string>",
"includeAllBlocks": true,
"fields": {
"instruction": {
"data": true
},
"block": {
"number": true
}
},
"instructions": [
{
"programId": [
"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
]
}
],
"transactions": [
{
"feePayer": [
"<string>"
],
"mentionsAccount": [
"<string>"
],
"instructions": true,
"balances": true,
"tokenBalances": true,
"logs": true
}
],
"balances": [
{
"account": [
"<string>"
],
"transaction": true,
"transactionInstructions": true
}
],
"tokenBalances": [
{
"account": [
"<string>"
],
"preProgramId": [
"<string>"
],
"postProgramId": [
"<string>"
],
"preMint": [
"<string>"
],
"postMint": [
"<string>"
],
"preOwner": [
"<string>"
],
"postOwner": [
"<string>"
],
"transaction": true,
"transactionInstructions": true
}
],
"rewards": [
{
"pubkey": [
"<string>"
]
}
],
"logs": [
{
"programId": [
"<string>"
],
"kind": [
"log"
],
"instruction": true,
"transaction": true
}
]
}
'[
{
"header": {
"number": 123,
"height": 123,
"parentSlot": 123,
"hash": "<string>"
},
"instructions": [
{
"transactionIndex": 123,
"instructionAddress": [
123
],
"programId": "<string>",
"accounts": [
"<string>"
],
"data": "<string>",
"d1": "<string>",
"d2": "<string>",
"d4": "<string>",
"d8": "<string>",
"error": "<string>",
"computeUnitsConsumed": 123,
"isCommitted": true,
"hasDroppedLogMessages": true
}
],
"transactions": [
{
"transactionIndex": 123,
"version": 123,
"accountKeys": [
123
],
"addressTableLookups": [
{
"accountKey": "<string>",
"readonlyIndexes": [
123
],
"writableIndexes": [
123
]
}
],
"numReadonlySignedAccounts": 123,
"numReadonlyUnsignedAccounts": 123,
"numRequiredSignatures": 123,
"recentBlockhash": "<string>",
"signatures": [
"<string>"
],
"err": {},
"fee": 123,
"computeUnitsConsumed": 123,
"loadedAddresses": {
"readonly": [
"<string>"
],
"writable": [
"<string>"
]
},
"feePayer": "<string>",
"hasDroppedLogMessages": true
}
],
"balances": [
{
"transactionIndex": 123,
"account": "<string>",
"pre": 123,
"post": 123
}
],
"tokenBalances": [
{
"transactionIndex": 123,
"account": "<string>",
"preMint": "<string>",
"postMint": "<string>",
"preDecimals": 123,
"postDecimals": 123,
"preProgramId": "<string>",
"postProgramId": "<string>",
"preOwner": "<string>",
"postOwner": "<string>",
"preAmount": 123,
"postAmount": 123
}
],
"rewards": [
{
"pubKey": "<string>",
"lamports": 123,
"postBalance": 123,
"rewardType": "<string>",
"commission": 123
}
],
"logs": [
{
"transactionIndex": 123,
"logIndex": 123,
"instructionAddress": [
123
],
"programId": "<string>",
"kind": "log",
"message": "<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/solana-mainnet/stream \
--header 'Content-Type: application/json' \
--data '
{
"fromBlock": 317617480,
"type": "solana",
"toBlock": 317617482,
"parentBlockHash": "<string>",
"includeAllBlocks": true,
"fields": {
"instruction": {
"data": true
},
"block": {
"number": true
}
},
"instructions": [
{
"programId": [
"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
]
}
],
"transactions": [
{
"feePayer": [
"<string>"
],
"mentionsAccount": [
"<string>"
],
"instructions": true,
"balances": true,
"tokenBalances": true,
"logs": true
}
],
"balances": [
{
"account": [
"<string>"
],
"transaction": true,
"transactionInstructions": true
}
],
"tokenBalances": [
{
"account": [
"<string>"
],
"preProgramId": [
"<string>"
],
"postProgramId": [
"<string>"
],
"preMint": [
"<string>"
],
"postMint": [
"<string>"
],
"preOwner": [
"<string>"
],
"postOwner": [
"<string>"
],
"transaction": true,
"transactionInstructions": true
}
],
"rewards": [
{
"pubkey": [
"<string>"
]
}
],
"logs": [
{
"programId": [
"<string>"
],
"kind": [
"log"
],
"instruction": true,
"transaction": true
}
]
}
'[
{
"header": {
"number": 123,
"height": 123,
"parentSlot": 123,
"hash": "<string>"
},
"instructions": [
{
"transactionIndex": 123,
"instructionAddress": [
123
],
"programId": "<string>",
"accounts": [
"<string>"
],
"data": "<string>",
"d1": "<string>",
"d2": "<string>",
"d4": "<string>",
"d8": "<string>",
"error": "<string>",
"computeUnitsConsumed": 123,
"isCommitted": true,
"hasDroppedLogMessages": true
}
],
"transactions": [
{
"transactionIndex": 123,
"version": 123,
"accountKeys": [
123
],
"addressTableLookups": [
{
"accountKey": "<string>",
"readonlyIndexes": [
123
],
"writableIndexes": [
123
]
}
],
"numReadonlySignedAccounts": 123,
"numReadonlyUnsignedAccounts": 123,
"numRequiredSignatures": 123,
"recentBlockhash": "<string>",
"signatures": [
"<string>"
],
"err": {},
"fee": 123,
"computeUnitsConsumed": 123,
"loadedAddresses": {
"readonly": [
"<string>"
],
"writable": [
"<string>"
]
},
"feePayer": "<string>",
"hasDroppedLogMessages": true
}
],
"balances": [
{
"transactionIndex": 123,
"account": "<string>",
"pre": 123,
"post": 123
}
],
"tokenBalances": [
{
"transactionIndex": 123,
"account": "<string>",
"preMint": "<string>",
"postMint": "<string>",
"preDecimals": 123,
"postDecimals": 123,
"preProgramId": "<string>",
"postProgramId": "<string>",
"preOwner": "<string>",
"postOwner": "<string>",
"preAmount": 123,
"postAmount": 123
}
],
"rewards": [
{
"pubKey": "<string>",
"lamports": 123,
"postBalance": 123,
"rewardType": "<string>",
"commission": 123
}
],
"logs": [
{
"transactionIndex": 123,
"logIndex": 123,
"instructionAddress": [
123
],
"programId": "<string>",
"kind": "log",
"message": "<string>"
}
]
}
]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
solana 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
Field selector for instructions
Show child attributes
Field selector for transactions
Show child attributes
Field selector for token balance updates
Show child attributes
Instruction data requests. Selects instructions found anywhere in the call tree, not just the top level ones. d1-d8 filter by the starting bytes of the data (in 0x-prefixed hex format); a0-a15 filter by account at the corresponding position in the accounts array; mentionsAccount filters by account mentions anywhere in the list
Show child attributes
Accepted values for the first byte of the data in 0x-prefixed hex format
Accepted values for the first two bytes of the data in 0x-prefixed hex format
Accepted values for the first three bytes of the data in 0x-prefixed hex format
Accepted values for the first four bytes of the data in 0x-prefixed hex format
Accepted values for the first eight bytes of the data in 0x-prefixed hex format
Selects instructions that mention a given account anywhere in their account lists, including at the positions higher than these accessible by the a* filters listed below
Fetch parent transactions for all matching instructions
Fetch SOL balance updates caused by parent transactions of all matching instructions
Fetch token balance updates caused by parent transactions of all matching instructions
Fetch all "sibling" instructions / instructions executed by parent transactions of all matching instructions
Fetch all instructions called by matching instructions (entire subtrees, not just the ones called directly)
Fetch logs produced by matching instructions. Read https://docs.soldexer.dev/api-reference/data-notes/logs-truncation before attempting to use logs
Transaction data requests
Show child attributes
Fetch all instructions executed in the matching transactions
Fetch all SOL balance updates due to the matching transactions
Fetch all token balance updates due to the matching transactions
Fetch all logs produced by the matching transactions. Read https://docs.soldexer.dev/api-reference/data-notes/logs-truncation before attempting to use logs
Requests for token balance updates
Show child attributes
Fetch parent transactions for all matching balance updates
Fetch all instructions executed by parent transactions of all matching balance updates
Logs data requests. Read https://docs.soldexer.dev/api-reference/data-notes/logs-truncation before attempting to use logs
A stream of blocks in JSON lines format, optionally gzipped. Can only 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
Show child attributes
An array of tree indices addressing the instruction in the call tree. Top level instructions get addresses [0], [1], ...; addresses of length 2 indicate inner instructions directly called by one of the top ones; and so on.
One byte instruction discriminator
Two bytes instruction discriminator
Four bytes instruction discriminator
Eight bytes instruction discriminator (Anchor standard)
Show child attributes
List of transaction signatures. The first one of these is also known as a "transaction hash"
Records of token balance updates done per transaction and token account. Uses data from https://solana.com/docs/rpc/json-structures#token-balances but combines pre- and post-balance records, making one record per token account
Show child attributes
The token account
The token mint account. Coincides with postMint when both are defined
The token mint account. Coincides with preMint when both are defined
The owner of the token account at the start of the transaction
The owner of the token account at the end of the transaction. When both pre- and postOwner are defined they can only be different if the transaction has changed the token account owner via the SetAuthority instruction
Read https://docs.soldexer.dev/api-reference/data-notes/logs-truncation before attempting to use logs
Show child attributes
Address of the instruction that produced the log. See the instruction field description for details (HTTP 200 response description -> instructions -> instructionAddress)
log, data, other Was this page helpful?