coinmarket
v1.0.9
Published
get the latest market value for any digital currency,including btc,bth,eth.
Downloads
3
Readme
return the ratio of the coinpair via Huobi.pro
#install npm install coinmarket -s
#usage example:
- get btcusdt coinpair ratio
(async ()=>{
let res=await coinmarket.RatioCoinpair("btcusdt")
})();
return ratio:
{
open: 8231.63,
close: 8164.16,
low: 8076.06,
high: 8277.12,
amount: 10272.949423936838,
count: 146588,
vol: 84071659.2274929,
symbol: 'btcusdt'
}
open =open price
close=latest price
low=lowest price
high=highest price
- get ethusdt coinpair ratio
(async ()=>{
let res=await coinmarket.RatioCoinpair("ethusdt")
})();
- the input you can use like bchusdt, ltcusdt etc.
#For China user: Since the GFW block the huobi api url,so you can use below api to get the current price .
- get the btcusdt coinpair ratio:
(async ()=>{
let res=await coinmarket.RatioCoinpairBypassGFW("usdt-btc")
})();
return the lastest ratio directly.
- you can get the bch,eth like the input format: usdt-bch, usdt-eth.