riingo_crypto_quote: Quote and Top of Book data for a given cryptocurrency

Description Usage Arguments Details Examples

View source: R/quote.R

Description

Tiingo provides TOP (top of book) bid and ask quotes for cryptocurrencies. Note that this cannot be historically queried.

Usage

1
2
3
4
5
6
riingo_crypto_quote(
  ticker,
  exchanges = NULL,
  convert_currency = NULL,
  raw = FALSE
)

Arguments

ticker

One or more cryptocurrency tickers. Specified as "btcusd" for bitcoin quoted in USD. A character vector.

exchanges

If you would like to limit the query to a subset of exchanges, pass a comma-separated list of exchanges to select. Example) "POLONIEX, GDAX"

convert_currency

This parameter will convert the return data into another fx rate. For example if querying BTCUSD and convert_currency is 'cure', the bitcoin prices will be converted to CureCoin prices. Setting this to a value will add fxOpen, fxHigh, fxLow, fxClose, fxVolumeNotional, and fxRate accordingly. fxRate is the rate used to perform the currency calculation. If exchanges is specified, the conversion rate will be calculated using the exchanges passed.

raw

If TRUE, the raw underlying data from multiple exchanges will be returned, rather than the clean prices. This is the data that calculates the aggregated prices and quotes.

Details

At the end of the day, the, askPrice, bidSize, bidPrice, askSize, and lastSize fields may be NA. This is normal.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 

riingo_crypto_quote("btcusd")

# The raw data can provide more insight into each individual exchange
riingo_crypto_quote("btcusd", raw = TRUE)


## End(Not run)

riingo documentation built on Sept. 13, 2020, 5:15 p.m.