next-game-solutions / geckor Goto Github PK
View Code? Open in Web Editor NEWAn R client for the public CoinGecko API
Home Page: https://next-game-solutions.github.io/geckor/
License: Other
An R client for the public CoinGecko API
Home Page: https://next-game-solutions.github.io/geckor/
License: Other
Return price and other data for a given coin on a given date: https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id__history
Restrict currencies to the major ones only: BTC, USD, EUR, and GBP
Return tickers for a given coin at specified exchanges. See: https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id__tickers
See also #15
When running
bitcoin <- coin_history_range(coin_id = "bitcoin",
vs_currency = "usd",
from = as.POSIXct("2016-01-01 00:00:00", tz = "UTC"),
to = as.POSIXct("2019-08-24 00:00:00", tz = "UTC"))
an error occurs:
Error: Can't recycle `..1` (size 1332) to match `..3` (size 1331).
This is due to a missing value in the retrieved data, a situation that is not treated gracefully and needs to be fixed.
Return market data for a range of dates in the past: https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id__market_chart_range
On 2017-04-02, market_cap is missing for bitcoin and ethereum. Also, when total_volume is zero, how is the price determined?
crypto_top5 <- coin_history(c("bitcoin", "ethereum", "binancecoin", "ripple", "cardano"),
vs_currency = "usd", days = "max")
Remove the unnecessary strictness for max_attempts
to be an integer, throughout the package.
A utility function to check the current status of the API.
A utility function that returns a list of all currencies supported by the CoinGecko API.
coin_id
is used in many functions, so move its definition to function_params()
.
Problem: The number of calls to the free version of the CoinGecko API has recently been significantly reduced: from ca. 50 calls/min to only 10-30 calls/min. This causes tests and examples in the documentation to fail (at build time) with the HTTP status of 429. Another reason why tests started failing on CRAN is because CRAN changed their policy towards the \donttest
command in documentation - by default, examples that are wrapped in \donttest
are in fact tested.
Solution: Use the @examplesIf
in documentation (instead of the standard @examples
), in combination with a non-public function that checks if the API rate is exceeded. Also, update the documentation accordingly (i.e. warn the users about the very limited number of calls they can now make with the free version of the API).
At the moment, coin_history()
returns data for a single coin at a time, which is not always convenient. Change this behaviour so that the coin_id
argument can take a vector of coin IDs. Important: due to the API rate limit, the size of such a vector cannot be too large.
A utility, non-public, function to automatically document common function arguments.
Returns market data for the last X days: https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id__market_chart
Using .data
in tidyselect
expressions leads to multiple warning when running tests.
Return OHLC data for a coin for the last N days. See: https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id__ohlc
A utility, non-public, function that is used to build correctly formatted GET
requests.
Is there a way to pull token address information from any of the endpoints (free or subscription-based)?
Ex) given coin_id (yogi) what is its contract address?
A utility, non-public, function to perform paginated API calls.
Get exchange rate of a supported currency vs BTC:
https://www.coingecko.com/api/documentations/v3#/exchange_rates/get_exchange_rates
Thank you for this great package. Is there a way to obtain the historical daily ohlc data of all coins? I divided the 13,253 coins supported by CoinGecko into many subsamples with each containing 30 coins and then used the function coin_history_ohlc to get the data in a for loop. This approach failed with an error message saying too many requests.
A utility, non-public, function that performs a GET
request.
Can you please add ?
Returns a list of top-7 trending coins on CoinGecko as searched by users in the last 24 hours (ordered by most popular first). See: https://www.coingecko.com/api/documentations/v3#/trending/get_search_trending
Endpoint: /simple/price
See: https://www.coingecko.com/api/documentations/v3#/simple/get_simple_price
Endpoint: /simple/token_price/{id}
See: https://www.coingecko.com/api/documentations/v3#/simple/get_simple_token_price__id_
A utility, non-public, function to validate common function arguments.
Returns a list of exchanges (and their IDs) currently supported by CoinGecko. See: https://www.coingecko.com/api/documentations/v3#/exchanges/get_exchanges_list
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.