otp.OneTickLib#

class OneTickLib(*args, log_file=None)[source]#

Bases: object

Singleton class for otq.OneTickLib to initialize it once usage:

OneTickLib() - returns existing otq.OneTickLib if it is intialized or

otq.OneTickLib(None) if it is not

OneTickLib(*args) - returns pyomf.OneTickLib(*args)

cleanup()[source]#
set_log_file(log_file)[source]#

Set log file for given instance of OneTickLib

Parameters

log_file – path to log file

set_logging_level(lvl)[source]#

Logging level can be specified by using LoggingLevel Enum class

Parameters

lvl (onetick.lib.instance.LoggingLevel) – available values are LoggingLevel.MIN, LoggingLevel.LOW, LoggingLevel.MEDIUM or LoggingLevel.MAX

Returns

set_authentication_token(auth_token)[source]#

Set authentication token for given instance of OneTickLib

Parameters

auth_token (str) – authentication token

static override_config_value(config_parameter_name, config_parameter_value)[source]#

Override config value of OneTickConfig :param config_parameter_name: param to override (could be both set or not set in OneTickConfig) :param config_parameter_value: new value of the param

Parameters

config_parameter_name (str) –