Skip to main content

ledger_entry

POST

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.

🚧 Provide only one selector!

Providing two or more selectors at once returns an invalidParams error.

param[0]
parametersobjectrequired
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.Specifies the offer by the account that created it and its sequence number.
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.
accountsarray
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_credentialsarray
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_indexoneOf
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.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://xrpl-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"method": "ledger_entry",
"params": [
{
"account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"binary": false,
"ledger_hash": "17ACB57A0F73B5160713E81FE72B2AC9F6064541004E272BD09F257D57C30C02"
}
]
}'