book_offers
POST
Returns the list of offers in the order book between two currencies.It lets you check the exchange rate and the funding status of each offer.
param[0]
parametersobjectrequired
taker_getsobjectrequired
Specifies an asset by currency code and issuer. No amount is included.currencystring
The currency code. Pass XRP for XRP.issuerstring
The address of the account that issued the token. Required for anything other than XRP.taker_paysobjectrequired
Specifies an asset by currency code and issuer. No amount is included.currencystring
The currency code. Pass XRP for XRP.issuerstring
The address of the account that issued the token. Required for anything other than XRP.takerstring
The account address used as the perspective for the order book.When specified, the unfunded offers from that account are also included in the results.limitinteger
The number of offers to return.domainstring
The domain ledger entry ID of the Permissioned DEX.It can be used only when the PermissionedDEX amendment is enabled.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 offers in the order book.
Accountstring
The address of the account that created the offer.TakerGetsoneOf
Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.TakerPaysoneOf
Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.BookDirectorystring
The ID of the order book directory this offer belongs to.Flagsinteger
A bit-map of flags enabled for the offer.Sequenceinteger
The sequence number of the transaction that created the offer.indexstring
The ID that identifies this offer ledger entry.qualitystring
The exchange rate of the offer, calculated as taker_pays divided by taker_gets.owner_fundsstring
The tradeable balance held by the offer's creator.It is returned only for the highest-ranked offer among the offers from the same account.taker_gets_fundedoneOf
Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.taker_pays_fundedoneOf
Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.ledger_hashstring
The hash of the ledger version used. Returned when a validated ledger version was queried.ledger_indexinteger
The ledger index of the version used. Returned when a validated ledger version was queried.ledger_current_indexinteger
The ledger index of the in-progress ledger. Returned when the current ledger was queried.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_offers","params": [{"taker_gets": {"currency": "XRP"},"taker_pays": {"currency": "USD","issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"},"limit": 10}]}'