curl --request POST \
--url https://portal.sqd.dev/datasets/solana-mainnet/finalized-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": [],
"instruction": true,
"transaction": true
}
]
}
'import requests
url = "https://portal.sqd.dev/datasets/solana-mainnet/finalized-stream"
payload = {
"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": [],
"instruction": True,
"transaction": True
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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: [], instruction: true, transaction: true}]
})
};
fetch('https://portal.sqd.dev/datasets/solana-mainnet/finalized-stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://portal.sqd.dev/datasets/solana-mainnet/finalized-stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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' => [
],
'instruction' => true,
'transaction' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://portal.sqd.dev/datasets/solana-mainnet/finalized-stream"
payload := strings.NewReader("{\n \"fromBlock\": 317617480,\n \"type\": \"solana\",\n \"toBlock\": 317617482,\n \"parentBlockHash\": \"<string>\",\n \"includeAllBlocks\": true,\n \"fields\": {\n \"instruction\": {\n \"data\": true\n },\n \"block\": {\n \"number\": true\n }\n },\n \"instructions\": [\n {\n \"programId\": [\n \"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH\"\n ]\n }\n ],\n \"transactions\": [\n {\n \"feePayer\": [\n \"<string>\"\n ],\n \"mentionsAccount\": [\n \"<string>\"\n ],\n \"instructions\": true,\n \"balances\": true,\n \"tokenBalances\": true,\n \"logs\": true\n }\n ],\n \"balances\": [\n {\n \"account\": [\n \"<string>\"\n ],\n \"transaction\": true,\n \"transactionInstructions\": true\n }\n ],\n \"tokenBalances\": [\n {\n \"account\": [\n \"<string>\"\n ],\n \"preProgramId\": [\n \"<string>\"\n ],\n \"postProgramId\": [\n \"<string>\"\n ],\n \"preMint\": [\n \"<string>\"\n ],\n \"postMint\": [\n \"<string>\"\n ],\n \"preOwner\": [\n \"<string>\"\n ],\n \"postOwner\": [\n \"<string>\"\n ],\n \"transaction\": true,\n \"transactionInstructions\": true\n }\n ],\n \"rewards\": [\n {\n \"pubkey\": [\n \"<string>\"\n ]\n }\n ],\n \"logs\": [\n {\n \"programId\": [\n \"<string>\"\n ],\n \"kind\": [],\n \"instruction\": true,\n \"transaction\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://portal.sqd.dev/datasets/solana-mainnet/finalized-stream")
.header("Content-Type", "application/json")
.body("{\n \"fromBlock\": 317617480,\n \"type\": \"solana\",\n \"toBlock\": 317617482,\n \"parentBlockHash\": \"<string>\",\n \"includeAllBlocks\": true,\n \"fields\": {\n \"instruction\": {\n \"data\": true\n },\n \"block\": {\n \"number\": true\n }\n },\n \"instructions\": [\n {\n \"programId\": [\n \"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH\"\n ]\n }\n ],\n \"transactions\": [\n {\n \"feePayer\": [\n \"<string>\"\n ],\n \"mentionsAccount\": [\n \"<string>\"\n ],\n \"instructions\": true,\n \"balances\": true,\n \"tokenBalances\": true,\n \"logs\": true\n }\n ],\n \"balances\": [\n {\n \"account\": [\n \"<string>\"\n ],\n \"transaction\": true,\n \"transactionInstructions\": true\n }\n ],\n \"tokenBalances\": [\n {\n \"account\": [\n \"<string>\"\n ],\n \"preProgramId\": [\n \"<string>\"\n ],\n \"postProgramId\": [\n \"<string>\"\n ],\n \"preMint\": [\n \"<string>\"\n ],\n \"postMint\": [\n \"<string>\"\n ],\n \"preOwner\": [\n \"<string>\"\n ],\n \"postOwner\": [\n \"<string>\"\n ],\n \"transaction\": true,\n \"transactionInstructions\": true\n }\n ],\n \"rewards\": [\n {\n \"pubkey\": [\n \"<string>\"\n ]\n }\n ],\n \"logs\": [\n {\n \"programId\": [\n \"<string>\"\n ],\n \"kind\": [],\n \"instruction\": true,\n \"transaction\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://portal.sqd.dev/datasets/solana-mainnet/finalized-stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromBlock\": 317617480,\n \"type\": \"solana\",\n \"toBlock\": 317617482,\n \"parentBlockHash\": \"<string>\",\n \"includeAllBlocks\": true,\n \"fields\": {\n \"instruction\": {\n \"data\": true\n },\n \"block\": {\n \"number\": true\n }\n },\n \"instructions\": [\n {\n \"programId\": [\n \"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH\"\n ]\n }\n ],\n \"transactions\": [\n {\n \"feePayer\": [\n \"<string>\"\n ],\n \"mentionsAccount\": [\n \"<string>\"\n ],\n \"instructions\": true,\n \"balances\": true,\n \"tokenBalances\": true,\n \"logs\": true\n }\n ],\n \"balances\": [\n {\n \"account\": [\n \"<string>\"\n ],\n \"transaction\": true,\n \"transactionInstructions\": true\n }\n ],\n \"tokenBalances\": [\n {\n \"account\": [\n \"<string>\"\n ],\n \"preProgramId\": [\n \"<string>\"\n ],\n \"postProgramId\": [\n \"<string>\"\n ],\n \"preMint\": [\n \"<string>\"\n ],\n \"postMint\": [\n \"<string>\"\n ],\n \"preOwner\": [\n \"<string>\"\n ],\n \"postOwner\": [\n \"<string>\"\n ],\n \"transaction\": true,\n \"transactionInstructions\": true\n }\n ],\n \"rewards\": [\n {\n \"pubkey\": [\n \"<string>\"\n ]\n }\n ],\n \"logs\": [\n {\n \"programId\": [\n \"<string>\"\n ],\n \"kind\": [],\n \"instruction\": true,\n \"transaction\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"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>",
"message": "<string>"
}
]
}
]"<string>""<string>""<string>"{
"previousBlocks": [
{
"number": 123,
"hash": "<string>"
}
]
}"<string>""<string>""<string>"POST /finalized-stream
Streams only finalized blocks matching the provided data query. Query structure is identical to that of the /stream endpoint. 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/finalized-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": [],
"instruction": true,
"transaction": true
}
]
}
'import requests
url = "https://portal.sqd.dev/datasets/solana-mainnet/finalized-stream"
payload = {
"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": [],
"instruction": True,
"transaction": True
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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: [], instruction: true, transaction: true}]
})
};
fetch('https://portal.sqd.dev/datasets/solana-mainnet/finalized-stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://portal.sqd.dev/datasets/solana-mainnet/finalized-stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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' => [
],
'instruction' => true,
'transaction' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://portal.sqd.dev/datasets/solana-mainnet/finalized-stream"
payload := strings.NewReader("{\n \"fromBlock\": 317617480,\n \"type\": \"solana\",\n \"toBlock\": 317617482,\n \"parentBlockHash\": \"<string>\",\n \"includeAllBlocks\": true,\n \"fields\": {\n \"instruction\": {\n \"data\": true\n },\n \"block\": {\n \"number\": true\n }\n },\n \"instructions\": [\n {\n \"programId\": [\n \"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH\"\n ]\n }\n ],\n \"transactions\": [\n {\n \"feePayer\": [\n \"<string>\"\n ],\n \"mentionsAccount\": [\n \"<string>\"\n ],\n \"instructions\": true,\n \"balances\": true,\n \"tokenBalances\": true,\n \"logs\": true\n }\n ],\n \"balances\": [\n {\n \"account\": [\n \"<string>\"\n ],\n \"transaction\": true,\n \"transactionInstructions\": true\n }\n ],\n \"tokenBalances\": [\n {\n \"account\": [\n \"<string>\"\n ],\n \"preProgramId\": [\n \"<string>\"\n ],\n \"postProgramId\": [\n \"<string>\"\n ],\n \"preMint\": [\n \"<string>\"\n ],\n \"postMint\": [\n \"<string>\"\n ],\n \"preOwner\": [\n \"<string>\"\n ],\n \"postOwner\": [\n \"<string>\"\n ],\n \"transaction\": true,\n \"transactionInstructions\": true\n }\n ],\n \"rewards\": [\n {\n \"pubkey\": [\n \"<string>\"\n ]\n }\n ],\n \"logs\": [\n {\n \"programId\": [\n \"<string>\"\n ],\n \"kind\": [],\n \"instruction\": true,\n \"transaction\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://portal.sqd.dev/datasets/solana-mainnet/finalized-stream")
.header("Content-Type", "application/json")
.body("{\n \"fromBlock\": 317617480,\n \"type\": \"solana\",\n \"toBlock\": 317617482,\n \"parentBlockHash\": \"<string>\",\n \"includeAllBlocks\": true,\n \"fields\": {\n \"instruction\": {\n \"data\": true\n },\n \"block\": {\n \"number\": true\n }\n },\n \"instructions\": [\n {\n \"programId\": [\n \"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH\"\n ]\n }\n ],\n \"transactions\": [\n {\n \"feePayer\": [\n \"<string>\"\n ],\n \"mentionsAccount\": [\n \"<string>\"\n ],\n \"instructions\": true,\n \"balances\": true,\n \"tokenBalances\": true,\n \"logs\": true\n }\n ],\n \"balances\": [\n {\n \"account\": [\n \"<string>\"\n ],\n \"transaction\": true,\n \"transactionInstructions\": true\n }\n ],\n \"tokenBalances\": [\n {\n \"account\": [\n \"<string>\"\n ],\n \"preProgramId\": [\n \"<string>\"\n ],\n \"postProgramId\": [\n \"<string>\"\n ],\n \"preMint\": [\n \"<string>\"\n ],\n \"postMint\": [\n \"<string>\"\n ],\n \"preOwner\": [\n \"<string>\"\n ],\n \"postOwner\": [\n \"<string>\"\n ],\n \"transaction\": true,\n \"transactionInstructions\": true\n }\n ],\n \"rewards\": [\n {\n \"pubkey\": [\n \"<string>\"\n ]\n }\n ],\n \"logs\": [\n {\n \"programId\": [\n \"<string>\"\n ],\n \"kind\": [],\n \"instruction\": true,\n \"transaction\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://portal.sqd.dev/datasets/solana-mainnet/finalized-stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromBlock\": 317617480,\n \"type\": \"solana\",\n \"toBlock\": 317617482,\n \"parentBlockHash\": \"<string>\",\n \"includeAllBlocks\": true,\n \"fields\": {\n \"instruction\": {\n \"data\": true\n },\n \"block\": {\n \"number\": true\n }\n },\n \"instructions\": [\n {\n \"programId\": [\n \"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH\"\n ]\n }\n ],\n \"transactions\": [\n {\n \"feePayer\": [\n \"<string>\"\n ],\n \"mentionsAccount\": [\n \"<string>\"\n ],\n \"instructions\": true,\n \"balances\": true,\n \"tokenBalances\": true,\n \"logs\": true\n }\n ],\n \"balances\": [\n {\n \"account\": [\n \"<string>\"\n ],\n \"transaction\": true,\n \"transactionInstructions\": true\n }\n ],\n \"tokenBalances\": [\n {\n \"account\": [\n \"<string>\"\n ],\n \"preProgramId\": [\n \"<string>\"\n ],\n \"postProgramId\": [\n \"<string>\"\n ],\n \"preMint\": [\n \"<string>\"\n ],\n \"postMint\": [\n \"<string>\"\n ],\n \"preOwner\": [\n \"<string>\"\n ],\n \"postOwner\": [\n \"<string>\"\n ],\n \"transaction\": true,\n \"transactionInstructions\": true\n }\n ],\n \"rewards\": [\n {\n \"pubkey\": [\n \"<string>\"\n ]\n }\n ],\n \"logs\": [\n {\n \"programId\": [\n \"<string>\"\n ],\n \"kind\": [],\n \"instruction\": true,\n \"transaction\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"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>",
"message": "<string>"
}
]
}
]"<string>""<string>""<string>"{
"previousBlocks": [
{
"number": 123,
"hash": "<string>"
}
]
}"<string>""<string>""<string>"Body
Data query to filter and retrieve finalized 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
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
Show child attributes
Transaction data requests
Show child attributes
Show child attributes
Requests for SOL balance updates
Show child attributes
Show child attributes
Requests for token balance updates
Show child attributes
Show child attributes
Reward data requests
Show child attributes
Show child attributes
Logs data requests. Read https://docs.soldexer.dev/api-reference/data-notes/logs-truncation before attempting to use logs
Show child attributes
Show child attributes
Response
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.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Records of SOL balance updates done per transaction and account. Combines pre- and post-balance records, making one record per account
Show child attributes
Show child attributes
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
Show child attributes
Show child attributes
Show child attributes
Read https://docs.soldexer.dev/api-reference/data-notes/logs-truncation before attempting to use logs
Show child attributes
Show child attributes
Was this page helpful?

