403 Client Error - get_historical_data
Firstly, thanks @jborchma for this library.
I am able to download data such as ticker information, account info etc, but when i try to download historical data i get the below error:
HTTPError: 403 Client Error: Forbidden for url: https://api02.iq.questrade.com/v1/markets/candles/36261155?startTime=2019-07-01T00%3A00%3A00-05%3A00&endTime=2019-07-02T00%3A00%3A00-05%3A00&interval=OneDay
Does this mean i do not have access to historical market data?
Anyone else get this issue?
Thanks
Yeah, I have never gotten an answer when trying to reach out to their api support. This is a new one, though. Let me see if they changed the API URL recently (or took out the historical data capability all together).
So I just tested it myself on my computer and I was able to successfully get historical data for the OneDay interval no problem. I ran
aapl_history = qt.get_historical_data('AAPL', '2020-04-01', '2020-04-02', 'OneDay')
Ok, well that's good.
Can you confirm if your request URL is similar in format to the below?
https://api02.iq.questrade.com/v1/markets/candles/8049?startTime=2020-04-01T00%3A00%3A00-05%3A00&endTime=2020-04-02T00%3A00%3A00-05%3A00&interval=OneDay
My only suspicion is either its an access issue, or the format of the URL is incorrect for the : characters which get transformed to %3A which i tried resolving in the source code by changing the payload param from a dict to a str but to no avail.
Hmm, so the creation of the URL submissions for the API are standardized and I don't see how they could be working correctly for me and then not work in a different case. I would assume this is just the error message encoding that gets sent back from Questrade.
Gonna close this issue since we never found any issue to fix.