POSTgetBlock

Returns identity and transaction information about a confirmed block in the ledger

Request Body
jsonrpcstringrequired
idintegerrequired
methodstringrequired
paramsoneOf[]required

It contains following items:

  1. Slot number (required)
  2. ConfigurationObject (optional)
params[0]integer (uint64)

The slot number.

Responses
idinteger

The request ID

jsonrpcstring

The JSON-RPC version

blockHeightinteger (uint64)

The number of blocks beneath this block.

blockTimeinteger (int64)

Estimated production time, as Unix timestamp (seconds since the Unix epoch). null if not available.

blockhashstring

The blockhash of the block, as base-58 encoded string

parentSlotinteger (uint64)

The slot index of the parent block.

previousBlockhashstring

The blockhash of this block's parent, as base-58 encoded string; if the parent block is not available due to ledger cleanup, this field will return "11111111111111111111111111111111"

transactionsobject[]
transactionobjectrequired
messageobjectrequired
accountKeysstring[]required

List of base-58 encoded public keys used by the transaction, including by the instructions and for signatures. The first message.header.numRequiredSignatures public keys must sign the transaction.

headerobjectrequired

Details the account types and signatures required by the transaction.

recentBlockhashstringrequired

A base-58 encoded hash of a recent block in the ledger used to prevent transaction duplication and to give transactions lifetimes.

instructionsobject[]required
addressTableLookupsobject[]required
signaturesstring[]required

A list of base-58 encoded signatures applied to the transaction. The list is always of length message.header.numRequiredSignatures and not empty. The signature at index i corresponds to the public key at index i in message.accountKeys. The first one is used as the transaction id.

metaobjectrequired
errobject

Error if transaction failed, null if transaction succeeded.

feeinteger

fee this transaction was charged, as u64 integer

preBalancesinteger[]

array of u64 account balances from before the transaction was processed

postBalancesinteger[]

array of u64 account balances after the transaction was processed

innerInstructionsobject[]

List of inner instructions or null if inner instruction recording was not enabled during this transaction

indexnumber

Index of the transaction instruction from which the inner instruction(s) originated

instructionsobject[]

Ordered list of inner program instructions that were invoked during a single transaction instruction.

programIdIndexnumber

Index into the message.accountKeys array indicating the program account that executes this instruction.

accountsnumber[]

List of ordered indices into the message.accountKeys array indicating which accounts to pass to the program.

datastring

The program input data encoded in a base-58 string.

preTokenBalancesobject[]

List of token balances from before the transaction was processed or omitted if token balance recording was not yet enabled during this transaction

accountIndexnumber

Index of the account in which the token balance is provided for.

mintstring

Pubkey of the token's mint.

ownerstring

Pubkey of token balance's owner.

programIdstring

Pubkey of the Token program that owns the account.

uiTokenAmountobject
postTokenBalancesobject[]

List of token balances from after the transaction was processed or omitted if token balance recording was not yet enabled during this transaction

accountIndexnumber

Index of the account in which the token balance is provided for.

mintstring

Pubkey of the token's mint.

ownerstring

Pubkey of token balance's owner.

programIdstring

Pubkey of the Token program that owns the account.

uiTokenAmountobject
logMessagesstring[]

array of string log messages or null if log message recording was not enabled during this transaction

rewardsobject[]

transaction-level rewards

pubkeystring

The public key, as base-58 encoded string, of the account that received the reward

lamportsinteger

number of reward lamports credited or debited by the account, as a i64

postBalanceinteger

account balance in lamports after the reward was applied

rewardTypestring (enum)
commissioninteger

vote account commission when the reward was credited, only present for voting and staking rewards

loadedAddressesobject

Transaction addresses loaded from address lookup tables. Undefined if maxSupportedTransactionVersion is not set in request params, or if jsonParsed encoding is set in request params.

writableany[]

Ordered list of base-58 encoded addresses for writable loaded accounts

readonlyany[]

Ordered list of base-58 encoded addresses for readonly loaded accounts

returnDataobject

the most-recent return data generated by an instruction in the transaction, with the following fields:

programIdstring

the program that generated the return data, as base-58 encoded Pubkey

datastring

the return data itself, as base-64 encoded binary data

computeUnitsConsumedinteger

number of compute units consumed by the transaction

versiononeOf

Transaction version. Undefined if maxSupportedTransactionVersion is not set in request params.

string 1string (enum)
number 2number
signaturesstring[]

present if "signatures" are requested for transaction details; an array of signatures strings, corresponding to the transaction order in the block

X-API-KEY
RequestCU150
cURL
curl -X POST "https://solana-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlock",
  "params": [
    378967388,
    {
      "commitment": "finalized",
      "encoding": "json",
      "transactionDetails": "full",
      "maxSupportedTransactionVersion": 0,
      "rewards": false
    }
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "result": {
    "blockHeight": 247274050,
    "blockTime": 1700225734,
    "blockhash": "57eP5Cy4ZpREfuSEagC7fyX4Aq49vbv9NGqLjNCEFCyi",
    "parentSlot": 258967387,
    "previousBlockhash": "8e8brip4atAwZnuVWCeHs5xWUQbjwbrWZMZ2TTimsGw1",
    "transactions": [
      {
        "meta": {
          "computeUnitsConsumed": 2100,
          "err": null,
          "fee": 5000,
          "innerInstructions": [],
          "loadedAddresses": {
            "readonly": [],
            "writable": []
          },
          "logMessages": [
            "Program Vote111111111111111111111111111111111111111 invoke [1]",
            "Program Vote111111111111111111111111111111111111111 success"
          ],
          "postBalances": [
            1007388953256632,
            100000000000,
            1
          ],
          "postTokenBalances": [],
          "preBalances": [
            1007388953261632,
            100000000000,
            1
          ],
          "preTokenBalances": [],
          "rewards": null,
          "status": {
            "Ok": null
          }
        },
        "transaction": {
          "message": {
            "accountKeys": [
              "dv2eQHeP4RFrJZ6UeiZWoc3XTtmtZCUKxxCApCDcRNV",
              "i7NyKBMJCA9bLM2nsGyAGCKHECuR2L5eh4GqFciuwNT",
              "Vote111111111111111111111111111111111111111"
            ],
            "header": {
              "numReadonlySignedAccounts": 0,
              "numReadonlyUnsignedAccounts": 1,
              "numRequiredSignatures": 1
            },
            "instructions": [
              {
                "accounts": [
                  1,
                  0
                ],
                "data": "Fk63PWrkyA55WyomNsd7oxdDhXWxEGWqEiZH7dEU8VdZY1Qq2Nnm7xTbD3AtRZb9f2QgBMd618dshgcFds1cPiQxVqR7MEP5X4L8H9JuVoceLRsj3ZvbHe9XU8qAz4ocndMQeJW6csuHN6k6ikLGP1tTC7dqQj",
                "programIdIndex": 2,
                "stackHeight": 1
              }
            ],
            "recentBlockhash": "8e8brip4atAwZnuVWCeHs5xWUQbjwbrWZMZ2TTimsGw1"
          },
          "signatures": [
            "4AaMrcYam73YMjiwpB9T4eLNLsyc5eJMZgD4EorSrdRkaHy9hfv94YVAc7jKYfzdEZyzV3GuFaReAvkBNDuQqm4z"
          ]
        },
        "version": "legacy"
      },
      {
        "meta": {
          "computeUnitsConsumed": 53919,
          "err": null,
          "fee": 5000,
          "innerInstructions": [],
          "loadedAddresses": {
            "readonly": [],
            "writable": []
          },
          "logMessages": [
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s invoke [1]",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s consumed 4533 of 480000 compute units",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s success",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s invoke [1]",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s consumed 4396 of 475467 compute units",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s success",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s invoke [1]",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s consumed 4273 of 471071 compute units",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s success",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s invoke [1]",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s consumed 4405 of 466798 compute units",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s success",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s invoke [1]",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s consumed 4571 of 462393 compute units",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s success",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s invoke [1]",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s consumed 4528 of 457822 compute units",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s success",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s invoke [1]",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s consumed 4792 of 453294 compute units",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s success",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s invoke [1]",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s consumed 4403 of 448502 compute units",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s success",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s invoke [1]",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s consumed 4546 of 444099 compute units",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s success",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s invoke [1]",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s consumed 4778 of 439553 compute units",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s success",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s invoke [1]",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s consumed 4390 of 434775 compute units",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s success",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s invoke [1]",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s consumed 4154 of 430385 compute units",
            "Program gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s success",
            "Program ComputeBudget111111111111111111111111111111 invoke [1]",
            "Program ComputeBudget111111111111111111111111111111 success"
          ],
          "postBalances": [
            78723895000,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            1,
            1169280,
            1141440
          ],
          "postTokenBalances": [],
          "preBalances": [
            78723900000,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            23942400,
            1,
            1169280,
            1141440
          ],
          "preTokenBalances": [],
          "rewards": null,
          "status": {
            "Ok": null
          }
        },
        "transaction": {
          "message": {
            "accountKeys": [
              "HUZu4xMSHbxTWbkXR6jkGdjvDPJLjrpSNXSoUFBRgjWs",
              "2hsrGu1CLET6CMvyg3sGXmpaDUT59nyQyeT7qfzMRLAJ",
              "3g5BEM6cqJyXwy2VVgdynCpJAHqFMQnGqQdiVNvEyvpc",
              "4BwstmwCNY4qCMkcuUPPuCsRovXTQcn6RKjKpKetUXMQ",
              "5Qz1ayDLUQ1VeW4hc18FEAF3qwUg5rqmgMzCz3o72usT",
              "6Eg8YdfFJQF2HHonzPUBSCCmyUEhrStg9VBLK957sBe6",
              "7X3UJgftWJBqrdPVWCUSJ4pjVZ9qEKT1CNxhoYy8zb5m",
              "7XcEQ3VLi8i36PtA8hg79tRPwvckodiMv5LrMspZoofT",
              "9FUjsTnUmJyF7zMkc6cKSzfgwmwyvS5YpUXkvCA1epCN",
              "CdTeotBBfP6R6oLh2A7FyEXDg9abWz6RWDp8X8s37RCW",
              "DspwfrfzKNv8bxbCLq9WZQXFJaR7jci6kc1m7swQ278Z",
              "EgCFaKazieBrHE72hVtA7NH2TrozYKEPw7rXPfsUqpoM",
              "GxZnb9KnT2NjkwbsxDLyHvV3s1gvNodEh8cmQVTgFXWC",
              "ComputeBudget111111111111111111111111111111",
              "SysvarC1ock11111111111111111111111111111111",
              "gSbePebfvPy7tRqimPoVecS2UsBvYv46ynrzWocc92s"
            ],
            "header": {
              "numReadonlySignedAccounts": 0,
              "numReadonlyUnsignedAccounts": 3,
              "numRequiredSignatures": 1
            },
            "instructions": [
              {
                "accounts": [
                  0,
                  4,
                  14
                ],
                "data": "6mJFQCt94hG4CKNYKgVcwfGuYwCrFk1wocUNW5EPAzuAyPfnVPbUN3",
                "programIdIndex": 15,
                "stackHeight": 1
              },
              {
                "accounts": [
                  0,
                  2,
                  14
                ],
                "data": "6mJFQCt94hG4CKNYKgVcweBR3ehe7RjbNQLBULTGVghhwExWzSEgM5",
                "programIdIndex": 15,
                "stackHeight": 1
              },
              {
                "accounts": [
                  0,
                  12,
                  14
                ],
                "data": "6mJFQCt94hG4CKNYKgVcwvhWRMMs6bGr4oeF4ScuUNYF7SmsLib5KV",
                "programIdIndex": 15,
                "stackHeight": 1
              },
              {
                "accounts": [
                  0,
                  9,
                  14
                ],
                "data": "6mJFQCt94hG4CKNYKgVcwhV9XpzqNKHJzHb2DUTyvNf36qcqaJbts1",
                "programIdIndex": 15,
                "stackHeight": 1
              },
              {
                "accounts": [
                  0,
                  8,
                  14
                ],
                "data": "6mJFQCt94hG4CKNYKgVcwh2ewy8W5fhkE63iZTn6EkDUUYZ9fdHpyu",
                "programIdIndex": 15,
                "stackHeight": 1
              },
              {
                "accounts": [
                  0,
                  6,
                  14
                ],
                "data": "6mJFQCt94hG4CKNYKgVcwkfQqDgs3DKYSuTfA5rXef8LZYaERvWoDy",
                "programIdIndex": 15,
                "stackHeight": 1
              },
              {
                "accounts": [
                  0,
                  10,
                  14
                ],
                "data": "6mJFQCt94hG4CKNYKgVcwqdaGuveouF3n4zbfkqUzzHsfCmUTST927",
                "programIdIndex": 15,
                "stackHeight": 1
              },
              {
                "accounts": [
                  0,
                  1,
                  14
                ],
                "data": "6mJFQCt94hG4CKNYKgVcwveZ2KtTQzzieY7UWM4gMbu5CF3f5aaLEj",
                "programIdIndex": 15,
                "stackHeight": 1
              },
              {
                "accounts": [
                  0,
                  5,
                  14
                ],
                "data": "6mJFQCt94hG4CKNYKgVcwsyg4txZVL1aSgZrjTmdaJKMfx6kaMZrJb",
                "programIdIndex": 15,
                "stackHeight": 1
              },
              {
                "accounts": [
                  0,
                  11,
                  14
                ],
                "data": "6mJFQCt94hG4CKNYKgVcwnFZTVkBVjXxM4E4SoZD4bStTohHy2U6TZ",
                "programIdIndex": 15,
                "stackHeight": 1
              },
              {
                "accounts": [
                  0,
                  3,
                  14
                ],
                "data": "6mJFQCt94hG4CKNYKgVcwcurtegisDhJuCzZD9K7nTxvaGL9VfT5Xu",
                "programIdIndex": 15,
                "stackHeight": 1
              },
              {
                "accounts": [
                  0,
                  7,
                  14
                ],
                "data": "6mJFQCt94hG4CKNYKgVcwezjfJh1Jw1fwERnR3aKYLoRWmStAzGgfZ",
                "programIdIndex": 15,
                "stackHeight": 1
              },
              {
                "accounts": [],
                "data": "E6YYnj",
                "programIdIndex": 13,
                "stackHeight": 1
              }
            ],
            "recentBlockhash": "2nzraoD3rYnBsH7Ahj2VqWJHbHNWRnEpfB1mnefd3TNU"
          },
          "signatures": [
            "5jTSajMfBmqixmRwU8chgwCGyCaUQB7L4z7GvQS2apuudJmL7nWzM1Mgf23kgWrEu99TdUYSqGVQYsWHJQbzTY3R"
          ]
        },
        "version": "legacy"
      }
    ]
  },
  "id": 1
}