Learn R Programming

tcsinvest (version 0.1.1)

getOrders: Download all orders in account

Description

Makes a request to the server, and returns a data.table object with information about all live orders related with your account if successful.

Usage

getOrders(
  token = "",
  live = FALSE,
  only_live_orders = TRUE,
  raw_orders = FALSE,
  from = Sys.Date() - 5,
  to = Sys.Date(),
  time_transform = TRUE
)

Arguments

token

token from Tinkoff account

live

live trading - TRUE or sandbox (paper) trading - FALSE (default)

only_live_orders

select only live order or use history? (default TRUE)

raw_orders

get raw orders from server or use transformation? (default FALSE)

from

depth of trading history (from)

to

depth of trading history (to)

time_transform

trasform time from string to POSIXct

Value

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

Details

As described by the official Tinkoff Investments documentation

See Also

getTrades cancelOrder

Examples

Run this code
# NOT RUN {
live = FALSE
token = 'your_sandbox_token_from_tcs_account'
getOrders(token,live)
# }

Run the code above in your browser using DataLab