NEAR Protocol RPC: Latest Block (1.0.0)

Retrieve the most recent block data from the NEAR blockchain

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

Get latest block

Request

Retrieves the most recent block from the blockchain

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

Special identifier for the latest block

Value"latest"
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": "latest"
    }
  }'

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": {}, "error": { "code": 0, "message": "string", "data": {} } }