getblockchaininfo

Returns an object containing various state info regarding blockchain processing.

Request

curl 'https://rpc.web3api.io?x-api-key=YOUR-API-KEY' \
    -X POST \
    -H 'x-amberdata-blockchain-id: bitcoin-mainnet' \
    -d '{"jsonrpc":"2.0","id":1,"method":"getblockchaininfo","params":[]}'

Response

{
  "result": {
    "chain": "main",
    "blocks": 597720,
    "headers": 597720,
    "bestblockhash": "0000000000000000000cb4d3aa971cd52cfb80028ae1db1fd99e0d35bf75c53e",
    "difficulty": 12759819404408.79,
    "mediantime": 1570124248,
    "verificationprogress": 0.9999850462316668,
    "initialblockdownload": false,
    "chainwork": "000000000000000000000000000000000000000008f9b24d889043b29bac2cd2",
    "size_on_disk": 275693732242,
    "pruned": false,
    "softforks": [{
        "id": "bip34",
        "version": 2,
        "reject": {
          "status": true
        }
      },
      {
        "id": "bip66",
        "version": 3,
        "reject": {
          "status": true
        }
      },
      {
        "id": "bip65",
        "version": 4,
        "reject": {
          "status": true
        }
      }
    ],
    "bip9_softforks": {
      "csv": {
        "status": "active",
        "startTime": 1462060800,
        "timeout": 1493596800,
        "since": 419328
      },
      "segwit": {
        "status": "active",
        "startTime": 1479168000,
        "timeout": 1510704000,
        "since": 481824
      }
    },
    "warnings": ""
  },
  "error": null,
  "id": 1
}