transaction_entry - XRPL

Example code for the transaction_entry JSON RPC method. Complete guide to using transaction_entry JSON-RPC in the GetBlock Web3 documentation.

This method retrieves information on a single transaction from a specific ledger version. The tx Method is recommended instead, as it searches all ledgers.

Parameters

Parameter
Type
Required
Description

tx_hash

string

Yes

Transaction hash

ledger_hash

string

No

Ledger hash

ledger_index

string/number

No

Ledger index

Request Example

cURL
curl --location --request POST 'https://xrp.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "transaction_entry",
    "params": [{
        "tx_hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9",
        "ledger_index": 63632029
    }],
    "id": "getblock.io"
}'

Response Example

Response Parameters

Parameter
Type
Description

tx_json

object

Transaction data

metadata

object

Transaction result

ledger_index

integer

Ledger containing tx

Use Cases

  • Get transaction from specific ledger

  • Historical analysis

  • Ledger auditing

Error Handling

chevron-righttxnNotFoundhashtag

Transaction not found

chevron-rightlgrNotFoundhashtag

Ledger not found

SDK Integration

Last updated

Was this helpful?