Node Health & Status
Health Status (v0.38.x)
Download OpenAPI specification:Download
The Node RPC endpoints are intended for working with the blockchain consensus layer directly. These endpoints return information about the blocks, validators, and network layer itself while the API endpoints work at a higher level and are used to return information at the blockchain Application layer.
The RPC service would typically be used by users and applications that wish to retrieve information about raw blocks being produced or monitor for transactions and network activity.
The Node RPC service supports the following communication protocols:
- URI over HTTP
- JSONRPC over HTTP
- JSONRPC over websockets
A bearer token is required for all requests.
Exchange client id and client secret for a token:
curl -XPOST https://dev-v6yakh57b7z3ngqo.us.auth0.com/oauth/token \
-H \"content-type: application/json\" \
-d '{\"client_id\":\"<id>\",\"client_secret\":\"<secret>\",\"audience\":\"https://api.provlabs.com\",\"grant_type\":\"client_credentials\"}'
The returned token can then be used to make API calls:
curl -XGET -H \"Authorization: Bearer <token>\" https://pio-mainnet-1-rpc.provlabs.com/block?height=5
Arguments which expect strings or byte arrays may be passed as quoted
strings, like "abc" or as 0x-prefixed strings, like 0x616263.
JSONRPC requests can be POST'd to the root RPC endpoint via HTTP.
curl --header "Content-Type: application/json" --request POST --data '{"method": "block", "params": ["5"], "id": 1}' https://pio-mainnet-1-rpc.provlabs.com
JSONRPC requests can be also made via websocket.
The websocket endpoint is at /websocket, e.g. https://pio-mainnet-1-rpc.provlabs.com/websocket.
Asynchronous RPC functions like event subscribe and unsubscribe are
only available via websockets.
For example using the websocat tool, you can subscribe for 'NewBlock` events with the following command:
echo '{ "jsonrpc": "2.0","method": "subscribe","id": 0,"params": {"query": "tm.event='"'NewBlock'"'"} }' | websocat -n -t wss://pio-mainnet-1-rpc.provlabs.com/websocket
Node Status
Get CometBFT status including node info, pubkey, latest block hash, app hash, block height and time.
Responses
Response samples
- 200
- 500
{- "id": 0,
- "jsonrpc": "2.0",
- "result": {
- "node_info": {
- "protocol_version": {
- "p2p": "7",
- "block": "10",
- "app": "0"
}, - "id": "5576458aef205977e18fd50b274e9b5d9014525a",
- "listen_addr": "tcp:0.0.0.0:26656",
- "network": "cosmoshub-2",
- "version": "0.32.1",
- "channels": "4020212223303800",
- "moniker": "moniker-node",
- "other": {
- "tx_index": "on",
- "rpc_address": "tcp:0.0.0.0:26657"
}
}, - "sync_info": {
- "latest_block_hash": "790BA84C3545FCCC49A5C629CEE6EA58A6E875C3862175BDC11EE7AF54703501",
- "latest_app_hash": "C9AEBB441B787D9F1D846DE51F3826F4FD386108B59B08239653ABF59455C3F8",
- "latest_block_height": "1262196",
- "latest_block_time": "2019-08-01T11:52:22.818762194Z",
- "earliest_block_hash": "790BA84C3545FCCC49A5C629CEE6EA58A6E875C3862175BDC11EE7AF54703501",
- "earliest_app_hash": "C9AEBB441B787D9F1D846DE51F3826F4FD386108B59B08239653ABF59455C3F8",
- "earliest_block_height": "1262196",
- "earliest_block_time": "2019-08-01T11:52:22.818762194Z",
- "catching_up": false
}, - "validator_info": {
- "address": "5D6A51A8E9899C44079C6AF90618BA0369070E6E",
- "pub_key": {
- "type": "tendermint/PubKeyEd25519",
- "value": "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
}, - "voting_power": "0"
}
}
}Response samples
- 200
- 500
{- "id": 0,
- "jsonrpc": "2.0",
- "result": {
- "listening": true,
- "listeners": [
- "Listener(@)"
], - "n_peers": "1",
- "peers": [
- {
- "node_info": {
- "protocol_version": {
- "p2p": "7",
- "block": "10",
- "app": "0"
}, - "id": "5576458aef205977e18fd50b274e9b5d9014525a",
- "listen_addr": "tcp:0.0.0.0:26656",
- "network": "cosmoshub-2",
- "version": "0.32.1",
- "channels": "4020212223303800",
- "moniker": "moniker-node",
- "other": {
- "tx_index": "on",
- "rpc_address": "tcp:0.0.0.0:26657"
}
}, - "is_outbound": true,
- "connection_status": {
- "Duration": "168901057956119",
- "SendMonitor": {
- "Active": true,
- "Start": "2019-07-31T14:31:28.66Z",
- "Duration": "168901060000000",
- "Idle": "168901040000000",
- "Bytes": "5",
- "Samples": "1",
- "InstRate": "0",
- "CurRate": "0",
- "AvgRate": "0",
- "PeakRate": "0",
- "BytesRem": "0",
- "TimeRem": "0",
- "Progress": 0
}, - "RecvMonitor": {
- "Active": true,
- "Start": "2019-07-31T14:31:28.66Z",
- "Duration": "168901060000000",
- "Idle": "168901040000000",
- "Bytes": "5",
- "Samples": "1",
- "InstRate": "0",
- "CurRate": "0",
- "AvgRate": "0",
- "PeakRate": "0",
- "BytesRem": "0",
- "TimeRem": "0",
- "Progress": 0
}, - "Channels": [
- {
- "ID": 48,
- "SendQueueCapacity": "1",
- "SendQueueSize": "0",
- "Priority": "5",
- "RecentlySent": "0"
}
]
}, - "remote_ip": "95.179.155.35"
}
]
}
}