Skip to main content

Module map

Module map 

Source
Expand description

Translation between Finam protobuf messages and brokapi-core types.

Pure functions, no network. Decimals arrive as strings and become exact Decimal numbers (an absent or unparseable value becomes 0 or None, as each function says). Times arrive as protobuf timestamps and become Unix nanoseconds.

ModuleMaps
instrumentdirectory entries, trading parameters, schedules
marketorder book rows, quotes, trades, bars
m1010-minute candles built from 5-minute ones
orderplain orders: statuses, requests
stopstop orders: STOP, STOP_LIMIT, SL/TP
portfolioaccount state, own trades

§Examples

use brokapi_finam::map::instrument::kind_from_type;
use brokapi_core::InstrumentKind;

// Finam's instrument types are not enumerated in its docs: they are matched by substring.
assert_eq!(kind_from_type("EQUITIES"), InstrumentKind::Stock);
assert_eq!(kind_from_type("BONDS"), InstrumentKind::Bond);

Modules§

instrument
Instrument directory mapping.
m10
10-minute candles built from 5-minute ones: Finam has no M10 timeframe.
market
Order book, quotes, trades, bars.
order
Orders: Finam OrderState <-> core snapshots, requests.
portfolio
Account / portfolio mapping.
stop
Stop orders: core requests <-> Finam Order (STOP, STOP_LIMIT) and SLTPOrder.