Crypto-Convert
Instantly convert cryptocurrency and get price information.
- Top 100 Crypto Currencies Supported
- Top 30 Fiats Supported
- Price & Ticker information updated on a configurable interval from multiple secure sources (Binance, Bitfinex, OKEx)
- Any pair can be converted, be it Crypto -> Crypto or Fiat -> Crypto.
- Instant convert, no slow promises.
Installation
npm i crypto-convert
Usage
const convert = require("crypto-convert");
(async function(){
if(!convert.isReady){
await convert.ready();
}
convert.BTC.USD(1);
convert.ETH.JPY(255);
convert.LINK.LTC(5);
convert.USD.CRO(100);
new convert.from("BTC").to("USD").amount(1);
})();
For Browsers
<script type="text/javascript" src="https://coinconvert.net/assets/js/crypto-convert.min.js"></script>
<script>
console.log(convert.BTC.USD(1));
</script>
Configuration
const convert = require("crypto-convert");
convert.set({
crypto_interval: 5000,
fiat_interval: (60 * 1e3 * 60),
binance: true,
bitfinex: true,
okex: true,
onUpdate: (tickers)=> {}
});
API
Free public API, up to 50 req/s.
https://api.coinconvert.net/convert/btc/usd?amount=1