Huobi · AsyncAPI Specification
Huobi / HTX WebSocket API
Version 1.0.0
AsyncAPI 2.6 specification for Huobi (HTX) public WebSocket Market Data API and WebSocket v2 Asset & Order subscription API. ## Envelope conventions ### Market data (v1, /ws) - Subscribe: `{ "sub": "
Channels
market.{symbol}.kline.{period}
Subscribe / unsubscribe / request kline data.
Candlestick (kline) updates for a symbol at the given period.
market.{symbol}.depth.{type}
Aggregated order book depth at a price-aggregation step.
market.{symbol}.trade.detail
Per-trade tick stream for a symbol.
market.{symbol}.detail
24-hour rolling market detail / statistics for a symbol.
market.{symbol}.ticker
Real-time ticker for a single symbol.
market.tickers
Real-time ticker snapshot for all trading pairs.
market.{symbol}.bbo
Best Bid / Best Offer updates for a symbol.
market.{symbol}.mbp.{levels}
Market By Price (incremental) updates. Use `seqNum` / `prevSeqNum` to chain updates and de-duplicate. Served on the `/feed` endpoint.
market.{symbol}.mbp.refresh.{levels}
Market By Price refresh updates (full snapshot at interval).
market.{symbol}.etp
ETP (Exchange Traded Product) net asset value updates.
ping
Heartbeat channel for the v1 market data sockets. The server sends a ping frame; the client MUST echo the same timestamp back as pong.
auth
Authentication handshake. Must be sent and confirmed before subscribing to any private topic on the v2 socket.
accounts.update#{mode}
Account balance / available balance updates. - mode 0: only balance changes are pushed. - mode 1: only available balance changes are pushed. - mode 2: both balance and available balance changes are pushed.
orders#{symbol}
Order update events for a single symbol. Use `*` as the symbol to subscribe to all symbols on the account.
trade.clearing#{symbol}
Trade clearing (settlement) events for a single symbol. Use `*` as the symbol to subscribe across all symbols on the account.
accounts.list
One-shot request that returns the full account list / balances.
orders.list
One-shot request that returns historical orders for an account.
orders.detail
One-shot request that returns the detail of a single order.
ping-v2
v2 heartbeat. Server sends `{ "action": "ping", "data": { "ts": } }`; client MUST echo with `{ "action": "pong", "data": { "ts": } }`.
Messages
V1SubscribeRequest
Subscribe (v1)
Subscribe to a v1 market-data topic.
V1UnsubscribeRequest
Unsubscribe (v1)
V1Request
One-shot Request (v1)
Request a historical / snapshot payload for a topic.
V1Ping
Ping (v1)
V1Pong
Pong (v1)
KlinePush
Kline Push
DepthPush
Aggregated Depth Push
TradeDetailPush
Trade Detail Push
MarketDetailPush
Market Detail (24h) Push
TickerPush
Ticker Push
TickersPush
All Tickers Push
BboPush
BBO Push
MbpIncrementalPush
MBP Incremental Push
MbpRefreshPush
MBP Refresh Push
EtpPush
ETP Net Asset Value Push
V2AuthRequest
Auth Request (v2)
V2AuthResponse
Auth Response (v2)
V2SubscribeRequest
Subscribe (v2)
V2UnsubscribeRequest
Unsubscribe (v2)
V2Request
One-shot Request (v2)
V2Ping
Ping (v2)
V2Pong
Pong (v2)
AccountsUpdatePush
Account Update Push
OrdersPush
Order Update Push
TradeClearingPush
Trade Clearing Push
AccountsListResponse
Accounts List Response
OrdersListResponse
Orders List Response
OrdersDetailResponse
Order Detail Response
Servers
wss
market
api.huobi.pro/ws
Public market data WebSocket endpoint. GZIP-compressed binary frames. Mirror: `api-aws.huobi.pro/ws`.
wss
feed
api.huobi.pro/feed
Dedicated endpoint for Market By Price (MBP) incremental updates. GZIP-compressed binary frames. Mirror: `api-aws.huobi.pro/feed`.
wss
account
api.huobi.pro/ws/v2
WebSocket v2 endpoint for asset and order subscriptions. Plain JSON frames (no GZIP). Requires authentication for all private topics. Mirror: `api-aws.huobi.pro/ws/v2`.
AsyncAPI Specification
Work with this as data
Every AsyncAPI spec here is available over the APIs.io API and to AI agents over MCP.