ws private clean

This commit is contained in:
tiagosiebler
2022-09-17 11:50:39 +01:00
parent f827318123
commit 296262f4fb

View File

@@ -1,13 +1,12 @@
import { DefaultLogger } from '../src';
import { WebsocketClient } from '../src/websocket-client';
import { WebsocketClient, WS_KEY_MAP, DefaultLogger } from '../src';
// or
// import { DefaultLogger, WebsocketClient } from 'bybit-api';
// import { DefaultLogger, WS_KEY_MAP, WebsocketClient } from 'bybit-api';
(async () => {
const logger = {
...DefaultLogger,
// silly: () => {},
silly: () => {},
};
const key = process.env.API_KEY;
@@ -25,7 +24,7 @@ import { WebsocketClient } from '../src/websocket-client';
key: key,
secret: secret,
market: market,
livenet: true,
// testnet: true,
restOptions: {
// enable_time_sync: true,
},
@@ -33,8 +32,6 @@ import { WebsocketClient } from '../src/websocket-client';
logger
);
// wsClient.subscribePublicSpotOrderbook('test', 'full');
wsClient.on('update', (data) => {
console.log('raw message received ', JSON.stringify(data, null, 2));
});