getTradelog: Get tradelog information from a brokerage or exchange

getTradelogR Documentation

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",
  verbose = FALSE,
  auto.assign = TRUE,
  env = globalenv()
)

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").

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

Value

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

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

getTradelog('BTC_USDT', src = 'poloniex')

arbuzovv/rusquant documentation built on Feb. 1, 2024, 6:39 p.m.