For buyers

API documentation

Free endpoints (coverage, discovery, availability) let you decide what to buy. Data endpoints return HTTP 402 Payment Required until you attach a signed X-PAYMENT header — you only need USDC, the facilitator pays the gas.

Base URL: https://api.hyperextend.xyz

Discover before you pay

All free, all unauthenticated — check what's available and how deep before spending anything.

EndpointAnswers
GET /v1/discoveryWhat's available at a glance — dex/coin counts, intervals, availability lag.
GET /v1/dexesEvery dex — main, HIP-3 and HIP-4 — with first/last seen.
GET /v1/dexes/{dex}/coinsThe active universe on a dex.
GET /v1/coins/{coin}Which dexes a coin trades on.
GET /v1/coins/{coin}/historyListing / delisting / leverage-change log over time.
GET /v1/availability/{coin}Per-dex first/last/row-count for ctx + candles.
GET /v1/coverage/{coin}?start=&end=Gap manifest for OI / ctx over a window.
GET /v1/candles/{coin}/coverage?start=&end=Gap manifest for candles.

The payment flow

  1. GET the data endpoint → you get a 402 with an accepts array.
  2. Sign an EIP-3009 transferWithAuthorization over USDC for accepts[0].
  3. Retry the same request with the base64 payload in the X-PAYMENT header → 200.

The settlement receipt comes back in the X-PAYMENT-RESPONSE header. The 402 body also carries an instructions block, so an agent can act on it without prior knowledge of the protocol.

Python (bundled helper)

import httpx
from hyperextend.x402 import build_x_payment_header

url = "https://api.hyperextend.xyz/v1/candles/BTC/1m"
params = {"start": 0, "end": 1735689600000}

with httpx.Client() as client:
    r = client.get(url, params=params)
    if r.status_code == 402:
        requirements = r.json()["accepts"][0]
        header = build_x_payment_header(MY_PRIVATE_KEY, requirements=requirements)
        r = client.get(url, params=params, headers={"X-PAYMENT": header})
    r.raise_for_status()
    candles = r.json()

build_x_payment_header reads the EIP-712 domain from the 402's extra field (never hardcoded), maps the network to the right chain id, and defaults a sane validity window and random nonce.

Endpoints

EndpointNotes
GET /v1/candles/{coin}/{interval}?start=&end=Historical OHLCV for a coin & interval over a time window, priced per candle returned.
GET /v1/candles/{coin}/{interval}/latest?n=The most recent n candles — a cheap recent-window convenience.
GET /v1/asset_ctx/{coin}?start=&end=OI / funding / mark / oracle / mid / volumes, same tariff.

Pricing

Two-part tariff, billed per row returned:

cost = floor + rows × per_row
     = $0.001 + rows × $0.000005

Responses are paginated — walk wider ranges with the X-Next-Start cursor returned in the response headers.

RequestCost
Latest 100 candles$0.0015
1 day of 1m candles (1,440 rows)$0.0082
1 month of 1m candles (43,200 rows)~$0.22
1 year of 1m candles (~525k rows)~$2.73

Network & USDC

The facilitator settles in USDC on Base. Always confirm the exact contract and EIP-712 domain from accepts[0].asset / accepts[0].extra rather than hardcoding them.

NetworkIdentifierUSDC contract
Base base / eip155:8453 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Data freshness

hyperextend serves history up to roughly 2 days ago. For anything more recent, go straight to the source — Hyperliquid's own API natively serves the latest candles and live market state.

  • Reads clip end to the cutoff; responses carry an X-Data-Cutoff-Ts header.
  • GET /v1/discovery reports the current availability_lag_minutes.
  • Newer data → Hyperliquid's info endpoint.