POSTaccount_offers

XRP Ledger Mainnethttps://xrpl-mainnet.nodit.io/

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.

Request Body
methodstringrequired
accountstringrequired

The account to look up.

limitinteger

The number of offers to return. Pass a value between 10 and 400.

markerobject

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_indexinteger

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.

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.

XRP Amountstring
Token Amountobject
currencystring

The currency code. Either a 3-character code or a 40-character hex string.

issuerstring

The address of the account that issued the token.

valuestring

The amount expressed as a string.

taker_paysoneOf

Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.

XRP Amountstring
Token Amountobject
currencystring

The currency code. Either a 3-character code or a 40-character hex string.

issuerstring

The address of the account that issued the token.

valuestring

The amount expressed as a string.

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.

markerobject

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.

X-API-KEY
RequestCU50
cURL
curl -X POST "https://xrpl-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "method": "account_offers",
  "params": [
    {
      "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
      "ledger_index": "validated",
      "limit": 200
    }
  ]
}'
Response
Example · 200
{
  "result": {
    "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
    "offers": [
      {
        "flags": 0,
        "quality": "0.000000015",
        "seq": 40,
        "taker_gets": "1000000",
        "taker_pays": {
          "currency": "USD",
          "issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
          "value": "0.015"
        }
      }
    ],
    "ledger_hash": "17ACB57A0F73B5160713E81FE72B2AC9F6064541004E272BD09F257D57C30C02",
    "ledger_index": 98765432,
    "validated": true
  }
}