Skip to main content
GET
Returns every position recorded for a market, newest first, each with its five most recent transactions. There is no pagination: the whole book comes back in one response. The endpoint reconciles against the chain in two steps before it answers. First, an event sweep records loans opened by any wallet and writes terminal statuses from the LoanClosed and LoanLiquidated events and auction starts it finds. The sweep runs at most once a minute per market. Second, a live read of the open positions pulls collateral, principal, interest, health factor, due date and stamped rate from the market contract and writes them back to the records. If the chain is unreachable, both steps are skipped and stored values are returned unchanged. Live state is fetched for the first 50 open positions only. Beyond that the stored values are served, so a market with more than 50 open loans returns a mix. The compliance block is attached to those open positions for at most 25 distinct borrowers. status is never inferred from the live read. A terminal label is written only by the confirm calls and the event sweep that can attest to it. A loan the chain reports as closed therefore keeps its recorded status until its evidence arrives.

Path Parameters

string
required
The market’s record ID, as id on List Markets, not its contract address. See Market IDs.

Response Fields

object
Positions are recorded when a loan is opened through this API on confirm, and are backfilled from chain events by the sweep. A loan opened by a wallet signing calldata directly is picked up by the next sweep, rather than at broadcast time.

Error Codes