POSTaccount_lines

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

Returns information about an account's trust lines. It lets you check the balance and limit of every non-XRP token, along with its freeze and authorization state.

Request Body
methodstringrequired
accountstringrequired

The account to look up.

peerstring

Returns only the trust lines connected to the specified account.

ignore_defaultboolean

Whether to exclude trust lines in their default state from the results.

limitinteger

The number of trust lines 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 account the request was made from the perspective of.

accountstring

The address of the counterparty on this trust line.

balancestring

The current balance. A positive value is owed to this account by the counterparty; a negative value is owed by this account.

currencystring

The currency code of the token this trust line holds.

limitstring

The maximum amount this account is willing to owe the counterparty.

limit_peerstring

The maximum amount the counterparty is willing to owe this account.

quality_ininteger

The valuation ratio applied to incoming balances.

quality_outinteger

The valuation ratio applied to outgoing balances.

no_rippleboolean

Whether this account has enabled the No Ripple flag.

no_ripple_peerboolean

Whether the counterparty has enabled the No Ripple flag.

authorizedboolean

Whether this account has authorized the trust line.

peer_authorizedboolean

Whether the counterparty has authorized the trust line.

freezeboolean

Whether this account has frozen the trust line.

freeze_peerboolean

Whether the counterparty has frozen the trust line.

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_lines",
  "params": [
    {
      "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
      "ledger_index": "validated",
      "limit": 200
    }
  ]
}'
Response
Example · 200
{
  "result": {
    "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
    "lines": [
      {
        "account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
        "balance": "150.5",
        "currency": "USD",
        "limit": "1000",
        "limit_peer": "0",
        "no_ripple": false,
        "no_ripple_peer": false,
        "quality_in": 0,
        "quality_out": 0
      }
    ],
    "ledger_hash": "17ACB57A0F73B5160713E81FE72B2AC9F6064541004E272BD09F257D57C30C02",
    "ledger_index": 98765432,
    "validated": true
  }
}