developers:websocket

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developers:websocket [2025/03/14 18:58] chaddevelopers:websocket [2025/03/14 19:15] (current) – [Message Structure Overview] chad
Line 27: Line 27:
  
 All messages sent to the server must be wrapped in a **ClientMessage** envelope, and all messages received from the server will be contained within a **ServerMessage** envelope. This ensures a consistent structure and simplifies message parsing. All messages sent to the server must be wrapped in a **ClientMessage** envelope, and all messages received from the server will be contained within a **ServerMessage** envelope. This ensures a consistent structure and simplifies message parsing.
- 
-A C# helper tool is available to streamline message handling. It is part of a repository that provides free utilities for developers. **[Repository Placeholder - Add Link]** 
  
 === Client Message Structure === === Client Message Structure ===
Line 34: Line 32:
 A **ClientMessage** is the top-level wrapper for all messages sent to the server. It contains fields for various message types, such as authentication requests, order submissions, and subscription requests. A **ClientMessage** is the top-level wrapper for all messages sent to the server. It contains fields for various message types, such as authentication requests, order submissions, and subscription requests.
  
-Example fields in a **ClientMessage**: +Example **ClientMessage**: 
-  AuthenticationRequest + 
-  MarketSubscription +<code> 
-  OrderRequest +message ClientMessage { 
-  ... (and other client-initiated messages)+  oneof payload { 
 +    AuthenticationRequest authentication_request = 1; 
 +    MarketSubscription market_subscription = 2; 
 +    OrderRequest order_request = 3; 
 +    // ... other client messages 
 +  } 
 +
 +</code>
  
 === Server Message Structure === === Server Message Structure ===
Line 44: Line 49:
 A **ServerMessage** is the top-level wrapper for all responses and updates from the server. It encapsulates messages related to market data, account updates, and execution reports. A **ServerMessage** is the top-level wrapper for all responses and updates from the server. It encapsulates messages related to market data, account updates, and execution reports.
  
-Example fields in a **ServerMessage**: +Example **ServerMessage**: 
-  AuthenticationResponse + 
-  MarketSnapshot +<code> 
-  OrderUpdate +message ServerMessage { 
-  ... (and other server-generated messages)+  oneof payload { 
 +    AuthenticationResponse authentication_response = 1; 
 +    MarketSnapshot market_snapshot = 2; 
 +    OrderUpdate order_update = 3; 
 +    // ... other server messages 
 +  } 
 +
 +</code> 
 + 
 + 
 +=== Message Tools === 
 + 
 +The [[https://github.com/CTS-Futures/t4-api-tools|T4 API Tools repository]] has code that makes wrapping messages from your client very easy. 
 + 
 +<bootnote> 
 +Reach out to support if you would like a API tool's for a language we have not covered yet. 
 +</bootnote> 
 + 
 +^ **Platform** ^ **Client Message Helper** ^ 
 +| **.Net** | [[https://github.com/CTS-Futures/t4-api-tools|ClientMessageHelper.cs]]| 
 + 
 + 
 + 
  
-Each message type within these envelopes is a Protobuf message, allowing for efficient serialization and deserialization. Developers should extract the relevant fields based on their needs. 
  
  • developers/websocket.1741978718.txt.gz
  • Last modified: 2025/03/14 18:58
  • by chad