Skip to main content
GET
Returns the largest debt the market will allow against a given quantity of collateral, computed by the contract from the stored oracle price and the collateral factor. Use it to drive a borrow slider before calling Open Loan. The quote is the collateral bound alone. It does not check the pool’s liquidity, the supply caps, the minimum borrow, or whether the price is fresh. Open Loan checks each of those before it returns calldata. On a market that charges an open fee, the borrower receives the loan amount less that fee and owes the full amount. The response also reports oracle freshness, because the contract refuses a new loan against a stale price.

Path Parameters

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

Query Parameters

string
required
Collateral quantity as a decimal string, for example "1000". Must be greater than zero, and is parsed at the collateral token’s decimals, so it may carry no more decimal places than the token has.

Response Fields

object
When isStale is true, opening a loan against the stored price reverts. On a NAV or MARKET market, push a fresh price with Sync Oracle Price. Or attach a signedPrice from Sign Price to the borrow call. An ORACLE market takes neither: its price moves only when the external feed it reads updates. A FIXED market never reports a stale price.

Error Codes