Skip to content

iou.list()

[Source]

List every IOU trust line for an account.

Signature

iou.list(
  params?: IOUListParams
): Promise<IOUListResult>

Parameters

ParameterTypeRequiredDescription
role'holder' | 'issuer'NoQuery as holder (default) or issuer.
accountstringNoThe account whose trust lines to list. Defaults to the primary signer's account.

Returns

Resolves to an IOUListResult, where ious[i] corresponds to data[i]:

FieldTypeDescription
iousreadonly string[]The iouID of each line, composable into the write operations.
datareadonly IOUTrustLine[]The shaped trust lines. See iou.retrieve for IOUTrustLine.

Underlying XRPL request

Read-only — no signer is required and nothing is submitted. Queries the ledger with account_lines.

Example

const { data } = await client.iou.list()

for (const line of data) {
  console.log(line.currency, line.balance)
}