Skip to main content

Module instrument

Module instrument 

Source
Expand description

Instrument directory mapping.

Functions§

apply_trade_lot_size
The lot for trading, when GetAssetParams gives one: trade_lot_size above 0 replaces the lot size of GetAsset (lot_size and min_qty). 0 or less means “no value” and params stays as it is.
availability_at
Availability from the schedule: inside a non-closed session -> open, otherwise closed.
kind_from_type
Finam’s type strings are not enumerated in the docs; matched by substring.
map_asset
A directory entry (Assets, AllAssets) -> core instrument.
map_get_asset
A GetAsset answer -> core instrument. symbol is the SYMBOL@MIC that was asked for.
map_schedule
A Schedule answer -> core schedule for the range from..to.
map_trading_params
Price step = min_step / 10^decimals. Finam does not give the money value of a step, so price_step_value equals price_step (right for stocks, not for futures). min_qty is one lot because orders are in pieces and sized in whole lots.
session_kind
Session type heuristics: the docs do not list the type values.