getrawmempool

Bitcoin RPC

Overview

The getrawmempool RPC method provides information on the transactions currently in the memory pool. This method is useful for getting details about unconfirmed transactions that have not yet been included in a block.

Parameters

verbose: Set to true to receive a detailed JSON object for each transaction in the memory pool. Set to false to receive a simple array of transaction IDs.

  • Example: verbose: true

Returns

The return object will depend on the value of the verbose parameter.

If verbose is set to false, the method will return an array of transaction IDs.

If verbose is set to true, the method will return an object with transaction IDs as keys and detailed transaction information as values.

Fields (when verbose is true):

NameDescription
sizeThe transaction size in bytes.
feeThe transaction fee in BTC.
modifiedfeeThe transaction fee with descendants in BTC.
timeThe local time when the transaction entered the memory pool.
heightThe block height when the transaction entered the memory pool.
descendantcountThe number of descendant transactions in the memory pool.
descendantsizeThe total size of all descendant transactions in the memory pool, in bytes.
descendantfeesThe total fees of all descendant transactions in the memory pool, in satoshis.
ancestorcountThe number of ancestor transactions in the memory pool.
ancestorsizeThe total size of all ancestor transactions in the memory pool, in bytes.
ancestorfeesThe total fees of all ancestor transactions in the memory pool, in satoshis.
wtxidThe transaction witness ID.
dependsAn array of unconfirmed transactions that this transaction depends on.

Request Example

curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {API_KEY}' \
--data '{
  "jsonrpc": "2.0",
  "method": "getrawmempool",
  "params": [true],
  "id": 1
}'
// yarn add @tatumio/tatum

import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Bitcoin>({network: Network.BITCOIN})

const result = await tatum.rpc.getRawMemPool(true)

await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs