Function waitForCandle

Waits for the next candle interval to start and returns the timestamp of the new candle.

  • Parameters

    • interval: CandleInterval

      The candle interval (e.g., "1m", "1h") to wait for.

    Returns Promise<number>

    A promise that resolves with the timestamp (in milliseconds) of the next candle start.