Documentation Index
Fetch the complete documentation index at: https://hypernode-docs.polynode.dev/llms.txt
Use this file to discover all available pages before exploring further.
1. Get an API key
Sign up at polynode.dev to get an API key. Keys are prefixed with pn_live_.
If you already have a polynode account on the Growth plan ($200/mo) or above, your existing key works on hypernode automatically.
2. Connect
wscat -c "wss://hyper.polynode.dev/ws?key=pn_live_YOUR_KEY"
3. Subscribe
Send a subscribe message to start receiving events:
{"action": "subscribe", "filters": {"action_types": ["order", "fill"]}}
You’ll immediately start receiving every new order and fill on HyperLiquid:
{"type":"order","consensus":"confirmed","asset":"BTC","user":"0x9e74a6a1...",
"data":{"coin":"BTC","side":"B","px":"74400.0","sz":"0.20146","oid":380660788366,"tif":"Alo"}}
{"type":"fill","consensus":"confirmed","asset":"HYPE","user":"0x34827044...",
"data":{"coin":"HYPE","side":"A","px":"22.608","sz":"442.0","dir":"Close Short","closedPnl":"0.92"}}
Common subscriptions
All orders and fills (recommended starting point):
{"action": "subscribe", "filters": {"action_types": ["order", "fill"]}}
Only BTC activity:
{"action": "subscribe", "filters": {"assets": ["BTC"]}}
Track a specific wallet across all markets:
{"action": "subscribe", "filters": {"addresses": ["0xd071d6d6ea52f5aa34b79e47f908ee48c8215837"]}}
Pre-consensus cancels only (early signal):
{"action": "subscribe", "filters": {"action_types": ["cancel", "cancelByCloid", "batchModify"]}}
Full firehose (everything, ~6,500 events/sec):
TypeScript
import WebSocket from "ws";
const ws = new WebSocket("wss://hyper.polynode.dev/ws?key=pn_live_YOUR_KEY");
ws.on("open", () => {
ws.send(JSON.stringify({
action: "subscribe",
filters: { action_types: ["order", "fill"] }
}));
});
ws.on("message", (raw) => {
const event = JSON.parse(raw.toString());
if (event.type === "fill") {
console.log(`FILL: ${event.asset} ${event.data.side === "B" ? "BUY" : "SELL"} ${event.data.sz}@${event.data.px}`);
console.log(` PnL: ${event.data.closedPnl} | Fee: ${event.data.fee} ${event.data.feeToken}`);
}
if (event.type === "order") {
console.log(`ORDER: ${event.asset} ${event.data.side === "B" ? "BUY" : "SELL"} ${event.data.sz}@${event.data.px} [${event.data.tif}]`);
}
});
Python
import json
import websocket
def on_message(ws, message):
event = json.loads(message)
if "action" in event:
return # subscription ack
if event["type"] == "fill":
d = event["data"]
print(f"FILL: {event['asset']} {d['sz']}@{d['px']} {d['dir']} PnL={d['closedPnl']}")
if event["type"] == "order":
d = event["data"]
print(f"ORDER: {event['asset']} {d['side']} {d['sz']}@{d['px']} [{d['tif']}]")
def on_open(ws):
ws.send(json.dumps({
"action": "subscribe",
"filters": {"action_types": ["order", "fill"]}
}))
ws = websocket.WebSocketApp(
"wss://hyper.polynode.dev/ws?key=pn_live_YOUR_KEY",
on_open=on_open,
on_message=on_message,
)
ws.run_forever()
Next steps