Description Usage Arguments Value Examples
Fetch IG Account Historical Prices
1 2 | IG_fetch_hist_prices(epic, n = 50, res = "DAY", headers,
url = "https://demo-api.ig.com/gateway/deal/prices", timeo = 5)
|
epic |
Instrument ID |
n |
Number of points to retrieve |
res |
Granularity of data |
headers |
Object returned from |
url |
API URL |
timeo |
number of tries |
A data.frame
of historical prices
1 2 3 | HEADERS = IG_Auth(" ","APIdemo1", " ")
audusd = IG_fetch_hist_prices("CS.D.AUDUSD.CFD.IP", 50, "HOUR", headers = HEADERS)
usdcad = IG_fetch_hist_prices("CS.D.USDCAD.CFD.IP", 50, "HOUR", headers = HEADERS)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.