Authentication

To make a call to the WebSocket endpoint, you can authenticate using a token.

Token authentication

A JWT token is obtained after a successful login using a user’s credentials and MFA.

The JWT token is passed within the a field of WebSocket messages that require an authentication.

For example, to subscribe to the private topic @subaccount-orders, the required token is added to the a (stands for authentication) field:

{
    "e": "tdx:subscribe",
    "t": "c531bd18-d134-4ce5-9f87-ccaea2527e55@subaccount-orders",
    "a": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxNDZmN2JmYi05ODc5LTRlM2QtOWQ0Ny04YzU0NDNjMWViNGUiLCJ1dCI6ImZvIiwiY2lkIjoiY2MxMzU3NTQtZDc3ZS00ZWZiLTgzZmItZmZkYWI1NzE3NjE2IiwidW4iOiJuYm9udmluMTIiLCJldXBrIjoicDNBUW9LMEVKbnBTcDkwYWJacS9DVUF3eERGOStKUzQ3eWZ1NmRnclpSOWkzdnllYU8zeXpibVp6TmxCalhzRG03MzJOMS9JaGFMckRRbS8iLCJtZmEiOnRydWUsInJhIjoyLCJyIjpbIlJPTEVfRk9fQ0FfT1dORVIiXSwibXMiOlsidGR4Il0sImV4cCI6MTY0MDM2MTE3NiwiaWF0IjoxNjQwMzU3NTc2fQ.HFvwi4uynI0QTwIldrRC0iiyiy6mJNvmGEAf6yG3MEI"
}



  © 2018-2023 Taurus SA. All rights reserved.