Oracle
Get Oracle Status
Read the current price, staleness, and signer authorization
GET
/
lending-external-securities
/
api
/
markets
/
{marketId}
/
oracle-status
curl "https://api.trusset.org/lending-external-securities/api/markets/{marketId}/oracle-status" \
-H "X-API-Key: trusset_your_key_here"
{
"success": true,
"data": {
"price": "104.820000",
"priceRaw": "104820000",
"timestamp": 1718445600,
"lastUpdate": "2025-06-15T10:00:00.000Z",
"isStale": false,
"priceAge": 1200,
"maxPriceAge": 86400,
"maxDeviationBps": 5000,
"configured": true,
"owner": "0x333...444",
"signerAddress": "0x123...456",
"signerAuthorized": true
}
}
{
"success": true,
"data": {
"price": "0",
"priceRaw": "0",
"timestamp": 0,
"lastUpdate": null,
"isStale": true,
"configured": false,
"signerAuthorized": false,
"error": "call revert exception"
}
}
{
"success": false,
"error": {
"code": "NO_ORACLE",
"message": "No oracle configured"
}
}
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.
Path Parameters
string
required
Market ID.
Response Fields
object
Show child attributes
Show child attributes
boolean
Whether the oracle was readable. When
false, the fields marked conditional below are absent and an error field is present instead.string
Current price as a decimal string, in borrow asset units.
string
Same price in base units.
integer
Unix seconds of the last price write.
string
The same instant as an ISO 8601 string, or null.
boolean
Whether the price is older than
maxPriceAge. A stale price causes borrow, withdraw, and liquidation calls to revert unless a signed price is supplied.integer
Seconds since the last update. Conditional on
configured.integer
Staleness threshold in seconds, from the market config. Conditional on
configured.integer
Circuit breaker limit in basis points. A price push differing from the current price by more than this is rejected. Reported as
5000 when the oracle does not expose the value. Conditional on configured.string
Oracle owner address. The owner is implicitly an authorized signer. Conditional on
configured.string
Registered wallet address, or null when no wallet is registered. Conditional on
configured.boolean
Whether the registered wallet can push and sign prices for this oracle.
string
Present only when
configured is false.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, owner, or signerAddress. Guard on configured before reading those fields.Price Decimals
Oracle prices carry the market’s borrow asset decimals, not a fixed precision. A USDC market prices at 6 decimals, a DAI market at 18. ReadborrowAssetDecimals from Get Market rather than assuming.
curl "https://api.trusset.org/lending-external-securities/api/markets/{marketId}/oracle-status" \
-H "X-API-Key: trusset_your_key_here"
{
"success": true,
"data": {
"price": "104.820000",
"priceRaw": "104820000",
"timestamp": 1718445600,
"lastUpdate": "2025-06-15T10:00:00.000Z",
"isStale": false,
"priceAge": 1200,
"maxPriceAge": 86400,
"maxDeviationBps": 5000,
"configured": true,
"owner": "0x333...444",
"signerAddress": "0x123...456",
"signerAuthorized": true
}
}
{
"success": true,
"data": {
"price": "0",
"priceRaw": "0",
"timestamp": 0,
"lastUpdate": null,
"isStale": true,
"configured": false,
"signerAuthorized": false,
"error": "call revert exception"
}
}
{
"success": false,
"error": {
"code": "NO_ORACLE",
"message": "No oracle configured"
}
}
⌘I
curl "https://api.trusset.org/lending-external-securities/api/markets/{marketId}/oracle-status" \
-H "X-API-Key: trusset_your_key_here"
{
"success": true,
"data": {
"price": "104.820000",
"priceRaw": "104820000",
"timestamp": 1718445600,
"lastUpdate": "2025-06-15T10:00:00.000Z",
"isStale": false,
"priceAge": 1200,
"maxPriceAge": 86400,
"maxDeviationBps": 5000,
"configured": true,
"owner": "0x333...444",
"signerAddress": "0x123...456",
"signerAuthorized": true
}
}
{
"success": true,
"data": {
"price": "0",
"priceRaw": "0",
"timestamp": 0,
"lastUpdate": null,
"isStale": true,
"configured": false,
"signerAuthorized": false,
"error": "call revert exception"
}
}
{
"success": false,
"error": {
"code": "NO_ORACLE",
"message": "No oracle configured"
}
}
