Get ord and bitcoin node status, returns a json object with the node status info.
GET http://{ip}:{port}/api/v1/node/info
Parameter | Type | Description | Notes |
---|---|---|---|
btc | Boolean | The btc address. | [default to null] |
Parameter | Type | Description |
---|---|---|
code | Integer | The response code. |
msg | String | A message describing the error. |
data | Object | It is a object with the node info. |
> ordHeight | Number | The brc20 node height. |
> btcChainInfo | Object | It is a object with btc node info. |
>> chain | String | The btc network. |
>> blocks | Number | The btc node block number. |
>> headers | Number | The btc node latest block number. |
>> bestblockhash | String | The btc node block hash. |
>> difficulty | Number | The btc node difficulty. |
>> mediantime | Number | The btc node median time. |
>> verificationprogress | Number | The verification progress. |
>> initialblockdownload | String | The initial block download. |
>> chainwork | String | The chainwork. |
>> size_on_disk | String | The size_on_disk. |
>> pruned | String | The pruned. |
>> pruneheight | String | The pruneheight. |
>> automatic_pruning | String | The automatic_pruning. |
>> prune_target_size | String | The prune_target_size. |
>> softforks | String | The softforks. |
>> warnings | String | The warnings. |
curl --location --request GET 'http://\{ip\}:\{port\}/api/v1/node/info?btc=true'
{
"code": 0,
"msg": "ok",
"data": {
"ordHeight": 794141,
"btcChainInfo": {
"chain": "main",
"blocks": 794141,
"headers": 794141,
"bestblockhash": "000000000000000000049611e6c68e8c236e9f28c2908ce155c9a1bc4e1801b8",
"difficulty": 51234338863442.89,
"mediantime": 1686631127,
"verificationprogress": 0.9999944081374568,
"initialblockdownload": false,
"chainwork": "00000000000000000000000000000000000000004b8a42ec14b026a6ceb6566c",
"size_on_disk": 553894933308,
"pruned": false,
"pruneheight": null,
"automatic_pruning": null,
"prune_target_size": null,
"softforks": {},
"warnings": ""
}
}
}