developers:websocket:connecting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
developers:websocket:connecting [2025/03/14 02:53] – created chaddevelopers:websocket:connecting [2026/03/09 16:39] (current) – [Authentication] frank
Line 5: Line 5:
 ===== WebSocket Connection ===== ===== WebSocket Connection =====
  
-^ Environment ^ WebSocket URL ^ +<WRAP 50%> 
-| **Live** | `wss://wss.t4login.com/v1+**Environment** **WebSocket URL** 
-| **Simulator** | `wss://wss-sim.t4login.com/v1|+| **Live** | %%wss://wss.t4login.com/v1%% 
 +| **Simulator** | %%wss://wss-sim.t4login.com/v1%% | 
 +</WRAP> 
 + 
 + 
  
 Clients must connect using **WebSocket Secure (WSS) over SSL/TLS** on port **443**. Messages are encoded using **Google Protocol Buffers (Protobuf)**. Clients must connect using **WebSocket Secure (WSS) over SSL/TLS** on port **443**. Messages are encoded using **Google Protocol Buffers (Protobuf)**.
Line 15: Line 20:
 ===== Authentication ===== ===== Authentication =====
 Authentication must be performed **immediately after establishing a connection** by sending a `LoginRequest` message. This API supports two authentication methods:   Authentication must be performed **immediately after establishing a connection** by sending a `LoginRequest` message. This API supports two authentication methods:  
-- **API Key Authentication** (provide only the `api_key` field).   +- **API Key Authentication** (provide only the `apikey` field).   
-- **Username/Password Authentication** (send `firm`, `username`, `password`, `app_name`, and `app_license`).  +- **Username/Password Authentication** (send `firm`, `username`, `password`, `appName`, and `appLicense`).  
  
 **Example LoginRequest (API Key Authentication):** **Example LoginRequest (API Key Authentication):**
 <code> <code>
 { {
-  "api_key": "abc123-xyz789"+  "apiKey": "abc123-xyz789"
 } }
 </code> </code>
Line 31: Line 36:
   "username": "trader123",   "username": "trader123",
   "password": "securepassword",   "password": "securepassword",
-  "app_name": "CustomTradingApp", +  "appName": "CustomTradingApp", 
-  "app_license": "LICENSE-4567"+  "appLicense": "LICENSE-4567"
 } }
 </code> </code>
Line 42: Line 47:
 { {
   "result": "LOGIN_SUCCESS",   "result": "LOGIN_SUCCESS",
-  "session_id": "sess-123456789", +  "sessionId": "sess-123456789", 
-  "user_id": "user-456", +  "userId": "user-456", 
-  "firm_id": "firm-789",+  "firmId": "firm-789",
   "roles": ["Trader", "RiskManager"]   "roles": ["Trader", "RiskManager"]
 } }
  • developers/websocket/connecting.1741920829.txt.gz
  • Last modified: 2025/03/14 02:53
  • by chad