Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix get_current_date() & now() #51

Open
seralekseenko opened this issue Sep 11, 2024 · 2 comments
Open

fix get_current_date() & now() #51

seralekseenko opened this issue Sep 11, 2024 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request priority: low

Comments

@seralekseenko
Copy link
Collaborator

Which are date/time-function actual in code?

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.

Returns:
     Clock: The market Clock data
"""
@seralekseenko seralekseenko added bug Something isn't working enhancement New feature or request priority: low labels Sep 11, 2024
@seralekseenko seralekseenko changed the title improve get_current_date() fix get_current_date() & now() Sep 11, 2024
@seralekseenko
Copy link
Collaborator Author

Next task: realize host's system time!

@seralekseenko seralekseenko self-assigned this Oct 30, 2024
@seralekseenko
Copy link
Collaborator Author

Next task: OPTIMIZATION

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request priority: low
Projects
None yet
Development

No branches or pull requests

1 participant