date format to get history

4 posts / 0 new
Last post
date format to get history

Hello everyone,

I'm using R to access the IG API and I'm having some issues retrieving historical information. In the following piece of code how do i enter the date format>

I tried "2018-07-09000000/2018-07-10000000" which did not work...any assistance would be greatly appreciated

add_headers(`X-IG-API-KEY` = vvvvvv,
`CST` = ccccc,

Thanks in advance.

Kind regards,

IG requires the date format

IG requires the date format to be little special. You have to bring it in the following form:


You need this "T" between date and time and the colons in the time string must be replaced by "%3A". Don't ask me why but it works this way. :-)

Date format

Hi Boris,

Tried what you recommended but that did not work.
I'm using Version 2 for now.

Any other ideas?

Date format

Ok, I worked it out. I was using Version = 2 instead of 3!

Managed to do this with assistance from helpdesk and the API companion (which I should have used in the first instance to work out the address instead of relying on "Reference" tab.

Log in or register to post comments