MCPcopy Index your code
hub / github.com/Mathieu2301/TradingView-API / replayStep

Method replayStep

src/chart/session.js:421–432  ·  view source on GitHub ↗

* Fetch x additional previous periods/candles values * @param {number} number Number of additional periods/candles you want to fetch * @returns {Promise} Raise when the data has been fetched

(number = 1)

Source from the content-addressed store, hash-verified

419 * @returns {Promise} Raise when the data has been fetched
420 */
421 replayStep(number = 1) {
422 return new Promise((cb) => {
423 if (!this.#replayMode) {
424 this.#handleError('No replay session');
425 return;
426 }
427
428 const reqID = genSessionID('rsq_step');
429 this.#client.send('replay_step', [this.#replaySessionID, reqID, number]);
430 this.#replayOKCB[reqID] = () => { cb(); };
431 });
432 }
433
434 /**
435 * Start fetching a new period/candle every x ms

Callers 2

stepFunction · 0.80
stepFunction · 0.80

Calls 3

#handleErrorMethod · 0.95
genSessionIDFunction · 0.85
sendMethod · 0.80

Tested by 1

stepFunction · 0.64