book_changes
POST
Reports information about changes to the order books compared with the previous ledger version.It lets you check the traded volume and the open, high, low and close rates for each currency pair.
param[0]
parametersobjectrequired
ledger_hashstring
The hash of the ledger version to use. Pass a 32-byte hex string.ledger_indexoneOf
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.
Responses
The list of order book changes.
currency_astring
The first currency identifier. XRP uses XRP_drops; tokens use the issuer/currency format.currency_bstring
The second currency identifier. Only tokens are specified.volume_astring
The total traded volume of the first currency.volume_bstring
The total traded volume of the second currency.highstring
The highest exchange rate recorded in this ledger version.lowstring
The lowest exchange rate recorded in this ledger version.openstring
The exchange rate before the ledger was processed.closestring
The exchange rate after the ledger was processed.ledger_hashstring
The hash of the ledger version used.ledger_indexinteger
The ledger index of the version used.ledger_timeinteger
The official close time of the ledger, in seconds since the Ripple Epoch.typestring
The response type. Always returns bookChanges.validatedboolean
Whether the response was derived from a validated ledger version.codestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "Unauthorized"}
cURL
curl -X POST 'https://xrpl-mainnet.nodit.io' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"method": "book_changes","params": [{"ledger_index": "validated"}]}'