Learn R Programming

rusquant (version 1.1.4)

getTradelog: Get tradelog information from a brokerage or exchange

Description

This function retrieves account information from a brokerage or exchange.

Usage

getTradelog(
  Symbols,
  depth = 500,
  src = "poloniex",
  api.key = "",
  adjust = FALSE,
  return.class = "data.table",
  index.class = "Date",
  market = "shares",
  board = "tqbr",
  verbose = FALSE,
  auto.assign = TRUE,
  env = globalenv()
)

Value

A data table or data frame with the retrieved trade logs, depending on the value of the return.class argument.

Arguments

Symbols

Character vector specifying the trading pair, e.g. "BTC_ETH".

depth

Numeric scalar, specifying the number of trades to retrieve (default = 500).

src

Character scalar, specifying the exchange to retrieve trade logs from. The supported exchanges are: "tinkoff", "alor", "poloniex", "kraken", "binance", "bttrex", "cex", "gate", "gatecoin", "gdax", "gemini", "hitbtc", "liqui", and "lykke".

api.key

Character scalar, specifying the API key (if required by the exchange).

adjust

Logical scalar, specifying whether to adjust timestamps for time zones (default = FALSE).

return.class

Character scalar, specifying the class of the returned object. The supported classes are: "data.table", "data.frame", and "xts" (default = "data.table").

index.class

Character scalar, specifying the class of the index column. The supported classes are: "Date" and "POSIXct" (default = "Date").

market

A character string specifying type of market. 'shares' or 'forts'

board

A character string specifying type of board

verbose

Logical scalar, specifying whether to print verbose output (default = FALSE).

auto.assign

Logical scalar, specifying whether to automatically assign the resulting object to the global environment (default = TRUE).

env

environment where data is stored

Author

Vyacheslav Arbuzov

Examples

Run this code
getTradelog('BTC_USDT', src = 'poloniex')
getTradelog('SBER', src = 'moex')
getTradelog('SiH5', src = 'moex',market='forts')

Run the code above in your browser using DataLab