Get Product Candles limited to 9 days?

Hello,
It appears the Advanced API, Get Product Candles | Coinbase Cloud is now limiting the historical data returned to about 9 days when using the granularity of ONE_MINUTE. I believe this started this weekend, for most product_id’s. BTC-USD and a few others aren’t restricted. Is this change intentional?
Thanks, Jerry

Hi @Jerry! Welcome to the forum! We get that when you try calling the Get Product Candles endpoint and you are reporting that the historical data only allows up to 9 days when using the granularity of ONE_MINUTE. For clarification, this is not intentional, the Get Product Candles is expected to fetch historical data of a trading pair from the first trade.

For example: let’s assume that every minute a candle is produced (please note that no candle is produced when there are no trades that happen).

  • 1 minute = 1 candle
  • 1 hour = 60 candles
  • 1 day = 24hr X 60 candles = 1440 candles
  • 9 days = 9day X 1440 candles = 12960 candles

The maximum limit for every request is 300. If you hit the maximum limit, we suggest that you shorten the difference of your start and end parameters or increase your granularity.

Additionally, if you are still unable to get your desired outcome after trying our suggestions above, please send the Http request that you are sending and if there is an error message you encountered, feel free to share it with us as well. You can also visit this link, for release notes list changes to the Coinbase Advanced Trade API.

We hope this helps! If you have further questions or clarifications, please do not hesitate to reach out back to us again.

1 Like

Hi Katkat,
Thanks for the info. I believe there is a problem, my code hasn’t changed in months. Here’s an example of the failure I’m seeing:

HTTP Get request:
/api/v3/brokerage/products/SHIB-USD/candles?granularity=ONE_MINUTE&start=1677949440&end=1677967440

Response:
{“candles”:[{“start”:“1677967440”,“low”:“0.00001087”,“high”:“0.00001109”,“open”:“0.00001109”,“close”:“0.0000109”,“volume”:“10694638384”}]}

The endpoint is requesting 300 candles, as 1677967440 - 1677949440 = 18000 = 300 * 60
The response only has one candle’s data with start 1677967440, which is during Mar 4 2023, now 10 days ago. My original thought it was limited to 9 days is incorrect. Previously I’ve been able to pull candle data for this product_id, SHIB-USD, back to Sep 9th 2021.

Most of my http candle data requests fail at start 1677967440, except for product_id’s BTC-USD, BTC-USD%, ETH-USD, ETH-BTC, CBETH-USD which go back in history much farther.

Hopefully that helps.
Thanks, Jerry

Can’t remember the details, but Coinbase was down for some sort of scheduled maintenance on March 4th. I’m guessing that had something to do with it.

Hi @Jerry ,

We would like to confirm with you if you still face this issue.

Hi Caleb,

Yes, the issue appears to still exist. I just confirmed by pulling fresh candle data for two pairs, ADA-USD and LTC-USD. I believe jmicko correctly identified when the issue began, as I can’t pull candles before Mar 4th, 2023.

I did not re-test for the couple of pairs, like BTC-USD, that worked for dates before Mar 4th.

I’ll attempt to change the subject line as it’s incorrect.

Thanks, Jerry

Hi @Jerry

Could you please confirm if you still require support on this? Apologies for the delay in response.