CoinTool Update: Arbitrary Historical Date Period + Amount Conversion to Local Currency + Preserve Historical Graphs


Introduction to CoinTools

CoinTools is a handy gadget to Chrome browser that you can launch easily to view the information of cryptocurrency.

Previous Versions

  • v0.0.9: CoinTools Update: v0.0.9, Specify Amount + Reverse Cryptocurrency Calculation
  • v0.0.8: CoinTools Update: v0.0.8: Add Coinbase API + Customized History Data
  • 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: Show Full Cryptocurrency Details by Click or Startup, Add Language Handlers
  • 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 Extension.

Github of CoinTools

https://github.com/DoctorLai/CoinTools

Chrome Webstore

It is available online at Chrome Webstore.

Commits

Here

CoinTools v0.0.9 Feature

  • Bug fixed in historical graph when users enter lowercase symbol the graphs doesn’t show which is caused to external API that does not like lowercase symbols.
  • Historical Graphs are now preserved in the reserved order (like a stack) and you can clear the graphs by clicking the button.
  • You can specify the format like 100 SBD that will be converted to your local currency and bitcoin (BTC)
  • The users now can enter arbitrary number of days in the historical tab. Also, if a number is less than 3 days, the API of minute will be called. If it is between 3 to 7, then API of hour will be called otherwise API of day will be used.
  • Code Refactoring e.g. the random_id is provided to improve the code robustness.

Roadmap of CoinTools

Any good suggestions, please shout at @justyy.

Screenshots of CoinTool

New format is supported (easy to use)

cointools-settings-amount-format CoinTool Update: Arbitrary Historical Date Period + Amount Conversion to Local Currency + Preserve Historical Graphs chrome extension Cryptocurrency javascript

cointools-settings-amount-format

Conversions are done on the fly.

cointools-amount-conversion-dashboard CoinTool Update: Arbitrary Historical Date Period + Amount Conversion to Local Currency + Preserve Historical Graphs chrome extension Cryptocurrency javascript

cointools-amount-conversion-dashboard

Graphs are pushed to the bottom and you can clear the tab via Clear Button.

cointools-history-graphs CoinTool Update: Arbitrary Historical Date Period + Amount Conversion to Local Currency + Preserve Historical Graphs chrome extension Cryptocurrency javascript

cointools-history-graphs

Javascript code that deals with the new format

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
if (pair.length == 2) {
    let a = pair[0].trim().toUpperCase();
    let b = pair[1].trim().toUpperCase();
    if (isNumeric(a)) {
        if (isValidSymbol(b)) {
            let dom = $('div#conversion_results');
            let dom_id = "convert" + random_id();
            dom.append('<div id="' + dom_id + '"> </div>');
            getConversion(b, "BTC").then(x => {
                $('div#' + dom_id).html("<h4>" + a + " " + b +  " = <span class=yellow>" + (x * a) + "</span> " + "BTC" + "</h4>");
            });                    
            if (local_currency != '') {
                let dom = $('div#conversion_results');
                let dom_id = "convert" + random_id();
                dom.append('<div id="' + dom_id + '"> </div>');
                getConversion(b, local_currency).then(x => {
                    $('div#' + dom_id).html("<h4>" + a + " " + b +  " = <span class=yellow>" + (x * a) + "</span> " + local_currency + "</h4>");
                });                                            
            }
        }
    }
}
if (pair.length == 2) {
    let a = pair[0].trim().toUpperCase();
    let b = pair[1].trim().toUpperCase();
    if (isNumeric(a)) {
        if (isValidSymbol(b)) {
            let dom = $('div#conversion_results');
            let dom_id = "convert" + random_id();
            dom.append('<div id="' + dom_id + '"> </div>');
            getConversion(b, "BTC").then(x => {
                $('div#' + dom_id).html("<h4>" + a + " " + b +  " = <span class=yellow>" + (x * a) + "</span> " + "BTC" + "</h4>");
            });                    
            if (local_currency != '') {
                let dom = $('div#conversion_results');
                let dom_id = "convert" + random_id();
                dom.append('<div id="' + dom_id + '"> </div>');
                getConversion(b, local_currency).then(x => {
                    $('div#' + dom_id).html("<h4>" + a + " " + b +  " = <span class=yellow>" + (x * a) + "</span> " + local_currency + "</h4>");
                });                                            
            }
        }
    }
}

Roadmap of Cryptocurrency CoinTools

Any good suggestions, please shout at @justyy.

License

MIT

Contribution Welcome

Github: https://github.com/DoctorLai/SteemTools/

  • 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!

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
925 words
Last Post: Turtle Programming v0.0.9: Add SetX, SetY, Square and Rect!
Next Post: SteemTool v0.0.9 - Sending Money to Multiple Addresses!

The Permanent URL is: CoinTool Update: Arbitrary Historical Date Period + Amount Conversion to Local Currency + Preserve Historical Graphs

Leave a Reply