ig-python / trading-ig

A lightweight Python wrapper for the IG Markets API
https://trading-ig.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
308 stars 196 forks source link

fetch_historical_prices_by_epic_and_date_range : "puredeal:err:(none):403 Access forbidden!" #293

Closed NathanCladiere closed 1 year ago

NathanCladiere commented 1 year ago

Hi,

Thanks for the python lib.

I have some issue when i tried to get historical data:

i add a print to see the problem in fetch_historical_prices_by_epic_and_date_range :

print("Response text:", response.text)
data = self.parse_response(response.text)

and see :"puredeal:err:(none):403 Access forbidden!"

Any idea where it comes from ?

bug-or-feature commented 1 year ago

https://trading-ig.readthedocs.io/en/latest/faq.html#what-if-i-have-a-problem

jansmets commented 10 months ago

@bug-or-feature:

There might be a problem though.

API companion https://demo-api.ig.com/gateway/deal/prices/CS.D.EURUSD.MINI.IP?resolution=MINUTE_10&from=2023-08-23T23%3A00%3A00&to=2023-08-23T23%3A10%3A00&max=10

DEBUG:urllib3.connectionpool:https://demo-api.ig.com:443 "GET /gateway/deal/prices/CS.D.EURUSD.MINI.IP/MINUTE_10/2023-08-24T04:00:00/2023-08-24T05:10:00 HTTP/1.1" 403 1862 INFO:root:GET '/prices/CS.D.EURUSD.MINI.IP/MINUTE_10/2023-08-24T04:00:00/2023-08-24T05:10:00', resp 403