1.0.35 • Published 4 years ago

bitmex-ws-orderbook v1.0.35

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

bitmex websocket orderbook keeper

install

npm i bitmex-ws-orderbook

Code

import { BitmexOrderBookKeeper } from 'bitmex-ws-orderbook';
const bitmexOb = new BitmexOrderBookKeeper({ testnet: true, enableEvent: true });
bitmexOb.onSocketMessage(msg);
const ob = await bitmexOb.getOrderBook('XBTUSD');

//event
bitmexOb.onOrderBookUpdated((ob: BitmexOb.OrderBookSchema) => {
    console.log(`orderbook from event`, ob);
})

You must send websocket message from outside, this is to enable using single websocket connection for multiple purposes

##sample see src/sample/bitmexOrderBookSample.ts

1.0.35

4 years ago

1.0.34

4 years ago

1.0.32

4 years ago

1.0.30

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago