NEAR Protocol RPC: Block by ID (1.0.0)

Retrieve block data using a specific block hash

Download OpenAPI description
Languages
Servers
Mainnet
https://rpc.mainnet.fastnear.com/
Testnet
https://rpc.testnet.fastnear.com/

Get block by ID

Request

Retrieves block details using a specific block hash

Bodyapplication/jsonrequired
jsonrpcstringrequired
Value"2.0"
idstringrequired
Example: "fastnear"
methodstringrequired
Value"block"
paramsobjectrequired
params.​block_idstringrequired

Base58-encoded block hash

curl -i -X POST \
  https://rpc.mainnet.fastnear.com/ \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": "fastnear",
    "method": "block",
    "params": {
      "block_id": "BnHU4MCqsNVgLRCiZteef85VYxCbNzwkWEo1cEG8Z6VX"
    }
  }'

Responses

Successful response

Bodyapplication/json
jsonrpcstringrequired
Value"2.0"
idstring or numberrequired
One of:
string
resultobject
errorobject
Response
application/json
{ "jsonrpc": "2.0", "id": "string", "result": { "author": "string", "chunks": [], "header": {} }, "error": { "code": 0, "message": "string", "data": {} } }