Don't miss Build Games$1M Builder Competition

avm.getBlock

Returns the block with the given id.

POST
/ext/bc/X#avm.getBlock

Request Body

application/json

JSON-RPC request

jsonrpc*string
method*string
params*
id*integer

Response Body

application/json

application/json

curl -X POST "https://api.avax.network/ext/bc/X#avm.getBlock" \  -H "Content-Type: application/json" \  -d '{    "jsonrpc": "2.0",    "method": "avm.getBlock",    "params": {      "blockID": "tXJ4xwmR8soHE6DzRNMQPtiwQvuYsHn6eLLBzo2moDqBquqy6"    },    "id": 1  }'
{
  "jsonrpc": "2.0",
  "result": {
    "block": "string",
    "encoding": "hex"
  },
  "id": 1
}
{
  "jsonrpc": "2.0",
  "error": {
    "code": 0,
    "message": "string",
    "data": null
  },
  "id": 1
}

Is this guide helpful?