More resources
Get node status

Get node status#

Get ord and bitcoin node status, returns a json object with the node status info.

Request address#

GET http://{ip}:{port}/api/v1/node/info

Request param#

ParameterTypeDescriptionNotes
btcBooleanThe btc address.[default to null]

Response param#

ParameterTypeDescription
codeIntegerThe response code.
msgStringA message describing the error.
dataObjectIt is a object with the node info.
> ordHeightNumberThe brc20 node height.
> btcChainInfoObjectIt is a object with btc node info.
>> chainStringThe btc network.
>> blocksNumberThe btc node block number.
>> headersNumberThe btc node latest block number.
>> bestblockhashStringThe btc node block hash.
>> difficultyNumberThe btc node difficulty.
>> mediantimeNumberThe btc node median time.
>> verificationprogressNumberThe verification progress.
>> initialblockdownloadStringThe initial block download.
>> chainworkStringThe chainwork.
>> size_on_diskStringThe size_on_disk.
>> prunedStringThe pruned.
>> pruneheightStringThe pruneheight.
>> automatic_pruningStringThe automatic_pruning.
>> prune_target_sizeStringThe prune_target_size.
>> softforksStringThe softforks.
>> warningsStringThe warnings.

Request example#

shell
curl --location --request GET 'http://\{ip\}:\{port\}/api/v1/node/info?btc=true'

Response example#

200
{
    "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": ""
        }
    }
}