powered by
Makes a request to the server, and returns an data.table object with information about prices of instrument if successful.
getHistoricalData( token = "", live = FALSE, figi = "", from = Sys.Date() - 1, to = Sys.Date(), interval = "hour", time_transform = TRUE, verbose = FALSE )
token from Tinkoff account
live trading - TRUE or sandbox (paper) trading - FALSE (default)
internal tinkoff code for instrument
from what date download history
to what date download history
timeframe of bars (availible "1min","2min","3min","5min","10min","15min","30min","hour","2hour","4hour","day","week","month")
trasform time from string to POSIXct
display status of retrieval (default FALSE)
returns an data.table object containing the requested data with historical bar data (OHLCV).
As described by the official Tinkoff Investments documentation
getOrderBook
# NOT RUN { live = FALSE token = 'your_sandbox_token_from_tcs_account' getHistoricalData(token,live,figi = 'BBG005HLTYH9') # }
Run the code above in your browser using DataLab