Skip to main content

Chunk by Block and Shard

chunk request type

This endpoint allows you to get a chunk by block ID and shard ID on the NEAR blockchain.

Network
FastNear API keyNo saved key
Get API key
Endpointhttps://rpc.mainnet.fastnear.com
Authnone detected
Live Response

Responses from the selected endpoint appear here after you run a request.

Live response output will appear here after you run a request.

Request reference

application/json

This operation accepts a JSON-RPC body over POST to /.

Required request inputs: yes

{
  "jsonrpc": "2.0",
  "id": "fastnear",
  "method": "chunk",
  "params": {
    "block_id": "6sddgq8nkENAz4f8qR72qxRPM25QWNBVMrkYr63DgC2E",
    "shard_id": 10
  }
}

Request schema

object
requires jsonrpc, id, method, params
jsonrpc *string
2.0
id *string

Example: fastnear

method *string
chunk
params *object
requires block_id, shard_id
block_id *one of

Block height (integer) or block hash (string)

integer
integer

Block height

string
string

Base58-encoded block hash

shard_id *integer

Shard identifier

Response reference

200 application/json

Successful response

Response schema

objectJsonRpcResponse
requires jsonrpc, id
jsonrpc *string
2.0
id *one of
stringnumber
resultobject
requires author, header, transactions, receipts
author *string

NEAR account ID

header *object
requires chunk_hash, prev_block_hash, outcome_root, prev_state_root, encoded_merkle_root, encoded_length, height_created, height_included, shard_id, gas_used, gas_limit, balance_burnt, outgoing_receipts_root, tx_root, validator_proposals, signature

Contains main info about the chunk.

balance_burnt *string

Amount in yoctoNEAR

bandwidth_requestsobjectnullable

One of multiple possible types

chunk_hash *string

Base58-encoded hash

congestion_infoobjectnullable

Stores the congestion level of a shard. More info about congestion [here](https://near.github.io/nearcore/architecture/how/receipt-congestion.html?highlight=congestion#receipt-congestion)

encoded_length *integer
encoded_merkle_root *string

Base58-encoded hash

gas_limit *string

Gas amount

gas_used *string

Gas amount

height_created *integer
height_included *integer
outcome_root *string

Base58-encoded hash

outgoing_receipts_root *string

Base58-encoded hash

prev_block_hash *string

Base58-encoded hash

prev_state_root *string

Base58-encoded hash

rent_paidstring

Amount in yoctoNEAR

Default: 0

shard_id *integer

Shard identifier

signature *string

Base58-encoded cryptographic signature

tx_root *string

Base58-encoded hash

validator_proposals *array
itemsobject
validator_rewardstring

Amount in yoctoNEAR

Default: 0

receipts *array
itemsobject
transactions *array
itemsobject
errorobject
codeinteger
messagestring
dataobject