v3.21.0-pre1
Pre-releaseFirst pre-release in the v3.21.0 cycle. Adds the HIP-4 outcome market family, unifies the response shape across /outcomes/* endpoints, and ships a few cross-family fixes.
Breaking changes
/v1/hyperliquid/markets — volume / count semantics
buy_volume_24h / sell_volume_24h now report taker-aggressor notional only (previously combined taker + maker on the matched side). volume_24h is the true matched total (was approximately 2× due to two rows per match) and trades_24h is the true match count (was approximately 2× inflated).
| Field | Before | After |
|---|---|---|
buy_volume_24h |
bid-side notional | taker buys (aggressor on the ask) |
sell_volume_24h |
ask-side notional | taker sells (aggressor on the bid) |
volume_24h |
sum of both sides (≈ 2× true) | true matched volume |
trades_24h |
row count (≈ 2× true) | true match count |
/v1/hyperliquid/markets/ohlc, /v1/hyperliquid/markets/liquidations/ohlc, /v1/hyperliquid/platform
Same taker-derived swap as /markets, applied to the equivalent fields on each. Additionally, the redundant buys / sells columns are removed from the response — after the fix both equalled the match count, so they carried no information.
/v1/hyperliquid/markets — nullable funding fields for spot rows
open_interest, funding_rate, and funding_snapshot_time now return null for spot markets (which have no funding data), instead of the sentinels 0 / 0 / 1970-01-01 00:00:00. Perp markets are unchanged.
// before
{ "coin": "@107", "dex": "spot", "open_interest": 0, "funding_rate": 0, "funding_snapshot_time": "1970-01-01 00:00:00" }
// after
{ "coin": "@107", "dex": "spot", "open_interest": null, "funding_rate": null, "funding_snapshot_time": null }New endpoints (six)
| Endpoint | Description |
|---|---|
GET /v1/hyperliquid/outcomes |
Outcome universe with per-leg price, 24h volume, and 24h price change |
GET /v1/hyperliquid/outcomes/ohlc |
Per-leg OHLCV candles |
GET /v1/hyperliquid/outcomes/trades |
Taker fills feed (BUY/SELL + optional composition events) |
GET /v1/hyperliquid/outcomes/users |
Per-user-per-outcome P&L and volume rollup; leaderboard mode when filtered by outcome/question |
GET /v1/hyperliquid/outcomes/users/positions |
Current share holdings per (user, leg) — open balances only |
GET /v1/hyperliquid/outcomes/users/activity |
Composition events feed per user (SPLIT/MERGE/MERGE_QUESTION/NEGATE/SETTLEMENT) |
Response shape on /outcomes/*
Every /outcomes/* response (except /outcomes itself, which remains the canonical full-metadata source) embeds a compact outcome context object:
OutcomeContexton/outcomes/users(aggregates collapse legs):outcome_id,outcome_name,question_id,question_name,status,settle_fraction.OutcomeLegContexton per-leg endpoints (/outcomes/ohlc,/outcomes/trades,/outcomes/users/positions,/outcomes/users/activity): the above +coin,side_index,side_label.
settle_fraction follows the HIP-4 spec — a value in [0, 1] representing the Yes share's payout at settlement. Null until status='settled'.
Additive filters (non-breaking)
?direction=...(CSV) on/v1/hyperliquid/outcomes/trades,/v1/hyperliquid/markets/activity, and/v1/hyperliquid/markets/liquidations, each with an endpoint-specific enum. Default behavior unchanged when omitted.?useris optional on/outcomes/users— when omitted, the response is a leaderboard for the given?outcome_id/?question_idscope, sorted bytotal_volumedesc.
Performance
- Responses are now gzip-encoded when
Accept-Encoding: gzipis sent. JSON payloads typically compress 5–10× on the wire. /v1/hyperliquid/outcomesis meaningfully faster — fewer source-table scans per request.
🤖 Generated with Claude Code