backtest-kit 3.0.12 → 3.0.13
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/build/index.cjs +2 -2
- package/build/index.mjs +2 -2
- package/package.json +1 -1
package/build/index.cjs
CHANGED
|
@@ -26846,12 +26846,12 @@ async function checkCandles(params) {
|
|
|
26846
26846
|
const { timestamp } = candle;
|
|
26847
26847
|
const aligned = ALIGN_TO_INTERVAL_FN(timestamp, step);
|
|
26848
26848
|
if (timestamp !== aligned) {
|
|
26849
|
-
throw new Error(`checkCandles: ${entry.name} timestamp
|
|
26849
|
+
throw new Error(`checkCandles: ${entry.name} timestamp not aligned to ${interval} boundary (actual=${timestamp}, expected=${aligned})`);
|
|
26850
26850
|
}
|
|
26851
26851
|
if (prevTimestamp !== null) {
|
|
26852
26852
|
const gap = timestamp - prevTimestamp;
|
|
26853
26853
|
if (gap !== stepMs) {
|
|
26854
|
-
throw new Error(`checkCandles: gap between ${prevName} and ${entry.name}
|
|
26854
|
+
throw new Error(`checkCandles: gap between ${prevName} and ${entry.name} (actual=${gap}ms, expected=${stepMs}ms)`);
|
|
26855
26855
|
}
|
|
26856
26856
|
}
|
|
26857
26857
|
prevTimestamp = timestamp;
|
package/build/index.mjs
CHANGED
|
@@ -26826,12 +26826,12 @@ async function checkCandles(params) {
|
|
|
26826
26826
|
const { timestamp } = candle;
|
|
26827
26827
|
const aligned = ALIGN_TO_INTERVAL_FN(timestamp, step);
|
|
26828
26828
|
if (timestamp !== aligned) {
|
|
26829
|
-
throw new Error(`checkCandles: ${entry.name} timestamp
|
|
26829
|
+
throw new Error(`checkCandles: ${entry.name} timestamp not aligned to ${interval} boundary (actual=${timestamp}, expected=${aligned})`);
|
|
26830
26830
|
}
|
|
26831
26831
|
if (prevTimestamp !== null) {
|
|
26832
26832
|
const gap = timestamp - prevTimestamp;
|
|
26833
26833
|
if (gap !== stepMs) {
|
|
26834
|
-
throw new Error(`checkCandles: gap between ${prevName} and ${entry.name}
|
|
26834
|
+
throw new Error(`checkCandles: gap between ${prevName} and ${entry.name} (actual=${gap}ms, expected=${stepMs}ms)`);
|
|
26835
26835
|
}
|
|
26836
26836
|
}
|
|
26837
26837
|
prevTimestamp = timestamp;
|