Skip to main content
GET
Scans the market’s active loans and returns every loan that Liquidate Loan would accept now. A loan qualifies on either of two triggers. Its health factor is below 1.0, or its term has run past its effective due date plus the grace period, however healthy its collateral is. A market that makes open-ended loans has only the first trigger. The first scan reads every loan the market has ever opened. Later scans read only the loans still known to be active plus any opened since, so the cost grows with the active book. Poll it on a schedule rather than per page view.
A failed chain read is not reported as an error. If the market’s loan counter cannot be read, the response carries totalActiveLoans: 0 and empty lists. A loan whose own read fails is left out, and when the term reads fail, loans that qualify only on their term are missing too. An empty liquidatableLoans is therefore not proof that the book is healthy. onChainError appears only when composing the response fails after the reads.

Path Parameters

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

Response Fields

object
Health factors are computed against the oracle’s stored price, and term enforceability against the time of the read. If the price is stale the health figures are stale too, and Liquidate Loan refuses every loan with PRICE_STALE until a fresh price is on the oracle or the call carries an accepted signedPrice. Push a current price with Sync Oracle Price before acting on this list.

Error Codes