Jump to content
  • 1

Historical price search error in API companion


AidanMcCullough

Question

Hi all,

On the API companion, I'm able to get the one minute prices, covering a one day period, but cannot extend this to one month.  Request details below.  Any ideas what could be the issue here?


Headers:
Content-Type = application/json; charset=UTF-8
Accept = application/json; charset=UTF-8
X-IG-API-KEY = <my live API key>
Version = 3
Authorization = Bearer <access key>
IG-ACCOUNT-ID = <my spread betting account ID>

URL:
https://api.ig.com/gateway/deal/prices/CS.D.EURUSD.MINI.IP?resolution=MINUTE&from=2022-06-16T00%3A00%3A00&to=2022-06-17T00%3A00%3A00

Response:
HTTP 200
status: success

Change the URL to:
https://api.ig.com/gateway/deal/prices/CS.D.EURUSD.MINI.IP?resolution=MINUTE&from=2022-05-16T00%3A00%3A00&to=2022-06-17T00%3A00%3A00

Keeping everything else the same.

Response:
HTTP 400
status: error
{
    "errorCode": "error.price-history.io-error"
}

Link to comment

3 answers to this question

Recommended Posts

  • 0
On 25/06/2022 at 15:04, AidanMcCullough said:

Hi all,

On the API companion, I'm able to get the one minute prices, covering a one day period, but cannot extend this to one month.  Request details below.  Any ideas what could be the issue here?


Headers:
Content-Type = application/json; charset=UTF-8
Accept = application/json; charset=UTF-8
X-IG-API-KEY = <my live API key>
Version = 3
Authorization = Bearer <access key>
IG-ACCOUNT-ID = <my spread betting account ID>

URL:
https://api.ig.com/gateway/deal/prices/CS.D.EURUSD.MINI.IP?resolution=MINUTE&from=2022-06-16T00%3A00%3A00&to=2022-06-17T00%3A00%3A00

Response:
HTTP 200
status: success

Change the URL to:
https://api.ig.com/gateway/deal/prices/CS.D.EURUSD.MINI.IP?resolution=MINUTE&from=2022-05-16T00%3A00%3A00&to=2022-06-17T00%3A00%3A00

Keeping everything else the same.

Response:
HTTP 400
status: error
{
    "errorCode": "error.price-history.io-error"
}

Hi @AidanMcCullough @magneticlin

Thanks for reaching out. 

Please send an email to webapisupport@ig.com for more assistance. This team is available for API support only. All the best, OfentseIG

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...