POSTledger

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

Returns the ledger header information. Depending on the request options, it can also return the list of transactions in the ledger and the queue data.

Request Body
methodstringrequired
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.

transactionsboolean

Whether to also return the transaction data in the ledger.

expandboolean

Whether to return transactions and account state as full JSON. When false, only the identifiers are returned.

owner_fundsboolean

Whether to include the owner_funds field in OfferCreate transaction metadata.

binaryboolean

Whether to return transactions as hex strings.

queueboolean

Whether to also return the queued transactions. It can be used only when ledger_index is set to current.

Responses
account_hashstring

The hash of the entire account state information.

close_flagsinteger

A bit-map of the flags applied when the ledger closed.

close_timeinteger

The time the ledger closed, in seconds since the Ripple Epoch.

close_time_humanstring

The time the ledger closed, as a human-readable UTC string.

close_time_isostring

The time the ledger closed, in ISO 8601 format.

close_time_resolutioninteger

The rounding interval applied to ledger close times, in seconds.

closedboolean

Whether the ledger version is closed.

ledger_hashstring

The unique hash that identifies the ledger version.

ledger_indexstring

The ledger index.

parent_close_timeinteger

The time the previous ledger closed, in seconds since the Ripple Epoch.

parent_hashstring

The hash of the previous ledger version.

total_coinsstring

The total amount of XRP in the network, in drops.

transaction_hashstring

The hash of all transactions included in this ledger version.

transactionsobject[]

The list of transactions included in the ledger. Returned when transactions is set to true in the request.

accountstring

The address of the account that submitted the transaction.

txobject

The transaction data.

retries_remaininginteger

The number of retries remaining.

preflight_resultstring

The result code from preliminary validation.

last_resultstring

The result code from the previous attempt.

auth_changeboolean

Whether the transaction changes the account's signing authority.

feestring

The transaction cost, in drops.

fee_levelstring

The transaction cost expressed in fee levels.

max_spend_dropsstring

The maximum amount this transaction could spend, in drops.

ledger_hashstring

The hash of the ledger version used. Returned when a validated ledger version was queried.

ledger_indexinteger

The ledger index of the version used. Returned when a validated ledger version was queried.

ledger_current_indexinteger

The ledger index of the in-progress ledger. Returned when the current ledger was queried.

validatedboolean

Whether the response was derived from a validated ledger version.

X-API-KEY
RequestCU50
cURL
curl -X POST "https://xrpl-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "method": "ledger",
  "params": [
    {
      "ledger_index": "validated",
      "transactions": false,
      "expand": false,
      "binary": false
    }
  ]
}'
Response
Example · 200
{
  "result": {
    "ledger": {
      "account_hash": "1B3C5D7E9F0A2B4C6D8E0F1A3B5C7D9E0F2A4B6C8D0E1F3A5B7C9D0E2F4A6B8C",
      "close_flags": 0,
      "close_time": 810900000,
      "close_time_human": "2026-Sep-02 04:00:00.000000000 UTC",
      "close_time_iso": "2026-09-02T04:00:00Z",
      "close_time_resolution": 10,
      "closed": true,
      "ledger_hash": "17ACB57A0F73B5160713E81FE72B2AC9F6064541004E272BD09F257D57C30C02",
      "ledger_index": "98765432",
      "parent_close_time": 810899996,
      "parent_hash": "2C4E6A8B0D1F3A5C7E9B0D2F4A6C8E0B1D3F5A7C9E0B2D4F6A8C0E1B3D5F7A9C",
      "total_coins": "99987654321098765",
      "transaction_hash": "3D5F7A9B1C2E4A6C8D0F2B4D6E8A0C1E3F5B7D9A0C2E4F6B8D0A1C3E5F7B9D0A"
    },
    "ledger_hash": "17ACB57A0F73B5160713E81FE72B2AC9F6064541004E272BD09F257D57C30C02",
    "ledger_index": 98765432,
    "validated": true
  }
}