Binance · AsyncAPI Specification

Binance Spot WebSocket API

Version 1.0.0

The Binance Spot WebSocket API provides an alternative way to access spot trading functionality through persistent WebSocket connections. It is functionally equivalent to the REST API, accepting the same parameters and returning the same status and error codes, but offers lower latency for time-sensitive trading operations. Developers can place orders, cancel orders, and query account information over a single WebSocket connection.

View Spec View on GitHub CryptocurrencyExchangeTradingBlockchainFinanceDeFiMarket DataAsyncAPIWebhooksEvents

Channels

/
publish receiveResponse
Receive API responses
Single WebSocket connection for sending trading requests and receiving responses. All requests and responses are JSON-formatted messages on this channel. Requests include a method name and parameters; responses include a matching id field.

Messages

OrderRequest
Order Request
Request to place a new order via WebSocket.
CancelOrderRequest
Cancel Order Request
Request to cancel an order via WebSocket.
AccountRequest
Account Request
Request for account information via WebSocket.
MarketDataRequest
Market Data Request
Request for market data via WebSocket.
OrderResponse
Order Response
Response to an order request.
AccountResponse
Account Response
Response to an account query.
MarketDataResponse
Market Data Response
Response to a market data query.
ErrorResponse
Error Response
Error response for failed requests.

Servers

wss
production wss://ws-api.binance.com:443/ws-api/v3
Production WebSocket API server for spot trading operations.
wss
testnet wss://testnet.binance.vision/ws-api/v3
Testnet WebSocket API server.