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

Get API keys for CoinGecko and CryptoCompare #14509

Open
anastasiyaig opened this issue Apr 24, 2024 · 9 comments
Open

Get API keys for CoinGecko and CryptoCompare #14509

anastasiyaig opened this issue Apr 24, 2024 · 9 comments

Comments

@anastasiyaig
Copy link
Contributor

anastasiyaig commented Apr 24, 2024

Description

Problem: we receive market data from CoinGecko and CryptoCompare and we're using their "free" plans currently.

The Free plan has per-IP-Address limits, which works fine as long as we're not all in the same hotel using Status at the same time.

We need to get some paid plans and API keys for this services so they are reliable

@anastasiyaig
Copy link
Contributor Author

anastasiyaig commented Apr 24, 2024

@anastasiyaig
Copy link
Contributor Author

@alaibe adding you as well

@jakubgs
Copy link
Member

jakubgs commented May 6, 2024

Even more centralized services being added to the App? Really?

@anastasiyaig
Copy link
Contributor Author

@jakubgs we use them already for long time, but the worst part is that we use free plan which is limited

@jakubgs
Copy link
Member

jakubgs commented May 6, 2024

Okay, but what kinda of scale do we want for this? Honestly regardless of which plan we pick once people start using this we will hit the limit, but do you have any idea what numbers we need right now?

image

https://www.coingecko.com/en/api/pricing

@anastasiyaig
Copy link
Contributor Author

i would like to hear opinions from wallet team and @John-44
cc @iurimatias

@dlipicar
Copy link
Contributor

dlipicar commented May 8, 2024

Hey there! Sorry for the delay in commenting.

So, we're using both CryptoCompare and CoinGecko in a way that's not even properly documented. According to their docs, even if you don't pay you're supposed to use an API key, which has terrible (per API key) limits

image
image

We're not using API keys for any. The closest thing we have is an identifier for CryptoCompare calls, not sure if we have some special arrangement with them:
image

Anyway, this lets us have per-IP-address limits which is awesome for our use case. However, this is dangerous because:

  • Conditions for this no-API-key usage could change at any moment or it might even be disabled
  • If several people use Status from the same location with a shared IP address (offsite, presenting Status at some crypto event), we hit the limits very quickly and the wallet becomes useless

So, the plan was to keep trying to use the free plan initially, but use an API key if our requests get throttled/denied. I've got the logic for this implemented, but still need to do some tests. However, there's still some issues:

Cryptocompare's Commercial plan allows only one user per license, which is no good for the current way we use their service. We'd need to get a custom plan suitable for our "decentralized" usage.
image
Unless we set up a proxy server to concentrate calls :D

I don't have exact usage stats, but with a 10min refresh period I think 1M calls/month would be good for a few hundred users. Unless we set up caching in our proxy server :D :D

CoinGecko's plans seem less restrictive (calls/month and number of users), but I'm still concerned about the calls/min limit in both (proxy server? :D :D :D)

Regarding privacy, requests to these APIs only include token symbols, no information about accounts.

@iurimatias mentioned this proxy server idea has been under discussion already. If we use that as our main provider and keep direct client access to the providers as a fallback in case we're blocked in some region, we should be good IMO.

@jakubgs
Copy link
Member

jakubgs commented May 16, 2024

That all sounds terrible. And nobody has the time to develop a proxy server. Best we can do is just an nginx with some caching, but even that could easily be overwhelmed.

I have yet to hear any actual concrete request for a proxy server, just conversations, so until someone actually explains what is necessary, at what scale, and for what service, there is no proxy.

@saledjenic
Copy link
Contributor

Was logged here #14591 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

5 participants