Skip to main content

Module util

Module util 

Source
Expand description

Small helpers shared by the two connectors: instrument ids, timeframes and timestamps.

Functions§

class_code
Returns the class code (trading board, for example TQBR) of an instrument id.
nanos_to_datetime
Converts a time in nanoseconds since the Unix epoch to a UTC date and time.
require_ticker_class
Returns the BCS instrument key (ticker and class code) of an instrument id.
ticker
Returns the ticker (for example SBER) of an instrument id.
timeframe_label
The label of a timeframe in BCS requests: M1 M5 M15 M30 H1 H4 D W MN (docs, checked 2026-10-19). M10 is not offered by BCS: None, the caller answers Unsupported.