Skip to main content

Module util

Module util 

Expand description

Small helpers: the identity of an instrument, the timeframe labels and the time conversions.

Functions§

exchange_of_board
The exchange an instrument trades on: SPBX for the board SPBX, MOEX for every other board.
instrument_id
The id of an instrument by ticker and board.
nanos_to_datetime
A [UnixNanos] as a date.
nanos_to_secs
Unix seconds of a [UnixNanos].
ticker_board
The ticker and the trading mode (board) of an instrument. ALOR needs them as two fields, so the native id must be [NativeId::TickerClass] (the class code is the board, for example TQBR).
timeframe_label
The tf of the broker for a timeframe: a number of seconds, or D, W, M.