Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Settlements

GET /v1/account/{addr}/settlements
Needs a session for the address in the path.
Every position of the account that has settled, newest first, a page at a time. Unlike engine.settled on GET /v1/account/{addr}, which holds the last eight days, this keeps every one, so a book the contract may still owe you (see Settlement) can always be found.
query limitintegerdefault: 100
At most 100, or 1,000 for a premium account. A larger value is cut to the most.
query beforeinteger
The pos of the last settlement of the page before: the next page is the settlements before it.
query envelope1
Wrap the answer as {"position", "settlements"}.
[ { "pos": 920114, "underlyingKey": 7, "specifier": 859008923130267914, "quantity": -1, "amount": -25800000 } ]
FieldMeaning
posThe settlement's stream position, which names it.
underlyingKey, specifierThe contract. Its expiry is in the specifier (see Instruments); its settlement price is on GET /v1/settlements.
quantityThe position that settled, signed: positive long, negative short.
amountThe cash the settlement moved for this position, micro-USDC: positive paid to you, negative paid by you.
The settlements come from the exchange's history; if it is away the answer is 503 with Retry-After: 1. Each settlement also arrives live as a positionSettled event on your WebSocket account: channel.