getTrades: Download trades of current account
Description
Makes a request to the server, and returns an data.table object with information about account trades if successful.
Usage
getTrades(
token = "",
live = FALSE,
from = Sys.Date() - 5,
to = Sys.Date(),
symbol_info = FALSE,
time_transform = TRUE,
verbose = FALSE
)
Arguments
token
token from Tinkoff account
live
live trading - TRUE or sandbox (paper) trading - FALSE (default)
from
from what date download trades
to
to what date download trades
symbol_info
download full information about instruments of trades (4 additional requests)
time_transform
trasform time from string to POSIXct
verbose
display status of retrieval (default FALSE)
Value
returns an data.table object containing the requested data with trades of current account.
Details
parsing this data from getOperaions function
Examples
Run this code# NOT RUN {
live = FALSE
token = 'your_sandbox_token_from_tcs_account'
getTrades(token,live)
# }
Run the code above in your browser using DataLab