Name | Type | Presence | Description |
---|---|---|---|
result | object | Required (exactly 1) | A object containing transactions currently in the memory pool. May be empty |
→ TXID | string : object | Optional (0 or more) | The TXID of a transaction in the memory pool, encoded as hex in RPC byte order |
→ →size | number (int) | Required (exactly 1) | The size of the serialized transaction in bytes |
→ →fee | number (bitcoins) | Required (exactly 1) | The transaction fee paid by the transaction in decimal bitcoins |
→ →modifiedfee | number (bitcoins) | Required (exactly 1) | Added in Bitcoin Core 0.12.0 The transaction fee with fee deltas used for mining priority in decimal bitcoins |
→ →time | number (int) | Required (exactly 1) | The time the transaction entered the memory pool, Unix epoch time format |
→ →height | number (int) | Required (exactly 1) | The block height when the transaction entered the memory pool |
→ →startingpriority | number (int) | Required (exactly 1) | The priority of the transaction when it first entered the memory pool |
→ →currentpriority | number (int) | Required (exactly 1) | The current priority of the transaction |
→ →descendantcount | number (int) | Required (exactly 1) | Added in Bitcoin Core 0.12.0 The number of in-mempool descendant transactions (including this one) |
→ →descendantsize | number (int) | Required (exactly 1) | Added in Bitcoin Core 0.12.0 The size of in-mempool descendants (including this one) |
→ →descendantfees | number (int) | Required (exactly 1) | Added in Bitcoin Core 0.12.0 The modified fees (see modifiedfee above) of in-mempool descendants (including this one) |
→ →depends | array | Required (exactly 1) | 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 |
→ → → Depends TXID | string | Optional (0 or more) | The TXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex in RPC byte order |
Examples from Dash Core 0.12.2
Get all transactions in the memory pool in JSON:
curl http://localhost:19998/rest/mempool/contents.json
Result (whitespace added):
{ "b06edec446fbcc0fc04a6e2774a843823f5238c2e15de40e61767a44f6788d32":{ "size":225, "fee":0.00010000, "modifiedfee":0.00010000, "time":1512596309, "height":38094, "startingpriority":1934576927.410256, "currentpriority":1934576927.410256, "descendantcount":1, "descendantsize":225, "descendantfees":10000, "depends":[ ] }}
See also
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 |
---|---|---|---|
result | object | Required (exactly 1) | A object containing information about the memory pool |
→size | number (int) | Required (exactly 1) | The number of transactions currently in the memory pool |
→bytes | number (int) | Required (exactly 1) | The total number of bytes in the transactions in the memory pool |
→usage | number (int) | Required (exactly 1) | Added in Bitcoin Core 0.11.0 Total memory usage for the mempool in bytes |
→maxmempool | number (int) | Required (exactly 1) | Added in Bitcoin Core 0.12.0 Maximum memory usage for the mempool in bytes |
→mempoolminfee | number (int) | Required (exactly 1) | Added in Bitcoin Core 0.12.0 The lowest fee per kilobyte paid by any transaction in the memory pool |
Examples from Dash Core 0.12.2
Get memory pool info in JSON:
curl http://localhost:19998/rest/mempool/info.json
Result (whitespace added):
{ "size":1, "bytes":1256, "usage":3376, "maxmempool":300000000, "mempoolminfee":0.00000000}
See also
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 (exactly 1) | 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 (exactly 1) | Set to .json for decoded transaction contents in JSON, or .bin or hex for a serialized transaction in binary or hex |
Response as JSON
Name | Type | Presence | Description |
---|---|---|---|
Result | object | Required (exactly 1) | An object describing the request transaction |
→txid | string (hex) | Required (exactly 1) | The transaction’s TXID encoded as hex in RPC byte order |
→size | number (int) | Required (exactly 1) | Added in Bitcoin Core 0.12.0 The serialized transaction size |
→version | number (int) | Required (exactly 1) | The transaction format version number |
→locktime | number (int) | Required (exactly 1) | The transaction’s locktime: either a Unix epoch date or block height; see the Locktime parsing rules |
→vin | array | Required (exactly 1) | 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 |
→ → Input | object | Required (1 or more) | An object describing one of this transaction’s inputs. May be a regular input or a coinbase |
→ → →txid | string | Optional (0 or 1) | The TXID of the outpoint being spent, encoded as hex in RPC byte order. Not present if this is a coinbase transaction |
→ → →vout | number (int) | Optional (0 or 1) | The output index number (vout) of the outpoint being spent. The first output in a transaction has an index of 0 . Not present if this is a coinbase transaction |
→ → →scriptSig | object | Optional (0 or 1) | An object describing the signature script of this input. Not present if this is a coinbase transaction |
→ → → →asm | string | Required (exactly 1) | The signature script in decoded form with non-data-pushing opcodes listed |
→ → → →hex | string (hex) | Required (exactly 1) | The signature script encoded as hex |
→ → →coinbase | string (hex) | Optional (0 or 1) | The coinbase (similar to the hex field of a scriptSig) encoded as hex. Only present if this is a coinbase transaction |
→ → →value | number (Dash) | Optional (exactly 1) | The number of Dash paid to this output. May be 0 .Only present if spentindex enabled |
→ → →valueSat | number (duffs) | Optional (exactly 1) | The number of duffs paid to this output. May be 0 .Only present if spentindex enabled |
→ → → →addresses | string : array | Optional (0 or 1) | The P2PKH or P2SH addresses used in this transaction, or the computed P2PKH address of any pubkeys in this transaction. This array will not be returned for nulldata or nonstandard script types.Only present if spentindex enabled |
→ → → → → Address | string | Required (1 or more) | A P2PKH or P2SH address |
→ → →sequence | number (int) | Required (exactly 1) | The input sequence number |
→vout | array | Required (exactly 1) | 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 |
→ → Output | object | Required (1 or more) | An object describing one of this transaction’s outputs |
→ → →value | number (Dash) | Required (exactly 1) | The number of Dash paid to this output. May be 0 |
→ → →valueSat | number (duffs) | Required (exactly 1) | The number of duffs paid to this output. May be 0 |
→ → →n | number (int) | Required (exactly 1) | The output index number of this output within this transaction |
→ → →scriptPubKey | object | Required (exactly 1) | An object describing the pubkey script |
→ → → →asm | string | Required (exactly 1) | The pubkey script in decoded form with non-data-pushing opcodes listed |
→ → → →hex | string (hex) | Required (exactly 1) | The pubkey script encoded as hex |
→ → → →reqSigs | number (int) | Optional (0 or 1) | The number of signatures required; this is always 1 for P2PK, P2PKH, and P2SH (including P2SH multisig because the redeem script is not available in the pubkey script). It may be greater than 1 for bare multisig. This value will not be returned for nulldata or nonstandard script types (see the type key below) |
→ → → →type | string | Optional (0 or 1) | The type of script. This will be one of the following: · pubkey for a P2PK script· pubkeyhash for a P2PKH script· scripthash for a P2SH script· multisig for a bare multisig script· nulldata for nulldata scripts· nonstandard for unknown scripts |
→ → → →addresses | string : array | Optional (0 or 1) | The P2PKH or P2SH addresses used in this transaction, or the computed P2PKH address of any pubkeys in this transaction. This array will not be returned for nulldata or nonstandard script types |
→ → → → → Address | string | Required (1 or more) | A P2PKH or P2SH address |
→blockhash | string (hex) | Optional (0 or 1) | 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 |
→height | number (int) | Required (exactly 1) | The height of this block on its block chain |
→confirmations | number (int) | Required (exactly 1) | If the transaction has been included in a block on the local best block chain, this is how many confirmations it has. Otherwise, this is 0 |
→time | number (int) | Optional (0 or 1) | If the transaction has been included in a block on the local best block chain, this is the block header time of that block (may be in the future) |
→blocktime | number (int) | Optional (0 or 1) | This field is currently identical to the time field described above |
Examples from Dash Core 0.12.2
Request a transaction in hex-encoded serialized transaction format:
curl http://localhost:19998/rest/tx/b06edec446fbcc0fc04a6e2774a843823f5238c2e15de40e61767a44f6788d32.hex
Result (wrapped):
0100000001c91d4bb14e061f8f6b775ca8e62ec8a66739b375f169bce1964ceea2368197e5000000006a473044022050644e406be3e463d94868c617309dc021174551dbb340665f48119e110a72b2022022f3cc93deeb4c44ce70bebe8e7f0f69c462f120eb64b47eeb77f0a62e9bd361012102f542dde7c155717ac8df05d0fc8f65e2ecc078ecad42b23462f27832b441ffa5feffffff0200e1f505000000001976a91443d11ad5889532f22f069b18b24489b1f94f253188ac7dbafa08000000001976a914bb900427682b8f7cae6779fb955a610ff71d68c888acce940000
Get the same transaction in JSON:
curl http://localhost:19998/rest/tx/b06edec446fbcc0fc04a6e2774a843823f5238c2e15de40e61767a44f6788d32.json
Result (whitespace added):
{ "txid":"b06edec446fbcc0fc04a6e2774a843823f5238c2e15de40e61767a44f6788d32", "size":225, "version":1, "locktime":38094, "vin":[ { "txid":"e5978136a2ee4c96e1bc69f175b33967a6c82ee6a85c776b8f1f064eb14b1dc9", "vout":0, "scriptSig":{ "asm":"3044022050644e406be3e463d94868c617309dc021174551dbb340665f48119e110a72b2022022f3cc93deeb4c44ce70bebe8e7f0f69c462f120eb64b47eeb77f0a62e9bd361[ALL] 02f542dde7c155717ac8df05d0fc8f65e2ecc078ecad42b23462f27832b441ffa5", "hex":"473044022050644e406be3e463d94868c617309dc021174551dbb340665f48119e110a72b2022022f3cc93deeb4c44ce70bebe8e7f0f69c462f120eb64b47eeb77f0a62e9bd361012102f542dde7c155717ac8df05d0fc8f65e2ecc078ecad42b23462f27832b441ffa5" }, "sequence":4294967294 } ], "vout":[ { "value":1.00000000, "valueSat":100000000, "n":0, "scriptPubKey":{ "asm":"OP_DUP OP_HASH160 43d11ad5889532f22f069b18b24489b1f94f2531 OP_EQUALVERIFY OP_CHECKSIG", "hex":"76a91443d11ad5889532f22f069b18b24489b1f94f253188ac", "reqSigs":1, "type":"pubkeyhash", "addresses":[ "ySW2cuvm2wJ4EU5KzX4waYfFPV3xQni6Nm" ] } }, { "value":1.50649469, "valueSat":150649469, "n":1, "scriptPubKey":{ "asm":"OP_DUP OP_HASH160 bb900427682b8f7cae6779fb955a610ff71d68c8 OP_EQUALVERIFY OP_CHECKSIG", "hex":"76a914bb900427682b8f7cae6779fb955a610ff71d68c888ac", "reqSigs":1, "type":"pubkeyhash", "addresses":[ "ydRBjVr78ejCqXuGs2wbtYoFpGbDkqV8V4" ] } } ], "blockhash":"0000000003b6a57e3614176e5b93caf9498009853e06d16028ebffeb361afda5", "height":38095, "confirmations":9, "time":1512596315, "blocktime":1512596315}
See also
txindex=1
in your Dash Core startup settings.联系客服