getTrades {rusquant} | R Documentation |
Download trades of account
Description
Get trades for a given broker from a specified date to the current date.
Usage
getTrades(
src = "",
api.key = "",
clientId = "",
figi = "",
from = Sys.Date() - 5,
to = Sys.Date(),
symbol_info = FALSE,
time_transform = TRUE,
verbose = FALSE
)
Arguments
src |
Character string indicating the broker to use. Currently, only "tinkoff" and "alor" are supported. |
api.key |
Character string containing the API key for the broker's API. |
clientId |
Character string containing the client ID for the broker. |
figi |
Character string containing the Financial Instrument Global Identifier for the broker. |
from |
Date specifying the start date for the trade data. Defaults to 5 days ago. |
to |
Date specifying the end date for the trade data. Defaults to the current date. |
symbol_info |
Logical indicating whether to include symbol information in the returned data. Defaults to FALSE. |
time_transform |
Logical indicating whether to transform the timestamps to the local timezone. Defaults to TRUE. |
verbose |
Logical indicating whether to print verbose output. Defaults to FALSE. |
Value
A data frame containing the trade data.
Note
Not for the faint of heart. All profits and losses related are yours and yours alone. If you don't like it, write it yourself.
Author(s)
Vyacheslav Arbuzov
Examples
getTrades(src = "tinkoff", api.key = "tks token", clientId = "clientID", figi = "figi",verbose=TRUE)