Expand description
The trading channel /cws: order commands over one WebSocket connection.
The same commands exist over HTTP, and the broker says the WebSocket gives only a small gain in time (up to 5 ms), so the connectors use HTTP. This client is here for those who want the channel anyway. It is plain on purpose: one connection, one command at a time, no reconnect. A command that gets no answer in time is an unknown outcome, as at every broker: find out before you send it again.
The connection is authorized once with authorize (the broker wants it every 15-20 minutes), and then every
command is a message with an opcode like create:limit, a guid of ours and the fields of the order. The
answer carries the guid back as requestGuid.
Modules§
- opcodes
- The opcodes of the order commands of the trading channel.
Structs§
- CwsReply
- The answer to a command of the trading channel.
- CwsSession
- An authorized connection to the trading channel.