library(geckor)
The CoinGecko API allows one to query market data on over 8000 cryptocurrencies from more than 300 exchanges. A list of the currently supported cryptocurrencies can be obtained with the supported_coins()
function:
<- supported_coins()
coins
# number of supported coins:
nrow(coins)
#> [1] 8457
head(coins, 10)
#> # A tibble: 10 x 3
#> coin_id symbol name
#> <chr> <chr> <chr>
#> 1 01coin zoc 01coin
#> 2 0-5x-long-algorand-token algohalf 0.5X Long Algorand Token
#> 3 0-5x-long-altcoin-index-token althalf 0.5X Long Altcoin Index Token
#> 4 0-5x-long-balancer-token balhalf 0.5X Long Balancer Token
#> 5 0-5x-long-bitcoin-cash-token bchhalf 0.5X Long Bitcoin Cash Token
#> 6 0-5x-long-bitcoin-sv-token bsvhalf 0.5X Long Bitcoin SV Token
#> 7 0-5x-long-bitcoin-token half 0.5X Long Bitcoin Token
#> 8 0-5x-long-cardano-token adahalf 0.5X Long Cardano Token
#> 9 0-5x-long-chainlink-token linkhalf 0.5X Long Chainlink Token
#> 10 0-5x-long-cosmos-token atomhalf 0.5X Long Cosmos Token
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:
<- supported_exchanges()
exchanges
# number of supported exchanges:
nrow(exchanges)
#> [1] 313
head(exchanges, 10)
#> # A tibble: 10 x 7
#> exchange_id name year_established country url trust_score trading_volume_~
#> <chr> <chr> <int> <chr> <chr> <int> <dbl>
#> 1 binance Bina~ 2017 Cayman~ http~ 10 281097.
#> 2 gdax Coin~ 2012 United~ http~ 10 30220.
#> 3 ftx_spot FTX 2019 Antigu~ http~ 10 29493.
#> 4 bitmart BitM~ 2017 Cayman~ http~ 10 24113.
#> 5 kraken Krak~ 2011 United~ http~ 10 11988.
#> 6 hotbit Hotb~ NA Estonia http~ 10 10307.
#> 7 binance_us Bina~ 2019 United~ http~ 10 6733.
#> 8 bitfinex Bitf~ 2014 Britis~ http~ 10 6084.
#> 9 crypto_com Cryp~ 2019 Cayman~ http~ 10 2845.
#> 10 gemini Gemi~ 2014 United~ http~ 10 1867.
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 to express the price in. The list of such reference currencies can be retrieved with the supported_currencies()
function:
<- supported_currencies()
currencies
currencies#> [1] "btc" "eth" "ltc" "bch" "bnb" "eos" "xrp" "xlm" "link" "dot"
#> [11] "yfi" "usd" "aed" "ars" "aud" "bdt" "bhd" "bmd" "brl" "cad"
#> [21] "chf" "clp" "cny" "czk" "dkk" "eur" "gbp" "hkd" "huf" "idr"
#> [31] "ils" "inr" "jpy" "krw" "kwd" "lkr" "mmk" "mxn" "myr" "ngn"
#> [41] "nok" "nzd" "php" "pkr" "pln" "rub" "sar" "sek" "sgd" "thb"
#> [51] "try" "twd" "uah" "vef" "vnd" "zar" "xdr" "xag" "xau" "bits"
#> [61] "sats"