01What
Fetches one version of the ledger — the network-wide snapshot produced every few seconds — with its hash, close time, and optionally the transactions it contains.
02Why you'd use it
Use it to watch the chain advance, timestamp events precisely, or see everything that happened in one specific ledger.
03How
- 1Keep Ledger Index on validated for the latest final ledger (current shows the in-progress one that can still change).
- 2Turn on Include Transactions to list what settled in that ledger.
- 3Run it and read ledger_index (the height), close_time, and the transaction list if requested.
Watch out
- Only validated ledgers are final — anything from the current ledger can still change or vanish.
- Ledger timestamps count from the Ripple Epoch (January 1, 2000), not the Unix epoch (1970) — libraries convert, but raw numbers will look 30 years off.
- A new ledger closes every 3-5 seconds; there is no fixed 'block time' like other chains.
For example
For an audit you must prove when a payment settled. You look up its ledger, record the ledger hash and close time, and cite both — an immutable, network-agreed timestamp.