GoldRush-native: No wss://api.hyperliquid.xyz/ws equivalent.
Filters coin and aggregateByTime are both optional. Omit coin to stream every market.
Live-only: No historical snapshot on subscribe. For windowed history, use the Info API userFillsByTime.
Same per-fill shape as userFills; channel name in messages is allFills.
Subscribe once and receive every fill on HyperCore as it executes, batched per block as [address, fill] tuples. Optional coin filter narrows the stream to a single market; aggregateByTime merges partial fills of the same order in a block.
import WebSocket from "ws";const ws = new WebSocket( `wss://hypercore.goldrushdata.com/ws?key=${process.env.GOLDRUSH_API_KEY}`,);ws.on("open", () => { ws.send(JSON.stringify({ method: "subscribe", subscription: { type: "allFills", }, }));});ws.on("message", (raw) => { const msg = JSON.parse(raw.toString()); if (msg.channel === "allFills") { for (const [address, fill] of msg.fills) { console.log(address, fill.coin, fill.side, fill.sz, "@", fill.px); } }});
import asyncio, json, osimport websocketsasync def main(): uri = f"wss://hypercore.goldrushdata.com/ws?key={os.environ['GOLDRUSH_API_KEY']}" async with websockets.connect(uri) as ws: await ws.send(json.dumps({ "method": "subscribe", "subscription": {"type": "allFills"}, })) async for raw in ws: msg = json.loads(raw) if msg.get("channel") == "allFills": for address, fill in msg["fills"]: print(address, fill["coin"], fill["side"], fill["sz"], "@", fill["px"])asyncio.run(main())
Unsubscribe matches subscriptions by exact body. A subscription created with {"type": "allFills", "coin": "BTC"} is a different subscription from a wildcard {"type": "allFills"} - they must be unsubscribed independently.
Each push has channel: "allFills" and a fills array of [address, fill] tuples - every fill from the same HyperCore block that matches the optional coin filter, with the executing wallet as the first element of each tuple.