1.1.10 • Published 6 years ago

crypto.in v1.1.10

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
6 years ago

Crypto.in

Build Status Crypto.in version FOSSA Status

How can I use it ?

Just write crypto coin name and get the values. !!

Example

var cryptoin = require('crypto.in')

cryptoin.in('bitcoin', value => {
	console.log(value)
});
  
/*
  bitname: 'Bitcoin',
  bitsymbol: 'BTC',
  bitrank: '1',
  bitpriceusd: '$8,059.41',
  bitpricebtc: '1.0',
  bithourchange: '%-0.28',
  bit24hchange: '%5.04',
  bitweekchange: '%21.36',
  bitpng: 'https://raw.githubusercontent.com/ahmtcn123/Crypto.in/master/images/Bitcoin.png'  
*/

To get special values

cryptoin.in('bitcoin', value => {
	console.log(value.bitpriceusd)
});
  
/*
$8,059.41
*/

On wrong crypto coin name returns;

null for debugging

Debugging example

cryptoin.in('ereum', value => {
console.log(value)
});
  
/*


Error: Wrong cryptocoin name.
    at C:\Users\ahmet\Desktop\Crypto.in\index.js:37:15
    at parseResponse (C:\Users\ahmet\Desktop\node_modules\restify-clients\lib\JsonClient.js:118:9)
    at IncomingMessage.done (C:\Users\ahmet\Desktop\node_modules\restify-clients\lib\StringClient.js:209:13)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1055:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

value : 'null' 



*/

**Example**

if(value === null) {
	return console.log('Opps wrong')
}

Try out our special AI API ? > FridayAPI

License

FOSSA Status

1.1.10

6 years ago

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

6 years ago