market-data-tradingview-ws 0.0.14 → 0.0.15
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.
- package/lib/client.js +2 -2
- package/lib/tradingView.js +4 -4
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -260,7 +260,7 @@ module.exports = class Client {
|
|
|
260
260
|
frame: data.frame,
|
|
261
261
|
increment: data.i,
|
|
262
262
|
symbolKey: data.symbolKey,
|
|
263
|
-
|
|
263
|
+
period: periods[period],
|
|
264
264
|
limit,
|
|
265
265
|
}),
|
|
266
266
|
);
|
|
@@ -293,7 +293,7 @@ module.exports = class Client {
|
|
|
293
293
|
frame: data.frame,
|
|
294
294
|
increment: data.i,
|
|
295
295
|
symbolKey: data.symbolKey,
|
|
296
|
-
|
|
296
|
+
period: periods[period],
|
|
297
297
|
}),
|
|
298
298
|
);
|
|
299
299
|
this.#charts.set({ key, data });
|
package/lib/tradingView.js
CHANGED
|
@@ -268,7 +268,7 @@ class TradingView {
|
|
|
268
268
|
// frame - рамка или окно для данной серии
|
|
269
269
|
// increment - инкрементируемый номер изменений запрашиваемого графика в данном frame (таймефрейм)
|
|
270
270
|
createSeries({ chartSession, frame = 'sds_1', increment = 's1', symbolKey, period = '60', limit = 1000 }) {
|
|
271
|
-
// console.warn('createSeries', chartSession, frame, increment, symbolKey,
|
|
271
|
+
// console.warn('createSeries', chartSession, frame, increment, symbolKey, period, limit);
|
|
272
272
|
return this.formatWSPacket({
|
|
273
273
|
packet: { m: 'create_series', p: [chartSession, frame, increment, symbolKey, period, limit] },
|
|
274
274
|
});
|
|
@@ -285,10 +285,10 @@ class TradingView {
|
|
|
285
285
|
return this.formatWSPacket({ packet: { m: 'remove_study', p: [ session, st ] } });
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
modifySeries({ chartSession, frame = 'sds_1', increment = 's1', symbolKey,
|
|
289
|
-
// console.warn('modify_series', chartSession, frame, increment, symbolKey,
|
|
288
|
+
modifySeries({ chartSession, frame = 'sds_1', increment = 's1', symbolKey, period = '60' }) {
|
|
289
|
+
// console.warn('modify_series', chartSession, frame, increment, symbolKey, pariod, limit);
|
|
290
290
|
return this.formatWSPacket({
|
|
291
|
-
packet: { m: 'modify_series', p: [chartSession, frame, increment, symbolKey,
|
|
291
|
+
packet: { m: 'modify_series', p: [chartSession, frame, increment, symbolKey, period] },
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
|