Configuration parameters#
See otp.config
for details.
- OptionsTable#
Name
Environment Variable
Description
OTP_DEFAULT_TZ
Default timezone used for running queries and creating databases, e.g. with
otp.run
. Default value is the local timezone of your machine.OTP_CONTEXT
Default context used for running queries, e.g. with
otp.run
.Note: In WebAPI mode it will have None value.OTP_DEFAULT_START_TIME
Default start time used for running queries, e.g. with
otp.run
.OTP_DEFAULT_END_TIME
Default end time used for running queries, e.g. with
otp.run
.OTP_DEFAULT_DB
Default database name used for running queries, e.g. with
otp.run
.OTP_DEFAULT_SYMBOL
Default symbol name used for running queries, e.g. with
otp.run
.OTP_DEFAULT_SYMBOLOGY
Default database symbology.
OTP_DEFAULT_CONCURRENCY
Default concurrency level used for running queries, e.g. with
otp.run
. Default value isNone
which means that the value is adaptive and is set to 0 (meaning concurrency will be auto-assigned by OneTick server) on the latest OneTick versions where it is supported or to 1 (meaning no concurrency) on older versions.OTP_DEFAULT_BATCH_SIZE
Default batch size used for running queries, e.g. with
otp.run
. Batch size is the maximum number of symbols that are processed at once. The value of 0 means unlimited – works faster for simple queries, but may consume too much memory for complex queries.OTP_DEFAULT_LICENSE_DIR
Default path for license directory. Needed for user to be allowed to use OneTick API. Default value is system-dependent: /license for Linux systems and C:/OMD/client_data/config/license_repository for Windows systems.
OTP_DEFAULT_LICENSE_FILE
Default path for license file. Needed for user to be allowed to use OneTick API. Default value is system-dependent: /license/license.dat for Linux systems and C:/OMD/client_data/config/license.dat for Windows systems.
OTP_DEFAULT_FAULT_TOLERANCE
Default value for USE_FT query property.
OTP_DEFAULT_AUTH_USERNAME
Default username used for authentication.
OTP_DEFAULT_PASSWORD
Default password used for authentication.
OTP_HTTP_ADDRESS
Default HTTP server used as WebAPI endpoint.
OTP_HTTP_USERNAME
Username used for WebAPI authentication.
OTP_HTTP_PASSWORD
Password used for WebAPI authentication.
HTTP_PROXY
HTTP proxy used for WebAPI requests.
HTTPS_PROXY
HTTPS proxy used for WebAPI requests.
OTP_ACCESS_TOKEN
SSO access token for WebAPI endpoint.
OTP_CLIENT_ID
Client ID for obtaining SSO access token.
OTP_CLIENT_SECRET
Client Secret for obtaining SSO access token.
OTP_ACCESS_TOKEN_URL
URL for obtaining SSO access token.
OTP_SSL_CERT_FILE
Path to the file with list of trusted Certificate Authority certificates for WebAPI requests.
OTP_MAX_EXPECTED_TICKS_PER_SYMBOL
Expected maximum number of ticks per symbol (used for performance optimizations).
OTP_SHOW_STACK_INFO
Show stack info (filename and line or stack trace) in OneTick exceptions.
OTP_LOG_SYMBOL
Log currently executed symbol. Note, this only works with unbound symbols. Note, in this case
otp.run
does not produce the output so it should be used only for debugging purposes.OTP_IGNORE_TICKS_IN_UNENTITLED_TIME_RANGE
Default value for IGNORE_TICKS_IN_UNENTITLED_TIME_RANGE query property.
OTP_MAIN_QUERY_GENERATED_FILENAME
The name of the .otq file with generated main query executed by otp.run.
OTP_LOGGING
The logging level string or path to the file with configuration. Check the documentation of python logging module for the configuration formats. JSON format (in the file with .json suffix) and python configparser formats are supported.
OTP_OTQ_DEBUG_MODE
Enable .otq files debug mode. If set to True, onetick.py will keep all generated otq files and log their paths to the console.
None
Allow using lower case characters in field names that are being stored in Onetick databases. If set to False, onetick.py would not allow saving fields with lower case characters to a database.
OTP_CLEAN_UP_TMP_FILES
Control deleting temporary files created by onetick-py. Temporary files are OneTick configuration files and generated .otq queries.
OTP_DEFAULT_SCHEMA_POLICY
Default schema policy when querying onetick database. See parameter
schema_policy
inotp.DataSource
for the list of supported values.Default symbol with database. Defined with
default_db
anddefault_symbol
as string default_db::default_symbol.Default date. Defined as a date part of
default_start_time
.