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

mempool/transaction - Cardano

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

This endpoint returns a single unconfirmed transaction from the mempool, expressed in the Rosetta operation model.

Parameters

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

Field
Type
Required
Description

network_identifier

object

Yes

The network to query

transaction_identifier

object

Yes

The mempool transaction hash to fetch

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/mempool/transaction' \
--header 'Content-Type: application/json' \
--data-raw '{
    "network_identifier": {
        "blockchain": "cardano",
        "network": "mainnet"
    },
    "transaction_identifier": {
        "hash": "10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642"
    }
}'
example.js
const response = await fetch(
    'https://go.getblock.io/<ACCESS-TOKEN>/mempool/transaction',
    {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({"network_identifier": {"blockchain": "cardano", "network": "mainnet"}, "transaction_identifier": {"hash": "10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642"}})
    }
);
console.log(await response.json());
example.py
import requests

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

print(response.json())

Response

Response Parameters

Field
Type
Description

transaction.transaction_identifier

object

The transaction hash

transaction.operations

array

The pending transaction's operations

Use Cases

  • Pending Detail: Inspect an unconfirmed transaction's operations

  • Payment Preview: Show incoming amounts before confirmation

  • Fee Analysis: Read a pending transaction's operations for fees

  • Monitoring: Track a specific pending transaction

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?