From my understanding, I should have 5 candles since start is 1688649744 (Thursday, July 6, 2023 1:22:24 PM GMT) and end is 1688650044 (Thursday, July 6, 2023 1:27:24 PM GMT) so the timespan is 5 minutes and since I ask a resolution of 60 seconds, I should have 5 candles.
The response candle has a timestamp at 1688650020 (Thursday, July 6, 2023 1:27:00 PM GMT), which is indeed into the asked interval, however I should get more data.
Thank you for using Coinbase forum, we are happy to help you.
To get the five candles you are expecting, you need to make sure that the start and end timestamps are aligned with the granularity you are requesting. In this case, you need to make sure that the start timestamp is a multiple of 60 seconds (e.g. 1688649740) and the end timestamp is a multiple of 60 seconds plus 59 seconds (e.g. 1688650099). This will ensure that you get the five candles you are expecting.
Thanks for your answer, I didn’t had much time to check this subject recently, but I just tried what you said, and indeed it fixes most of the request calls.
However I still found a particular case where no candle was returned, even if the timestamps were aligned with the interval.
For example with the candle on USDT-EUR between 2023-07-06 23:10:44 and 2023-07-06 23:11:44