Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt

Use this file to discover all available pages before exploring further.

HIP-4 outcome markets live under /v1/hyperliquid/hip4/*. Use this family when the product needs binary outcome-market data, side-level order books, trades, candles, open interest, or probability-like mark and mid values.
HIP-4 mark_price and mid_price values are implied probabilities in the [0, 1] range. Do not treat them as USD prices.

Example

curl "https://api.0xarchive.io/v1/hyperliquid/hip4/orderbook/%230" \
  -H "X-API-Key: $OXARCHIVE_API_KEY"

Use HIP-4 For

NeedRoute family
Outcome discoveryHIP-4 outcomes and instruments
Side-level order bookHIP-4 order-book routes
Outcome tradesHIP-4 trade routes
Probability historyHIP-4 candles, mark/mid, and open-interest projections

Implementation Notes

HIP-4 routes are for outcome-market data, so symbol handling and price interpretation are different from core perps or Spot pairs. Store the outcome identifier and venue family with every record. If a UI, model, or backtest displays a HIP-4 price, label it as probability-like market pricing rather than a dollar-denominated asset price. Use outcome discovery before assuming an identifier. Then pull the side-level order book, trades, candles, or open-interest route that matches the workflow. For historical analysis, combine the market-data request with Data Quality and request-ID logging so probability series can be audited later.

HIP-4 Request Packet

Use this packet before HIP-4 data enters charts, models, exports, or generated clients.
FieldHIP-4 value
Namespace/v1/hyperliquid/hip4/*
IdentifierOutcome ID, side identifier, or symbol from the generated reference
Price handlingTreat documented mark and mid values as implied probabilities in [0, 1]
First probeOutcome discovery, one order book, one trades page, or one OI request
Stop ruleDo not route outcome IDs through core Hyperliquid, Spot, HIP-3, or Lighter paths

Implementation Fit

Use HIP-4 when the business question is about outcome markets, not assets. A HIP-4 chart, model feature, alert, or export should preserve outcome id, side id, route family, and probability-price semantics. Use Hyperliquid REST API for normal perps and Hyperliquid Spot for pair markets.

Common Mistakes

Do not compare HIP-4 mid_price directly with BTC, ETH, or Spot pair prices. Do not route # outcome identifiers through Hyperliquid core or Lighter paths. Do not remove URL encoding from examples such as %230 when building curl commands.

Next Step

Open Venue Coverage for taxonomy, Markets for search-entry context, or Best HIP-4 Data API for evaluation language.

Generated-Client Rule

HIP-4 examples should mention probability-style price interpretation whenever generated code uses mark, mid, or open-interest fields. This prevents downstream code from treating outcome-market values as normal asset prices. Keep that warning close to calculations, chart labels, and model features. Treat outcome IDs as first-class symbols.
Last modified on May 18, 2026