getrawmempool
Returns the IDs of all transactions in the node's memory pool. This method uses 80 credits from your daily balance.
The mempool can hold tens of thousands of transactions, so verbose responses can be large.
Parameters
verbose: (boolean) [optional] -falsereturns an array of transaction IDs.truereturns an object keyed by transaction ID, with fee, size, and ancestor details for each entry. The default isfalse.mempool_sequence: (boolean) [optional] -truereturns an object withtxidsand themempool_sequencenumber. Can't be combined withverbose. The default isfalse.
Returns
result: (array or object) - Transaction IDs when verbose is false.
Otherwise, an object that maps each transaction ID to its mempool entry, with fields such as:
vsize: (integer) - Virtual size, in vbytes.weight: (integer) - Transaction weight.time: (integer) - Time the transaction entered the mempool, in Unix epoch seconds.height: (integer) - Block height when the transaction entered the mempool.descendantcount,descendantsize,ancestorcount,ancestorsize: (integer) - In-mempool descendant and ancestor statistics.wtxid: (string) - Witness transaction ID.fees: (object) -base,modified,ancestor, anddescendantfees, in BTC.depends: (array) - Unconfirmed parent transaction IDs.spentby: (array) - Unconfirmed child transaction IDs.bip125-replaceable: (boolean) -truewhen the transaction signals BIP 125 replaceability.unbroadcast: (boolean) -truewhen no peer has seen the transaction yet.
Request
- curl
curl https://bitcoin-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "getrawmempool", "params": [false]}'
Response
- JSON
{
"jsonrpc": "2.0",
"id": 1,
"result": [
"5b1d0e9f4c3a2b8170e6d5c4b3a29180f7e6d5c4b3a291807f6e5d4c3b2a1908",
"a4c7e2f1b0d9c8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3",
"e91f0b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8"
]
}