For the complete documentation index, see llms.txt. This page is also available as Markdown.

mempool - Cardano

Example code for the mempool JSON-RPC method. Complete guide on how to use mempool JSON-RPC in GetBlock Web3 documentation.

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

Parameters

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

Field
Type
Required
Description

network_identifier

object

Yes

The network to query

metadata

object

No

Optional metadata object

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/mempool' \
--header 'Content-Type: application/json' \
--data-raw '{
    "network_identifier": {
        "blockchain": "cardano",
        "network": "mainnet"
    },
    "metadata": {}
}'
example.js
const response = await fetch(
    'https://go.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
import requests

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

print(response.json())

Response

Response Parameters

Field
Type
Description

transaction_identifiers

array

Hashes 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 Code
Message
Description

1

Invalid request

The request body is malformed or missing required fields

4

Block not found

The requested block does not exist on this node

5

Internal error

The node failed to answer the request

Was this helpful?