market-data-tradingview-ws 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/client.js +6 -5
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -115,7 +115,7 @@ module.exports = class Client {
115
115
  this.#ws.send(this.auth(this.#token));
116
116
  this.#ws.send(tv.setLocaleRu());
117
117
 
118
- const chartKey = this.createChartSession();
118
+ // const chartKey = this.createChartSession();
119
119
  const quoteKey = this.createQuoteSmallSession();
120
120
  // this.addQuoteSymbols({ symbols: ['NASDAQ:PYPL'] });
121
121
 
@@ -254,9 +254,9 @@ module.exports = class Client {
254
254
  if (packet.type === 'ping') {
255
255
  // console.info('pong', packet);
256
256
  this.#ws.send(tv.createPong({ value: packet.data }));
257
- } else if (packet.type === 'protocol_error') {
258
- console.warn('protocol_error', packet);
259
- this.close();
257
+ // } else if (packet.type === 'protocol_error') {
258
+ // console.warn('protocol_error', packet);
259
+ // this.close();
260
260
  } else if (packet.type === 'qsd') {
261
261
  const send = packet.data[1].v;
262
262
  const name = send.bid === undefined && send.ask === undefined ? 'data' : 'levelI';
@@ -290,7 +290,8 @@ module.exports = class Client {
290
290
  } else if (['series', 'symbol', 'quote', 'session'].includes(packet.type)) {
291
291
  // console.info(packet);
292
292
  } else {
293
- console.warn('error', raw.toString());
293
+ // console.warn('error', raw.toString());
294
+ result('error', raw.toString())
294
295
  }
295
296
  }
296
297
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "market-data-tradingview-ws",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "marketData from Tradingview ws",
5
5
  "main": "index.js",
6
6
  "scripts": {