Documentation

v0.1

Everything you need to understand HIP-4 outcome markets and integrate with the Hyperliquid API.

FAQ

How It Works

QWhat are outcome markets?
  • Fully collateralized contracts that settle at $0 or $1 based on whether an event occurs.
  • No leverage, no liquidations — your max loss is what you pay.
QWhat is HIP-4?
  • Hyperliquid’s protocol for outcome trading — adds prediction-market-style contracts to Hyperliquid L1.
  • Currently live on testnet with recurring binary options on BTC and HYPE.
QHow do YES/NO prices work?
  • YES price = market’s implied probability the event happens (e.g., 62¢ = 62% chance).
  • NO price = 1 − YES price (e.g., 38¢).
  • If you’re right, your shares are worth $1. If wrong, $0.
QWhat are recurring binary options?
  • Short-duration contracts (1 day or 15 minutes) that auto-renew.
  • Example: "Will BTC be above $72,900 at 03:00 UTC?" — settles daily.
QIs this real money?
  • Currently testnet only — no real funds at risk.
  • Mainnet launch planned within 2026, starting with BTC and HYPE 1-day binaries.

Developers

API Reference

Base URL

https://api.hyperliquid-testnet.xyz/info

Endpoints

POST{"type": "outcomeMeta"}List all outcome markets
POST{"type": "l2Book", "coin": "#<encoding>"}Order book for an outcome side
Encoding Reference

Coin encoding: 10 * outcome_id + side where side 0 = YES, side 1 = NO

Asset ID for orders: 100_000_000 + encoding

Example: BTC binary option (outcome 1564)

YES{"type": "l2Book", "coin": "#15640"}
NO{"type": "l2Book", "coin": "#15641"}

Example Requests

terminal
# Fetch all outcome markets
curl -X POST https://api.hyperliquid-testnet.xyz/info \
  -H "Content-Type: application/json" \
  -d '{"type": "outcomeMeta"}'

# Fetch YES order book for BTC binary option (outcome 1564)
curl -X POST https://api.hyperliquid-testnet.xyz/info \
  -H "Content-Type: application/json" \
  -d '{"type": "l2Book", "coin": "#15640"}'

# Fetch NO order book for the same outcome
curl -X POST https://api.hyperliquid-testnet.xyz/info \
  -H "Content-Type: application/json" \
  -d '{"type": "l2Book", "coin": "#15641"}'

Links

Resources