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!