Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple fallback options for historical crypto prices #224

Open
LefterisJP opened this issue Dec 4, 2018 · 4 comments

Comments

@LefterisJP
Copy link
Contributor

commented Dec 4, 2018

Problem Definition

As can be seen in a recent tweet I made it seems that Cryptocompare will phase out their public API and enforce API key authentication. That presents a problem for apps like rotkehlchen that will have to force their users to get an API key just to get historical price data.

Edit: Vlad from cryptocompare tweeted they will still keep the public API around without API key authentication for tens of thousands of requests per month.

This issue aims to find ways to allow more options for rotkehlchen users while also allowing them to input a cryptocompare API key if they so desire.

Related issue for current prices is here

APIs for historical crypto prices

  • Cryptocompare: Has public API but will get rate limited and users are encouraged to authenticate via api key. Users would need to go to the website, register, get API key and then input it in Rotkehlchen.
  • Coin gecko: Has historical prices for many coins and the API is public and open.
  • Coinpapricka: Public API. Has historical data.
  • Coinmarketcap: Also requires authentication via api key. Users would need to go to the website, register, get API key and then input it in Rotkehlchen.

Task

  • Refactor the price historian so that it has multiple querying backends and can choose depending on availability any of the known APIs for historical prices shown in the previous section.
  • Allow addition of cryptocompare and coinmarketcap api keys per user via the UI.
  • Create two fallback API keys for cryptocompare and coinmarketcap that would be shared by all users to which rotkehlchen would fallback if the public API call fails.
  • Create two more such API keys for the CI tests.
  • Add tests for all the above.
@tmlee

This comment has been minimized.

Copy link

commented Dec 5, 2018

You might want to consider our public open api at https://www.coingecko.com/api
Happy to answer any questions or concerns

@LefterisJP

This comment has been minimized.

Copy link
Contributor Author

commented Dec 5, 2018

@tmlee Thanks a lot for popping in. Definitely will add it as an option then. The most important thing is to not let the app without a way to fetch historical prices so the more options there are the better.

@vcealicu

This comment has been minimized.

Copy link

commented Dec 5, 2018

As I said on Twitter, we won't change it massively and there will always be free IP limits as well but it makes sense to have a few fallback options. Redundancy on API feeds makes sense.

@LefterisJP

This comment has been minimized.

Copy link
Contributor Author

commented Dec 5, 2018

As I said on Twitter, we won't change it massively and there will always be free IP limits as well but it makes sense to have a few fallback options. Redundancy on API feeds makes sense.

Thank you @vcealicu . I noted that in the issue and really appreciate it. I expect to have a refactored Price Historian with multiple API backends and cryptocompare being the default first choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.