Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
developers:websocket [2025/03/14 18:58] – chad | developers: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, | 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, | ||
- | Example | + | Example **ClientMessage**: |
- | | + | |
- | | + | < |
- | | + | message ClientMessage { |
- | | + | |
+ | | ||
+ | MarketSubscription | ||
+ | OrderRequest | ||
+ | // | ||
+ | } | ||
+ | } | ||
+ | </ | ||
=== 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 | + | Example **ServerMessage**: |
- | | + | |
- | | + | < |
- | | + | message ServerMessage { |
- | | + | |
+ | | ||
+ | MarketSnapshot | ||
+ | OrderUpdate | ||
+ | // | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Message Tools === | ||
+ | |||
+ | The [[https:// | ||
+ | |||
+ | < | ||
+ | Reach out to support if you would like a API tool's for a language we have not covered yet. | ||
+ | </ | ||
+ | |||
+ | ^ **Platform** ^ **Client Message Helper** ^ | ||
+ | | **.Net** | [[https:// | ||
+ | |||
+ | |||
+ | |||
- | 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. | ||