get_status - Bitcoin Cash

Example code for the get_status json-rpc method. Сomplete guide on how to use get_status json-rpc in GetBlock.io Web3 documentation.

Parameters

top_block_hash - string

Optional.

Value received in previous get_status response.

transaction_pool_version - uint32

Optional.

Value received in previous get_status response.

incoming_peer_count - uint32

Optional.

Value received in previous get_status response.

outgoing_peer_count - uint32

Optional.

Value received in previous get_status response.

lower_level_error - string

Optional.

Value received in previous get_status response.

Request

curl --location --request POST 'https://bcn.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "get_status",
"params": {},
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "incoming_peer_count": 0,
        "lower_level_error": "",
        "next_block_effective_median_size": 98872,
        "outgoing_peer_count": 8,
        "recommended_fee_per_byte": 100,
        "recommended_max_transaction_size": 98872,
        "top_block_cumulative_difficulty": 30676358330795090,
        "top_block_difficulty": 10361588328,
        "top_block_hash": "5099fb0b04b83d4f9862109608349d7a25938e6aa00b509366848589fe69917a",
        "top_block_height": 2403323,
        "top_block_timestamp": 1631799662,
        "top_block_timestamp_median": 1631795442,
        "top_known_block_height": 2403323,
        "transaction_pool_version": 2438
    }
}

Last updated

© 2019-2024 GetBlock LLC. All rights reserved ID: 21835790. Address: Belgrade, Serbia.