riingo_crypto_latest: The latest day's worth of intraday data for a given...

Description Usage Arguments Examples

View source: R/latest.R

Description

This returns only the most recent day of intraday data for the supplied ticker(s).

Usage

1
2
3
4
5
6
7
8
riingo_crypto_latest(
  ticker,
  resample_frequency = "1min",
  base_currency = NULL,
  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.

resample_frequency

For Tiingo data, a character specified as one of: "daily", "weekly", "monthly" or "annually".

For IEX data, a character specified at the "min" or "hour" frequencies in the form: "1min", "5min", or "2hour".

For Crypto data, a character specified at the "min", "hour" or "day" frequencies similar to IEX.

base_currency

Instead of ticker you may pass a base currency. This selects all currencies with that base currency. For example if 'base_currency="btc"“ tickers btcusd, btcjpy, btceur, etc.. will all be returned.

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.

Examples

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

# The latest available day of intraday data for QQQ
riingo_crypto_latest("btcusd")



## End(Not run)

business-science/riingo documentation built on Sept. 16, 2020, 4:39 p.m.