Skip to main content
Reports information about changes to the order books in the decentralized exchange compared with the previous ledger version. Useful for building candlestick charts. This method will use 40 Compute Units.

Reference: Here

Parameters

  • ledger_hash (string, optional) The unique hash of the ledger version to use.
  • ledger_index (number or string, optional) The ledger index of the ledger to use, or a shortcut string such as validated.

Returns

  • type (string) The string bookChanges.
  • ledger_hash (string) The identifying hash of the ledger version used.
  • ledger_index (number) The ledger index of the ledger version used.
  • ledger_time (number) The official close time of the ledger, in seconds since the Ripple Epoch.
  • validated (boolean) If true, the information comes from a validated ledger version.
  • changes (array) One book update object per order book that was updated in this ledger, each with currency_a (XRP_drops for XRP, otherwise issuer/currency), currency_b, volume_a, volume_b, high, low, open and close. Empty if no order books were updated.
Over WebSocket, send {"id":1,"command":"book_changes","ledger_index":"validated"} to wss://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE>.