getmempoolancestors | Bitcoin

The getmempoolancestors method retrieves all in-mempool ancestors for a specific transaction in the mempool.

📘

Get an unconfirmed transaction hash

For the example to work, get an unconfirmed transaction hash from mempool.space.

📘

Empty result

If there is no pending transaction in the mempool that is an ancestor to the one you are querying, you will get an empty response.

👍

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • txid (required) — the transaction ID for which to retrieve in-mempool ancestors.

Response

  • result — an array containing all in-mempool ancestor transactions for the specified transaction.
  • error — an object containing an error message if an error occurred, otherwise null.
  • id — an integer representing the ID of the request, used to match requests with responses.

Use case

The getmempoolancestors method is useful for exploring the ancestry of a transaction in the mempool. It provides insights into the chain of transactions that are waiting to be included in a block.

Try the getmempoolancestors RPC method yourself

Language
Click Try It! to start a request and see the response here!