status - Cosmos

Example code for the status JSON-RPC method. Complete guide on how to use status JSON-RPC in GetBlock Web3 documentation.

Returns comprehensive node status — node info, public key, latest block hash, app hash, block height, and block time. This is the single most useful method for confirming connectivity and sync status against a Cosmos Hub node.

Parameters

  • None

Request Example

# JSON-RPC over HTTP POST (canonical)
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "status",
    "params": [],
    "id": "getblock.io"
}'

# URI over HTTP GET (alternate, for simple methods)
curl --location --request GET 'https://go.getblock.io/<ACCESS-TOKEN>/status'

Response Example

Response Parameters

Field
Type
Description

result.node_info.network

string

Chain ID — should be cosmoshub-4 for Cosmos Hub mainnet

result.node_info.version

string

CometBFT software version

result.node_info.moniker

string

Human-readable node name

result.sync_info.latest_block_height

string

Most recent block height (decimal string)

result.sync_info.latest_block_hash

string

Hash of the most recent block

result.sync_info.latest_block_time

string

ISO 8601 timestamp of the most recent block

result.sync_info.catching_up

boolean

true if the node is still syncing, false if caught up

result.sync_info.earliest_block_height

string

Lowest block height stored locally — useful for detecting archive vs pruning nodes

result.validator_info.voting_power

string

Voting power if this node is also a validator

Use Cases

  • Confirming network connectivity to Cosmos Hub specifically (network = cosmoshub-4)

  • Sync-status monitoring in failover-aware client setups

  • Detecting archive vs pruning nodes via earliest_block_height

  • Single-call comprehensive health checks

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

-32603

Internal error

Server-side error while processing the request

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Was this helpful?