-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add exchange rates #158
Add exchange rates #158
Conversation
9aecf23
to
961555f
Compare
This seems pretty extensible. We could also respond with the rates for all the currencies at once if you think that'd be better. |
I think it's fine for our API to return a single rate per request. However, a ticker per source per pair is less than ideal. For example, with Coingecko, you can get all the currencies you need at once:
Ideally, you could refresh all the sources at the same rate and save on a lot of unnecessary tickers. |
…e don't have to wait for refresh delay to happen to start getting prices
… currencies in the same kraken/coingecko ExchangeRateSource
The implementors just retrieve the exchange rate every x seconds and cache the results. This way the number of requests doesn't scale with the number of users and we won't exceed rate limits.