Skip to main content
GET
Returns, for every fee leg of the market, what has accrued over its life, what has been swept out and what is still waiting on the market. It also itemises the liquidity providers’ part of each split and totals the interest and fixed transaction fees collected. Two sources feed the figures. Accrued and paid amounts come from the market’s own fee events, which Trusset reads into a ledger up to a settled block. Pending amounts are the market’s payable balances. When the ledger is complete, both are read at the same block, and each leg reconciles to the smallest unit. The figures trail the chain. Nothing newer than the settled block appears, so a repayment or a sweep mined a moment ago shows here once its block is final. How finality affects the figures explains what a partial answer looks like.

Path Parameters

string
required
Market ID.

Response Fields

Every amount is an object { raw, value }: raw in the borrow asset’s smallest unit, value as a decimal string at its decimals.
object

How finality affects the figures

The ledger reads fee events only up to a settled block, never to the chain head. That block is the chain’s finalized block, or five blocks behind the head where the node reports no finality. On a complete history, pending is read at that same block. Accrued, paid and pending then describe one moment, and reconciliation checks each leg against it. A sweep that mined after that block appears in neither paid nor pending until its block is final. A partial history is flagged, never presented as complete. complete is false, reconciliation and balancesAtBlock are null, and pending is read live while accrued and paid cover only the blocks read so far. Three situations cause it: A market deployed moments ago returns a history like this until its deployment block is final.
History Pending Finality
A complete read is reused for up to 60 seconds, so two calls in quick succession return the same figures.

Error Codes