Binance Web3 API
string · requiredstring · requiredstring · requiredinteger · int64stringintegerstringstringinteger · int64boolean
Get WebSocket Auth Token
Get a WebSocket auth token before connecting to the WebSocket stream service. For details on WebSocket usage, please refer to the WebSocket documentation.
GET
/api/v1/dex/market/wss/auth/token
https://web3.binance.com/build
Get WebSocket Auth Token › Authorization
This is a signed endpoint and a signature must be included in the request headers.Learn more about how to generate a valid signature in the Authentication.
Headers
X-OC-APIKEYAPI Key issued by Binance Web3 API for authentication.
Example: your-api-key-here
X-OC-TIMESTAMPCurrent UTC time in ISO 8601 format with milliseconds, e.g. 2026-05-11T10:08:57.715Z.
Example: 2026-05-11T10:08:57.715Z
X-OC-SIGNRequest signature (Base64-encoded).
Example: Base64EncodedSignature==
X-OC-RECV-WINDOWAllowed time deviation in milliseconds (default: 5000, max: 60000).
Example: 5000
X-OC-NONCEUnique request identifier for anti-replay; falls back to X-OC-SIGN if omitted.
Example: unique-nonce-string
Get WebSocket Auth Token › Responses
200
WebSocket auth token returned successfully.
codeResponse code. 0 indicates success.
Example: 0
msgResponse message.
Example: success
object
tokenWebSocket auth token (JWT).
Example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJvbmNoYWlub3MtbWFya2V0IiwiYXVkIjoidzN3LXdzcCIsImFwayI6Inczd0BvbmNoYWlub3NAcHViIiwiaWF0IjoxNzg4MjYxMDY1LCJleHAiOjE3ODg4NjU4NjV9.feuZY7YDqaPrGTDVtfOwyH4Goq9rewLbokflraq1IrY
timestampServer timestamp in milliseconds.
Example: 1788261065615
successWhether the request was successful.
Example: true