mempool - Cardano

This endpoint returns the transaction identifiers currently in the node's mempool.

Parameters

The request body is a JSON object with the following fields.

FieldTypeRequiredDescription
network_identifierobjectYesThe network to query
metadataobjectNoOptional metadata object

Request

bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/mempool' \
--header 'Content-Type: application/json' \
--data-raw '{
    "network_identifier": {
        "blockchain": "cardano",
        "network": "mainnet"
    },
    "metadata": {}
}'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/mempool',
    {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({"network_identifier": {"blockchain": "cardano", "network": "mainnet"}, "metadata": {}})
    }
);
console.log(await response.json());

example.py

pythonimport requests

response = requests.post(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/mempool',
    headers={'Content-Type': 'application/json'},
    json={"network_identifier": {"blockchain": "cardano", "network": "mainnet"}, "metadata": {}}
)

print(response.json())

Response

json{
    "transaction_identifiers": [
        {
            "hash": "10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642"
        }
    ]
}

Response Parameters

FieldTypeDescription
transaction_identifiersarrayHashes of transactions currently in the mempool

Use Cases

  • Pending Monitoring: List unconfirmed transactions
  • Payment Detection: Detect an incoming transaction before confirmation
  • Congestion Signals: Gauge mempool depth
  • Status Tracking: Confirm a submitted transaction is pending

Error Handling

Error CodeMessageDescription
1Invalid requestThe request body is malformed or missing required fields
4Block not foundThe requested block does not exist on this node
5Internal errorThe node failed to answer the request