CoinTools Update: v0.0.8: Add Coinbase API + Customized History Data
Introduction
CoinTools is a handy gadget to Chrome browser that you can launch easily to view the information of cryptocurrency.
Previous Contributions
- v0.0.7: CoinTools: Historical Conversion between Any Two Cryptocurrency
- v0.0.6: CoinTools Update: Show Full Cryptocurrency Details by Click or Startup, Add Language Handlers
- CoinTools v0.0.5: Update: Cryptocurrency Converter Calculator, Support Coin Symbols and Add More Localization
- CoinTools v0.0.4: Conversion Between Two Fiat or Fiat-Coin + 24 Hour Cap Chart
- CoinTools v0.0.3: Adding Total Market Cap USD Chart, Localization and Stock Price Emoji
- v0.0.2 Cryptocurrency Conversion + UI Localization
- v0.0.1 Introduction to CoinTools! A Cryptocurrency Chrome Extension
Technology Stacks
Javascript that runs in Chrome.
Github
https://github.com/DoctorLai/CoinTools
Chrome Webstore
It is available online at Chrome Webstore:
https://chrome.google.com/webstore/detail/coin-tools/fmglcggbdcbkpkfapngjobfeakehpcgj
v0.0.8 Feature
This version adds the following features:
- Add Coinbase API to convert from FIAT to FIAT.
- Customize Period of History Data
- Adds Russian UI translation.
- Support single FIAT command
Screenshots
Commits
Roadmap of CoinTools
Any good suggestions, please shout at @justyy.
Coinbase API
Get Exchange Rate from two Fiats.
// ajax calling coinbase to return fiat conversion
const getPriceOf_Coinbase_Fiat = (a, b) => {
return new Promise((resolve, reject) => {
let api = 'https://api.coinbase.com/v2/exchange-rates/?currency=' + a.toUpperCase();
fetch(api, {mode: 'cors'}).then(validateResponse).then(readResponseAsJSON).then(function(result) {
let data = result.data.rates;
resolve(data[b.toUpperCase()]);
}).catch(function(error) {
logit('Request failed: ' + api + ": " + error);
reject(error);
});
});
}
Then, you can use it:
// both are currencies e.g. USD to CNY
if ((!is_coin1) && (!is_coin2)) {
try {
return await getPriceOf_Coinbase_Fiat(coin1, coin2);
} catch (e) { // if anything goes wrong with above coinbase, then use coinmarkecap (two API calls)
let api1 = getPriceOf1BTC(coin1);
let api2 = getPriceOf1BTC(coin2);
return await api2 / await api1;
}
}
If anything goes wrong with above coinbase, then use coinmarkecap (two API calls)
License
Contribution Welcome
Github: https://github.com/DoctorLai/CoinTools/
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request.
Chrome Webstore
Install the CoinTools Now!
Posted on Utopian.io - Rewarding Open Source Contributors
I like this tool very much!
Actually it is the best tool I have ever used!
Voted and support.
great work
Thank you!
nice gadget... it works anda very useful.. thanks @justyy
Good post
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Hey @justyy I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x