Blockchain RPCs

getbestblockhash

Returns the hash of the best (tip) block in the most-work fully-validated chain.

Method: POST

https://dash.nownodes.io

Example body (raw)

{"jsonrpc": "1.0", "id": "curltest", "method": "getbestblockhash", "params": []}

Example response: 200

{
    "result": "000000000000000cab1829b4436458441ba7a1a6aacc3ccdad6faea0c5f97998",
    "error": null,
    "id": "curltest"
}

getblock

If verbosity is 0, returns a string that is serialized, hex-encoded data for block โ€˜hashโ€™.

If verbosity is 1, returns an Object with information about block โ€˜hashโ€™.

If verbosity is 2, returns an Object with information about block โ€˜hashโ€™ and information about each transaction.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getblock",
    "params": [
        "0000000000000030e17fdbc5f0686d5e05572d2529c14f89bc5a54d7ece16733"
    ]
}

Example response: 200

{
    "result": {
        "hash": "0000000000000030e17fdbc5f0686d5e05572d2529c14f89bc5a54d7ece16733",
        "confirmations": 10,
        "height": 2055073,
        "version": 536870912,
        "versionHex": "20000000",
        "merkleroot": "999e3e8f2b800c341eab8dc736cd612c880dd58bbc1827f7ea3efafc5f635480",
        "time": 1713174999,
        "mediantime": 1713174736,
        "nonce": 2003269418,
        "bits": "1933bc23",
        "difficulty": 83017479.65221639,
        "chainwork": "0000000000000000000000000000000000000000000093872576b7d85d38d0c6",
        "nTx": 13,
        "previousblockhash": "000000000000002d2fc1fb5b8c7dabf890f48be7a2d04b182cb0ea8ca572aad4",
        "nextblockhash": "00000000000000265183b50064776a6a85a49e9c08639023625d21d893a15fee",
        "chainlock": true,
        "size": 11721,
        "tx": [
            "5efbfea92d442ba0f7172b9cefb9b181b53bf1b9c7de7b4f8a890092df5ed6ab",
            "0247d12752a640e82a84cacbc19c384284ab39ff9317d68d1bd8a4606c731b5b",
            "b879c6fd17ca42f9512f44c4a87788f7c402f66324937a61840efe339d21fa10",
            "9ec5d2a189de6d0d297a7f839cbf67ea4c0f9eef4105aa162f88dbb616df6d41",
            "80efbf9b8dd40f85b796933b3b0e56d3d78fa502330ca9e2f3da87f639aa5485",
            "a90036d6411f36ad55233c0df4d35108d607f77a9b8c5bfa3353964d8357d885",
            "5dbb53c105dbeeec873bc0786aadcc7091796a26cb69e4f93c5bb083951a3076",
            "d46c837e249d84de419ccc7a48a4a25b2307185b77450f150c7022a9181a02d1",
            "b4cb39c12daa270b0e4e20d5c578c6b1b86bd3694c9b268b4e2956b9ae7df783",
            "c34e2891fc471ad90cd1b59867c8d85af1e6bd41b212b62837ed5ad0d9c22c94",
            "f71665fa72c0a3cf78dc022ed89df81ab5a4db5fdb42b3d041e5e3d5024c1518",
            "e5322362964b9ad98f7d90f5375bac78407481938d7664538e8ea71ac3d30b56",
            "72dae560ec6c26b3141f22f1c247a8ca249c967b9d6dd38b4e6384d6ddb8460d"
        ],
        "cbTx": {
            "version": 3,
            "height": 2055073,
            "merkleRootMNList": "1b92bb97acbd622bead6fc078941c9a4160ecce6fb07f70a448e7d3cd99c52fe",
            "merkleRootQuorums": "70f57681c186be8825a274bd7d83e6bcb82ec25fbbdd9b24e38b6471646624b4",
            "bestCLHeightDiff": 0,
            "bestCLSignature": "8275db1fc5bd839bc02f508b6bcc6a237d5f616636db93e8b176867f48e1c3f53f9c534acee22e4e1295246ef739a9f60612b7f45dbae7116f3b9233767e9af5b024fbd8260a58b6c74b11500a685802fd01e3ef8dacb06a4a5a6408b284ac96",
            "creditPoolBalance": 0.00000000
        }
    },
    "error": null,
    "id": "curltest"
}

getblockchaininfo

Returns an object containing various state info regarding blockchain processing.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getblockchaininfo",
    "params": []
}

Example response: 200

{
    "result": {
        "chain": "main",
        "blocks": 2055083,
        "headers": 2055083,
        "bestblockhash": "000000000000001112acfceeb9a4b6443571601fa158fbcb9c706cd51a940006",
        "difficulty": 83526720.57545964,
        "time": 1713176765,
        "mediantime": 1713176029,
        "verificationprogress": 0.9999999022875147,
        "initialblockdownload": false,
        "chainwork": "00000000000000000000000000000000000000000000938755ebb0e97eab1fce",
        "size_on_disk": 37869943167,
        "pruned": false,
        "softforks": {
            "bip34": {
                "type": "buried",
                "active": true,
                "height": 951
            },
            "bip66": {
                "type": "buried",
                "active": true,
                "height": 245817
            },
            "bip65": {
                "type": "buried",
                "active": true,
                "height": 619382
            },
            "bip147": {
                "type": "buried",
                "active": true,
                "height": 939456
            },
            "csv": {
                "type": "buried",
                "active": true,
                "height": 622944
            },
            "dip0001": {
                "type": "buried",
                "active": true,
                "height": 782208
            },
            "dip0003": {
                "type": "buried",
                "active": true,
                "height": 1028160
            },
            "dip0008": {
                "type": "buried",
                "active": true,
                "height": 1088640
            },
            "dip0020": {
                "type": "buried",
                "active": true,
                "height": 1516032
            },
            "dip0024": {
                "type": "buried",
                "active": true,
                "height": 1737792
            },
            "realloc": {
                "type": "buried",
                "active": true,
                "height": 1374912
            },
            "v19": {
                "type": "buried",
                "active": true,
                "height": 1899072
            },
            "v20": {
                "type": "bip9",
                "bip9": {
                    "status": "active",
                    "start_time": 1700006400,
                    "timeout": 1731628800,
                    "ehf": false,
                    "since": 1987776
                },
                "height": 1987776,
                "active": true
            },
            "mn_rr": {
                "type": "bip9",
                "bip9": {
                    "status": "defined",
                    "start_time": 1704067200,
                    "timeout": 1767225600,
                    "ehf": true,
                    "since": 0
                },
                "active": false
            }
        },
        "warnings": ""
    },
    "error": null,
    "id": "curltest"
}

getblockcount

Returns the height of the most-work fully-validated chain.

The genesis block has height 0.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getblockcount",
    "params": []
}

Example response: 200

{
    "result": 2055083,
    "error": null,
    "id": "curltest"
}

getblockhash

Returns hash of block in best-block-chain at height provided.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getblockhash",
    "params": [
        1000
    ]
}

Example response: 200

{
    "result": "000003a25f2e73e06780808c6be48ef0c5d4592b53ff7d8f43dbefbb66f4c3ab",
    "error": null,
    "id": "curltest"
}

getblockheader

If verbose is false, returns a string that is serialized, hex-encoded data for blockheader โ€˜hashโ€™.

If verbose is true, returns an Object with information about blockheader โ€˜hashโ€™.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getblockheader",
    "params": [
        "0000000000000030e17fdbc5f0686d5e05572d2529c14f89bc5a54d7ece16733"
    ]
}

Example response: 200

{
    "result": {
        "hash": "0000000000000030e17fdbc5f0686d5e05572d2529c14f89bc5a54d7ece16733",
        "confirmations": 11,
        "height": 2055073,
        "version": 536870912,
        "versionHex": "20000000",
        "merkleroot": "999e3e8f2b800c341eab8dc736cd612c880dd58bbc1827f7ea3efafc5f635480",
        "time": 1713174999,
        "mediantime": 1713174736,
        "nonce": 2003269418,
        "bits": "1933bc23",
        "difficulty": 83017479.65221639,
        "chainwork": "0000000000000000000000000000000000000000000093872576b7d85d38d0c6",
        "nTx": 13,
        "previousblockhash": "000000000000002d2fc1fb5b8c7dabf890f48be7a2d04b182cb0ea8ca572aad4",
        "nextblockhash": "00000000000000265183b50064776a6a85a49e9c08639023625d21d893a15fee",
        "chainlock": true
    },
    "error": null,
    "id": "curltest"
}

getblockstats

Compute per block statistics for a given window. All amounts are in satoshis.

It wonโ€™t work for some heights with pruning.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getblockstats",
    "params": [
        1000,
        [
            "minfeerate",
            "avgfeerate"
        ]
    ]
}

Example response: 200

{
    "result": {
        "avgfeerate": 0,
        "minfeerate": 0
    },
    "error": null,
    "id": "curltest"
}

getchaintips

Return information about all known tips in the block tree, including the main chain as well as orphaned branches.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getchaintips",
    "params": []
}

Example response: 200

{
    "result": [
        {
            "height": 2055084,
            "hash": "000000000000002f7fa7d439ba02b6aa9a2de62f584e7d0ad1b52e85e20e8913",
            "difficulty": 85868790.3361038,
            "chainwork": "0000000000000000000000000000000000000000000093875b09f6fe1acaa1db",
            "branchlen": 0,
            "forkpoint": "000000000000002f7fa7d439ba02b6aa9a2de62f584e7d0ad1b52e85e20e8913",
            "status": "active"
        },
        {
            "height": 2053214,
            "hash": "0000000000000011478ee0f275ab2f03662a943a8b87e799952d4002a53967e7",
            "difficulty": 70727834.24979854,
            "chainwork": "00000000000000000000000000000000000000000000935e4f183f7ed1bec914",
            "branchlen": 1,
            "forkpoint": "0000000000000030f66477fa4711014fc6f2b5c8208c7188ef6530849d071d6b",
            "status": "valid-headers"
        },
        {
            "height": 2052603,
            "hash": "000000000000002150499611f4de352e441d9cfead617da92c883738cb9ca518",
            "difficulty": 103604632.1591209,
            "chainwork": "00000000000000000000000000000000000000000000935072ce22b9a44bebd5",
            "branchlen": 1,
            "forkpoint": "0000000000000016b8c22ffa3925d6e653730308fa794fe5195fe55d2c2e6a0c",
            "status": "valid-headers"
        },
        {
            "height": 2051010,
            "hash": "0000000000000027d5eda8a4d85367bf4a2125f54d5f91f2a78ab3319be35622",
            "difficulty": 82400128.61712328,
            "chainwork": "000000000000000000000000000000000000000000009326e8744f9306aa2eae",
            "branchlen": 1,
            "forkpoint": "000000000000000f430081b772a87a2506b1808d86fab48963ae036bcca116d4",
            "status": "valid-headers"
        },
        {
            "height": 2049659,
            "hash": "00000000000000094e8b08b2d25eea492dd7f531345c29bc1da6bb676904a20b",
            "difficulty": 107651915.6362279,
            "chainwork": "000000000000000000000000000000000000000000009302c1ff2efced48590f",
            "branchlen": 1,
            "forkpoint": "000000000000001e338ac0905e500807a9af041f4db1a34d3fcf984b72421f09",
            "status": "valid-headers"
        },
        {
            "height": 2049233,
            "hash": "00000000000000081e8747a0dd7c8ba281ff47f884708ddbee6c86cebe7fe024",
            "difficulty": 59911445.64952049,
            "chainwork": "0000000000000000000000000000000000000000000092f7de60e69cb6347a2c",
            "branchlen": 1,
            "forkpoint": "000000000000000e4b0e6792318d87e058bc32ed81cadecf6b568b4c0ff4699f",
            "status": "valid-headers"
        },
...

getchaintxstats

Compute statistics about the total number and rate of transactions in the chain.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getchaintxstats",
    "params": [
        2016
    ]
}

Example response: 200

{
    "result": {
        "time": 1713176955,
        "txcount": 52355983,
        "window_final_block_hash": "00000000000000295af5b1a736fea795ed260d940c27e1438de2d8b1027ea9db",
        "window_final_block_height": 2055085,
        "window_block_count": 2016,
        "window_tx_count": 43726,
        "window_interval": 317463,
        "txrate": 0.1377357361330297
    },
    "error": null,
    "id": "curltest"
}

getdifficulty

Returns the proof-of-work difficulty as a multiple of the minimum difficulty.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getdifficulty",
    "params": []
}

Example response: 200

{
    "result": 88799100.28887479,
    "error": null,
    "id": "curltest"
}

getmempoolancestors

If txid is in the mempool, returns all in-mempool ancestors.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getmempoolancestors",
    "params": [
        "mytxid"
    ]
}

Example response: 200

{
    "result": null,
    "error": {
        "code": -8,
        "message": "parameter 1 must be of length 64 (not 6, for 'mytxid')"
    },
    "id": "curltest"
}

getmempooldescendants

If txid is in the mempool, returns all in-mempool descendants.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getmempooldescendants",
    "params": [
        "mytxid"
    ]
}

Example response: 200

{
    "result": null,
    "error": {
        "code": -8,
        "message": "parameter 1 must be of length 64 (not 6, for 'mytxid')"
    },
    "id": "curltest"
}

getmempoolentry

Returns mempool data for given transaction

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getmempoolentry",
    "params": [
        "mytxid"
    ]
}

Example response: 200

{
    "result": null,
    "error": {
        "code": -8,
        "message": "parameter 1 must be of length 64 (not 6, for 'mytxid')"
    },
    "id": "curltest"
}

getmempoolinfo

Returns details on the active state of the TX memory pool.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getmempoolinfo",
    "params": []
}

Example response: 200

{
    "result": {
        "loaded": true,
        "size": 18,
        "bytes": 17129,
        "usage": 45104,
        "total_fee": 0.00063706,
        "maxmempool": 2000000000,
        "mempoolminfee": 0.00001000,
        "minrelaytxfee": 0.00001000,
        "instantsendlocks": 18,
        "unbroadcastcount": 0
    },
    "error": null,
    "id": "curltest"
}

getrawmempool

Returns all transaction ids in memory pool as a json array of string transaction ids.

Hint: use getmempoolentry to fetch a specific transaction from the mempool.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getrawmempool",
    "params": [
        true
    ]
}

Example response: 200

{
    "result": {
        "ab354105fa515c81d260b00480b7ae0db41dacd7d28d8349ea4a89a44645edb9": {
            "fees": {
                "base": 0.00000000,
                "modified": 0.10000000,
                "ancestor": 0.10000000,
                "descendant": 0.10000000
            },
            "vsize": 1277,
            "fee": 0.00000000,
            "modifiedfee": 0.10000000,
            "time": 1713177239,
            "height": 2055087,
            "descendantcount": 1,
            "descendantsize": 1277,
            "descendantfees": 10000000,
            "ancestorcount": 1,
            "ancestorsize": 1277,
            "ancestorfees": 10000000,
            "depends": [],
            "spentby": [],
            "instantlock": "true",
            "unbroadcast": false
        },
        "bfaf756c08f0dd8c205b934c5a90356e6b06c245aefa526401fed650f1fee452": {
            "fees": {
                "base": 0.00000374,
                "modified": 0.00000374,
                "ancestor": 0.00000374,
                "descendant": 0.00000374
            },
            "vsize": 374,
            "fee": 0.00000374,
            "modifiedfee": 0.00000374,
            "time": 1713177244,
            "height": 2055087,
            "descendantcount": 1,
            "descendantsize": 374,
            "descendantfees": 374,
            "ancestorcount": 1,
            "ancestorsize": 374,
            "ancestorfees": 374,
            "depends": [],
            "spentby": [],
            "instantlock": "true",
            "unbroadcast": false
        },
...

gettxout

Returns details about an unspent transaction output.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "gettxout",
    "params": [
        "5efbfea92d442ba0f7172b9cefb9b181b53bf1b9c7de7b4f8a890092df5ed6ab",
        1
    ]
}

Example response: 200

{
    "result": {
        "bestblock": "00000000000000222830eb29502be0878c157fb63180135a30de8e55771c08a7",
        "confirmations": 16,
        "value": 1.53991785,
        "scriptPubKey": {
            "asm": "OP_DUP OP_HASH160 b0d43f7eb7d21b43fae7b86c9b3cbfce23ba9768 OP_EQUALVERIFY OP_CHECKSIG",
            "hex": "76a914b0d43f7eb7d21b43fae7b86c9b3cbfce23ba976888ac",
            "reqSigs": 1,
            "type": "pubkeyhash",
            "addresses": [
                "Xroq2GSk1WUTiUx1dNPz3uJ5ruwWuDJL69"
            ]
        },
        "coinbase": true
    },
    "error": null,
    "id": "curltest"
}

gettxoutproof

Returns a hex-encoded proof that โ€œtxidโ€ was included in a block.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "gettxoutproof",
    "params": [
        [
            "5efbfea92d442ba0f7172b9cefb9b181b53bf1b9c7de7b4f8a890092df5ed6ab",
            "0247d12752a640e82a84cacbc19c384284ab39ff9317d68d1bd8a4606c731b5b"
        ],
        null
    ]
}

Example response: 200

{
    "result": "00000020d4aa72a58ceab02c184bd0a2e78bf490f8ab7d8c5bfbc12f2d000000000000008054635ffcfa3eeaf72718bc8bd50d882c61cd36c78dab1e340c802b8f3e9e99d7f91c6623bc33192a7767770d00000005abd65edf9200898a4f7bdec7b9f13bb581b1b9ef9c2b17f7a02b442da9fefb5e5b1b736c60a4d81b8dd61793ff39ab8442389cc1cbca842ae840a65227d14702a4ace793232498f2b30996f1f14a997d95c3bcfedb780e4faaa4a367d775a2cb3d4159c28a0f82381bb9d5384d2d324c6baea8837c392872458d63acc0ff1d1ef327fe37bf7a282e1d57a5a11bf1006638bf9ca0c25ad4aa2aa0f9faeaec75f2023f00",
    "error": null,
    "id": "curltest"
}

preciousblock

Treats a block as if it were received before others with the same work.

A later preciousblock call can override the effect of an earlier one.

The effects of preciousblock are not retained across restarts.

Method: POST

https://dash.nownodes.io

Example body (raw)

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "preciousblock",
    "params": [
        "0000000000000030e17fdbc5f0686d5e05572d2529c14f89bc5a54d7ece16733"
    ]
}

Example response: 200

{
    "result": null,
    "error": null,
    "id": "curltest"
}

Last updated