1.0.35 • Published 5 years ago

bitmex-ws-orderbook v1.0.35

Weekly downloads
3
License
MIT
Repository
github
Last release
5 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

5 years ago

1.0.34

5 years ago

1.0.32

5 years ago

1.0.30

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago

1.0.27

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

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

1.0.2

6 years ago

1.0.1

6 years ago