Pro WebSocket

Connect to wss://ws.bit2me.com/v1/trading, authenticate, subscribe.

URL: wss://ws.bit2me.com/v1/trading.

Public channels need no login. Private channels and order commands need a token from POST /v1/signin/apikey. That token is valid 1 minute — authenticate on the socket within that window.

Get a token

curl --location --request POST 'https://gateway.bit2me.com/v1/signin/apikey' \
  -H 'Content-type: application/json' \
  -H 'X-API-KEY: <api key>' \
  -H 'api-signature: <sign message>' \
  -H 'x-nonce: <nonce>'

Sample: https://github.com/bit2me-devs/trading-spot-samples/blob/main/node/auth/ws.js.

Authenticate on the socket

{
  "event": "authenticate",
  "token": "the-token"
}

Success:

{
  "event": "authenticate"
}

Error:

{
  "event": "authenticate",
  "error": "jwt expired"
}

Then subscribe or send commands. See Public channels, Private channels, and Order commands.

Each command has its own message-per-second limit, and reaching it aborts the connection. See WebSocket rate limits.

This surface is not the gateway notification socket. Notifications (wallet, KYC, teller) are documented under Wallet → Notifications.

On this page