Function getTimestamp

  • Gets the current timestamp from execution context.

    In backtest mode: returns the current timeframe timestamp being processed In live mode: returns current real-time timestamp

    Returns Promise<number>

    Promise resolving to current execution context timestamp in milliseconds

    const timestamp = await getTimestamp();
    console.log(timestamp); // 1700000000000