Once you establish a web socket connection, your client has 30 seconds to complete the login process. Otherwise, the socket will be closed. The Symbridge platform supports a secure key pair authentication model.
The Secure Token Authentication flow is as follows:
Initial Setup (requires login with username and password)
Create an RSA keypair (public and private RSA keypair)
Follow the standard logon process
Call AddDeviceAccess registration (see below) with the public key component of your key pair
Once the device is added you can use your keypair for subsequent logins
Secure Login
Open WSS Connection
Send a RequestSecureToken request for a secure token (which will be encrypted with your public key – that was used in the registration above)
Decrypt the secure token (from the Secure Token request above) with your private key
Send Challenge message - you can ignore the token contained in this challenge response
Send Login request (see below) with the decrypted token
Note Symbridge will send current open orders and position information upon a successful login
Add Device Access
Request
Key
Type
Value
Required
type
string
adddeviceaccess
Yes
devid
string
Unique registration ID for your keypair
Yes
key
string, base64
Base64 encoded public key of the keypair
Yes
nickname
string
Display name for your keypair registration
Optional
delete
boolean
Set this to true to delete an existing device
Optional
Response
Key
Type
Value
type
string
adddeviceaccess
devid
string
Unique registration id for your keypair
key
string, base64
Base64 encoded public key of the keypair
nickname
string
Display name for your keypair registration
result
string
"OK" for successful registration of your public key, otherwise an error message will be returned