Reading the unconfirmed parents of a Bitcoin transaction

A transaction can spend an output whose creator is still waiting in the mempool. To understand the fees involved, inspect the child alongside the unconfirmed transactions it depends on.

Inspect one entry

Set TXID to the transaction ID reported by your wallet or application. Run the following command against a Bitcoin Core 30 node that has seen the transaction.

bitcoin-cli getmempoolentry "$TXID" | jq '{depends, ancestorcount, vsize, ancestorsize, base_btc: .fees.base, ancestors_btc: .fees.ancestor}'

depends lists the immediate unconfirmed parents known to this node. ancestorcount includes the selected transaction itself. One direct parent and an ancestor count of three can occur when that parent also spends an unconfirmed output. Request the parent's own entry to follow the dependency.

Calculate the rate for the group

Suppose fees.ancestor is 0.00002000 BTC and ancestorsize is 500 virtual bytes. The group contributes 2,000 satoshis across 500 vB, or 4 sat/vB. The fee field used here includes any local fee deltas for prioritisation. A high fee on the child alone can therefore give a different picture from the rate across its dependencies.

The result describes this node's mempool at query time. A parent may confirm between two calls, and another node can have a different set of entries. If the query fails, check the transaction's confirmation state before interpreting the missing entry as an eviction.

bitcoincore.org getmempoolentry