Closed ghost closed 5 years ago
I'm not a fan of including static data in this package; if coinmarketcap adds or removes fiat currencies, then we need to stay on top of our game and update the package.
I'd sooner petition CMC to add an API endpoint for this, then query that endpoint from this package.
Thanks, yeah I was thinking so.
On Sat, 28 Jul 2018, 8:32 PM Ryan Zimmerman, notifications@github.com wrote:
I'm not a fan of including static data in this package; if coinmarketcap adds or removes fiat currencies, then we need to stay on top of our game and update the package.
I'd sooner petition CMC to add an API endpoint for this, then query that endpoint from this package.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ExodusMovement/coinmarketcap/issues/5#issuecomment-408608213, or mute the thread https://github.com/notifications/unsubscribe-auth/ATo8k6-KTzg93zRRV0LteEFDxEhxf2gwks5uLGfegaJpZM4Vk3c3 .
I'm contacting coinmarketcap to see if they are interested in incorporating this :)
Maybe we can leave this issue open just for a bit so I can reference them here?
They just released their pro API
https://pro.coinmarketcap.com/
Free tier requires registration.
Good news though, in the free tier they have an endpoint for FIAT conversion!
So they'll be retiring this current API at end of the year.
Current API is retired.
For an open free public API, do consider our offerings at https://www.coingecko.com/api API endpoints are straightforward to consume, and we have some endpoints to solve the problems stated in this issue as well
Hey, I'm using this in a project and it's great.
However, there is no easily accessible list of fiat currencies (the API, v1 and v2) doesn't have this available.
So this is the object I've created, which is currently populated with the available FIAT currencies as per the documentation on the CMC API:
Using this array of objects one assumes that the currency has 2 decimal places - where the object has a decimals value it should overwrite this (e.g. JPY, CLP, KRW)
The information was taken from the Wikipedia ISO code article.
It could be good to include in this package, would you be interested in me contributing my idea of how it could go in?
Edit: changed
currency
toname
in my application so updated here. Means avoidingcurrency.currency
orconst { currency } = currency;