Skip to content
Alchemy Logo

WebSocket streaming

Beta

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.

FieldRequiredDescription
methodYessubscribe or unsubscribe.
subscriptionIdYesAn 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.
subscriptionSubscribe onlyThe 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.

MessageShapeWhen
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.

StreamKindFilterReplay
allFillsEventcoins (optional)fromBlock
userFillsEventusersfromBlock
builderFillsEventbuildersfromBlock
liquidationFillsEventNonefromBlock
l2BookBook: snapshotscoins (optional)No
l2BookDiffBook: snapshot, then diffscoins (optional)No
bboBook: snapshotscoins (optional)No
allMidsBook: snapshotscoins (optional)No
l4BookUpdatesBook: snapshot, then order diffscoins (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.

Was this page helpful?