New Here? Claim Your 30% Discount on Your First Blockchain Node Access!

banner image
btg

BTG

POST

GET

chevron-right

Last updated on January 1, 1970

5 min read

Method getblockchaininfo undefined ()
connect with JSON-RPC protocol

getblockchaininfo

info-circle-fill

Returns an object containing various state info regarding blockchainprocessing.

Parameters

-

Request

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

Response

{
    "error": null,
    "id": "getblock.io",
    "result": {
        "bestblockhash": "000000007cc1fc836d0992202730ca71f77a8cf2a35974ca300dadbf8bc1e090",
        "bip9_softforks": {
            "csv": {
                "since": 419328,
                "startTime": 1462060800,
                "status": "active",
                "timeout": 1493596800
            },
            "segwit": {
                "since": 481824,
                "startTime": 1479168000,
                "status": "active",
                "timeout": 1510704000
            }
        },
        "blocks": 702634,
        "chain": "main",
        "chainwork": "000000000000000000000000000000000000000000a21782bdfc4d22791bf052",
        "difficulty": 197682.9725910754,
        "headers": 702634,
        "initialblockdownload": false,
        "mediantime": 1631008651,
        "pruned": false,
        "size_on_disk": 163410304062,
        "softforks": [
            {
                "id": "bip34",
                "reject": {
                    "status": true
                },
                "version": 2
            },
            {
                "id": "bip66",
                "reject": {
                    "status": true
                },
                "version": 3
            },
            {
                "id": "bip65",
                "reject": {
                    "status": true
                },
                "version": 4
            }
        ],
        "verificationprogress": 0.9999999981038389,
        "warnings": ""
    }
}
banner icon

Start Building with GetBlock RPCs for Free