How to Build a Trading Terminal on Hyperliquid
Build a Hyperliquid trading terminal: charts, order book, trades and order entry, plus 1-second candles and older chart history. Tested on both APIs.

A trading terminal is the screen active traders live in: several charts, the order book, the tape of trades, positions, and an order ticket with hotkeys.
Fun fact: We built Flowscan.xyz, which is a trading analytic terminal using the Hydromancer API! (Caveat: You cannot open trades on Flowscan.)
Why traders want one:
• Everything on one screen. Charts, the book, the tape and positions side by side, not spread across tabs.
• Speed. Hotkeys and one-click orders matter when a second's delay costs money.
• Their own setup. Layouts, indicators and alerts the exchange's app doesn't offer.
On Hyperliquid you don't need your own exchange behind it. Orders go into Hyperliquid's shared order books, so a terminal can focus on being faster and nicer to use than Hyperliquid's own app.
Why should you choose to build a trading terminal on Hyperliquid?
• Active traders want more than the default app. Several charts side by side, hotkeys, their own layout. They trade often, so they notice every click.
• Same order books, same depth. Every order your terminal sends lands in the same books as Hyperliquid's own app, at the same prices. You don't run an exchange or need anyone's permission.
• It's fast. Hyperliquid's docs give a median 0.2 seconds from sending an order to seeing it on-chain, for software running close to Hyperliquid's servers; a user's browser further away sees more delay.
• Traders pay for it. In Flowscan's ranking on 2 October 2026, Insilico (multi-chart layouts and programmable hotkeys) had earned $4.10M in builder fees on $41.41B of routed trading, and Axiom $2.44M (top builders by revenue).
• Every order can earn. Attach your builder code and each trade sent from your terminal pays you a fee.
Each panel of a terminal needs something different from the API. The chart is where the two APIs differ most, so that's what we built and timed on both, on 31 October 2026. Code blocks are for developers; everyone else can read past them.
| Panel | Hyperliquid's free API | What Hydromancer adds |
|---|---|---|
| Live chart | candle stream, 1m and up | 1s, 15s and 30s candles |
| Chart history | About the 5,000 most recent candles per interval | Older 1m candles |
| Order book | l2Book and bbo streams | Order-by-order (L4) book |
| Trades tape | trades stream | Last 24 hours by time, for backfill |
| Orders and positions | User streams, /exchange | Many users in one stream |
The chart
Most of a terminal's chart work runs fine on the official API. The candle subscription streams live candles, and candleSnapshot loads history. Two things are harder: how far back the history goes, and charts shorter than a minute.
Prototype 1: load a week of 1-minute candles
Hyperliquid APIOne request:
import time, requests
now, day = int(time.time() * 1000), 86400000
req = {"coin": "BTC", "interval": "1m",
"startTime": now - 7 * day, "endTime": now}
c = requests.post("https://api.hyperliquid.xyz/info",
json={"type": "candleSnapshot", "req": req}).json()
print(len(c), "candles, covering",
round((now - c[0]["t"]) / day, 1), "of 7 days")5015 candles, covering 3.5 of 7 daysHyperliquid keeps about the 5,000 most recent candles per interval, so a 1-minute chart stops about three and a half days back, and paging doesn't help. To go further back on Hyperliquid alone, rebuild the bars yourself from its S3 fill archive (node_fills_by_block); the archive has no candle files.
candleSnapshot returns up to 5,000 candles per page and keeps going back, so the prototype pages until it reaches now:
import os, time, requests
H = {"Authorization": "Bearer " + os.environ["HYDROMANCER_API_KEY"]}
now, day = int(time.time() * 1000), 86400000
candles, start = [], now - 7 * day
while start < now:
req = {"coin": "BTC", "interval": "1m",
"startTime": start, "endTime": now}
page = requests.post("https://api.hydromancer.xyz/info", headers=H,
json={"type": "candleSnapshot", "req": req}).json()
candles += page
start = page[-1]["t"] + 60000 if len(page) == 5000 else now
print(len(candles), "candles, covering",
round((now - candles[0]["t"]) / day, 1), "of 7 days")10076 candles, covering 7.0 of 7 days| Hyperliquid API | Hydromancer API | |
|---|---|---|
| What you get | 3.5 of 7 days | All 7 days |
| Worked | 3 of 3 runs | 3 of 3 runs |
| Time to finish (median) | 0.3 s | 0.9 s |
| Requests | 1 | 3 |
| Rate-limit cost | 103 weight (limit: 1,200 a minute per IP) | 60 points (limit: 20,000 a minute on the Growth plan) |
| Data received over REST (uncompressed) | 0.7 MB | 1.7 MB |
Hyperliquid answered faster, because it returned half the chart. Hydromancer took three pages to return the whole week.
Prototype 2: 1-second candles
Hyperliquid APIcandleSnapshot rejects "interval": "1s" with a 422 error, but you can build the candles yourself: the trades stream sends every trade, so a terminal can group them into one-second bars as they arrive:
import json, time
from websockets.sync.client import connect
bars, start = {}, time.time()
with connect("wss://api.hyperliquid.xyz/ws") as ws:
ws.send(json.dumps({"method": "subscribe", "subscription":
{"type": "trades", "coin": "BTC"}}))
while time.time() < start + 60:
m = json.loads(ws.recv())
for t in m["data"] if m["channel"] == "trades" else []:
px, sec = float(t["px"]), t["time"] // 1000
if sec >= start: # skip trades sent on subscribe
o, h, l, c = bars.get(sec, (px, px, px, px))
bars[sec] = (o, max(h, px), min(l, px), px)
print(len(bars), "one-second candles in 60 seconds; last:", bars[max(bars)])32 one-second candles in 60 seconds; last: (77562.0, 77562.0, 77562.0, 77562.0)It works, but only from the moment you connect: there's no history, so a trader opening the chart sees an empty screen that fills one second at a time. And a second with no trades comes with no bar (in one minute of BTC, only 32 seconds had a trade), so your chart fills it with the previous close.
Hydromancer API1-second, 15-second and 30-second candles are a normal candleSnapshot interval, with history:
import os, time, requests
KEY = os.environ["HYDROMANCER_API_KEY"]
now = int(time.time() * 1000)
req = {"coin": "BTC", "interval": "1s",
"startTime": now - 600000, "endTime": now}
c = requests.post("https://api.hydromancer.xyz/info",
json={"type": "candleSnapshot", "req": req},
headers={"Authorization": "Bearer " + KEY}).json()
print(len(c), "one-second candles; last close", c[-1]["c"])598 one-second candles; last close 77550.00| Hyperliquid API | Hydromancer API | |
|---|---|---|
| What you get | Bars from the moment you connect, none for quiet seconds | 10 minutes of history, a bar for every second |
| Worked | 1 of 1 runs | 3 of 3 runs |
| Time to finish (median) | 61 s (listens live by design) | 0.2 s |
| Requests | 0 (live stream) | 1 |
| Rate-limit cost | none (live stream) | 20 points (limit: 20,000 a minute on the Growth plan) |
| Data received over REST (uncompressed) | not measured (live stream) | under 0.1 MB |
Ten minutes is up to 600 candles; Hydromancer returns a candle for quiet seconds too, with zero trades. For scalpers, that's the difference between a chart that matches the tape and one that hides a whole minute in one bar. For backtesting, Reservoir, Hydromancer's free archive, keeps daily 1-second candle files back to August 2025 (you pay only AWS download charges).
The order book and the tape
Hyperliquid API
l2Book (20 levels a side) and bbo cover a standard price ladder, and the trades stream fills the tape while the terminal is open. Two gaps: a user who opens the terminal mid-session gets only the last 10 trades from recentTrades, and the ladder shows size per price, not individual orders.
Hydromancer API
The L4 book shows each resting order and who placed it, so a terminal can flag one large order instead of a thick price level. Hydromancer added this endpoint for builder convenience; it isn't part of Hyperliquid's original API, and orders still go through Hyperliquid. tradesByTime fills the tape with the last 24 hours when the screen opens.
Side by side
| Hyperliquid API | Hydromancer API | |
|---|---|---|
| Price ladder (20 levels) | Yes, live | Yes |
| Every single order, with its owner | Only with your own node | Yes (L4 book) |
| Tape when the terminal opens | Last 10 trades | Last 24 hours, 2,000 per page |
| Live tape | Yes | Yes |
The order flow dashboard guide tests the tape backfill and covers the order-by-order book in depth; the heatmap guide draws resting liquidity over time.
Orders, positions and hotkeys
Order entry always goes to Hyperliquid's /exchange, signed by an API wallet the user approves. The ticket can offer every order type Hyperliquid runs natively: market, limit, stop and take-profit (market or limit), scale orders across a range, TWAP, and the options post-only, IOC and reduce-only (order types). Leverage is set per market with updateLeverage before the order. Hotkeys are your own code; the useful API detail is that a bulk order or bulk cancel goes in one signed request, so "cancel all" is one call. Each order still counts toward the account's request budget.
Put your builder code on the order ticket and on every hotkey, so each trade a user fires off pays your terminal a small fee.
Swing traders or scalpers?
Build for 1-minute charts and up and Hyperliquid's free API is the whole stack: candles, a 20-level book, the live tape, order entry. Scalpers ask for the rest: second-by-second candles, a week or more of 1-minute history, and a tape that's already full when they open the screen.
FAQ
Does Hyperliquid have 1-second candles?
Not as a request: candleSnapshot with "interval": "1s" returns a 422 error. You can build them live from the trades stream, without history. Hydromancer serves 1s, 15s and 30s candles with history, and Reservoir has daily 1-second candle files.
How far back do Hyperliquid's candles go?
Hyperliquid keeps about the 5,000 most recent candles per interval: about three and a half days of 1-minute candles, about seven months of hourly ones. In our test, a week of 1-minute candles came back half full.
Can a trading terminal earn money on Hyperliquid?
Yes, through builder codes on the orders it sends. Insilico and Axiom both rank in the top 12 builders by revenue.
Related reading
• BBO vs L2Book vs L4Book: Hyperliquid orderbook types
• How to build a Hyperliquid orderbook heatmap
• Hyperliquid data feeds: every real-time stream
• Hyperliquid tick size and lot size
Sources
- Hyperliquid docs: Info endpoint, Subscriptions, Builder codes
- Hydromancer docs: Trading frontend guide, candleSnapshot
Read next

How to Build a Hyperliquid TWAP Execution Tool
Build a TWAP execution tool on Hyperliquid: native TWAP orders vs your own slicing, tracking slice fills, and seeing every active TWAP in a market.

How to Build a Trading Journal for Hyperliquid
Build a Hyperliquid trading journal: turn fills into closed trades with entry, exit, fees, funding and hold time, and keep history past 10,000 fills.

How to Run a Trading Competition on Hyperliquid
Run a Hyperliquid trading competition: register wallets, score PnL over your own start and end time, filter out cheating, and track it live. Tested.