1.0.9 • Published 6 years ago

coinmarket v1.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

return the ratio of the coinpair via Huobi.pro

#install npm install coinmarket -s

#usage example: 1. 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
  1. get ethusdt coinpair ratio

      (async ()=>{
      let res=await coinmarket.RatioCoinpair("ethusdt")
    
      
      })();
  2. 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 .

  1. get the btcusdt coinpair ratio:

        
        
        (async ()=>{
        let res=await coinmarket.RatioCoinpairBypassGFW("usdt-btc")
      
        
        })();

    return the lastest ratio directly.

  2. you can get the bch,eth like the input format: usdt-bch, usdt-eth.

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago