Bitcoin
Ready to call this in production?
Free tier covers personal projects. Pay-as-you-go scales without a card.
Bitcoin
Free tier covers personal projects. Pay-as-you-go scales without a card.
getmempooldescendants is a Bitcoin Core JSON-RPC method that walks the dependency graph of a pending BTC transaction forwards: given a txid that is still in the node's mempool, it returns every other unconfirmed transaction that spends its outputs, directly or indirectly — its descendants. In Bitcoin's UTXO model a transaction's outputs can be spent before that transaction confirms, so an unconfirmed transaction can already have a chain of unconfirmed children riding on top of it. Send the request to https://bitcoin.therpc.io/YOUR_API_KEY with positional params. By default it returns a flat array of descendant txids; pass verbose = true to receive an object keyed by txid carrying the same per-transaction fields as getmempoolentry (vsize, weight, fees in BTC, ancestor/descendant counts, and more).
verbose = true) before attempting a replace-by-fee (RBF) replacement — replacing a transaction also evicts its descendants, so you need to know what would drop out.| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | txid | string | Yes | Transaction id, which must be in the mempool. |
| 2 | verbose | boolean | No | false = array of txids; true = object keyed by txid with per-tx data.Default: false |
| Type | Description |
|---|---|
| array | Array of descendant txids, or (verbose) object keyed by txid with the same per-tx fields as getmempoolentry. |
| Code | Message | Cause |
|---|---|---|
-5 | Transaction not in mempool | The txid is not currently in this node's mempool — it may be confirmed, evicted, or never seen. |
-5 if the txid you pass is not currently in this node's mempool — for example because it has already confirmed, was evicted, or was never seen by the node.