Skip to main content
Looks up the last closed ledger at a given real-world time. Useful for correlating events that happened off-chain with historical data in the XRP Ledger. This method will use 20 Compute Units.

Reference: Here

Parameters

  • date (string, optional) An ISO 8601 timestamp of the time to look up, without microseconds and using Z as the time zone marker, for example 2025-01-01T00:00:00Z. If omitted, use the current time.

Returns

  • ledger_index (number) The ledger index of the most recently closed ledger at the specified time.
  • ledger_hash (string) The identifying hash of that ledger.
  • closed (string) The official close time of that ledger.
  • validated (boolean) If true, the ledger has been validated by the consensus process and is immutable.
Over WebSocket, send {"id":1,"command":"ledger_index","date":"2025-01-01T00:00:00Z"} to wss://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE>.
This method is served by Clio, our full-history XRPL server, and is not available from rippled.