For the complete documentation index, see llms.txt. This page is also available as Markdown.

network/status - Cardano

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

This endpoint returns the current status of the network, including the current and genesis block identifiers, the latest block timestamp, and connected peers.

Parameters

The request body is a JSON object with the following fields.

Field
Type
Required
Description

network_identifier

object

Yes

The network to query, with blockchain and network

metadata

object

No

Optional metadata object

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/network/status' \
--header 'Content-Type: application/json' \
--data-raw '{
    "network_identifier": {
        "blockchain": "cardano",
        "network": "mainnet"
    },
    "metadata": {}
}'
const response = await fetch(
    'https://go.getblock.io/<ACCESS-TOKEN>/network/status',
    {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({"network_identifier": {"blockchain": "cardano", "network": "mainnet"}, "metadata": {}})
    }
);
console.log(await response.json());
import requests

response = requests.post(
    'https://go.getblock.io/<ACCESS-TOKEN>/network/status',
    headers={'Content-Type': 'application/json'},
    json={"network_identifier": {"blockchain": "cardano", "network": "mainnet"}, "metadata": {}}
)

print(response.json())

Response

Response Parameters

Field
Type
Description

current_block_identifier

object

Index and hash of the current tip block

current_block_timestamp

integer

Timestamp of the tip block in milliseconds

genesis_block_identifier

object

Index and hash of the genesis block

peers

array

Peers the node is connected to

Use Cases

  • Tip Tracking: Read the current block index and hash

  • Sync Checks: Compare the tip against a local index

  • Timestamps: Read the tip block time for display

  • Health Monitoring: Inspect connected peers and chain progress

Error Handling

Error Code
Message
Description

1

Invalid request

The request body is malformed or missing required fields

4

Block not found

The requested block does not exist on this node

5

Internal error

The node failed to answer the request

Last updated

Was this helpful?