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

KeyTypeValueRequired
typestringadddeviceaccessYes
devidstringUnique registration ID for your keypairYes
keystring, base64Base64 encoded public key of the keypairYes
nicknamestringDisplay name for your keypair registrationOptional
deletebooleanSet this to true to delete an existing deviceOptional

Response

KeyTypeValue
typestringadddeviceaccess
devidstringUnique registration id for your keypair
keystring, base64Base64 encoded public key of the keypair
nicknamestringDisplay name for your keypair registration
resultstring"OK" for successful registration of your public key, otherwise an error message will be returned
# AddDeviceAccess Request
{
  "type":"adddeviceaccess",
  "devid":"device-to-add",
  "key":"MIIBIjANBgkqhkiG832w0BAQEFAAOCAQ8AMIIBCgKCAQEAjegN8Aq0jTi92Wy0E+Bs62U26yz4qH8wz+wf/TFkBLFWOEUZx9BGAw7iXwgWbfpWuNuRmEVIW6b2iUBW/k+FvZcbCjVnLkJ2WGuJdJyGojOvprGgfltLyGJaGuvbkHZeNJKV6x2zFyq+qikVL07K1+6t0ZQtUv973fHiycECdoocXal05Wf86OW+CtFdLzceuFN3K2c5yyCdpUr3+qkiuyP8jHRYFXKp9V8GS3YipEBCf2MyO9tPve6t5w52CGyvIx6D3ieJ5fowLQpJkBH2igyFG/3Sm9TX+3X+kwsj/asZtqRudQINkwsB4CgBa2LDFj8VZ5ZqaNTiWxgi6nebmQIDAQAB"
}

# AddDeviceAccess Response
{
  "type":"adddeviceaccess",
  "result":"OK",
  "devid":"device-to-add",
  "key":"MIIBIjANBgkqhkiG832w0BAQEFAAOCAQ8AMIIBCgKCAQEAjegN8Aq0jTi92Wy0E+Bs62U26yz4qH8wz+wf/TFkBLFWOEUZx9BGAw7iXwgWbfpWuNuRmEVIW6b2iUBW/k+FvZcbCjVnLkJ2WGuJdJyGojOvprGgfltLyGJaGuvbkHZeNJKV6x2zFyq+qikVL07K1+6t0ZQtUv973fHiycECdoocXal05Wf86OW+CtFdLzceuFN3K2c5yyCdpUr3+qkiuyP8jHRYFXKp9V8GS3YipEBCf2MyO9tPve6t5w52CGyvIx6D3ieJ5fowLQpJkBH2igyFG/3Sm9TX+3X+kwsj/asZtqRudQINkwsB4CgBa2LDFj8VZ5ZqaNTiWxgi6nebmQIDAQAB"
}

Request Secure Token


Request

KeyTypeValueRequired
typestringrequestsecuretokenYes
useridstringUserID of the user authenticating to the platformYes
devidstringUnique registration id for your keypairYes

Response

KeyTypeValue
type stringrequestsecuretoken
devid stringUnique registration id for your keypair
userid stringUserID of the user authenticating to the platform
securetoken string, base64Base64 encoded token (encrypted with your public key)
result string"OK" for successful retrieval of your encrypted token
# Request Secure Token
{
  "devid":"device-to-add",
  "type":"requestsecuretoken",
  "userid":"[email protected]"
}

# Response - Request Secure Token

{
  "devid":"device-to-add",
  "result":"OK",
  "type":"requestsecuretoken",
  "userid":"[email protected]",
  "securetoken":"Zt2VY8HnQU1sO1T4X3hVdRafcaZh1Dl9mxskPy3PldYqj10AZqRkDIqvqDdeUI1Mj0sugqLEOaLhCn+SXO0PJhSF9ny9D6uy8JCaF/fxKa16oj7BBFAhb8ZDQkGdp14uBU9wTDJFobh1GGi+OB+B3aKeW4zUEsnoa2rVDfJDyvNOEz+E0H9YD/4VZgoHkaBtMazgfGZJwttTvhzu8Ie0L2OgedxszrP17Xv7nY6MQmZAADEsn3ivLcZfuTwf0BduLUrQylxx0SMztoR/O9O9bNhcL/SbcobwOQRuwzleSoPvZ5KHzu3NBfJQLrYgLQtTdwWT3bujRYEElBGURdAjGw=="
}

Secure Login


Request

KeyTypeValueRequired
typestringloginYes
tokenstringDecrypted token from the secure token sequence (using your private key). Note: not base64 encodedYes

Response

KeyTypeValue
typestringlogin
resultstring"OK" if successful. If not successful, this field will contain the reject reason.
firmstringThe firm account associated with the login user
need2FAbooleanWhether or not the user is required to use 2FA at login
rolesstringThe role string associated with the login user
activestringWhether the user is active or not.
secondary_accountstringThe user's secondary account.
attrjsonContains user level attributes.
use2faboolean
useridstringThe userid associated with the login user.
restricted_attrjsonContains user level attributes that display sensitive fields (which are not included).
# Send Secure Login
{
  "type":"login",
  "token":"^Aa&yoB%Isz44w:i(t^/N,tQ=x#X.*mDPP6yE=ejL^J[_Q?y>g'iVy*Ll1TEeRG"
}

# Response - Secure Login

{
  "result":"OK",
  "firm":"SYMB",
  "roles":"OOOOO",
  "active":"Y",
  "secondary_account":"JOHNDOEMAILCOM", 
  "type":"login",
  "userid":"[email protected]"
  "attr":{
    "country":"",
    "tax_code":"",
    "use2fa":true,
    "last_name":"Doe",
    "first_name":"John",
    "email":"[email protected]"
  },
  "use2fa":"N",
  "restricted_attr":{
    "dev_list":[{"devid":"device-to-add"}]
  },
}