binbot-charts 0.2.29 → 0.2.32
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.
|
@@ -32,8 +32,7 @@ const getConfigurationData = async () => {
|
|
|
32
32
|
class Datafeed {
|
|
33
33
|
constructor() {
|
|
34
34
|
let timescaleMarks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
35
|
-
let
|
|
36
|
-
let interval = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "1h";
|
|
35
|
+
let interval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "1h";
|
|
37
36
|
|
|
38
37
|
_defineProperty(this, "onReady", async callback => {
|
|
39
38
|
this.configurationData = await getConfigurationData();
|
|
@@ -133,10 +132,9 @@ class Datafeed {
|
|
|
133
132
|
(0, _streaming.unsubscribeFromStream)(subscriberUID);
|
|
134
133
|
});
|
|
135
134
|
|
|
136
|
-
this.timescaleMarks = timescaleMarks;
|
|
137
|
-
this.lineOrders = lineOrders;
|
|
138
135
|
this.streaming = null;
|
|
139
136
|
this.interval = interval;
|
|
137
|
+
this.timescaleMarks = timescaleMarks;
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
getTimescaleMarks(symbolInfo, from, to, onDataCallback, resolution) {
|
|
@@ -144,7 +142,9 @@ class Datafeed {
|
|
|
144
142
|
let timescaleMarks = [];
|
|
145
143
|
this.timescaleMarks.forEach(mark => {
|
|
146
144
|
let time = new Date(mark.time * 1000);
|
|
147
|
-
time.
|
|
145
|
+
time.setMinutes(0);
|
|
146
|
+
time.setSeconds(0);
|
|
147
|
+
time.setMilliseconds(0);
|
|
148
148
|
const roundFloor = time.getTime() / 1000;
|
|
149
149
|
mark.time = roundFloor;
|
|
150
150
|
timescaleMarks.push(mark);
|
package/package.json
CHANGED