xrp

XRP (XRP)

Method: POST account_offers

dropdown

POST account_offers

The account_offers method retrieves a list of offers made by a given account that are outstanding as of a particular ledger version.

Parameters

account - String

The unique identifier of an account, typically the account's Address.

The request returns channels where this account is the channel's owner/source.

ledger - Unsigned Integer, or String

(Deprecated, Optional) A unique identifier for the ledger version to use, such as a ledger index, a hash, or a shortcut such as "validated".

ledger_hash - String

(Optional) A 20-byte hex string for the ledger version to use.

ledger_index - String or Unsigned Integer

(Optional) The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically.

limit - Integer

(Optional, default varies) Limit the number of trust lines to retrieve.

The server is not required to honor this value.

Must be within the inclusive range 10 to 400.

marker - Marker

(Optional) Value from a previous paginated response.

Resume retrieving data where that response left off.

strict - Boolean

(Optional) If true, then the account field only accepts a public key or XRP Ledger address.

Otherwise, account can be a secret or passphrase (not recommended).

The default is false.

Request

curl --location --request POST 'https://xrp.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "account_offers",
"params": [{"account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH"}],
"id": "getblock.io"}'


Response

{
    "result": {
        "account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
        "ledger_current_index": 63631836,
        "offers": [],
        "status": "success",
        "validated": false
    }
}