Open s-maheshbabu opened 2 months ago
I reached out to Schwab about this issue.
They acknowledged that their API does not return intra-day snippets but instead returns the entire day when the given start/end times are within the same day. They said the data needs to be filtered down to the given time bounds at the client level. Weird limitation for no good reason!
Even though the underlying API defines this as expected behavior, I still think schwab-py should make developers life easier by always honoring the time bounds.
Description of Bug
get_price_history_every_minute
and similar methods don't honor thestart_datatime
andend_datetime
fields. Regardless of what the time bounds are, we return data for the entire day.The API should either filter out data outside the provided bounds or just not accept bounds at all as an input.
Code to Reproduce
Expected Behavior Data returned only for the requested hour i.e. 10 AM to 11 AM Eastern time. Number of candles returned should be 60.
Actual Behavior 224 one minute candles were returned. The earliest and latest timestamps are clearly beyond the provided time bounds in the API call.