Expand description
Mapping of the wire models of the exchange to the broker-independent types.
Every function here is pure: no clock but the one passed in, no network.
Modules§
- execution
- Fills.
- instrument
- Instruments: the directory entry, the trading rules and the status.
- market
- Market data: books, quotes, trades and candles.
- order
- Orders: the state words of the exchange and the snapshot of an order.
- portfolio
- The portfolio: positions and the balances of the wallet.
- stop
- Stop orders: conditional orders of the exchange.
Functions§
- broker_
ts - The time of the exchange as nanoseconds,
Nonewhen the exchange gave none (zero). - ms_
to_ nanos - Nanoseconds from milliseconds since the epoch.
- side_of
- The side from the word of the API.
- side_
word - The word of the API for a side.
- timestamps
- The three clocks of an event:
nowis the local monotonic one, the wall clock is read here, the time of the exchange is given when the frame has it. - unix_
now_ nanos - The wall clock now, as nanoseconds since the epoch.