⚠ Live in production, still flag-gated — read before you write code Every perpetual surface — REST and WebSocket alike — is behind one rollout flag, enabled in production and staging today. Where it is off, the surface does not exist rather than erroring usefully:Point your integration at the production hosts:/perpetuals/venues,/perpetuals/instrumentsand the snapshot all return404, and the WebSocket refuses aperps_booksubscription. Do not read that404as an outage or a bad identifier. Contracts remain beta and carry no SLA, and three pages in this chapter are design previews with nothing callable behind them. See Availability and guarantees.
Perpetual futures are non-expiring leveraged instruments. They share familiar
market-data concepts with prediction markets — books, trades, and candles — but
require different identity, pricing, funding, margin, risk, and position
semantics. This chapter covers what is different.
Kairos standardizes Hyperliquid, Polymarket Perps, and Kalshi Margin without
hiding venue-specific facts or inventing conversions.
Perpetuals are not a separate API. They ride the same REST service
(Market Data) and the same WebSocket gateway
(Market Data Stream) as prediction
markets, with the same auth and error envelopes.
Never apply prediction-market probability math here. Perpetual prices are direct venue prices, not 0–100 probabilities. Dividing one by 100 produces a silently wrong number.
Hyperliquid is two products. Its HIP-4 outcome markets are prediction markets (provider: "hyperliquid", venue coins like#1210); its perpetuals are bare coins (provider: "hyperliquid_perps",BTC/kPEPE). Different id schemes, different price scales, separate decoders. See Venue normalization.
Identifier asymmetry: REST vs WebSocket
This is the single most common integration mistake in this chapter.
The canonical id is returned in the REST snapshot body as
canonical_instrument_id, and by GET /perpetuals/instruments. Do not swap
them. The venue slugs differ too — see
Venue normalization.
Live snapshot
heavy bucket, 6 units per call.
Request
The
depth default is per venue on purpose: a flat default would mark every
Hyperliquid snapshot depth-limited for no reason and ask Kalshi for less book
than it has.
Example
Response
Every financial value is a decimal string. Prices, quantities, volumes, rates, and multipliers never cross the boundary as a JSON number. See Exact values and time.
Every timestamp is a nanosecond JSON number, already past 2^53.fetched_at_ns,event_time_ns,observed_time_ns,interval_start_nsand friends will lose precision if parsed as a JavaScriptNumber. Parse them asBigIntor as text. See Exact values and time.
Errors
Errors use the shared Market Data API envelope,{"error": {"code": …, "message": …}}.
502 is also how “stale” is reported. The snapshot fails closed rather
than serving a partially old body: any component outside its freshness fence
returns 502 upstream. The fences are tabulated in
Availability and guarantees.Notes
The snapshot isCache-Control: no-store. The Market Data API coalesces
bursts behind a one-second replica-local cache, and concurrent requests for the
same (venue, instrument, depth) share one in-flight fetch.
Quantity units differ by venue and must not be collapsed:
Book stream
The WebSocket gateway exposes one perps topic,perps_book. It delivers
kairos.v2.BookSnapshot frames for all three venues and replays the latest
validated frame on subscribe when one is cached. Automatic catalog enrollment
keeps books warm without relying on a subscriber-created presence lease.
Perps are v2-only. There is no parallel v1 perpetual book contract to reconcile
or deprecate. See
Streaming and recovery for the
byte-level frame and consumer algorithm.
The other beta surfaces
Full instrument rules and discovery are owned by the Python API, not by the
snapshot endpoint.
What is shared with prediction markets
What is new
- Non-expiring instrument identity and asset roles
- Exact decimal values with explicit quantity units
- Mark, index, oracle, mid, and other typed price sources
- Funding observations, predictions, settlements, and account ledger entries
- Cross, isolated, and venue-specific margin modes
- Position episodes, account risk, maintenance tiers, and liquidation events
- Reconnect epochs, book-view identities, revision state, and recovery fences
Design principles
- Preserve facts. Native identifiers, units, clocks, and source metadata remain available after normalization.
- Never guess. Kairos does not infer a multiplier, liquidation, side, or conversion that the venue does not prove.
- Exact values at boundaries. Prices, quantities, rates, balances, and notionals do not cross service boundaries as binary floating-point values.
- Absence is not zero. Missing, unavailable, stale, and zero are different states.
- Recovery is part of the contract. A stream consumer can determine when state is valid, detect gaps, and rebuild deterministically.
- Shared shapes, separate semantics. Reuse is preferred when the economic meaning is the same; venue extensions remain explicit when it is not.
Current availability
Beta fields and availability can change before general availability. Private
account data, order entry, and an SLA remain outside the public market-data
beta — see
Availability and guarantees for
the exact boundary.

