otp.TestSession#

class TestSession(*args, **kwargs)#

Bases: onetick.py.session.Session

This class does the same as onetick.py.session.Session, but also defines default required otp.config values.

Using this session object is the equivalent of defining these configuration values:

otp.config['tz'] = 'EST5EDT'
otp.config['default_db'] = 'DEMO_L1'
otp.config['default_symbol'] = 'AAPL'
otp.config['default_start_time'] = datetime(2003, 12, 1, 0, 0, 0)
otp.config['default_end_time'] = datetime(2003, 12, 4, 0, 0, 0)

DEMO_L1 is the database defined in the default locator generated by onetick.py and it is also a name of the database commonly used in the OneTick ecosystem, academy courses, etc.