LegendTrade · AsyncAPI Specification
Legend WebSocket API
Version 0.1.0
Legend's Hyperliquid-compatible WebSocket at wss://api.legend.trade/ws, using subscription-based messaging. Clients subscribe to named channels; the server streams matching events. GENERATED by the API Evangelist enrichment pipeline on 2026-07-19 from the API's own self-describing root document (GET https://api.legend.trade), which enumerates the `/ws` path and the exact `wsSubscriptions` channel names under `marketData` and `userData`. Channel names are verbatim from that document. Message payload schemas are NOT modelled — Legend does not publish them and they were not observed on the wire, so they are left as open objects rather than invented.
View Spec
View on GitHub
CompanyDefiTradingCryptocurrencyPerpetual FuturesSocial TradingCopy TradingMarket DataHyperliquidWebSocketAsyncAPIWebhooksEvents
Channels
trades
Market data — executed trades.
candle
Market data — candle updates.
activeAssetCtx
Market data — context for the active asset.
userFills
User data — fills for the subscribed account.
openOrders
User data — current open orders.
orderUpdates
User data — order lifecycle updates.
clearinghouseState
User data — margin and position state.
notification
User data — account notifications.
webData3
User data — aggregated client state payload.
twapStates
User data — state of running TWAP orders.
userEvents
User data — account events.
userFundings
User data — funding payments.
userNonFundingLedgerUpdates
User data — ledger updates other than funding.
activeAssetData
User data — per-asset account data.
userTwapSliceFills
User data — fills from individual TWAP slices.
userTwapHistory
User data — historical TWAP orders.
Messages
MarketDataEvent
Market data event
A market-data event on a public channel. Payload schema not published by Legend.
UserDataEvent
User data event
An account-scoped event. Payload schema not published by Legend.
Servers
wss
production
Production WebSocket endpoint.