Problem: there are we have two functions for getting a datetime:
in calls/generic_calls.py which uses system time in container
in utils/common.py which uses NASDAQ timezone...
What I propose: use one timezone from market.
For example, there is helpful function in Alpaca's API: TradingClientSingleton.get_instance().get_clock().
From doc:
"""
Gets the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close.
Which are date/time-function actual in code?
Problem: there are we have two functions for getting a
datetime
:calls/generic_calls.py
which uses system time in containerin
utils/common.py
which uses NASDAQ timezone...What I propose: use one timezone from market. For example, there is helpful function in Alpaca's API:
TradingClientSingleton.get_instance().get_clock()
.From doc:
Returns: Clock: The market Clock data """