MCPcopy
hub / github.com/Mathieu2301/TradingView-API / replayStart

Method replayStart

src/chart/session.js:439–450  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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

Callers 1

replayMode.test.tsFile · 0.80

Calls 3

#handleErrorMethod · 0.95
genSessionIDFunction · 0.85
sendMethod · 0.80

Tested by

no test coverage detected