PUBLISH Authenticate

PUB wss://test-api.synquote.com/ws

This request authenticates a WebSocket connection for a particular account.

REQUEST

HEADER PARAMS

msg_type string required
Message type: authenticate

id number required
The ID of the request. This is returned in the response header.

version integer required
Version number: 1

BODY PARAMS

signature string required

The signed account_token from the get_account_token request

cancel_on_disconnect bool required

If true, all open limit orders will be canceled if the underlying connection is disconnected

send_heartbeats bool required

If true, the server will send heartbeat requests to the client. The client must respond or it will be disconnected.

Example
[
  {
    "msg_type":"authenticate",
    "id": 1002,
    "version": 1
  },
  {
    "signature": "test_signature",
    "cancel_on_disconnect": true,
    "send_heartbeats": true,
  }
]

RESPONSE

account_id string
The account associated with the response.

status string
The status of the authentication. Can be authenticated, invalid_signature, or invalid_token

Example
[
  {
    "msg_type":"authenticate_response",
    "id": 1002,
    "version": 1
  },
  {
    "account_id": "0x9f58498b98348b9BFbE53F0E18AA818a4Be0aE49",
    "status": "authenticated"
  }
]