我尝试了两个用于R的加密货币API包,以命名它:
> riingo_crypto_latest("btcusd", resample_frequency = "10min", base_currency = NULL)
Request failed [401]. Retrying in 1.6 seconds...
Request failed [401]. Retrying in 1.5 seconds...
Error: There was an error, but riingo isn't sure why. See Tiingo msg for details.
Tiingo msg) Invalid token.有人能帮我吗?或者建议其他来源获取加密货币的历史数据?谢谢您的任何答复!
我已经插入了API密钥,所以这不是身份验证问题。
发布于 2021-11-05 00:06:49
如果您试图在上搜索有关密码交换处新列表的信息和一些更有用的信息,那么您可能有兴趣使用这个API:
https://rapidapi.com/Diver44/api/new-cryptocurrencies-listings/
R中的示例请求:
library(httr)
url <- "https://new-cryptocurrencies-listings.p.rapidapi.com/new_listings"
response <- VERB("GET", url, add_headers(x_rapidapi-host = 'new-cryptocurrencies-listings.p.rapidapi.com', x_rapidapi-key = 'your-api-key', '), content_type("application/octet-stream"))
content(response, "text")它包括一个具有最大交易所的新列表的端点和一个非常有用的端点,其中包含关于交易所的信息,在那里您可以在该交易所购买特定的硬币和该硬币的价格。您可以使用这些信息进行交易。当货币开始在宾斯、KuCoin、霍比等热门交易所上市时,价格上涨了20-30%。
https://stackoverflow.com/questions/67343289
复制相似问题