Infront Desktop API for RΒΆ

Instructions for retrieval of time series: GetHistory()

Load the Infront library

In [2]:
library(InfrontConnect)
Loading required package: httr
Loading required package: plyr
Loading required package: jsonlite

Insert your login credentials: your terminal user and password

In [4]:
InfrontConnect(user = "myuser", password="mypassword")
Connected to Infront Desktop API for R 

**Disclaimer** 
 End-User agrees not to redistribute any such Information and to comply with any 

    restrictions placed on such information by the providers thereof, hereunder but 
 
    not limited to acceptance of and compliance with Data Providers<92> and/or other 
 
    third party license agreements. 
 
    Customer agrees to indemnify and keep indemnified Infront and its affiliates harmless 
 
    from and against any loss, damage, liability, cost, charges and expenses, including 
 
    reasonable legal fees, arising out of any breach on part of Customer with respect to 
 
    its obligations to obtain prior approvals from appropriate Data Providers and to 
 
    comply with any applicable, conditions, restrictions, or limitations imposed by such 
 Data Providers.

Use GetHistory() to fetch historical time series. The output is a list of DataFrames.

Formats

tickers: A list containing strings in the format "FEED:TICKER", i.e. tickers = ["NYS:BLK","NYS:CAT"]

fields: A list containing valid strings, i.e. fields = ["last","bid","ask","volume","turnover"]

start_date: A string with the date in a YYYY-MM-DD format, i.e. "2017-06-06"

end_date: A string with the date in a YYYY-MM-DD format, i.e. "2017-06-06"

In [5]:
MySymbols = GetHistory(tickers = c("NYS:AGN","NYS:AIG","NYS:ANTM"), fields = c("bid","ask","turnover","volume","last"), start_date = "2017-05-26", end_date = "2017-06-25")
In [6]:
MySymbols
$AGN
lastturnoverbidask
2017-05-26223.08 367700883222.01 223.12
2017-05-30222.28 737607107222.28 225.00
2017-05-31223.71 541712624223.75 224.00
2017-06-01227.29 520865336226.00 228.00
2017-06-02227.93 367987384227.50 228.90
2017-06-05228.17 342111856226.44 229.54
2017-06-06228.30 364202796222.00 230.00
2017-06-07228.07 288457642224.00 228.00
2017-06-08229.41 629499557220.00 229.71
2017-06-09232.37 447468849220.00 232.62
2017-06-12230.86 434097016225.72 231.78
2017-06-13230.78 325186722229.20 231.66
2017-06-14233.00 483937850220.00 233.50
2017-06-15234.87 460034303233.01 234.74
2017-06-16235.41 409819115219.30 236.00
2017-06-19237.57 577325514236.97 240.79
2017-06-20238.65 308922487236.97 239.00
2017-06-21244.54 623173345243.50 244.45
2017-06-22247.18 641640810242.50 248.50
2017-06-23246.33 1059337278230.00 250.00
$AIG
lastturnoverbidask
2017-05-2663.560 52580420763.55 63.69
2017-05-3064.100 75319435463.80 64.33
2017-05-3163.630 37135818963.63 63.90
2017-06-0163.900 30972988563.60 64.09
2017-06-0264.170 33500870364.11 64.48
2017-06-0563.830 19495642663.65 64.10
2017-06-0663.315 24476636963.00 63.80
2017-06-0763.170 23703530663.00 63.49
2017-06-0863.665 47025499663.11 63.66
2017-06-0964.170 42401069963.92 64.45
2017-06-1263.820 34342133363.53 63.91
2017-06-1364.250 25431205964.10 64.49
2017-06-1464.250 17810421363.72 64.24
2017-06-1563.820 28317960963.51 63.91
2017-06-1663.810 31183083563.51 64.18
2017-06-1963.920 17387709063.78 64.20
2017-06-2063.390 23309902963.14 63.68
2017-06-2163.240 26313540263.13 63.49
2017-06-2263.060 15572763462.70 63.40
2017-06-2363.020 33631263062.70 63.30
$ANTM
lastturnoverbidask
2017-05-26183.040 149587753182.59 NA
2017-05-30183.320 516803527174.43 NA
2017-05-31182.325 243532526173.75 NA
2017-06-01187.690 335798218178.87 NA
2017-06-02187.410 203480460178.87 NA
2017-06-05186.640 164524568174.86 NA
2017-06-06187.720 223646095175.43 NA
2017-06-07188.335 248398245188.40 NA
2017-06-08187.620 491112676178.87 NA
2017-06-09186.870 291415619169.35 NA
2017-06-12186.850 261685954169.35 NA
2017-06-13187.190 188038026169.35 NA
2017-06-14188.740 136036580175.43 NA
2017-06-15188.790 139745826169.43 NA
2017-06-16189.960 298662461173.65 NA
2017-06-19192.660 347123495169.43 NA
2017-06-20192.080 293677562169.43 193.21
2017-06-21192.070 380232125190.11 NA
2017-06-22193.310 361164499188.11 200.00
2017-06-23190.160 495886108169.35 200.00
In [ ]: