Bittrex Orderbook Manager
Requirements
This package requires Node.js 6.0.x+
Installation
You can install the package via npm:
$ npm install --save bittrex-orderbook-manager
or via yarn:
$ yarn add bittrex-orderbook-manager
Documentation
This package provides ability to track orderbooks updates from bittrex.com market.
All you need is to import bittrex-orderbook-manager
, create new instance, add event listeners & start connection.
This example shows how to connect to the market & create orderbooks for all currencies available:
const BittrexClient =const bittrex =bittrexbittrex
This example shows how to create orderbook for single currency:
const BittrexClient =const bittrex =bittrexbittrex
Events
All classes in this package are extended from EventEmitter
and emits several events you might want to subscribe to.
Call obj.on(event, handler)
to subscribe to any event listed below:
bittrexbittrexorderBookorderBooksCollection
BittrexClient
Events related to signalR client
bound
connectFailed(err)
connected(connection)
connectionLost(err)
disconnected
error(err)
bindingError(err)
unauthorized(res)
reconnected(connection)
reconnecting(retry)
Market-related events
summary(payload)
- emits when client receives market summary state updates;orderBookUpdate(marketName, payload)
- emits when any registered orderbook being updated.
BittrexOrderBook
started
- emits when orderbook was loaded & started receiving updates;error(err)
- emits when something goes wrong;update(payload)
- emits on each update from market.
OrderBooksCollection
orderBookStarted(orderbook, readyCount)
- emits when single orderbook was started. readyCount - total count of registered & ready orderbooks in current collection;ready
- emits when all orderbooks were started & receiving updates;error(err)
- emits when something goes wrong;
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email zurbaev@gmail.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.