getmempoolentry

Bitcoin RPC

Overview

The getmempoolentry RPC method allows you to retrieve information about a specific transaction in the memory pool. This method is useful for tracking the status of unconfirmed transactions and for gathering additional details about their current state.

Parameters

  • txid: The transaction ID of the transaction you want to retrieve information about.

Returns

The return object will be an object containing information about the specified transaction.

NameDescription
sizeThe transaction size in bytes.
feeThe transaction fee in BTC.
modifiedfeeThe transaction fee with fee deltas used for mining priority.
timeThe local time the transaction entered the memory pool.
heightThe block height when the transaction entered the memory pool.
descendantcountThe number of descendant transactions.
descendantsizehe virtual transaction size of all descendant transactions combined.
descendantfeesThe total fees of all descendant transactions.
ancestorcountThe number of ancestor transactions.
ancestorsizehe virtual transaction size of all ancestor transactions combined.
ancestorfeesThe total fees of all ancestor transactions.
wtxidThe witness transaction ID of the transaction.
dependsAn array containing the witness transaction IDs of the transactions this transaction depends on.
spentbyAn array containing the witness transaction IDs of the transactions that spend this transaction.
bip125-replaceableWhether the transaction is BIP125 replaceable. Possible values are "yes", "no", or "unknown".

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": "getmempoolentry",
  "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"],
  "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.getMempoolEntry(
  'c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2',
)

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