xrp

XRP (XRP)

Method: POST account_lines

dropdown

POST account_lines

The account_lines method returns information about an account's trust lines, including balances in all non-XRP currencies and assets.

All information retrieved is relative to a particular version of the ledger.

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.

peer - String

(Optional) The Address of a second account.

If provided, show only lines of trust connecting the two accounts.

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.

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


Response

{
    "result": {
        "account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
        "ledger_current_index": 63631836,
        "lines": [
            {
                "account": "rrh7rf1gV2pXAoqA8oYbpHd8TKv5ZQeo67",
                "balance": "0",
                "currency": "0158415500000000C1F76FF6ECB0BAC600000000",
                "freeze_peer": true,
                "limit": "0",
                "limit_peer": "0",
                "no_ripple": true,
                "quality_in": 0,
                "quality_out": 0
            }
        ],
        "status": "success",
        "validated": false
    }
}
GetBlock.io

Get access to 40+ blockchain nodes right now! GetBlock provides a fast and reliable connection for the most popular cryptocurrencies` nodes.

Subscribe

Email is invalid

2019 - 2021 GetBlock