Key Points for WebSocket API:
- Use the same API Token and Secret from your REST API credentials
- Include
apiToken,timestamp, andsignaturein theparamsobject of each request - The signature is generated using: Timestamp + JSON Body (business parameters only)
Signature Generation for WebSocket API
Unlike the REST API, the WebSocket signature is simpler because there’s no HTTP method or path: Message to sign:Timestamp + JSON Body
Where:
Timestamp: The same timestamp sent in theparams.timestampfield (in milliseconds)JSON Body: ONLY the business parameters (pair, side, type, amount, price, etc.). DO NOT includeapiToken,timestamp, orsignaturein the body to sign.
+ signs - just concatenate the values directly.