* Start fetching a new period/candle every x ms * @param {number} interval Number of additional periods/candles you want to fetch * @returns {Promise} Raise when the replay mode starts
(interval = 1000)
| 437 | * @returns {Promise} Raise when the replay mode starts |
| 438 | */ |
| 439 | replayStart(interval = 1000) { |
| 440 | return new Promise((cb) => { |
| 441 | if (!this.#replayMode) { |
| 442 | this.#handleError('No replay session'); |
| 443 | return; |
| 444 | } |
| 445 | |
| 446 | const reqID = genSessionID('rsq_start'); |
| 447 | this.#client.send('replay_start', [this.#replaySessionID, reqID, interval]); |
| 448 | this.#replayOKCB[reqID] = () => { cb(); }; |
| 449 | }); |
| 450 | } |
| 451 | |
| 452 | /** |
| 453 | * Stop fetching a new period/candle every x ms |
no test coverage detected