List the open DEX offers placed by an account.
account.listOffers(
params?: AccountListOffersParams,
): Promise<ListOffersResult>| Parameter | Type | Required | Description |
|---|---|---|---|
account | string | No | The account whose offers to list. Defaults to the primary signer's account. |
Resolves to a ListOffersResult:
| Field | Type | Description |
|---|---|---|
data | readonly OfferSummary[] | The shaped open offers. |
Each offer mirrors the buyOffer / sellOffer input format, so it's composable back into those write operations.
| Field | Type | Description |
|---|---|---|
offerSequence | number | The offer's sequence number (pass to cancelOffer). |
amount | string | The quantity of the base asset being traded, as a decimal string. |
price | IOUOfferPrice | What is paid/received for it, in offer-price form. |
orderType | 'limit' | 'passive' | Resting offers are limit, or passive when the passive flag is set. |
type | 'buy' | 'sell' | Whether the offer buys or sells the base asset. |
Amounts stay strings rather than being coerced to number: these values compose back into iou.buyOffer / iou.sellOffer, and rounding an exact ledger amount through a double would silently change the order you re-place from a read.
Read-only — no signer is required and nothing is submitted. Queries the ledger with account_offers.
const { data } = await client.account.listOffers()
for (const offer of data) {
console.log(offer.offerSequence, offer.type, offer.amount)
}