getOrderbook: Get the order book for a given symbol from a supported...

getOrderbookR Documentation

Get the order book for a given symbol from a supported exchange

Description

This function retrieves order book information

Usage

getOrderbook(
  Symbols,
  depth = 10,
  src = "poloniex",
  adjust = FALSE,
  verbose = FALSE,
  auto.assign = TRUE,
  api.key = "",
  env = globalenv()
)

Arguments

Symbols

A character vector specifying the symbol to retrieve order book data for.

depth

An integer value specifying the number of levels of the order book to retrieve. Defaults to 10.

src

A character string specifying the exchange to retrieve data from. Possible values are kraken,poloniex,tinkoff,alor, binance.

adjust

A logical value indicating whether to adjust timestamps to match the system timezone. Defaults to FALSE.

verbose

A logical value indicating whether to print detailed messages during the function's execution. Defaults to FALSE.

auto.assign

A logical value indicating whether to automatically assign the resulting object to the current environment. Defaults to TRUE.

api.key

A character string specifying the API key to use when retrieving data from Alor or Tinkoff. Defaults to "".

env

environment where the data will be assigned

Value

A data.table object containing the order book data for the specified symbol.

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

getOrderbook('USDTGBP', src = 'kraken')
getOrderbook('BTC_USDT', src = 'poloniex')

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