This returns only the most recent day of intraday data for the supplied ticker(s).
riingo_crypto_latest(ticker, resample_frequency = "1min",
base_currency = NULL, exchanges = NULL, convert_currency = NULL,
raw = FALSE)
One or more cryptocurrency tickers.
Specified as "btcusd"
for bitcoin quoted in USD. A character vector.
For Tiingo data, a character specified as one of:
"daily"
, "monthly"
, "quarterly"
or "yearly"
. 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.
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.
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"
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.
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.
# NOT RUN {
# }
# NOT RUN {
# The latest available day of intraday data for QQQ
riingo_crypto_latest("btcusd")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab