Configuration#

There are numerous variables you can use to change the onetick.py behavior.

Some of them are optional and have a working defaults, but some of them need to be set manually.

These configuration options can be set:

  • via environment variables before the start of the python process

  • using otp.config properties after importing onetick.py module

The full list of onetick.py configuration options can be found here: otp.config

name

default

description

OTP_DEFAULT_TZ

Local timezone of your machine

Default timezone that’s used for every query run, for example otp.run. Could be set in code using the otp.config['tz']

OTP_DEFAULT_START_TIME

Default start time that’s used for every query run, for example otp.run. Could be set in code using the otp.config['default_start_time']

OTP_DEFAULT_END_TIME

Default end time that’s used for every query run, for example otp.run. Could be set in code using the otp.config['default_end_time']

OTP_CONTEXT

DEFAULT

Default context that’s used for every query run, for example otp.run Could be set in code using the otp.config['context']

OTP_DEFAULT_CONCURRENCY

Machine’s number of cores or other system-dependent value.

Default maximum number of cpu cores that’s used for every query run, for example otp.run Could be set in code using the otp.config['default_concurrency']

OTP_DEFAULT_BATCH_SIZE

1

Default maximum number of symbols to process at once, for example otp.run Could be set in code using the otp.config['default_batch_size']

OTP_DEFAULT_DB

Default database from the current context that’s used as a placeholder for a query run. Could be set in code using the otp.config['default_db']

OTP_DEFAULT_SYMBOL

Default symbol in the database that’s used as a placeholder for a query run. Could be set in code using the otp.config['default_symbol']

OTP_BASE_FOLDER_FOR_GENERATED_RESOURCE

python tempdir

Folder where are saved intermediate queries and resources that could appear during a query run.

OTP_DEFAULT_LICENSE_DIR

Default license directory’s path that’s used for every query run. If not set the default OneTick license directory for the system is used.

OTP_DEFAULT_LICENSE_FILE

Default license file’s path that’s used for every query run. If not set the default OneTick license file for the system is used.

OTP_DEFAULT_FAULT_TOLERANCE

FALSE

Default value for USE_FT query property.