diff --git a/examples/ws-private.ts b/examples/ws-private.ts index 59623f3..14bd950 100644 --- a/examples/ws-private.ts +++ b/examples/ws-private.ts @@ -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)); });