How to get real time quote from Tiingo

208 Views Asked by At

I am trying to get the updated quotes of cryptocurrencies from Tiingo using this code:

library(tidyquant)
tiingo_api_key('<my key>')
prices.hour <- tq_get(c('adausd', 'ethusd', 'xrpusd'),
               get    = "tiingo.crypto",
               from   = '2021-05-01',
               to     = '2021-05-17',
               resample_frequency = "60min")

It works well but the most updates data is several hours ago (00:00:00) while Tiingo say they provide real-time even with free accounts (https://api.tiingo.com/about/pricing).

Is there some missing option in my code ? Many thanks

1

There are 1 best solutions below

0
On

Set the "to" to one day after the current day. E.g. '2021-05-18' if you were requesting this on May 17th, 2021.