getTrades: Download trades of current account

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/getTrades.R

Description

Makes a request to the server, and returns an data.table object with information about account trades if successful.

Usage

1
2
3
4
5
6
7
8
9
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)

Details

parsing this data from getOperaions function

Value

returns an data.table object containing the requested data with trades of current account.

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

See Also

getOrders

Examples

1
2
3
live = FALSE
token = 'your_sandbox_token_from_tcs_account'
getTrades(token,live)

tcsinvest documentation built on Aug. 17, 2021, 9:08 a.m.