cryptowatch_data_download: Download trades data or order book data from cryptowat.ch

View source: R/liquidity_cryptowat.R

cryptowatch_data_downloadR Documentation

Download trades data or order book data from cryptowat.ch

Description

This function downloads trades data or order book data from cryptowat.ch

Usage

cryptowatch_data_download(
  exchange,
  pair,
  query_type,
  query_options = NULL,
  data_dir = NULL,
  file_prefix = NULL,
  logfile = "loader.log",
  register = "register.csv"
)

Arguments

exchange

is the required exchange

pair

is the required exchange rate pair

query_type

can be either "orderbook" or "trades"

query_options

can be either NULL or "limit=100" (in the latter case the limit can vary)

data_dir

is the file path where to save the downloaded data

file_prefix

is a prefix to the filename where the data will be saved.If NULL, date and time will be added.

logfile

is a text file where the situation of the download process will be saved

register

collects the names of the successfully downloaded files and their characteristics

Details

This function downloads trades data or order book data from cryptowat.ch and save them in a .json file

Examples

## Not run: 
cryptowatch_data_download("coinbase","btcusd", "orderbook", data_dir=getwd() )
cryptowatch_data_download("coinbase","btcusd", "trades",
   query_options="limit=100", data_dir=getwd() )

## End(Not run)

deanfantazzini/bitcoinFinance documentation built on June 12, 2024, 4:10 p.m.