New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

coinmarket

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coinmarket

get the latest market value for any digital currency,including btc,bth,eth.

latest
npmnpm
Version
1.0.9
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

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

2. 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.

Keywords

btc

FAQs

Package last updated on 16 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts