HyperCore APIs are in beta. Message fields, limits, and behavior may change, including breaking changes. To request access, contact [email protected].
Stream Hyperliquid order books and fills from Alchemy-operated nodes. One connection carries many subscriptions, each subscription can cover many markets or addresses, and every data message carries the block it came from.
wss://hypercore-mainnet.g.alchemy.com/v2/<API_KEY>HyperCore access is enabled per team during the beta; to request it, contact [email protected]. Once enabled, the HyperCore network appears in your Alchemy dashboard and works with your existing API key. Testnet is not available yet.
{"method":"subscribe","subscriptionId":"btc-top","subscription":{"type":"bbo","coins":["BTC"]}}{"channel":"subscriptionResponse","subscriptionId":"btc-top","data":{"type":"bbo","coins":["BTC"]}}
{"seq":1,"channel":"bbo","subscriptionId":"btc-top","data":{"blockNumber":1183716828,"blockTime":1791996538119,"isSnapshot":true,"books":[{"coin":"BTC","bbo":[{"px":"81772.0","sz":"30.29","n":96},{"px":"81773.0","sz":"0.02","n":2}]}]}}Every request is a JSON object with method and subscriptionId.
| Field | Required | Description |
|---|---|---|
method | Yes | subscribe or unsubscribe. |
subscriptionId | Yes | An ID you choose, up to 128 characters. It must be unique on the connection and is echoed on every message for that subscription. Use it to unsubscribe. |
subscription | Subscribe only | The stream type plus its filters. |
{"method":"unsubscribe","subscriptionId":"btc-top"}Filters are arrays: coins, users, builders. To subscribe to one market, pass a one-element array such as "coins": ["BTC"]. Omitting coins subscribes to every market, which can be a large volume of data. See unfiltered subscriptions.
Send only the fields documented for each stream. Fields the server doesn't recognize are ignored rather than rejected, so a misspelled or unsupported filter (for example coin instead of coins) can result in an unfiltered, all-markets subscription.
| Message | Shape | When |
|---|---|---|
connected | {"channel":"connected"} | The connection is ready. |
| Acknowledgement | {"channel":"subscriptionResponse","subscriptionId":…,"data":{…}} | A subscribe or unsubscribe succeeded. data echoes the accepted filters. |
| Data | {"seq":…,"channel":<type>,"subscriptionId":…,"data":{…}} | A block's worth of fills, or a book update. |
| Gap | {"seq":…,"channel":<type>,"subscriptionId":…,"gap":{"fromBlock":…,"toBlock":…}} | Fill streams only. The range could not be delivered. |
| Error | {"channel":…,"subscriptionId"?:…,"error":{"code":…,"message":…}} | See errors and limits. |
Every data message includes data.blockNumber and data.blockTime (Unix milliseconds). seq is a per-subscription counter that starts at 1 and increases by one with each data, gap, or book_reset message; use it to detect a missed message. See connection lifecycle.
| Stream | Kind | Filter | Replay |
|---|---|---|---|
| allFills | Event | coins (optional) | fromBlock |
| userFills | Event | users | fromBlock |
| builderFills | Event | builders | fromBlock |
| liquidationFills | Event | None | fromBlock |
| l2Book | Book: snapshots | coins (optional) | No |
| l2BookDiff | Book: snapshot, then diffs | coins (optional) | No |
| bbo | Book: snapshots | coins (optional) | No |
| allMids | Book: snapshots | coins (optional) | No |
| l4BookUpdates | Book: snapshot, then order diffs | coins (optional) | No |
Event streams deliver each fill once and can replay recent blocks after a reconnect. Book streams start with a snapshot of current state and need no replay: resubscribe and the snapshot re-establishes your state.
- Connection lifecycle: reconnecting, heartbeats, sequence numbers
- Replay and recovery: resuming fill streams after a disconnect
- Errors and limits
- Migrating from the Hyperliquid API