Skip to main content
GET
Returns the market oracle’s current state. Check this before any borrow or liquidation flow, since the contract rejects actions priced against a stale oracle. A stale price makes opening a loan, borrowing more, liquidating, and withdrawing collateral against outstanding debt revert, unless the transaction carries a fresh signed price. Repaying never reads a price, so a stale oracle never blocks a repayment.

Path Parameters

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

Response Fields

object
The failure response is a different shape, not an error status. When configured is false the endpoint still returns 200 with price: "0", isStale: true, and no priceAge, maxPriceAge, maxDeviationBps, fixed, markDownOnly, owner, ownerIsInstanceWallet or signerAddress. Guard on configured before reading those fields.
A healthy answer is held for up to 15 seconds per market and instance. Any successful write through this API clears it, so a read right after a confirmed price push reaches the chain.

Price Decimals

Oracle prices carry the market’s borrow asset decimals, not a fixed precision. The price is per whole collateral token, in the smallest unit of the settlement token (stablecoin): a 6-decimal token prices at 6 decimals, an 18-decimal one at 18. Read borrowAssetDecimals from Get Market rather than assuming.

Fixed Price Markets

A market deployed with the FIXED price source holds the price stated at deployment for its whole life. fixed and markDownOnly read true, and the answer adds stale: false and staleness: null. The price never goes stale and accepts no signed price. The oracle owner or an authorized signer can only mark it down with Sync Oracle Price, within maxDeviationBps. Whoever owns the oracle, owner here, could still replace its implementation through an upgrade and with it the fixed price, so the lender of record keeps the oracle owner in its own control.

External Feed Markets

A market deployed with the ORACLE price source reads an external feed. Its oracle takes no pushed or signed price, so price and timestamp are the feed’s live answer rescaled to the borrow asset’s decimals. When the feed cannot answer, isStale reads true and the price read fails. Read priceSource from Get Market to tell the two kinds apart.

Error Codes