"invalid end" on Product Candles endpoint

I’m trying to retrieve historical candles but when I enter start/end timestamp I receive an error response. Omitting the start/end will return results. When I make a subsequent call using the start/end of the first/last candle returned I still get the error. Not sure if I’m missing something or of this is a bug in the API. Any help appreciated. Thanks!

Hi @haagendoss - thank you so much for joining and letting us know about this issue you’re facing. I am working with the team to see what may be going on here. Will follow up as soon as I get a better understanding. Thanks again and welcome!!

@haagendoss Here is an example way of doing it: https://api.pro.coinbase.com/products/BTC-USD/candles?start=2022-02-15T06:47:00&end=2022-02-16T06:50:00&granularity=300

:face_with_hand_over_mouth: Probably would be good to update the docs to show the format since it says timestamp and returns results with timestamp. I assumed Unix timestamp… Thanks!

Great feedback - here are the docs that seem most appropriate - Types - thanks again @haagendoss

@arood In the example above, the start and end times do not have an explicit time zone. Please clarify.

  1. Which timezone is assumed if the request does not specify a time zone?

  2. Does the API allow specification of a particular timezone? If so, could you give an example of the format?

Hello @Grenda! Currently, there is no way to specify a timezone. Always use UTC timezone values when interacting with the API.

As for the format, you can check this link for more information. I hope this helps.

1 Like

Thank you @joshmer.briones

1 Like