knitr::opts_chunk$set( error = TRUE, collapse = TRUE, comment = "#>" ) Sys.sleep(60)
library(geckor)
The CoinGecko API allows one to query market data on thousands of cryptocurrencies from more than 300 exchanges. A list of the currently supported cryptocurrencies can be obtained with the supported_coins()
function:
coins <- supported_coins() # number of supported coins: nrow(coins) head(coins, 10)
The first column in the resultant tibble contains coin IDs in the format expected by other geckor
functions.
Similarly, a list of supported exchanges can be retrieved with the supported_exchanges()
function:
exchanges <- supported_exchanges() # number of supported exchanges: nrow(exchanges) head(exchanges, 10)
One of the important columns in the obtained tibble is trust_score
. This score ranges from 1 to 10 and combines several metrics indicative of how much one can trust the data originating from a given exchange (see this and this articles on the CoinGecko website for details).
When querying the market data for a cryptocurrency, users are always expected to supply one or several reference currencies (fiat or crypto) to express the coin price in. The list of such reference currencies can be retrieved with the supported_currencies()
function:
currencies <- supported_currencies() currencies
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.