MyHush / hush-ng

Hush Next-generation
GNU General Public License v3.0
7 stars 16 forks source link

Show CMC USD+BTC price #43

Closed leto closed 6 years ago

leto commented 6 years ago

https://api.coinmarketcap.com/v1/ticker/hush/

OleksandrBlack commented 6 years ago

@leto Not sure, or it will help you. https://github.com/MyHush/hush-ng/pull/44

function priceHUSH() {
    jQuery.getJSON('https://api.coinmarketcap.com/v1/ticker/hush/?convert=EUR')
        .done(function(data){
            $('.hush_usd').text(data[0]['price_usd']);
            $('.hush_eur').text(data[0]['price_eur']);
            $('.hush_btc').text(data[0]['price_btc']);
        });
}
priceHUSH();
setInterval(priceHUSH, 20000);
USD: <span class="hush_usd"></span>
EUR: <span class="hush_eur"></span>
BTC: <span class="hush_btc"></span>
leto commented 6 years ago

Working on it in dev_fee branch

leto commented 6 years ago

hush-cmc-prices was my first hack at it and now it looks like: hush-cmc-prices2

@OleksandrBlack thanks for your help, we are using the same API 😄

Also planning on adding the daily/weekly/monthly percent changes, that takes some more work.

OleksandrBlack commented 6 years ago

@leto take a look at my pr https://github.com/MyHush/hush-ng/pull/44

https://api.coinmarketcap.com/v1/ticker/hush/?convert=EUR ?convert=EUR - Provides an opportunity to withdraw information in Euro