Traceback (most recent call last):
File "/workspaces/avanza/src/example_avanza.py", line 27, in <module>
insights_report = avanza.get_insights_report(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/avanza/avanza.py", line 1483, in get_insights_report
return self.__call(
^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/avanza/avanza.py", line 139, in __call
response.raise_for_status()
File "/home/vscode/.local/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://www.avanza.se/_api/insights-development/?timePeriod=ONE_MONTH&accountIds=1234567
Setup versions
The following piece of code works
But When used with other
time_periods
likeTimePeriod.ONE_MONTH
,TimePeriod.THREE_MONTHS
, the request fails.Error log