status - Stable
Example code for the status JSON-RPC method. Complete guide on how to use status JSON-RPC in GetBlock Web3 documentation.
Returns node information: protocol and software version, network (chain id), latest block hash, app hash, block height and time, and the node's validator info and sync state.
Method
statusParameters
This method takes no parameters.
Example
export STABLE_TM=https://shared.ap-southeast-1.getblock.io/<ACCESS-TOKEN>/
# JSON-RPC over HTTP (POST)
curl -X POST "${STABLE_TM}" -H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": "getblock.io", "method": "status", "params": {}}'
# URI over HTTP (GET)
curl "${STABLE_TM}status"Response
Response Fields
node_info
object
Node id, network (chain id), and software version
sync_info
object
Latest block height/hash/time and catching_up flag
validator_info
object
This node's validator address and voting power
Use Cases
Sync tracking: Read latest_block_height and catching_up
Chain identity: Confirm node_info.network is stablechain_988-1 before broadcasting
Error Handling
-32600 / Invalid request
Invalid request
The JSON-RPC envelope was malformed
-32602 / Invalid params
Invalid params
A parameter was missing or of the wrong type
403 / RBAC: access denied
Access denied
The GetBlock access token is missing or incorrect
Last updated
Was this helpful?