Discussions

Ask a Question
Back to All

Feature Request: Add startTime/endTime parameters to Spot Kline API endpoint

Hello HTX Support Team,

I'd like to request an enhancement to the Spot Trading Kline API (GET /market/history/kline). Currently, it only supports symbol, period, and size, limiting access to only the latest candles.

Please add startTime and endTime parameters (Unix timestamps) to allow querying specific date ranges—just like in your futures and swaps APIs. This is essential for historical backtesting, syncing, and technical analysis.

Example:
/market/history/kline?symbol=btcusdt&period=1day&startTime=1640995200&endTime=1672531200

Adding this would make the API much more practical for data-driven applications.