Fetches historical candle data from the registered exchange.
Candles are fetched backwards from the current execution context time. Uses the exchange's getCandles implementation.
Trading pair symbol (e.g., "BTCUSDT")
Candle interval ("1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h")
Number of candles to fetch
Promise resolving to array of candle data
const candles = await getCandles("BTCUSDT", "1m", 100);console.log(candles[0]); // { timestamp, open, high, low, close, volume } Copy
const candles = await getCandles("BTCUSDT", "1m", 100);console.log(candles[0]); // { timestamp, open, high, low, close, volume }
Fetches historical candle data from the registered exchange.
Candles are fetched backwards from the current execution context time. Uses the exchange's getCandles implementation.