crypto-coin
Version:
gets basic market data
34 lines (27 loc) • 648 B
Markdown
# How to Install
```
$ npm install crypto-coin
```
## Basic Usage
```
var Products = require('crypto-coin')`
var BTC = new Products() // default param is ("BTC-USD")
var LTC = new Products("LTC-USD")
console.log(BTC.price) //=> 4000
console.log(LTC.price) //=> 43
```
## API
```
var BTC = new Products()
BTC.price
BTC.volume
BTC.bid
BTC.ask
BTC.spread
BTC.pairs // Array of all available pairs
//=> "BTC-USD", "BTC-EUR", "BTC-GBP", "ETH-BTC", "ETH-EUR","ETH-USD", "LTC-BTC", "LTC-EUR", "LTC-USD"
```
### Note
__All operations are done synchronously__
__Information is relative to GDAX Exchange__
`