Crypto quant trading: strategies, data and tools
Updated Nov 18, 2026 · 6 min read
Crypto quant trading runs tested rules on markets that never close, with hourly funding and public positions. What sets Hyperliquid apart, free data sources, tools and costs.
What is crypto quant trading? It is quantitative trading applied to crypto: you turn an idea into an exact rule, test it on data with realistic costs, and run it as code with fixed risk limits. On Hyperliquid, perps trade around the clock, pay funding every hour, and every account’s positions can be read from a free API. For the general method, start with what is quant trading.
Key takeaways
- Crypto quant trading = a tested rule, data, code that runs it, and risk limits.
- On Hyperliquid, funding is paid hourly, max leverage is set per market (3x to 40x), and any account’s positions are public.
- The info API is free and needs no key, but serves only the most recent 5,000 candles per market and interval.
- A taker round trip on a crypto perp costs 0.09% at the base tier, before slippage and funding.
What changes in a crypto model
| On Hyperliquid | What it changes in a model |
|---|---|
| Trading never closes: the API returned an hourly BTC candle for every hour of the last 30 days | Annualise with 365 days |
| Perpetual futures with USDC collateral and no expiry | Short as easily as long; nothing to roll |
| Funding every hour: longs pay shorts when the perp trades above the oracle, shorts pay longs below it; capped at 0.5% an hour | Funding is a cost, an input and a strategy |
| Max leverage 3x to 40x per market; maintenance margin is half the initial margin at max leverage | Liquidation belongs in the risk model |
| Any account’s positions and fills via the public API, plus a public PnL leaderboard | Positioning is data you can query |
What a crypto quant can pull for free (Nov 18, 2026)
| Reading | Value | Endpoint |
|---|---|---|
| Perps listed on the main exchange | 179 | metaAndAssetCtxs |
| Open interest across them | $6.78B | metaAndAssetCtxs |
| Volume, last 24 hours | $5.88B | metaAndAssetCtxs |
| BTC hourly candles, last 30 days | 721 | candleSnapshot |
| BTC funding, 7-day average, annualised | 7.6% | fundingHistory (168 hourly rows) |
| HIP-3 perp exchanges | 10 | perpDexs |
| Spot pairs | 353 | spotMeta |
| Accounts on the public leaderboard | 48,162 | stats-data leaderboard |
| Of those, $1M+ all-time PnL | 2,429 | stats-data leaderboard |
The script uses only the Python standard library and needs no key or account. Tested with Python 3.9.6 on Nov 17, 2026.
# Pull a market snapshot from Hyperliquid's free info API (no key, no account).
# Standard library only. Tested with Python 3.9.6 on Nov 17, 2026.
import json
import time
import urllib.error
import urllib.request
from datetime import datetime, timezone
API = "https://api.hyperliquid.xyz/info"
def info(body, tries=6):
req = urllib.request.Request(API, data=json.dumps(body).encode(),
headers={"Content-Type": "application/json"})
for i in range(tries):
try:
with urllib.request.urlopen(req, timeout=30) as r:
return json.load(r)
except urllib.error.HTTPError as e:
if e.code != 429 or i == tries - 1:
raise
time.sleep(2 ** i) # rate-limited: back off and retry
print("Pulled at", datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC"))
# 1. Every perp on the main exchange, with its live context
meta, ctxs = info({"type": "metaAndAssetCtxs"})
rows = []
for asset, ctx in zip(meta["universe"], ctxs):
if asset.get("isDelisted"):
continue
mark = float(ctx["markPx"])
rows.append({
"coin": asset["name"],
"max_lev": asset["maxLeverage"],
"oi_usd": float(ctx["openInterest"]) * mark,
"vol_24h": float(ctx["dayNtlVlm"]),
"funding_apr": float(ctx["funding"]) * 24 * 365 * 100, # hourly rate -> % a year
})
print("Perps listed:", len(rows))
print("Open interest: $%.2fB" % (sum(r["oi_usd"] for r in rows) / 1e9))
print("24h volume: $%.2fB" % (sum(r["vol_24h"] for r in rows) / 1e9))
big = [r for r in rows if r["oi_usd"] >= 10e6]
big.sort(key=lambda r: r["funding_apr"])
print("Perps with $10M+ open interest:", len(big))
print("Lowest funding: %s %.1f%% a year" % (big[0]["coin"], big[0]["funding_apr"]))
print("Highest funding: %s %.1f%% a year" % (big[-1]["coin"], big[-1]["funding_apr"]))
# 2. Builder-deployed (HIP-3) perp exchanges, listed separately
dexes = [d for d in info({"type": "perpDexs"}) if d]
print("HIP-3 perp dexs:", len(dexes))
# 3. Spot pairs
print("Spot pairs:", len(info({"type": "spotMeta"})["universe"]))
# 4. Hourly candles: the API serves the most recent 5,000 per market and interval
now_ms = int(time.time() * 1000)
candles = info({"type": "candleSnapshot", "req": {
"coin": "BTC", "interval": "1h", "startTime": now_ms - 30 * 86400 * 1000, "endTime": now_ms}})
print("BTC 1h candles, last 30 days:", len(candles), "| last close:", candles[-1]["c"])
# 5. Funding history: one row per hour
fh = info({"type": "fundingHistory", "coin": "BTC", "startTime": now_ms - 7 * 86400 * 1000})
avg = sum(float(x["fundingRate"]) for x in fh) / len(fh)
print("BTC funding, last 7 days: %d hourly payments, average %.1f%% a year" % (len(fh), avg * 24 * 365 * 100))
# 6. Public positions: the stats leaderboard (about 40 MB of JSON) lists accounts with their PnL
with urllib.request.urlopen("https://stats-data.hyperliquid.xyz/Mainnet/leaderboard", timeout=120) as r:
board = json.load(r)["leaderboardRows"]
million = [a for a in board if float(dict(a["windowPerformances"])["allTime"]["pnl"]) >= 1e6]
print("Leaderboard accounts:", len(board), "| with $1M+ all-time PnL:", len(million))
# Any of those addresses can be passed to {"type": "clearinghouseState", "user": address}
pos = info({"type": "clearinghouseState", "user": million[0]["ethAddress"]})
print("Open positions in the first $1M+ account:", len(pos["assetPositions"]))Strategy families
The main families are momentum and trend, mean reversion, statistical arbitrage and pairs, funding carry, market making, and positioning strategies that read public positions, open interest and liquidations (reading Hyperliquid market data).
Data sources and tools
| Source | What you get | Limits | Cost |
|---|---|---|---|
| Info API (REST) | Candles, books, funding, open interest, any account’s positions and fills | Most recent 5,000 candles per market and interval; 500 rows per time-range reply; 1,200 weight a minute per IP | Free |
| WebSocket | Live trades, books, candles, account updates | 10 connections and 1,000 subscriptions per IP | Free |
| S3 archive | L2 book snapshots, asset contexts, node fills | Uploaded about monthly, no guarantee; no candles | Requester pays transfer |
| Stats leaderboard | PnL, ROI and volume by account and window | One file of about 40 MB | Free |
- Hyperliquid Python SDK (0.24.0 on PyPI), from the hyperliquid-dex GitHub organisation.
- CCXT (4.5.93): one API across many exchanges, Hyperliquid included (frameworks vs an AI agent).
- Freqtrade (2026.10): supports Hyperliquid futures in isolated and cross margin; it marks Hyperliquid as having no historic data download, so you save the latest 5,000 candles yourself before backtesting.
- NautilusTrader (1.231.0): its Hyperliquid adapter provides live market data and order execution.
Crypto quant trading with Senpi
Senpi, which publishes this guide, is an AI trading agent for Hyperliquid. On Senpi, a strategy you confirm runs as code on Senpi’s runtime, and by default no AI model makes live trading decisions. Strategies built from a rule or a template carry the Dynamic Stop-Loss (DSL), a stop that ratchets up as the trade gains, from the first fill, and each can have its own daily-loss halt, which lifts at the next UTC midnight, or a drawdown halt, which waits until you resume it. Copy strategies carry at most a flat stop.
Each strategy trades from its own strategy wallet; the agent holds no key and cannot withdraw. Senpi doesn’t run backtests; Simulations, paper trading with simulated money, are coming. For research, senpi.ai/assets covers every Hyperliquid perp with top-trader positioning and a Senpi Signals score.
What data do crypto quants use?
Candles, order books, trades, funding rates, open interest and liquidations. On Hyperliquid all of it, including any account’s positions and fills, comes from a free API with no account needed.
How much history does Hyperliquid’s API give?
The most recent 5,000 candles per market and interval. For longer histories, record your own from the API or WebSocket, or use the S3 archive, which has book snapshots and asset contexts but no candles.
How much does a crypto quant strategy cost to run?
Hyperliquid’s API data is free. At the base tier a taker round trip on a crypto perp costs 0.09% in fees (Hyperliquid fees), plus slippage, funding and your own hosting.
Can I run a crypto quant strategy without coding?
Yes, with an AI agent. On Senpi, a strategy you confirm runs as code on Senpi’s runtime, and strategies built from a rule or a template carry the Dynamic Stop-Loss from the first fill.
Sources: Hyperliquid docs (funding, fees, margining, liquidations, info endpoint, rate limits, historical data); Hyperliquid info API and stats leaderboard, pulled 11:42 UTC on Nov 18, 2026; Freqtrade exchange notes, NautilusTrader Hyperliquid integration, CCXT and PyPI, all checked Nov 17, 2026.
This is educational material, not financial advice. Market readings are data, not trade signals, and leveraged perps can lose money quickly.
Turn a quant idea into a running strategy
Strategies built from a rule or a template run as code on Senpi’s runtime, with a stop from the first fill.
Related articles
What is revenge trading, and how do you stop it?
Revenge trading is trading bigger or faster to win back a loss. Why it happens, the recovery maths that makes it costly, what Hyperliquid data shows, and rules that stop it.
What is the Calmar ratio, and what is a good one?
The Calmar ratio divides annual return by max drawdown. Formula, how to read it, and the one-year Calmar ratio of BTC, ETH, SOL, HYPE, XRP and DOGE on Nov 18, 2026.
How to read Hyperliquid market data: open interest, long/short ratio, funding and liquidations
What open interest, the long/short ratio, funding and liquidations tell you on Hyperliquid, where each number comes from, and how to read them together, with the ten largest perps on Nov 10, 2026.
What is a trailing stop loss, and how do you set one on Hyperliquid?
A trailing stop follows price up and locks in part of the move. Definition, how wide to set it, and BTC, ETH, SOL and HYPE trail sizes on Nov 18, 2026.