Module market
Expand description
Order book, quotes, trades, bars.
Structs§
- Book
State - Local order book rebuilt from Finam’s snapshot + action rows.
- RowView
- Side-neutral view of a book row (unary and stream rows are different generated types).
Enums§
- Apply
Outcome - Result of applying rows to a
BookState. - RowAction
- Row action of a stream update.
Functions§
- bar_
close - Finam gives the bar open time only; close is open + frame length (UTC for week/month).
- book_
snapshot - Full snapshot event from the local book.
- map_bar
Bar-> core candle. Absent prices and volume become 0.close_tsis computed from the open time and the timeframe (month and longer frames follow the calendar), because the bar carries only the open time.- map_
quote Quote-> core quote. Finam sends 0 for a missing side.- map_
rest_ order_ book - Unary
OrderBookresponse -> snapshot. - map_
trade Trade-> market trade. A trade without a side cannot be expressed (coreSideis mandatory), so it is dropped by returningNone.- rest_
rows - Rows of a unary
OrderBookanswer in the neutral form. Rows with no side or no price are skipped. - stream_
rows - Rows of an order book stream message in the neutral form. Rows with no side or no price are skipped.
- timeframe_
to_ pb - Core timeframe -> Finam. M10 has no Finam equivalent (see
wire_timeframe). - wire_
timeframe - Timeframe asked from Finam for a core timeframe: the same one, except M10, which is built from M5
candles (
map::m10).