Requests#
GET Block#
The GET block operation gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
Request
GET /block/<hash>.<format>
Parameter #1—the header hash of the block to retrieve
Name |
Type |
Presence |
Description |
|---|---|---|---|
Header Hash |
path (hex) |
Required |
The hash of the header of the block to get, encoded as hex in RPC byte order |
Parameter #2—the output format
Name |
Type |
Presence |
Description |
|---|---|---|---|
Format |
suffix |
Required |
Set to |
Response as JSON
Name |
Type |
Presence |
Description |
|---|---|---|---|
Result |
object |
Required |
An object containing the requested block |
→ |
string (hex) |
Required |
The hash of this block’s block header encoded as hex in RPC byte order. This is the same as the hash provided in parameter #1 |
→ |
number (int) |
Required |
The number of confirmations the transactions in this block have, starting at 1 when this block is at the tip of the best block chain. This score will be -1 if the the block is not part of the best block chain |
→ |
number (int) |
Required |
The height of this block on its block chain |
→ |
number (int) |
Required |
This block’s version number. See block version numbers |
→ |
string (hex) |
Required |
This block’s version number formatted in hexadecimal |
→ |
string (hex) |
Required |
The merkle root for this block, encoded as hex in RPC byte order |
→ |
number (int) |
Required |
The value of the time field in the block header, indicating approximately when the block was created |
→ |
number (int) |
Required |
Added in Bitcoin Core 0.12.0 |
→ |
number (int) |
Required |
The nonce which was successful at turning this particular block into one that could be added to the best block chain |
→ |
string (hex) |
Required |
The value of the nBits field in the block header, indicating the target threshold this block’s header had to pass |
→ |
number (real) |
Required |
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0 |
→ |
string (hex) |
Required |
The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex |
→ |
number (int) |
Required |
The number of transactions in the block |
→ |
string (hex) |
Optional |
The hash of the header of the previous block, encoded as hex in RPC byte order. Not returned for genesis block |
→ |
string (hex) |
Optional |
The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order |
→ |
bool |
Required |
If set to |
→ |
number (int) |
Required |
The size of this block in serialized block format, counted in bytes |
→ |
array |
Required |
An array containing all transactions in this block. The transactions appear in the array in the same order they appear in the serialized block |
→ → |
object |
Required |
An object describing a particular transaction within this block |
→ → → |
string (hex) |
Required |
The transaction’s TXID encoded as hex in RPC byte order |
→ → → |
number (int) |
Required |
Added in Bitcoin Core 0.12.0 |
→ → → |
number (int) |
Required |
The transaction format version number |
→ → → |
number (int) |
Required |
Added in Dash Core 0.13.0.0 |
→ → → |
number (int) |
Required |
The transaction’s locktime: either a Unix epoch date or block height; see the locktime parsing rules |
→ → → |
array |
Required |
An array of objects with each object being an input vector (vin) for this transaction. Input objects will have the same order within the array as they have in the transaction, so the first input listed will be input 0 |
→ → → → |
object |
Required |
An object describing one of this transaction’s inputs. May be a regular input or a coinbase |
→ → → → → |
string |
Optional |
The TXID of the outpoint being spent, encoded as hex in RPC byte order. Not present if this is a coinbase transaction |
→ → → → → |
number (int) |
Optional |
The output index number (vout) of the outpoint being spent. The first output in a transaction has an index of |
→ → → → → |
object |
Optional |
An object describing the signature script of this input. Not present if this is a coinbase transaction |
→ → → → → → |
string |
Required |
The signature script in decoded form with non-data-pushing opcodes listed |
→ → → → → → |
string (hex) |
Required |
The signature script encoded as hex |
→ → → → → |
string (hex) |
Optional |
The coinbase (similar to the hex field of a scriptSig) encoded as hex. Only present if this is a coinbase transaction |
→ → → → → |
object |
Optional |
The output being spent. Only present if block undo data is available. Not present if this is a coinbase transaction |
→ → → → → → |
bool |
Required |
Whether the output being spent is a coinbase output |
→ → → → → → |
number (int) |
Required |
The height of the block containing the output being spent |
→ → → → → → |
number (Dash) |
Required |
The value of the output being spent in DASH |
→ → → → → → |
object |
Required |
An object describing the pubkey script of the output being spent |
→ → → → → → → |
string |
Required |
The pubkey script in decoded form with non-data-pushing opcodes listed |
→ → → → → → → |
string |
Required |
Inferred descriptor for the output |
→ → → → → → → |
string (hex) |
Required |
The pubkey script encoded as hex |
→ → → → → → → |
string |
Required |
The type of script. This will be one of the following: |
→ → → → → → → |
string |
Optional |
Dash address (only if a well-defined address exists) |
→ → → → → |
number (int) |
Required |
The input sequence number |
→ → → |
array |
Required |
An array of objects each describing an output vector (vout) for this transaction. Output objects will have the same order within the array as they have in the transaction, so the first output listed will be output 0 |
→ → → → |
object |
Required |
An object describing one of this transaction’s outputs |
→ → → → → |
number (Dash) |
Required |
The number of Dash paid to this output. May be |
→ → → → → |
number (duffs) |
Required |
The number of duffs paid to this output. May be |
→ → → → → |
number (int) |
Required |
The output index number of this output within this transaction |
→ → → → → |
object |
Required |
An object describing the pubkey script |
→ → → → → → |
string |
Required |
The pubkey script in decoded form with non-data-pushing opcodes listed |
→ → → → → → |
string |
Required |
Inferred descriptor for the output |
→ → → → → → |
string (hex) |
Required |
The pubkey script encoded as hex |
→ → → → → → |
string |
Required |
The type of script. This will be one of the following: |
→ → → → → → |
string |
Optional |
Dash address (only if a well-defined address exists) |
→ → → |
number (int) |
Optional |
Added in Dash Core 0.13.0.0 |
→ → → |
string (hex) |
Optional |
Added in Dash Core 0.13.0.0 |
→ → → |
object |
Optional |
The decoded Coinbase special transaction (CbTx) payload, with the same fields as the block’s |
→ → → |
string (hex) |
Optional |
Added in Dash Core 24.0.0 |
→ → → |
number (Dash) |
Optional |
The transaction fee in DASH. Not present for the coinbase transaction or if block undo data is not available |
→ → → |
string (hex) |
Required |
The serialized, hex-encoded data for the transaction |
→ → → |
bool |
Required |
If set to |
→ → → |
bool |
Required |
If set to |
→ |
object |
Optional |
Coinbase special transaction details. Only present if the block’s coinbase transaction is a Coinbase special transaction (CbTx) |
→ → |
number (int) |
Required |
The version of the Coinbase special transaction (CbTx) |
→ → |
number (int) |
Required |
The height of this block on its block chain |
→ → |
string (hex) |
Required |
The merkle root for the masternode list |
→ → |
string (hex) |
Optional |
The merkle root for the quorum list |
→ → |
number (int) |
Optional |
Blocks between the current block and the last known block with a ChainLock |
→ → |
string (hex) |
Optional |
Best ChainLock signature known by the miner |
→ → |
number (real) |
Optional |
Balance in the Platform credit pool |
→ → |
string (hex) |
Optional |
Added in Dash Core 24.0.0 |
Examples from Dash Core 24.0.0
Request a block in hex-encoded serialized block format:
curl http://localhost:19898/rest/block/7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79.hex
Result (wrapped):
000000209845c5e39b8d98c7094801cbb0fa27ba6ddb110d00cbf20a1aef1e35\
44f9b255036f309b40326518781c29a054f83d68e3ca73b9c685edc19f849de3\
3dbdf3b77e1b5769ffff7f200000000002030005000100000000000000000000\
00000000000000000000000000000000000000000000ffffffff016affffffff\
023fe8ec0f000000001976a91432ae99679ea84309f80373691cf2bb7b0da9ae\
1688ac374e3b0600000000016a00000000af03005e0200000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000010655c9d040000\
000200000001fdd454572780af673f0c39335cf2f6db997ca0d55c0606d765cf\
6303ad091709000000006a47304402206465db43706bd35b1ced14e27b89ecc2\
ad939bb04fd7f644e74d322ef5c553b7022022069e76134796df3a006d6c18d9\
4ff75cbb4165508211914d41b3ea0e6122cc012102cde88a8b67f85aa08dfaf0\
c10714d5af431b8909ea5a2da4551584e3533b621bffffffff0200ca9a3b0000\
00001976a914db91347da1e3fc25608b441994027847f489191b88ac18a6a068\
0b0000001976a91432ae99679ea84309f80373691cf2bb7b0da9ae1688ac0000\
0000
Get the same block in JSON:
curl http://localhost:19898/rest/block/7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79.json
Result (whitespace added):
{
"hash": "7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79",
"confirmations": 5,
"height": 606,
"version": 536870912,
"versionHex": "20000000",
"merkleroot": "b7f3bd3de39d849fc1ed85c6b973cae3683df854a0291c78186532409b306f03",
"time": 1767316350,
"mediantime": 1767315600,
"nonce": 0,
"bits": "207fffff",
"difficulty": 4.656542373906925e-10,
"chainwork": "00000000000000000000000000000000000000000000000000000000000004be",
"nTx": 2,
"previousblockhash": "55b2f944351eef1a0af2cb000d11db6dba27fab0cb014809c7988d9be3c54598",
"nextblockhash": "54a630f248fa9cd8b7dd7ddddf5e74b7d91de5d168c6708656fd85b182b516e4",
"chainlock": false,
"size": 578,
"tx": [
{
"txid": "d4a330e14742feb8f38947ffd9eea12a5bba3301513c94ef60a5b76a1bed0cc6",
"version": 3,
"type": 5,
"size": 272,
"locktime": 0,
"vin": [
{
"coinbase": "6a",
"sequence": 4294967295
}
],
"vout": [
{
"value": 2.67184191,
"valueSat": 267184191,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 32ae99679ea84309f80373691cf2bb7b0da9ae16 OP_EQUALVERIFY OP_CHECKSIG",
"desc": "addr(yQwRoAN7nzz1rbjq5oyt3d5gpyqChMEn3x)#73ua6uzw",
"hex": "76a91432ae99679ea84309f80373691cf2bb7b0da9ae1688ac",
"address": "yQwRoAN7nzz1rbjq5oyt3d5gpyqChMEn3x",
"type": "pubkeyhash"
}
},
{
"value": 1.04549943,
"valueSat": 104549943,
"n": 1,
"scriptPubKey": {
"asm": "OP_RETURN",
"desc": "raw(6a)#4mhr9ur5",
"hex": "6a",
"type": "nulldata"
}
}
],
"extraPayloadSize": 175,
"extraPayload": "03005e020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010655c9d04000000",
"cbTx": {
"version": 3,
"height": 606,
"merkleRootMNList": "0000000000000000000000000000000000000000000000000000000000000000",
"merkleRootQuorums": "0000000000000000000000000000000000000000000000000000000000000000",
"bestCLHeightDiff": 0,
"bestCLSignature": "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"creditPoolBalance": 198.19947280
},
"hex": "03000500010000000000000000000000000000000000000000000000000000000000000000ffffffff016affffffff023fe8ec0f000000001976a91432ae99679ea84309f80373691cf2bb7b0da9ae1688ac374e3b0600000000016a00000000af03005e020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010655c9d04000000",
"instantlock": false,
"instantlock_internal": false
},
{
"txid": "2d527d1ca1900100c40b41d1881afb6a07888373e03ff7be0420960005b6f648",
"version": 2,
"type": 0,
"size": 225,
"locktime": 0,
"vin": [
{
"txid": "091709ad0363cf65d706065cd5a07c99dbf6f25c33390c3f67af80275754d4fd",
"vout": 0,
"scriptSig": {
"asm": "304402206465db43706bd35b1ced14e27b89ecc2ad939bb04fd7f644e74d322ef5c553b7022022069e76134796df3a006d6c18d94ff75cbb4165508211914d41b3ea0e6122cc[ALL] 02cde88a8b67f85aa08dfaf0c10714d5af431b8909ea5a2da4551584e3533b621b",
"hex": "47304402206465db43706bd35b1ced14e27b89ecc2ad939bb04fd7f644e74d322ef5c553b7022022069e76134796df3a006d6c18d94ff75cbb4165508211914d41b3ea0e6122cc012102cde88a8b67f85aa08dfaf0c10714d5af431b8909ea5a2da4551584e3533b621b"
},
"prevout": {
"generated": true,
"height": 1,
"value": 500.00000000,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 32ae99679ea84309f80373691cf2bb7b0da9ae16 OP_EQUALVERIFY OP_CHECKSIG",
"desc": "addr(yQwRoAN7nzz1rbjq5oyt3d5gpyqChMEn3x)#73ua6uzw",
"hex": "76a91432ae99679ea84309f80373691cf2bb7b0da9ae1688ac",
"address": "yQwRoAN7nzz1rbjq5oyt3d5gpyqChMEn3x",
"type": "pubkeyhash"
}
},
"sequence": 4294967295
}
],
"vout": [
{
"value": 10.00000000,
"valueSat": 1000000000,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 db91347da1e3fc25608b441994027847f489191b OP_EQUALVERIFY OP_CHECKSIG",
"desc": "addr(ygLQnEhtRv9LiQAfjzvURpUiEXLK9xei6f)#e0zk9xr6",
"hex": "76a914db91347da1e3fc25608b441994027847f489191b88ac",
"address": "ygLQnEhtRv9LiQAfjzvURpUiEXLK9xei6f",
"type": "pubkeyhash"
}
},
{
"value": 489.99999000,
"valueSat": 48999999000,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 32ae99679ea84309f80373691cf2bb7b0da9ae16 OP_EQUALVERIFY OP_CHECKSIG",
"desc": "addr(yQwRoAN7nzz1rbjq5oyt3d5gpyqChMEn3x)#73ua6uzw",
"hex": "76a91432ae99679ea84309f80373691cf2bb7b0da9ae1688ac",
"address": "yQwRoAN7nzz1rbjq5oyt3d5gpyqChMEn3x",
"type": "pubkeyhash"
}
}
],
"fee": 0.00001000,
"hex": "0200000001fdd454572780af673f0c39335cf2f6db997ca0d55c0606d765cf6303ad091709000000006a47304402206465db43706bd35b1ced14e27b89ecc2ad939bb04fd7f644e74d322ef5c553b7022022069e76134796df3a006d6c18d94ff75cbb4165508211914d41b3ea0e6122cc012102cde88a8b67f85aa08dfaf0c10714d5af431b8909ea5a2da4551584e3533b621bffffffff0200ca9a3b000000001976a914db91347da1e3fc25608b441994027847f489191b88ac18a6a0680b0000001976a91432ae99679ea84309f80373691cf2bb7b0da9ae1688ac00000000",
"instantlock": false,
"instantlock_internal": false
}
],
"cbTx": {
"version": 3,
"height": 606,
"merkleRootMNList": "0000000000000000000000000000000000000000000000000000000000000000",
"merkleRootQuorums": "0000000000000000000000000000000000000000000000000000000000000000",
"bestCLHeightDiff": 0,
"bestCLSignature": "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"creditPoolBalance": 198.19947280
}
}
See also
GET Block/NoTxDetails gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block. The JSON object includes TXIDs for transactions within the block rather than the complete transactions GET block returns.
GetBestBlockHash RPC: returns the header hash of the most recent block on the best block chain.
GetBlock RPC: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
GetBlockHash RPC: returns the header hash of a block at the given height in the local best block chain.
GET Block/NoTxDetails#
The GET block/notxdetails operation gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block. The JSON object includes TXIDs for transactions within the block rather than the complete transactions GET block returns.
Request
GET /block/notxdetails/<hash>.<format>
Parameter #1—the header hash of the block to retrieve
Name |
Type |
Presence |
Description |
|---|---|---|---|
Header Hash |
path (hex) |
Required |
The hash of the header of the block to get, encoded as hex in RPC byte order |
Parameter #2—the output format
Name |
Type |
Presence |
Description |
|---|---|---|---|
Format |
suffix |
Required |
Set to |
Response as JSON
Name |
Type |
Presence |
Description |
|---|---|---|---|
Result |
object |
Required |
An object containing the requested block |
→ |
string (hex) |
Required |
The hash of this block’s block header encoded as hex in RPC byte order. This is the same as the hash provided in parameter #1 |
→ |
number (int) |
Required |
The number of confirmations the transactions in this block have, starting at 1 when this block is at the tip of the best block chain. This score will be -1 if the the block is not part of the best block chain |
→ |
number (int) |
Required |
The height of this block on its block chain |
→ |
number (int) |
Required |
This block’s version number. See block version numbers |
→ |
string (hex) |
Required |
Added in Bitcoin Core 0.13.0 |
→ |
string (hex) |
Required |
The merkle root for this block, encoded as hex in RPC byte order |
→ |
number (int) |
Required |
The value of the time field in the block header, indicating approximately when the block was created |
→ |
number (int) |
Required |
Added in Bitcoin Core 0.12.0 |
→ |
number (int) |
Required |
The nonce which was successful at turning this particular block into one that could be added to the best block chain |
→ |
string (hex) |
Required |
The value of the nBits field in the block header, indicating the target threshold this block’s header had to pass |
→ |
number (real) |
Required |
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0 |
→ |
string (hex) |
Required |
The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex |
→ |
number (int) |
Required |
The number of transactions in the block |
→ |
string (hex) |
Optional |
The hash of the header of the previous block, encoded as hex in RPC byte order. Not returned for genesis block |
→ |
string (hex) |
Optional |
The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order |
→ |
bool |
Required |
If set to |
→ |
number (int) |
Required |
The size of this block in serialized block format, counted in bytes |
→ |
array |
Required |
An array containing the TXIDs of all transactions in this block. The transactions appear in the array in the same order they appear in the serialized block |
→ → |
string (hex) |
Required |
The TXID of a transaction in this block, encoded as hex in RPC byte order |
→ |
object |
Optional |
Coinbase special transaction details. Only present if the block’s coinbase transaction is a Coinbase special transaction (CbTx) |
→ → |
number (int) |
Required |
The version of the Coinbase special transaction (CbTx) |
→ → |
number (int) |
Required |
The height of this block on its block chain |
→ → |
string (hex) |
Required |
The merkle root for the masternode list |
→ → |
string (hex) |
Optional |
The merkle root for the quorum list |
→ → |
number (int) |
Optional |
Blocks between the current block and the last known block with a ChainLock |
→ → |
string (hex) |
Optional |
Best ChainLock signature known by the miner |
→ → |
number (real) |
Optional |
Balance in the Platform credit pool |
→ → |
string (hex) |
Optional |
Added in Dash Core 24.0.0 |
Examples from Dash Core 24.0.0
Request a block in hex-encoded serialized block format:
curl http://localhost:19898/rest/block/notxdetails/7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79.hex
Result (wrapped):
000000209845c5e39b8d98c7094801cbb0fa27ba6ddb110d00cbf20a1aef1e35\
44f9b255036f309b40326518781c29a054f83d68e3ca73b9c685edc19f849de3\
3dbdf3b77e1b5769ffff7f200000000002030005000100000000000000000000\
00000000000000000000000000000000000000000000ffffffff016affffffff\
023fe8ec0f000000001976a91432ae99679ea84309f80373691cf2bb7b0da9ae\
1688ac374e3b0600000000016a00000000af03005e0200000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000000000000000000000010655c9d040000\
000200000001fdd454572780af673f0c39335cf2f6db997ca0d55c0606d765cf\
6303ad091709000000006a47304402206465db43706bd35b1ced14e27b89ecc2\
ad939bb04fd7f644e74d322ef5c553b7022022069e76134796df3a006d6c18d9\
4ff75cbb4165508211914d41b3ea0e6122cc012102cde88a8b67f85aa08dfaf0\
c10714d5af431b8909ea5a2da4551584e3533b621bffffffff0200ca9a3b0000\
00001976a914db91347da1e3fc25608b441994027847f489191b88ac18a6a068\
0b0000001976a91432ae99679ea84309f80373691cf2bb7b0da9ae1688ac0000\
0000
Get the same block in JSON:
curl http://localhost:19898/rest/block/notxdetails/7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79.json
Result (whitespace added):
{
"hash": "7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79",
"confirmations": 5,
"height": 606,
"version": 536870912,
"versionHex": "20000000",
"merkleroot": "b7f3bd3de39d849fc1ed85c6b973cae3683df854a0291c78186532409b306f03",
"time": 1767316350,
"mediantime": 1767315600,
"nonce": 0,
"bits": "207fffff",
"difficulty": 4.656542373906925e-10,
"chainwork": "00000000000000000000000000000000000000000000000000000000000004be",
"nTx": 2,
"previousblockhash": "55b2f944351eef1a0af2cb000d11db6dba27fab0cb014809c7988d9be3c54598",
"nextblockhash": "54a630f248fa9cd8b7dd7ddddf5e74b7d91de5d168c6708656fd85b182b516e4",
"chainlock": false,
"size": 578,
"tx": [
"d4a330e14742feb8f38947ffd9eea12a5bba3301513c94ef60a5b76a1bed0cc6",
"2d527d1ca1900100c40b41d1881afb6a07888373e03ff7be0420960005b6f648"
],
"cbTx": {
"version": 3,
"height": 606,
"merkleRootMNList": "0000000000000000000000000000000000000000000000000000000000000000",
"merkleRootQuorums": "0000000000000000000000000000000000000000000000000000000000000000",
"bestCLHeightDiff": 0,
"bestCLSignature": "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"creditPoolBalance": 198.19947280
}
}
See also
GET Block: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
GetBlock RPC: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
GetBlockHash RPC: returns the header hash of a block at the given height in the local best block chain.
GetBestBlockHash RPC: returns the header hash of the most recent block on the best block chain.
GET BlockFilter#
The GET blockfilter operation gets the BIP157 compact block filter for a block either as a JSON object or as a serialized filter. Requires the -blockfilterindex Dash Core command-line/configuration-file parameter to be enabled (masternodes enable it automatically).
Request
GET /blockfilter/<filtertype>/<hash>.<format>
Parameter #1—the filter type
Name |
Type |
Presence |
Description |
|---|---|---|---|
Filter Type |
path (string) |
Required |
The type of filter to get. Only |
Parameter #2—the header hash of the block
Name |
Type |
Presence |
Description |
|---|---|---|---|
Header Hash |
path (hex) |
Required |
The hash of the header of the block whose filter to get, encoded as hex in RPC byte order. A hash not found in the local block index returns HTTP 404 with |
Parameter #3—the output format
Name |
Type |
Presence |
Description |
|---|---|---|---|
Format |
suffix |
Required |
Set to |
Response as JSON
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
object |
Required |
An object containing the block filter |
→ |
string (hex) |
Required |
The hex-encoded filter data |
Examples from Dash Core 24.0.2
Request the basic filter for a block in hex-encoded serialized format:
curl http://localhost:19898/rest/blockfilter/basic/7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79.hex
Result (wrapped):
00798b062ea8524b1b17c52d9ce38da7819f78c6f62b452c263292038e7069b8\
7e0702c777e41ff9c0
Get the same filter in JSON:
curl http://localhost:19898/rest/blockfilter/basic/7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79.json
Result (whitespace added):
{
"filter": "02c777e41ff9c0"
}
See also
GET BlockFilterHeaders gets the compact block filter headers for a range of blocks.
GetBlockFilter RPC: retrieves a BIP157 content filter for a particular block.
GET BlockFilterHeaders#
The GET blockfilterheaders operation returns the BIP157 compact block filter headers for a specified amount of blocks in upward direction, either as a JSON array or serialized. Requires the -blockfilterindex Dash Core command-line/configuration-file parameter to be enabled (masternodes enable it automatically).
Request
GET /blockfilterheaders/<filtertype>/<hash>.<format>?count=<count>
The older GET /blockfilterheaders/<filtertype>/<count>/<hash>.<format> form is deprecated but still supported.
Parameter #1—the filter type
Name |
Type |
Presence |
Description |
|---|---|---|---|
Filter Type |
path (string) |
Required |
The type of filter to use. Only |
Parameter #2—the header hash of the first block
Name |
Type |
Presence |
Description |
|---|---|---|---|
Header Hash |
path (hex) |
Required |
The hash of the header of the first block whose filter header to get, encoded as hex in RPC byte order |
Parameter #3—the output format
Name |
Type |
Presence |
Description |
|---|---|---|---|
Format |
suffix |
Required |
Set to |
Parameter #4—the amount of filter headers to retrieve
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
query (int) |
Optional |
The amount of filter headers in upward direction to return, starting with the filter header of the requested block. Default: |
Response as JSON
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
array |
Required |
An array containing the requested filter headers |
→ |
string (hex) |
Optional |
A filter header, encoded as hex in RPC byte order. The array contains the amount of filter headers requested with |
Examples from Dash Core 24.0.2
Request 2 filter headers in hex-encoded serialized format:
curl "http://localhost:19898/rest/blockfilterheaders/basic/7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79.hex?count=2"
Result (wrapped):
d42e01b64f76ecb51cd354098d21d3ff483c219e1bf1b148f397db0bde48afa7\
4f3a98c5abab7b241bb0ecbee79be7c6e18ebd11c1f1c6fc1de97b11d0369ace
Get the same filter headers in JSON:
curl "http://localhost:19898/rest/blockfilterheaders/basic/7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79.json?count=2"
Result (whitespace added):
[
"a7af48de0bdb97f348b1f11b9e213c48ffd3218d0954d31cb5ec764fb6012ed4",
"ce9a36d0117be91dfcc6f1c111bd8ee1c6e79be7beecb01b247bababc5983a4f"
]
See also
GET BlockFilter gets the compact block filter for a block.
GetBlockFilter RPC: retrieves a BIP157 content filter for a particular block.
GET BlockHashByHeight#
The GET blockhashbyheight operation returns the hash of a block in best-block-chain at the height provided. The hash can be returned as a JSON object or serialized as binary or hex.
Request
GET /blockhashbyheight/<height>.<format>
Parameter #1—the header hash of the block to retrieve
Name |
Type |
Presence |
Description |
|---|---|---|---|
Block Height |
number (int) |
Required |
The height of the block hash to get |
Parameter #2—the output format
Name |
Type |
Presence |
Description |
|---|---|---|---|
Format |
suffix |
Required |
Set to |
Response as JSON
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
object |
Required |
An object containing the block hash for the requested height |
→ |
string |
Required |
Block hash for the requested height |
Examples from Dash Core 24.0.0
Request a block hash in hex-encoded serialized block hash format:
curl http://localhost:19898/rest/blockhashbyheight/606.hex
Result:
7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79
Get the same block hash in JSON:
curl http://localhost:19898/rest/blockhashbyheight/606.json
Result:
{
"blockhash": "7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79"
}
See also
GetBlockHash RPC: returns the header hash of a block at the given height in the local best block chain.
GET ChainInfo#
The GET chaininfo operation returns information about the current state of the block chain. Supports only json as output format.
Request
GET /chaininfo.json
Parameters: none
Response as JSON
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
object |
Required |
Information about the current state of the local block chain |
→ |
string |
Required |
The name of the block chain. One of |
→ |
number (int) |
Required |
The number of validated blocks in the local best block chain. For a new node with just the hardcoded genesis block, this will be 0 |
→ |
number (int) |
Required |
The number of validated headers in the local best headers chain. For a new node with just the hardcoded genesis block, this will be zero. This number may be higher than the number of blocks |
→ |
string (hex) |
Required |
The hash of the header of the highest validated block in the best block chain, encoded as hex in RPC byte order. This is identical to the string returned by the |
→ |
number (real) |
Required |
The difficulty of the highest-height block in the best block chain |
→ |
number (int) |
Required |
The block time of the highest-height block in the best block chain, expressed in Unix epoch time |
→ |
number (int) |
Required |
Added in Bitcoin Core 0.12.0 |
→ |
number (real) |
Required (exactly 1) |
Estimate of what percentage of the block chain transactions have been verified so far, starting at 0.0 and increasing to 1.0 for fully verified. May slightly exceed 1.0 when fully synced to account for transactions in the memory pool which have been verified before being included in a block |
→ |
bool |
Required |
An estimate of whether this node is in Initial Block Download mode (debug information) |
→ |
string (hex) |
Required |
The estimated number of block header hashes checked from the genesis block to this block, encoded as big-endian hex |
→ |
number (int) |
Required |
The estimated size of the block and undo files on disk, in bytes |
→ |
bool |
Required |
Indicates if the blocks are subject to pruning |
→ |
number (int) |
Optional |
The lowest-height complete block stored if pruning is activated |
→ |
bool |
Optional |
Whether automatic pruning is enabled ( |
→ |
number (int) |
Optional |
The target size used by pruning, in bytes. Only present if automatic pruning is enabled |
→ |
object |
Optional |
Deprecated in Dash Core 24.0.0 |
→ |
string |
Required |
Any network and blockchain warnings |
Examples from Dash Core 24.0.0
Get blockchain info in JSON:
curl http://localhost:19898/rest/chaininfo.json
Result (whitespace added):
{
"chain": "regtest",
"blocks": 610,
"headers": 610,
"bestblockhash": "3990ef757c54a2866029c56f693797e78c426e7c47afbc102902a2d12c54efe9",
"difficulty": 4.656542373906925e-10,
"time": 1767316950,
"mediantime": 1767316200,
"verificationprogress": 1,
"initialblockdownload": false,
"chainwork": "00000000000000000000000000000000000000000000000000000000000004c6",
"size_on_disk": 272279,
"pruned": false,
"warnings": ""
}
See also
GET DeploymentInfo: returns state info regarding deployments of consensus changes at the chain tip or at a specified block.
GetBlockChainInfo RPC: provides information about the current state of the block chain.
GET DeploymentInfo#
Added in version 24.0.0.
The GET deploymentinfo operation returns an object containing various state info regarding deployments of consensus changes, either at the current chain tip or at a specified block. The output is the same as the getdeploymentinfo RPC. Supports only json as output format.
Request
GET /deploymentinfo.json
GET /deploymentinfo/<blockhash>.json
Parameter #1—the header hash of the block to query
Name |
Type |
Presence |
Description |
|---|---|---|---|
Block Hash |
path (hex) |
Optional |
The hash of the header of the block at which to query deployment state, encoded as hex in RPC byte order. If omitted, the current chain tip is used. An invalid hash returns HTTP 400 with |
Response as JSON
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
object |
Required |
Deployment information for the requested block (or tip). See the |
→ |
string (hex) |
Required |
The requested block hash (or tip) |
→ |
number (int) |
Required |
The requested block height (or tip) |
→ |
object |
Required |
Deployments, keyed by name |
Examples from Dash Core 24.0.0
Get deployment info at the current chain tip in JSON:
curl http://localhost:19898/rest/deploymentinfo.json
Get deployment info at a specific block in JSON:
curl http://localhost:19898/rest/deploymentinfo/7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79.json
Result for the specific block (whitespace added, truncated):
{
"hash": "7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79",
"height": 606,
"deployments": {
"bip34": {
"type": "buried",
"active": true,
"height": 1
},
"dip0003": {
"type": "buried",
"active": true,
"height": 432
},
"withdrawals": {
"type": "buried",
"active": true,
"height": 600
},
"v24": {
"type": "bip9",
"active": false,
"bip9": {
"start_time": 0,
"timeout": 9223372036854775807,
"ehf": true,
"min_activation_height": 0,
"status": "defined",
"since": 0,
"status_next": "defined"
}
}
}
}
See also
GET ChainInfo: returns information about the current state of the block chain.
GetDeploymentInfo RPC: returns state info regarding deployments of consensus changes at any block.
GET GetUtxos#
The GET getutxos operation returns an UTXO set given a set of outpoints.
Request
GET /getutxos/<checkmempool>/<txid>-<n>/<txid>-<n>/.../<txid>-<n>.<bin|hex|json>
Parameter #1—Include memory pool transactions
Name |
Type |
Presence |
Description |
|---|---|---|---|
Check mempool |
string |
Optional |
Set to |
Parameter #2—List of Outpoints
Name |
Type |
Presence |
Description |
|---|---|---|---|
Outpoint |
vector |
Required |
The list of outpoints to be queried. Each outpoint is the TXID of the transaction, encoded as hex in RPC byte order with an additional |
Parameter #3—the output format
Name |
Type |
Presence |
Description |
|---|---|---|---|
Format |
suffix |
Required |
Set to |
Response as JSON
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
object |
Required |
The requested UTXO set |
→ |
number (int) |
Required |
The height of the chain at the moment the result was calculated |
→ |
string (hex) |
Required |
The block hash of the top of the chain at the moment the result was calculated, encoded as hex in RPC byte order |
→ |
string |
Required |
Whether each requested output was found in the UTXO set or not. A |
→ |
array |
Required |
An array of objects each describing an outpoint that is unspent |
→ → |
object |
Optional |
A UTXO match based on the query |
→ → → |
number (int) |
Required |
The height of the block containing the defining transaction, or |
→ → → |
number (Dash) |
Required |
The value of the output in DASH |
→ → → |
object |
Required |
An object describing the pubkey script |
→ → → → |
string |
Required |
The pubkey script in decoded form with non-data-pushing opcodes listed |
→ → → → |
string |
Required |
Inferred descriptor for the output |
→ → → → |
string (hex) |
Required |
The pubkey script encoded as hex |
→ → → → |
string |
Required |
The type of script. This will be one of the following: |
→ → → → |
string |
Optional |
Dash address (only if a well-defined address exists) |
Examples from Dash Core 24.0.0
Request the UTXO set for a confirmed output and an unconfirmed (memory pool) output:
curl http://localhost:19898/rest/getutxos/checkmempool/2d527d1ca1900100c40b41d1881afb6a07888373e03ff7be0420960005b6f648-0/5c4551c47487217a228ca7d10d39dea9bdb25d8ce327740be94e1dc596613939-0.hex
Result (wrapped):
62020000e9ef542cd1a2022910bcaf477c6e428ce79737696fc5296086a2547c\
75ef9039010302000000005e02000000ca9a3b000000001976a914db91347da1\
e3fc25608b441994027847f489191b88ac00000000ffffff7f0065cd1d000000\
001976a914db91347da1e3fc25608b441994027847f489191b88ac
Same request in JSON:
curl http://localhost:19898/rest/getutxos/checkmempool/2d527d1ca1900100c40b41d1881afb6a07888373e03ff7be0420960005b6f648-0/5c4551c47487217a228ca7d10d39dea9bdb25d8ce327740be94e1dc596613939-0.json
Result (whitespace added):
{
"chainHeight": 610,
"chaintipHash": "3990ef757c54a2866029c56f693797e78c426e7c47afbc102902a2d12c54efe9",
"bitmap": "11",
"utxos": [
{
"height": 606,
"value": 10.00000000,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 db91347da1e3fc25608b441994027847f489191b OP_EQUALVERIFY OP_CHECKSIG",
"desc": "addr(ygLQnEhtRv9LiQAfjzvURpUiEXLK9xei6f)#e0zk9xr6",
"hex": "76a914db91347da1e3fc25608b441994027847f489191b88ac",
"address": "ygLQnEhtRv9LiQAfjzvURpUiEXLK9xei6f",
"type": "pubkeyhash"
}
},
{
"height": 2147483647,
"value": 5.00000000,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 db91347da1e3fc25608b441994027847f489191b OP_EQUALVERIFY OP_CHECKSIG",
"desc": "addr(ygLQnEhtRv9LiQAfjzvURpUiEXLK9xei6f)#e0zk9xr6",
"hex": "76a914db91347da1e3fc25608b441994027847f489191b88ac",
"address": "ygLQnEhtRv9LiQAfjzvURpUiEXLK9xei6f",
"type": "pubkeyhash"
}
}
]
}
See also
GetTxOutSetInfo RPC: returns statistics about the confirmed unspent transaction output (UTXO) set. Note that this call may take some time and that it only counts outputs from confirmed transactions—it does not count outputs from the memory pool.
GET Headers#
The GET headers operation returns a specified amount of block headers in upward direction.
Request
GET /headers/<hash>.<format>?count=<count>
The older GET /headers/<count>/<hash>.<format> form is deprecated but still supported.
Parameter #1—the header hash of the block to retrieve
Name |
Type |
Presence |
Description |
|---|---|---|---|
Header Hash |
path (hex) |
Required |
The hash of the header of the block to get, encoded as hex in RPC byte order |
Parameter #2—the output format
Name |
Type |
Presence |
Description |
|---|---|---|---|
Format |
suffix |
Required |
Set to |
Parameter #3—the amount of block headers to retrieve
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
query (int) |
Optional |
The amount of block headers in upward direction to return (including the start header hash). Default: |
Response as JSON
Name |
Type |
Presence |
Description |
|---|---|---|---|
Result |
array |
Required |
An array containing the requested block headers |
→ |
object |
Optional |
An object containing a block header. The array contains the amount of headers requested with |
→ → |
string (hex) |
Required |
The hash of this block’s block header encoded as hex in RPC byte order. This is the same as the hash provided in parameter #1 |
→ → |
number (int) |
Required |
The number of confirmations the transactions in this block have, starting at 1 when this block is at the tip of the best block chain. This score will be -1 if the the block is not part of the best block chain |
→ → |
number (int) |
Required |
The height of this block on its block chain |
→ → |
number (int) |
Required |
This block’s version number. See block version numbers |
→ → |
string (hex) |
Required |
This block’s version number formatted in hexadecimal |
→ → |
string (hex) |
Required |
The merkle root for this block, encoded as hex in RPC byte order |
→ → |
number (int) |
Required |
The value of the time field in the block header, indicating approximately when the block was created |
→ → |
number (int) |
Required |
Added in Bitcoin Core 0.12.0 |
→ → |
number (int) |
Required |
The nonce which was successful at turning this particular block into one that could be added to the best block chain |
→ → |
string (hex) |
Required |
The value of the nBits field in the block header, indicating the target threshold this block’s header had to pass |
→ → |
number (real) |
Required |
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0 |
→ → |
string (hex) |
Required |
The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex |
→ → |
number (int) |
Required |
The number of transactions in the block |
→ → |
string (hex) |
Optional |
The hash of the header of the previous block, encoded as hex in RPC byte order. Not returned for genesis block |
→ → |
string (hex) |
Optional |
The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order |
→ → |
bool |
Required |
If set to |
Examples from Dash Core 24.0.2
Request 2 block headers in hex-encoded serialized block format:
curl "http://localhost:19898/rest/headers/7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79.hex?count=2"
Result (wrapped):
000000209845c5e39b8d98c7094801cbb0fa27ba6ddb110d00cbf20a1aef1e35\
44f9b255036f309b40326518781c29a054f83d68e3ca73b9c685edc19f849de3\
3dbdf3b77e1b5769ffff7f200000000000000020798b062ea8524b1b17c52d9c\
e38da7819f78c6f62b452c263292038e7069b87ec8997f386905bafad4ff3e6a\
a14244e881eb7c2ed29d6d39d9f406dbd431a28c141c5769ffff7f2001000000
Get the same block headers in JSON:
curl "http://localhost:19898/rest/headers/7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79.json?count=2"
Result (whitespace added):
[
{
"hash": "7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79",
"confirmations": 5,
"height": 606,
"version": 536870912,
"versionHex": "20000000",
"merkleroot": "b7f3bd3de39d849fc1ed85c6b973cae3683df854a0291c78186532409b306f03",
"time": 1767316350,
"mediantime": 1767315600,
"nonce": 0,
"bits": "207fffff",
"difficulty": 4.656542373906925e-10,
"chainwork": "00000000000000000000000000000000000000000000000000000000000004be",
"nTx": 2,
"previousblockhash": "55b2f944351eef1a0af2cb000d11db6dba27fab0cb014809c7988d9be3c54598",
"nextblockhash": "54a630f248fa9cd8b7dd7ddddf5e74b7d91de5d168c6708656fd85b182b516e4",
"chainlock": false
},
{
"hash": "54a630f248fa9cd8b7dd7ddddf5e74b7d91de5d168c6708656fd85b182b516e4",
"confirmations": 4,
"height": 607,
"version": 536870912,
"versionHex": "20000000",
"merkleroot": "8ca231d4db06f4d9396d9dd22e7ceb81e84442a16a3effd4faba0569387f99c8",
"time": 1767316500,
"mediantime": 1767315750,
"nonce": 1,
"bits": "207fffff",
"difficulty": 4.656542373906925e-10,
"chainwork": "00000000000000000000000000000000000000000000000000000000000004c0",
"nTx": 1,
"previousblockhash": "7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79",
"nextblockhash": "702d26b15179aa51cffba4bc6ab7f3b18fc2ef68886c5cc9db1c232ad387ae95",
"chainlock": false
}
]
See also
GET Block/NoTxDetails gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block. The JSON object includes TXIDs for transactions within the block rather than the complete transactions GET block returns.
GetBlockHash RPC: returns the header hash of a block at the given height in the local best block chain.
GetBlockHeader RPC: gets a block header with a particular header hash from the local block database either as a JSON object or as a serialized block header.
GET MemPool/Contents#
The GET mempool/contents operation returns all transaction in the memory pool with detailed information, or only their TXIDs (verbose=false). Supports only json as output format.
Request
GET /mempool/contents.json
GET /mempool/contents.json?verbose=<true|false>&mempool_sequence=<true|false>
Parameter #1—verbose output
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
query (bool) |
Optional |
Added in Dash Core 24.0.0 |
Parameter #2—include mempool sequence
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
query (bool) |
Optional |
Added in Dash Core 24.0.0 |
Result (verbose=true, the default)—a JSON object describing each transaction
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
object |
Required |
A object containing transactions currently in the memory pool. May be empty |
→ |
string : object |
Optional |
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order |
→ → |
number (int) |
Required |
Transaction size |
→ → |
number (int) |
Required |
The time the transaction entered the memory pool, Unix epoch time format |
→ → |
number (int) |
Required |
The block height when the transaction entered the memory pool |
→ → |
number (int) |
Required |
The number of in-mempool descendant transactions (including this one) |
→ → |
number (int) |
Required |
The size of in-mempool descendants (including this one) |
→ → |
number (int) |
Required |
The number of in-mempool ancestor transactions (including this one) |
→ → |
number (int) |
Required |
The size of in-mempool ancestors (including this one) |
→ → |
object |
Required |
Object containing fee information |
→ → → |
number (Dash) |
Required |
Transaction fee in DASH |
→ → → |
number (Dash) |
Required |
Transaction fee with fee deltas used for mining priority in DASH |
→ → → |
number (Dash) |
Required |
Modified fees (see above) of in-mempool ancestors (including this one) in DASH |
→ → → |
number (Dash) |
Required |
Modified fees (see above) of in-mempool descendants (including this one) in DASH |
→ → |
array |
Required |
An array holding TXIDs of unconfirmed transactions this transaction depends upon (parent transactions). Those transactions must be part of a block before this transaction can be added to a block, although all transactions may be included in the same block. The array may be empty |
→ → → |
string |
Optional (0 or more) |
The TXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex in RPC byte order |
→ → |
array |
Required |
An array of unconfirmed transactions spending outputs from this transaction |
→ → → |
string |
Optional (0 or more) |
The TXIDs of any unconfirmed transactions spending from this transaction |
→ → |
string |
Required |
|
→ → |
bool |
Required |
Whether this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers) |
Result (verbose=false)—an array of TXIDs
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
array |
Required |
An array of TXIDs belonging to transactions in the memory pool. The array may be empty if there are no transactions in the memory pool |
→ |
string |
Optional |
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order |
Result (verbose=false&mempool_sequence=true)—TXIDs with the mempool sequence
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
object |
Required |
An object containing the TXIDs and the mempool sequence number |
→ |
array |
Required |
An array of TXIDs belonging to transactions in the memory pool. The array may be empty if there are no transactions in the memory pool |
→ → |
string |
Optional |
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order |
→ |
number (int) |
Required |
The mempool sequence value |
Examples from Dash Core 24.0.0
Get all transactions in the memory pool in JSON:
curl http://localhost:19898/rest/mempool/contents.json
Result (whitespace added):
{
"5c4551c47487217a228ca7d10d39dea9bdb25d8ce327740be94e1dc596613939": {
"vsize": 225,
"time": 1767317100,
"height": 610,
"descendantcount": 2,
"descendantsize": 450,
"ancestorcount": 1,
"ancestorsize": 225,
"fees": {
"base": 0.00001000,
"modified": 0.00001000,
"ancestor": 0.00001000,
"descendant": 0.00002000
},
"depends": [],
"spentby": [
"7713aaad561955af9c0cf461e3823d3413f3de370b9420a2c6f3f666c4cb02a5"
],
"instantlock": "false",
"unbroadcast": true
},
"7713aaad561955af9c0cf461e3823d3413f3de370b9420a2c6f3f666c4cb02a5": {
"vsize": 225,
"time": 1767317100,
"height": 610,
"descendantcount": 1,
"descendantsize": 225,
"ancestorcount": 2,
"ancestorsize": 450,
"fees": {
"base": 0.00001000,
"modified": 0.00001000,
"ancestor": 0.00002000,
"descendant": 0.00001000
},
"depends": [
"5c4551c47487217a228ca7d10d39dea9bdb25d8ce327740be94e1dc596613939"
],
"spentby": [],
"instantlock": "false",
"unbroadcast": true
}
}
Get only the TXIDs:
curl "http://localhost:19898/rest/mempool/contents.json?verbose=false"
Result (whitespace added):
[
"5c4551c47487217a228ca7d10d39dea9bdb25d8ce327740be94e1dc596613939",
"7713aaad561955af9c0cf461e3823d3413f3de370b9420a2c6f3f666c4cb02a5"
]
Get the TXIDs with the mempool sequence number:
curl "http://localhost:19898/rest/mempool/contents.json?verbose=false&mempool_sequence=true"
Result (whitespace added):
{
"txids": [
"5c4551c47487217a228ca7d10d39dea9bdb25d8ce327740be94e1dc596613939",
"7713aaad561955af9c0cf461e3823d3413f3de370b9420a2c6f3f666c4cb02a5"
],
"mempool_sequence": 5
}
See also
GET MemPool/Info: returns information about the node’s current transaction memory pool.
GetMemPoolInfo RPC: returns information about the node’s current transaction memory pool.
GetRawMemPool RPC: returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object.
GET MemPool/Info#
The GET mempool/info operation returns information about the node’s current transaction memory pool. Supports only json as output format.
Request
GET /mempool/info.json
Parameters: none
Result as JSON
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
object |
Required |
A object containing information about the memory pool |
→ |
bool |
Required |
True if the mempool is fully loaded |
→ |
number (int) |
Required |
The number of transactions currently in the memory pool |
→ |
number (int) |
Required |
The total number of bytes in the transactions in the memory pool |
→ |
number (int) |
Required |
Added in Bitcoin Core 0.11.0 |
→ |
number (Dash) |
Required |
Total fees for the mempool in DASH, ignoring fees modified through the |
→ |
number (int) |
Required |
Added in Bitcoin Core 0.12.0 |
→ |
number (Dash) |
Required |
Added in Bitcoin Core 0.12.0 |
→ |
number (Dash) |
Required |
Current minimum relay fee rate for transactions, in DASH/kB |
→ |
number (int) |
Required |
Number of unconfirmed InstantSend locks |
→ |
number (int) |
Required |
Current number of transactions that haven’t passed initial broadcast yet |
→ |
number (Dash) |
Required |
Added in Dash Core 24.0.0 |
Examples from Dash Core 24.0.0
Get memory pool info in JSON:
curl http://localhost:19898/rest/mempool/info.json
Result (whitespace added):
{
"loaded": true,
"size": 2,
"bytes": 450,
"usage": 2176,
"total_fee": 0.00002000,
"maxmempool": 300000000,
"mempoolminfee": 0.00001000,
"minrelaytxfee": 0.00001000,
"instantsendlocks": 0,
"unbroadcastcount": 2,
"pendingassetunlocks": 0.00000000
}
See also
GET MemPool/Contents: returns all transaction in the memory pool with detailed information, or only their TXIDs.
GetMemPoolInfo RPC: returns information about the node’s current transaction memory pool.
GET Tx#
The GET tx operation gets a hex-encoded serialized transaction or a JSON object describing the transaction. By default, Dash Core only stores complete transaction data for UTXOs and your own transactions, so this method may fail on historic transactions unless you use the non-default txindex=1 in your Dash Core startup settings.
Note
If you begin using txindex=1 after downloading the block chain, you must rebuild your indexes by starting Dash Core with the option -reindex. This may take several hours to complete, during which time your node will not process new blocks or transactions. This reindex only needs to be done once.
Request
GET /tx/<txid>.<format>
Parameter #1—the TXID of the transaction to retrieve
Name |
Type |
Presence |
Description |
|---|---|---|---|
TXID |
path (hex) |
Required |
The TXID of the transaction to get, encoded as hex in RPC byte order |
Parameter #2—the output format
Name |
Type |
Presence |
Description |
|---|---|---|---|
Format |
suffix |
Required |
Set to |
Response as JSON
Name |
Type |
Presence |
Description |
|---|---|---|---|
Result |
object |
Required |
An object describing the request transaction |
→ |
string (hex) |
Required |
The transaction’s TXID encoded as hex in RPC byte order |
→ |
number (int) |
Required |
Added in Bitcoin Core 0.12.0 |
→ |
number (int) |
Required |
The transaction format version number |
→ |
number (int) |
Required |
Added in Dash Core 0.13.0.0 |
→ |
number (int) |
Required |
The transaction’s locktime: either a Unix epoch date or block height; see the locktime parsing rules |
→ |
array |
Required |
An array of objects with each object being an input vector (vin) for this transaction. Input objects will have the same order within the array as they have in the transaction, so the first input listed will be input 0 |
→ → |
object |
Required |
An object describing one of this transaction’s inputs. May be a regular input or a coinbase |
→ → → |
string |
Optional |
The TXID of the outpoint being spent, encoded as hex in RPC byte order. Not present if this is a coinbase transaction |
→ → → |
number (int) |
Optional |
The output index number (vout) of the outpoint being spent. The first output in a transaction has an index of |
→ → → |
object |
Optional |
An object describing the signature script of this input. Not present if this is a coinbase transaction |
→ → → → |
string |
Required |
The signature script in decoded form with non-data-pushing opcodes listed |
→ → → → |
string (hex) |
Required |
The signature script encoded as hex |
→ → → |
string (hex) |
Optional |
The coinbase (similar to the hex field of a scriptSig) encoded as hex. Only present if this is a coinbase transaction |
→ → → |
number (int) |
Required |
The input sequence number |
→ |
array |
Required |
An array of objects each describing an output vector (vout) for this transaction. Output objects will have the same order within the array as they have in the transaction, so the first output listed will be output 0 |
→ → |
object |
Required |
An object describing one of this transaction’s outputs |
→ → → |
number (Dash) |
Required |
The number of Dash paid to this output. May be |
→ → → |
number (duffs) |
Required |
The number of duffs paid to this output. May be |
→ → → |
number (int) |
Required |
The output index number of this output within this transaction |
→ → → |
object |
Required |
An object describing the pubkey script |
→ → → → |
string |
Required |
The pubkey script in decoded form with non-data-pushing opcodes listed |
→ → → → |
string |
Required |
Inferred descriptor for the output |
→ → → → |
string (hex) |
Required |
The pubkey script encoded as hex |
→ → → → |
string |
Required |
The type of script. This will be one of the following: |
→ → → → |
string |
Optional |
Dash address (only if a well-defined address exists) |
→ |
number (int) |
Optional |
Added in Dash Core 0.13.0.0 |
→ |
string (hex) |
Optional |
Added in Dash Core 0.13.0.0 |
→ |
object |
Optional |
The decoded Coinbase special transaction (CbTx) payload, with the same fields as the block-level |
→ |
string (hex) |
Optional |
Added in Dash Core 24.0.0 |
→ |
string (hex) |
Optional |
If the transaction has been included in a block on the local best block chain, this is the hash of that block encoded as hex in RPC byte order. Not present for memory pool transactions |
→ |
string (hex) |
Required |
The serialized, hex-encoded data for the transaction |
Examples from Dash Core 24.0.0
Request a transaction in hex-encoded serialized transaction format:
curl http://localhost:19898/rest/tx/2d527d1ca1900100c40b41d1881afb6a07888373e03ff7be0420960005b6f648.hex
Result (wrapped):
0200000001fdd454572780af673f0c39335cf2f6db997ca0d55c0606d765cf63\
03ad091709000000006a47304402206465db43706bd35b1ced14e27b89ecc2ad\
939bb04fd7f644e74d322ef5c553b7022022069e76134796df3a006d6c18d94f\
f75cbb4165508211914d41b3ea0e6122cc012102cde88a8b67f85aa08dfaf0c1\
0714d5af431b8909ea5a2da4551584e3533b621bffffffff0200ca9a3b000000\
001976a914db91347da1e3fc25608b441994027847f489191b88ac18a6a0680b\
0000001976a91432ae99679ea84309f80373691cf2bb7b0da9ae1688ac000000\
00
Get the same transaction in JSON:
curl http://localhost:19898/rest/tx/2d527d1ca1900100c40b41d1881afb6a07888373e03ff7be0420960005b6f648.json
Result (whitespace added):
{
"txid": "2d527d1ca1900100c40b41d1881afb6a07888373e03ff7be0420960005b6f648",
"version": 2,
"type": 0,
"size": 225,
"locktime": 0,
"vin": [
{
"txid": "091709ad0363cf65d706065cd5a07c99dbf6f25c33390c3f67af80275754d4fd",
"vout": 0,
"scriptSig": {
"asm": "304402206465db43706bd35b1ced14e27b89ecc2ad939bb04fd7f644e74d322ef5c553b7022022069e76134796df3a006d6c18d94ff75cbb4165508211914d41b3ea0e6122cc[ALL] 02cde88a8b67f85aa08dfaf0c10714d5af431b8909ea5a2da4551584e3533b621b",
"hex": "47304402206465db43706bd35b1ced14e27b89ecc2ad939bb04fd7f644e74d322ef5c553b7022022069e76134796df3a006d6c18d94ff75cbb4165508211914d41b3ea0e6122cc012102cde88a8b67f85aa08dfaf0c10714d5af431b8909ea5a2da4551584e3533b621b"
},
"sequence": 4294967295
}
],
"vout": [
{
"value": 10.00000000,
"valueSat": 1000000000,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 db91347da1e3fc25608b441994027847f489191b OP_EQUALVERIFY OP_CHECKSIG",
"desc": "addr(ygLQnEhtRv9LiQAfjzvURpUiEXLK9xei6f)#e0zk9xr6",
"hex": "76a914db91347da1e3fc25608b441994027847f489191b88ac",
"address": "ygLQnEhtRv9LiQAfjzvURpUiEXLK9xei6f",
"type": "pubkeyhash"
}
},
{
"value": 489.99999000,
"valueSat": 48999999000,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 32ae99679ea84309f80373691cf2bb7b0da9ae16 OP_EQUALVERIFY OP_CHECKSIG",
"desc": "addr(yQwRoAN7nzz1rbjq5oyt3d5gpyqChMEn3x)#73ua6uzw",
"hex": "76a91432ae99679ea84309f80373691cf2bb7b0da9ae1688ac",
"address": "yQwRoAN7nzz1rbjq5oyt3d5gpyqChMEn3x",
"type": "pubkeyhash"
}
}
],
"blockhash": "7eb869708e039232262c452bf6c6789f81a78de39c2dc5171b4b52a82e068b79",
"hex": "0200000001fdd454572780af673f0c39335cf2f6db997ca0d55c0606d765cf6303ad091709000000006a47304402206465db43706bd35b1ced14e27b89ecc2ad939bb04fd7f644e74d322ef5c553b7022022069e76134796df3a006d6c18d94ff75cbb4165508211914d41b3ea0e6122cc012102cde88a8b67f85aa08dfaf0c10714d5af431b8909ea5a2da4551584e3533b621bffffffff0200ca9a3b000000001976a914db91347da1e3fc25608b441994027847f489191b88ac18a6a0680b0000001976a91432ae99679ea84309f80373691cf2bb7b0da9ae1688ac00000000"
}
See also
GetRawTransaction RPC: gets a hex-encoded serialized transaction or a JSON object describing the transaction. By default, Dash Core only stores complete transaction data for UTXOs and your own transactions, so the RPC may fail on historic transactions unless you use the non-default
txindex=1in your Dash Core startup settings.GetTransaction RPC: gets detailed information about an in-wallet transaction.