Qluxzz / avanza

A Python library for the unofficial Avanza API
https://qluxzz.github.io/avanza/
MIT License
90 stars 41 forks source link

delete_order seems broken - Bad request for URL #106

Open Bjorn12341234 opened 1 month ago

Bjorn12341234 commented 1 month ago

When deleting order, a Bad Request for url error appears:

result = avanza.delete_order(account_id, order_id) File "/home/robot/.local/lib/python3.10/site-packages/avanza/avanza.py", line 804, in delete_order return self.__call( File "/home/robot/.local/lib/python3.10/site-packages/avanza/avanza.py", line 148, in __call response.raise_for_status() File "/usr/local/lib/python3.10/dist-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/trading-critical/rest/order/delete

Maybe something changed on the Avanza API end!

Unt3r commented 1 month ago

I don't have this issue.

Check that account_id and order_id is correct in your call.