All market data in MVP comes from Hyperliquid. Platform adapts format and passes through.
| Data Type | HL Channel | Frequency |
|---|---|---|
| Real-time price / mark price | allMids |
Real-time |
| Order book depth | l2Book |
Real-time |
| Candlestick / K-line | candle |
Per interval |
| Funding rate | activeAssetCtx |
Real-time |
| Recent trades | trades |
Real-time |
| User position events | user |
Event-driven |
| Data Type | Source | Sync Frequency |
|---|---|---|
| Contract metadata (listed assets, leverage range) | HL /info |
Hourly |
| Precision rules (szDecimals, size step) | HL /info |
Hourly |
| Maintenance margin rate tiers | HL /info |
Hourly |
| Predicted funding rate | HL REST | Hourly |
| Current funding rate | HL REST / WS | Real-time |
HL /info metadata contains:
szDecimals: price/quantity decimal places per assetmaxLeverage: maximum leverage per assetmarginTableTiers: maintenance rate tier table (by notional value bracket)Usage:
Platform does not compute mark price. It uses HL’s pushed mark price directly.
allMids WebSocket subscriptionEnd-to-end latency = HL generation → Platform receive → user display
Alert: > 200ms
Critical: > 500ms → Pause internalization (no internalization during data lag)
See 09-settlement.md for full funding settlement formulas.
Disconnect → Immediate alert
Reconnect: exponential backoff (1s, 2s, 4s, ... max 30s)
During disconnect:
- Pause internalization (no real-time price = no safe B-booking)
- Pause HL order forwarding
- Users see "data loading"
After recovery: full snapshot refresh, then incremental updates
Detect: single update > configured threshold (e.g. BTC 5% in one update)
Handle: use last valid price
Notify: alert + pause internalization
Recover: resume after N consecutive normal updates