Trading pair symbol (e.g., "BTCUSDT")
Candle interval ("1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h")
Optionallimit: numberOptional number of candles to fetch
OptionalsDate: numberOptional start date in milliseconds
OptionaleDate: numberOptional end date in milliseconds
Promise resolving to array of candle data
// Fetch 100 candles backward from current context time
const candles = await getRawCandles("BTCUSDT", "1m", 100);
// Fetch candles for specific date range
const rangeCandles = await getRawCandles("BTCUSDT", "1h", undefined, startMs, endMs);
// Fetch with all parameters specified
const exactCandles = await getRawCandles("BTCUSDT", "1m", 100, startMs, endMs);
Fetches raw candles with flexible date/limit parameters.
All modes respect execution context and prevent look-ahead bias.
Parameter combinations: