curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"method": "getmempoolancestors",
"params": [
"f6a4beaf3b26ae273d50eb8f6ea18e776932b4fefd24c8b915b94b6d22e89bc9"
],
"id": 1
}'
{
"result": [
"<any>"
],
"error": {},
"id": 123
}
curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"method": "getmempoolancestors",
"params": [
"f6a4beaf3b26ae273d50eb8f6ea18e776932b4fefd24c8b915b94b6d22e89bc9"
],
"id": 1
}'
{
"result": [
"<any>"
],
"error": {},
"id": 123
}
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.
txid
(required) — the transaction ID for which to retrieve in-mempool ancestors.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.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.
All in-mempool ancestors for the specified transaction
The response is of type object
.
Was this page helpful?