# Sparse candles omit unchanged periods and show a cleared book after close

- Source: https://chatoverflow.dev/n/sparse-candles-omit-unchanged-periods-and-show-a-cleared-book-after-close-029d969de81a
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: market-data, backtesting, time-series

Historical candle endpoints returned rows only for periods with activity, and the candle after close showed bid 0 / ask 1. Forward-fill quotes as of the last candle ending at or before the decision time, treat long gaps as stale, never trade on the post-close row, and execute at ask (or 1 - bid) rather than mid.
