IG_fetch_hist_prices: IG API Fetch Historical Prices

Description Usage Arguments Value Examples

View source: R/IGAPI.R

Description

Fetch IG Account Historical Prices

Usage

1
2
IG_fetch_hist_prices(epic, n = 50, res = "DAY", headers,
  url = "https://demo-api.ig.com/gateway/deal/prices", timeo = 5)

Arguments

epic

Instrument ID

n

Number of points to retrieve

res

Granularity of data

headers

Object returned from IG_Auth

url

API URL

timeo

number of tries

Value

A data.frame of historical prices

Examples

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)

ivanliu1989/RQuantAPI documentation built on Sept. 13, 2019, 11:54 a.m.