For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

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] - false returns an array of transaction IDs. true returns an object keyed by transaction ID, with fee, size, and ancestor details for each entry. The default is false.
  • mempool_sequence: (boolean) [optional] - true returns an object with txids and the mempool_sequence number. Can't be combined with verbose. The default is false.

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, and descendant fees, in BTC.
  • depends: (array) - Unconfirmed parent transaction IDs.
  • spentby: (array) - Unconfirmed child transaction IDs.
  • bip125-replaceable: (boolean) - true when the transaction signals BIP 125 replaceability.
  • unbroadcast: (boolean) - true when no peer has seen the transaction yet.

Request​

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​

{
"jsonrpc": "2.0",
"id": 1,
"result": [
"5b1d0e9f4c3a2b8170e6d5c4b3a29180f7e6d5c4b3a291807f6e5d4c3b2a1908",
"a4c7e2f1b0d9c8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3",
"e91f0b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8"
]
}