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

Please include session_open, session_close in get_calendar #483

Open
1 task done
vkana opened this issue Jul 5, 2024 · 2 comments
Open
1 task done

Please include session_open, session_close in get_calendar #483

vkana opened this issue Jul 5, 2024 · 2 comments
Assignees

Comments

@vkana
Copy link

vkana commented Jul 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe.

session_open, session_close are available in REST api, but not in alpaca-py to get the pre-market open and after-hours close times.

Describe the solution you'd like.

include session_open, session_close in Calendar

Describe an alternate solution.

No response

Anything else? (Additional Context)

No response

@hiohiohio
Copy link
Contributor

hiohiohio commented Jul 8, 2024

Thank you for the feedback. I have found some internal discussion about the session_open/close as you can see two time format (including : and not) in the response also not mentioned in the doc [1] or depricated [2].
Try to find the ideal current state/plan. It is expected to take a bit time.

*1 https://docs.alpaca.markets/reference/getcalendar-1
*2 https://docs.alpaca.markets/reference/querymarketcalendar-1

@hiohiohio hiohiohio self-assigned this Jul 8, 2024
@impredicative
Copy link

impredicative commented Jul 12, 2024

A sample raw output currently looks like:

{
  "date": "2024-07-12",
  "open": "09:30",
  "close": "16:00",
  "session_open": "0400",
  "session_close": "2000",
  "settlement_date": "2024-07-15"
}

I guess session_open and session_close need to be fixed in the API to output a consistent format that matches that of open and close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants