API
REST + WebSocket
Endpoints documented below are part of the proposed protocol specification. The reference implementation is in development; api.miletus.exchange is not currently live.
GET/v1/prices/{symbol}
Synthetic price, confidence interval, source breakdown, timestamp.
WS/v1/prices/stream
Push on deviation trigger (>0.3%) or heartbeat (5 min).
GET/v1/markets/{symbol}
Open interest, funding rate, max leverage, spread, vault utilization, TVL.
POST/v1/positions/open
Open long or short. Params: symbol, side, size_usdc, leverage.
POST/v1/positions/close
Close full or partial. Returns exit price, realized PnL, fees, funding.
GET/v1/oracle/{symbol}/history
Historical prices at all three layers. 15-sec candles, daily marks, weekly index.
GET/v1/signals/feed
Geopolitical signals, trade policy updates, production data. Tagged with affected symbols.
// Real-time NdPr price with confidence interval
const { price, confidence, sources } = await fetch(
'https://api.miletus.exchange/v1/prices/NDPR'
).then(r => r.json())
// { price: 97.42, confidence: { upper: 99.10, lower: 95.74 },
// sources: [{ name: "MP Materials", signal: +0.82%, weight: 0.35 }, ...] }
await fetch('https://api.miletus.exchange/v1/positions/open', {
method: 'POST',
body: JSON.stringify({ symbol: 'NDPR', side: 'LONG', size_usdc: 500, leverage: 5 })
})