vike

Recipe 46 of 65

What is the basis between HYPE spot and HYPE perp on Hyperliquid?

Pull hourly HYPE candles twice from /v1/hyperliquid/ohlcv, once with market=spot and once for the perp, and divide the closes; /symbols/hourly adds the venue's premium and funding for the same hours.

GET /v1/hyperliquid/ohlcv answers it in two calls, because both legs trade on Hyperliquid: ask for HYPE with market=spot, then for the perp, and compare the closes hour by hour, basis = perp close / spot close - 1. The spot leg resolves the name HYPE to its spot index @107 and says so in symbol. The full parameter list is on Candles.

Quick answer

One call per leg, same interval and limit.

cURL — spot leg
# 24 hourly HYPE spot candles
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hyperliquid/ohlcv?symbol=HYPE&market=spot&interval=1h&limit=24"
cURL — perp leg
# the same 24 hours of the HYPE perp
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hyperliquid/ohlcv?symbol=HYPE&interval=1h&limit=24"

Join the two on ts.

Python
import os

import requests

H = {"X-API-Key": os.environ["VIKE_API_KEY"]}
URL = "https://data.vike.io/v1/hyperliquid/ohlcv"
spot = requests.get(URL, params={"symbol": "HYPE", "market": "spot", "interval": "1h", "limit": 24}, headers=H, timeout=60).json()
perp = requests.get(URL, params={"symbol": "HYPE", "interval": "1h", "limit": 24}, headers=H, timeout=60).json()

spot_close = {c["ts"]: c["close"] for c in spot["candles"]}
for c in perp["candles"]:
    if c["ts"] in spot_close:
        print(c["ts"], round((c["close"] / spot_close[c["ts"]] - 1) * 1e4, 2), "bps")

Example response

Captured from the live API on 2026-10-24 at 17:16 UTC, trimmed to the newest 3 of 24 candles per leg.

The two responses are shown side by side under spot and perp; each is returned on its own. At 15:00 UTC the perp closed 2.1 bps above spot (75.087 against 75.071), at 16:00 0.8 bps above. Over all 24 hours of this capture the close basis ran from -10.1 to +4.7 bps, -3.4 bps on average: the perp mostly traded a little below spot.

Example response
{
  "spot": {
    "symbol": "@107",
    "market": "spot",
    "dex": "HL",
    "interval": "1h",
    "tz": "UTC",
    "source": "1h fills rollup",
    "candles": [
      {"ts": 1792854000000, "open": 75.444, "high": 75.487, "low": 73.665955, "close": 75.071, "volume": 88826.52, "volume_usd": 6644285.160402851, "n_trades": 4741},
      {"ts": 1792857600000, "open": 75.071, "high": 75.772, "low": 74.841, "close": 75.619, "volume": 36333.08999999998, "volume_usd": 2732675.2912600036, "n_trades": 3028},
      {"ts": 1792861200000, "open": 75.611, "high": 75.633, "low": 75.43, "close": 75.591, "volume": 8209.319999999996, "volume_usd": 620032.7123000004, "n_trades": 541}
    ]
  },
  "perp": {
    "symbol": "HYPE",
    "market": "perp",
    "dex": "HL",
    "interval": "1h",
    "tz": "UTC",
    "source": "1h fills rollup",
    "candles": [
      {"ts": 1792854000000, "open": 75.406, "high": 75.479, "low": 74.347, "close": 75.087, "volume": 777291.4299999999, "volume_usd": 58137923.09648, "n_trades": 31903},
      {"ts": 1792857600000, "open": 75.072, "high": 75.797, "low": 74.824, "close": 75.625, "volume": 384829.7000000001, "volume_usd": 28974587.22782, "n_trades": 17830},
      {"ts": 1792861200000, "open": 75.626, "high": 75.64, "low": 75.426, "close": 75.574, "volume": 52375.77999999999, "volume_usd": 3956233.7387399995, "n_trades": 2646}
    ]
  }
}

Variations

Premium and funding for the same hours. The venue's own premium and funding_rate per hour, beside the perp's close and open interest.

cURL — premium and funding
# HYPE hourly close, open interest, funding rate and premium for the last day
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hyperliquid/symbols/hourly?symbols=HYPE&days=1"

On the same capture the newest three rows read premium -0.00041, 0.00012 and -0.000018 (the venue's hourly average, a fraction) and funding_rate 0.0000125 per hour. The 24-hour mean premium was -3.1 bps, close to the -3.4 bps mean close basis of the same hours.

A longer window. A month of hourly bars per leg, to see whether the basis mean-reverts. Pin start so both legs cover the same hours.

cURL — 30 days
# 720 hourly HYPE spot candles from a pinned start; repeat without market=spot for the perp
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hyperliquid/ohlcv?symbol=HYPE&market=spot&interval=1h&start=2026-09-24T00:00:00Z&limit=720"

Minute resolution. The same join on 1-minute bars catches the moments the gap opens.

cURL — 1m
# the last 240 one-minute HYPE spot candles
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hyperliquid/ohlcv?symbol=HYPE&market=spot&interval=1m&limit=240"

Before you rely on it

A close is the last trade of the hour, not a simultaneous quote

Each close is the last fill of its market in that bar, and the two legs' last fills can be seconds or minutes apart, so a few bps of "basis" can be timing. A bar exists only where its market traded: join on ts and skip hours where one leg has no candle. The newest bar of each leg is the hour still in progress and moves until the hour ends.

Spot volume is far thinner

Over these 24 hours HYPE spot traded $48.0M against $446.9M on the perp. A basis read off a thin spot hour is a quote you could not trade size at; check n_trades and volume_usd on the spot leg before acting on a gap.

Ask your agent

Connected to the Vike MCP server (https://vike.io/mcp) in Claude, ChatGPT or Cursor, ask it in plain words. The hl_ohlcv tool answers one call per leg, at 1 credit a call.

Ask your agent
Compare the hourly closes of HYPE spot and the HYPE perp on Hyperliquid over the last 24 hours
Example response
{  "spot": {    "symbol": "@107",    "market": "spot",    "dex": "HL",    "interval": "1h",    "tz": "UTC",    "source": "1h fills rollup",    "candles": [      {"ts": 1792854000000, "open": 75.444, "high": 75.487, "low": 73.665955, "close": 75.071, "volume": 88826.52, "volume_usd": 6644285.160402851, "n_trades": 4741},      {"ts": 1792857600000, "open": 75.071, "high": 75.772, "low": 74.841, "close": 75.619, "volume": 36333.08999999998, "volume_usd": 2732675.2912600036, "n_trades": 3028},      {"ts": 1792861200000, "open": 75.611, "high": 75.633, "low": 75.43, "close": 75.591, "volume": 8209.319999999996, "volume_usd": 620032.7123000004, "n_trades": 541}    ]  },  "perp": {    "symbol": "HYPE",    "market": "perp",    "dex": "HL",    "interval": "1h",    "tz": "UTC",    "source": "1h fills rollup",    "candles": [      {"ts": 1792854000000, "open": 75.406, "high": 75.479, "low": 74.347, "close": 75.087, "volume": 777291.4299999999, "volume_usd": 58137923.09648, "n_trades": 31903},      {"ts": 1792857600000, "open": 75.072, "high": 75.797, "low": 74.824, "close": 75.625, "volume": 384829.7000000001, "volume_usd": 28974587.22782, "n_trades": 17830},      {"ts": 1792861200000, "open": 75.626, "high": 75.64, "low": 75.426, "close": 75.574, "volume": 52375.77999999999, "volume_usd": 3956233.7387399995, "n_trades": 2646}    ]  }}