Skip to main content

account_lines

POST

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.
param[0]
parametersobjectrequired
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.
markerstring
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_indexoneOf
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.
The list of trust lines.
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.
markerstring
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.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://xrpl-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"method": "account_lines",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"ignore_default": false,
"limit": 200
}
]
}'