Funding and the oracle
Oracle, mark and index prices, how validators supply them, and how funding is settled.
Prices
GET /oracle/{pair} serves three prices for a market, each with 6 decimals:
- oracle price — the price the validators supply;
- mark price — the price margin, liquidation and the price band are measured against;
- index price — the reference price funding compares against.
Each validator supplies prices, and a validator's price counts only while it is fresh: a price older than 30 seconds
drops out. If a market's price is missing or stale, the chain stops what depends on it and says so —
an agent order on that market, for example, is refused with oracle_unavailable. Whether the oracle is healthy right
now is part of the agreed facts (GET /truth/v1, field oracle).
Order prices carry 8 decimals, oracle reads 6: multiply an oracle price by 100 to compare it with a signed price.
Funding
Perpetual markets settle funding between longs and shorts. When the rate is positive, longs pay shorts.
- Funding is settled every —, at the first batch boundary at or after the last settlement plus the interval.
- The rate for one interval is capped at — in either direction.
GET /funding/{pair} answers the rate applied at the last settlement, the next settlement time and what decides it
(next_funding_basis), an indicative next rate, and the market's long and short open interest.
Read rate_8dec or rate_pct. rate_bps is rounded to whole basis points and reads 0 for small rates.
Network facts last checked against the network 2026-10-22 13:00:37 UTC · mainnet spec v28 · testnet spec v8