Open API: every funding gap between Hyperliquid and Lighter.
Every market on both exchanges as plain JSON, no sign-in and no API key. Anyone can build on it.
Endpoints
All GET, all JSON, base URL https://hyduo.xyz. Rates are % per hour, times are unix seconds.
GET/api/stateEverything at once: every pair with both funding rates and the gap, plus counts, exchange health and the token.
GET/api/alertsAlerts, newest first: all open ones and the latest closed ones from the last 7 days. Page back with before, before_id and limit (up to 500).
GET/api/pair/{key}One market by its key, like BTC--BTC: the pair, its settled hours from the last day and up to 20 of its alerts.
GET/api/tokenThe $HYDUO contract on Elysium, whether tiers are on, the tier thresholds and the price used to count them.
GET/api/configSite basics: brand, X account, ticker, Telegram bot and which features are on.
GET/healthzA quick check that the engine runs and both exchanges answer. Returns 503 if the engine has stopped.
Try it
From a terminal
curl -s https://hyduo.xyz/api/stateFrom Node or any backend
const res = await fetch('https://hyduo.xyz/api/state');
const { pairs } = await res.json();
// the widest gap among liquid markets
const best = pairs
.filter((p) => p.liquid && p.net != null)
.sort((a, b) => b.net - a.net)[0];
const asOf = new Date((best.as_of ?? best.read_at) * 1000);
console.log(`${best.sym}: long ${best.long}, short ${best.short}`);
console.log(`net ${best.net} %/h as of ${asOf.toISOString()}`);Response, trimmed to one pair
{ "at": 1795873478.58, "cycle": 276, "view": "free",
"data_ok": true, "cycle_age_s": 8, "next_funding_s": 912,
"counts": { "pairs": 193, "liquid": 115, "hot": 3,
"best_net": 0.0248336 },
"pairs": [
{ "key": "xyz_IREN--IREN", "sym": "IREN", "cls": "stock",
"hl": { "name": "xyz:IREN", "f": -0.0139416, "px": 13.56,
"oi": 13098127, "vol": 5689045, "taker": 0.009 },
"lt": { "name": "IREN", "f": 0.0004, "px": 13.628,
"oi": 1368671, "vol": 146415, "taker": 0.0 },
"long": "hl", "short": "lt",
"net": 0.0143416, "fees_pct": 0.018, "payback_h": 1.26,
"liquid": true, "hot": true,
"fresh": true, "read_at": 1795873470.2,
"age_s": 10, "stale": false,
"delayed": true, "delay_s": 1800,
"as_of": 1795871678.59 } ] }The data refreshes every 30 seconds, so asking more often gets you nothing new.
For AI agents
Paste this into your agent's instructions. It can then find the widest gaps, check how a market moved over the last day or watch for new alerts. Any agent that can make a web request works.
Agent instructions
Before you build
Fair use: one request every 30 s is plenty, and never more than one every 10 s. There's no hard limit, so please keep it polite.
Rates, gaps and alerts are 5 min behind for crypto and 30 min behind for stocks, commodities, indices and FX: this API serves the Free view. Prices, open interest and volume are live. Real‑time gaps are for $HYDUO holders, on the site.
The data comes as is, with no uptime promise, and it's not financial advice. Trades happen on Hyperliquid and Lighter, never through this API.
Made for servers, bots and AI agents. Browsers on other sites can't read it, so call it from your backend.
Fields
A pair
In pairs[] of /api/state and in pair of /api/pair/{key}.
key- Market id, like BTC--BTC or xyz_IREN--IREN. Use it in /api/pair/{key}.
sym- The ticker, like BTC or IREN.
cls- Market class: crypto, stock, commodity or fx (indices and currencies). On the Free view, crypto is 5 min behind and the rest 30 min.
hl.f- Funding on Hyperliquid, % per hour. Plus means longs pay shorts.
lt.f- Funding on Lighter, % per hour.
net- The gap between the two rates, % per hour per leg, for the legs named in long and short.
long- Where to go long: hl (Hyperliquid) or lt (Lighter).
short- Where to go short: hl or lt.
fees_pct- Taker fees to open and close both legs, in % of one leg's size.
payback_h- Hours at this gap it takes to cover the trading fees on both legs, in and out. null when the gap is zero or below.
liquid- true when both exchanges have at least $100k of open interest and $100k of 24 h volume. Alerts fire only on these.
hot- true when the gap is at least 0.005% per hour and covers the fees within 12 hours.
hl.px, lt.px- Price on each exchange (hl.px, lt.px). Live.
hl.oi, lt.oi- Open interest in $ on each exchange. Live.
hl.vol, lt.vol- 24 h volume in $ on each exchange. Live.
read_at- Unix time both exchanges were last read. Prices, open interest and volume are from then.
delayed- true on the Free view, which is what this API serves. Real‑time rates are for $HYDUO holders, on the site.
delay_s- How far behind the rates are, in seconds: 300 for crypto, 1800 for the rest.
as_of- Unix time the delayed rates are from.
age_s, stale- Seconds since read_at. stale is true when that read is over 90 s old or missed an exchange.
An alert
In /api/alerts and in alerts[] of /api/pair/{key}. Here the rates are f_hl and f_lt, not hl.f and lt.f.
id- Alert id. To page back, pass the last closed alert's fired_at as before and its id as before_id.
key, sym, cls, long, short- Same as on a pair.
hl_name, hl_venue, lt_sym- The market's name on Hyperliquid, the Hyperliquid dex it trades on, and its name on Lighter.
f_hl, f_lt, net- Funding on each exchange and the gap when the alert fired, % per hour.
payback_h, fees_pct- As on a pair, at the moment it fired.
fired_at, ended_at- Unix time it fired and ended. ended_at is null while it's open.
end_reason- faded: the gap stayed under half the alert level. flipped: it turned the other way. market gone or not matched: the two markets stopped pairing. null while open.
peak_net- The widest gap while it was open, % per hour.
delay_s- How long after it fired the alert shows up on the Free view, in seconds.
A settled hour
In hours[] of /api/pair/{key}, oldest first. The newest hour can land up to an hour late, so there are 23 or 24.
ts- Unix time of the hour mark the funding was paid at.
f_hl, f_lt- The rate each exchange settled for that hour, % per hour.
net- That hour's gap for the pair's current long and short. Below zero, the hour went against the trade.
Source code
The code behind this site is public under the MIT license. The README's “Verify it yourself” section shows how to check that the files served here match it.
github.com/hyduo/hyduo