xrp

XRP (XRP)

Method: POST account_currencies

dropdown

POST account_currencies

The account_currencies command retrieves a list of currencies that an account can send or receive, based on its trust lines.

(This is not a thoroughly confirmed list, but it can be used to populate user interfaces.)

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_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.

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_currencies",
"params": [{"account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH"}],
"id": "getblock.io"}'


Response

{
    "result": {
        "ledger_current_index": 63631836,
        "receive_currencies": [],
        "send_currencies": [],
        "status": "success",
        "validated": false
    }
}