For the complete documentation index, see llms.txt. This page is also available as Markdown.

ledger_closed

Returns the unique identifiers of the most recently closed ledger. This ledger is not necessarily validated and immutable yet.

This method will use 20 Compute Units.


Reference: Here

Parameters

None

Returns

  • ledger_hash (string) The unique hash of this ledger version, in hexadecimal.

  • ledger_index (unsigned integer) The ledger index of this ledger version.

// Result
{
  "result": {
    "ledger_hash": "3FF4EFB0A896061499DCE559C21A44563F74C040226019033B06BA6FC383B450",
    "ledger_index": 107292935,
    "status": "success"
  },
  "status": "success",
  "type": "response",
  "forwarded": true
}

Over WebSocket, send {"id":1,"command":"ledger_closed"} to wss://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE>.

Last updated

Was this helpful?