Binance · AsyncAPI Specification

Binance Spot WebSocket Streams

Version 1.0.0

Binance Spot WebSocket Streams deliver real-time market data updates via persistent WebSocket connections. Developers can subscribe to individual symbol ticker streams, aggregate trade streams, kline and candlestick data, depth-of-book updates, and mini-ticker streams. A single connection is valid for 24 hours. The server sends a ping frame every 20 minutes and will disconnect if no pong is received within 60 seconds.

View Spec View on GitHub CryptocurrencyExchangeTradingBlockchainFinanceDeFiMarket DataAsyncAPIWebhooksEvents

Channels

/ws/{symbol}@aggTrade
publish receiveAggTrade
Receive aggregate trade events
Aggregate trade stream. Pushes trade information that is aggregated for a single taker order.
/ws/{symbol}@trade
publish receiveTrade
Receive individual trade events
Raw trade stream. Pushes raw trade information; each trade has a unique buyer and seller.
/ws/{symbol}@kline_{interval}
publish receiveKline
Receive kline/candlestick events
Kline/candlestick stream. Pushes updates to the current kline every two seconds.
/ws/{symbol}@miniTicker
publish receiveMiniTicker
Receive mini ticker events
Individual symbol mini ticker stream. Pushes 24hr rolling window mini-ticker statistics every second.
/ws/!miniTicker@arr
publish receiveAllMiniTickers
Receive all market mini ticker events
All market mini tickers stream. Pushes mini-ticker for all symbols every second.
/ws/{symbol}@ticker
publish receiveTicker
Receive ticker events
Individual symbol ticker stream. Pushes 24hr rolling window ticker statistics every second.
/ws/{symbol}@bookTicker
publish receiveBookTicker
Receive book ticker events
Individual symbol book ticker stream. Pushes the best bid or ask in real-time.
/ws/{symbol}@depth{levels}
publish receivePartialDepth
Receive partial order book depth events
Partial book depth stream. Pushes the top bids and asks at specified depth levels (5, 10, or 20). Updated every second or 100ms depending on the update speed parameter.
/ws/{symbol}@depth
publish receiveDiffDepth
Receive order book diff depth events
Diff depth stream. Pushes order book price and quantity changes in real-time.
/ws/{symbol}@avgPrice
publish receiveAvgPrice
Receive average price events
Average price stream. Pushes changes in the average price over a fixed time window.

Messages

AggTrade
Aggregate Trade
Aggregate trade event with price, quantity, and trade IDs.
Trade
Trade
Individual trade event.
Kline
Kline/Candlestick
Kline/candlestick update event.
MiniTicker
Mini Ticker
24hr mini ticker event with basic price statistics.
Ticker
24hr Ticker
24hr rolling window ticker statistics event.
BookTicker
Book Ticker
Best bid and ask update event.
PartialDepth
Partial Book Depth
Top bids and asks at specified levels.
DiffDepth
Diff Depth
Order book price and quantity changes.
AvgPrice
Average Price
Average price update event.

Servers

wss
production wss://stream.binance.com:9443
Production WebSocket stream server. Supports up to 1024 streams per connection and 300 connections per 5 minutes per IP.
wss
productionAlt wss://stream.binance.com:443
Alternative production WebSocket stream server on port 443.