POSTledger_entry

XRP Ledger Mainnethttps://xrpl-mainnet.nodit.io/

Returns a single entry from the ledger in its raw format. The way you specify the target differs by entry type, and you must provide exactly one of the selectors below.

Request Body
methodstringrequired
indexstring

The ID of the ledger entry to look up. Pass a 64-character hex string.

account_rootstring

Specifies the AccountRoot entry to look up by account address.

offeroneOf

Specifies an offer entry.

accountstring

The address of the account that created the offer.

seqinteger

The sequence number of the transaction that created the offer.

ripple_stateobject

Specifies a trust line (RippleState) entry between two accounts.

accountsstring[]

The addresses of the two accounts that share the trust line.

currencystring

The currency code of the trust line.

directoryoneOf

Specifies a directory entry. Pass an object or the entry ID as a string.

ownerstring

The account address of the directory owner.

dir_rootstring

The root ID of the directory.

sub_indexinteger

The sub-page number of the directory.

escrowoneOf

Specifies an Escrow entry. Pass an object or the entry ID as a string.

ownerstring

The account address that created the Escrow.

seqinteger

The sequence number of the transaction that created the Escrow.

checkstring

The ID of the Check ledger entry.

payment_channelstring

The ID of the Payment Channel ledger entry.

deposit_preauthoneOf

Specifies a DepositPreauth entry. Pass an object or the entry ID as a string.

ownerstring

The account address that set up the preauthorization.

authorizedstring

The preauthorized account address.

authorized_credentialsobject[]

The list of credentials used for the preauthorization.

ticketoneOf

Specifies a Ticket entry. Pass an object or the entry ID as a string.

accountstring

The account address that created the Ticket.

ticket_seqinteger

The sequence number of the Ticket.

nft_pagestring

The ID of the NFTokenPage ledger entry.

didstring

Specifies a DID entry by account address.

oracleobject

Specifies a Price Oracle entry.

accountstring

The address of the account that owns the Oracle.

oracle_document_idinteger

The number that identifies the Oracle within the account.

ammoneOf

Specifies an AMM entry. Pass an asset pair object or the entry ID as a string.

assetobject

Specifies an asset by currency code and issuer. Omit issuer for XRP.

currencystring

The currency code. Pass XRP for XRP.

issuerstring

The address of the account that issued the token. Omit for XRP.

asset2object

Specifies an asset by currency code and issuer. Omit issuer for XRP.

currencystring

The currency code. Pass XRP for XRP.

issuerstring

The address of the account that issued the token. Omit for XRP.

credentialoneOf

Specifies a Credential entry. Pass an object or the entry ID as a string.

subjectstring

The account address the credential applies to.

issuerstring

The account address that issued the credential.

credential_typestring

The credential type, hex-encoded.

permissioned_domainoneOf

Specifies a PermissionedDomain entry. Pass an object or the entry ID as a string.

accountstring

The account address that owns the domain.

seqinteger

The sequence number of the transaction that created the domain.

mptokenoneOf

Specifies an MPToken entry. Pass an object or the entry ID as a string.

mpt_issuance_idstring

The identifier of the MPTokenIssuance.

accountstring

The account address that holds the MPToken.

mpt_issuancestring

The identifier of the MPTokenIssuance.

vaultstring

The ID of a Vault ledger entry.

signer_liststring

The ID of the SignerList ledger entry.

binaryboolean

Whether to return the entry as a hex string.

ledger_hashstring

The hash of the ledger version to use. Pass a 32-byte hex string.

ledger_indexinteger

Specifies the ledger version to use. Pass a ledger index as an integer, or use one of the shortcut strings below.

  • validated: Uses the most recent ledger version validated by the network.
  • closed: Uses the most recent ledger version the server has closed. It may not be validated.
  • current: Uses the in-progress ledger version the server is currently building.

The ledger index of the version to use.

Responses
indexstring

The ID that identifies the ledger entry.

ledger_indexinteger

The ledger index of the version used.

ledger_hashstring

The hash of the ledger version used.

nodeobject

The ledger entry expressed as JSON. Omitted when binary is true.

node_binarystring

The ledger entry, hex-encoded. Returned only when binary is true.

validatedboolean

Whether the response was derived from a validated ledger version.

X-API-KEY
RequestCU25
cURL
curl -X POST "https://xrpl-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "method": "ledger_entry",
  "params": [
    {
      "account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
      "ledger_index": "validated"
    }
  ]
}'
Response
Example · 200
{
  "result": {
    "index": "5F7A9C0E2D4F6B8A0C1E3D5F7A9B0C2E4D6F8A0B1C3E5D7F9A0B2C4E6D8F0A1B",
    "ledger_hash": "17ACB57A0F73B5160713E81FE72B2AC9F6064541004E272BD09F257D57C30C02",
    "ledger_index": 98765432,
    "node": {
      "Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
      "Balance": "9977",
      "Flags": 0,
      "LedgerEntryType": "AccountRoot",
      "OwnerCount": 0,
      "PreviousTxnID": "4E6A8C0D2F4B6A8C0E1D3F5A7B9C0E2D4F6A8B0C2E4D6F8A0B1C3D5E7F9A0B2C",
      "PreviousTxnLgrSeq": 98765000,
      "Sequence": 42,
      "index": "5F7A9C0E2D4F6B8A0C1E3D5F7A9B0C2E4D6F8A0B1C3E5D7F9A0B2C4E6D8F0A1B"
    },
    "validated": true
  }
}