Returns up to 1500 candlestick records containing open, high, low, close prices and trading volume. Use this for charting, technical analysis, and backtesting trading strategies. Supports intervals from 1 minute to 1 week.
From spec: Get historical candlestick data for a specific symbol
Usage Tips
- Symbol format: BASE-QUOTE (e.g., BTC-USDT)
- Valid type values: 1min, 3min, 5min, 15min, 30min, 1hour, 2hour, 4hour, 6hour, 8hour, 12hour, 1day, 1week
- Maximum 1500 candles per request
- Use startAt/endAt timestamps to paginate historical data
import zingu_apis
api = zingu_apis.api("kucoin")
result = api.fetch("api/v1/market/candles", symbol="BTC-USDT", type="1hour")
for item in result:
print(item)
const resp = await fetch("https://api.kucoin.com/api/v1/market/candles?symbol=BTC-USDT&type=1hour");
const data = await resp.json();