coinbase-pro-feed
Lightweight Coinbase Pro Websocket Feed implementation.
Install
npm install -s coinbase-pro-feed
.feedFor(product_ids[, options[, env]])
The feed wraps websocket client using stream.Readable
:
const feedFor = // when false // data event invokes raw buffer // when true // data event invokes parsed object
- product_ids (default:
[]
) - options (default:
{ objectMode = true, channels: ['full'] }
) - env (default:
process.env
)
.socketFor(product_ids[, options[, env]])
The websocket client allows you to connect and listen to exchange messages.
const feedFor =
Command Line Interface (CLI)
When installed globally it is possibile to access the command line interface:
npm install --global coinbase-pro-feed
Usage
coinbase-pro-feed btc-eur eth-eur ltc-eur # stdout compatible with http://jsonlines.org