Skip to main content

account_offers

POST

Returns the list of outstanding offers created by an account.It lets you check the buy and sell amounts and the exchange rate of each offer.
param[0]
parametersobjectrequired
accountstringrequired
The account to look up.
limitinteger
The number of offers to return. Pass a value between 10 and 400.
markerstring
A value that marks a pagination position. Pass the marker value from a previous response to retrieve the next page.Its format depends on the server implementation, so use it verbatim without interpreting its contents.
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.
The ledger index of the version to use.
Responses
accountstring
The address of the account that created the offer.
The list of outstanding offers.
flagsinteger
A bit-map of flags enabled for the offer.
seqinteger
The sequence number of the transaction that created the offer.
taker_getsoneOf
Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.
An XRP amount in drops. 1 XRP equals 1,000,000 drops.
taker_paysoneOf
Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.
An XRP amount in drops. 1 XRP equals 1,000,000 drops.
qualitystring
The exchange rate of the offer, calculated as taker_pays divided by taker_gets.
expirationinteger
The expiration time of the offer, in seconds since the Ripple Epoch. Returned only when an expiration is set.
limitinteger
The limit value used in the request.
markerstring
A value that marks a pagination position. Pass the marker value from a previous response to retrieve the next page.Its format depends on the server implementation, so use it verbatim without interpreting its contents.
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": "account_offers",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"limit": 200
}
]
}'