Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Friday, Dec 4.Claim the deal

You are given a list of timestamped prices represented as pairs of [time, price]. Your task is to generate candlestick data for fixed intervals of 10 time units. For each interval, produce a candlestick with the following information:

  1. Start Time: The beginning of the interval (round down the time to the nearest multiple of 10).
  2. Maximum Price: The highest price recorded within the interval.
  3. Minimum Price: The lowest price within the interval.
  4. Opening Price: The price corresponding to the earliest time in the interval.
  5. Closing Price: The price corresponding to the latest time in the interval.
Test Cases
Input
Output
Expected