Closed petioptrv closed 1 year ago
[ch43278]
This pull request has been linked to Shortcut Story #43278: Port CoinCap Rate Oracle Data Source to OSS.
Closing this PR to re-open towards Foundation: https://github.com/hummingbot/hummingbot/pull/6534
Before submitting this PR, please make sure:
A description of the changes proposed in the pull request:
This PR is associated to bounty issue: https://github.com/hummingbot/hummingbot/issues/6517.
This PR introduces the CoinCap rate source for the rate oracle. It is possible to obtain an API key here.
CoinCap adds an alternative to CoinGecko, and its API allows for price streaming, which is included in this PR.
Note that CoinCap's API uses asset names rather than symbols, which means users must configure an asset map like
'BTC:bitcoin,DOGE:dogecoin'
to theassets_map
of the rate source's config.Note also that the only consequence of a faulty API key (or no API key) is that the user will have lower rate limits. If a faulty API key is detected, the client will issue a warning log.
The PR had to make significant changes to the configuration modules in order to allow configuring a secret API key in the client config map.
Tests performed by the developer:
Tips for QA testing:
Obtain an API key here and run a full test on the functionality of the rate provider. Please not that the global token must be configured to
USD
in order forrate --token {TOKEN}
to work. That is because CoinCap only supports USD as a quote, and that rate functionality cannot perform conversions. However, therate --pair {BASE}-{QUOTE}
will work with pairs that don't includeUSD
as quote.