OHLCV For Products Every Minute (Rate Limited)

I have an app that requests OHLCV data using the /products/{productId}/candles endpoint for over 100 products. It was working great until recently and now I’m getting a ton of 429 rate_limit_exceeded responses. The requests are rate-limited to 10 requests per second and there’s exponential backoff delays when errors are returned. With latency considered, the endpoint should NEVER be hit more than 10 times per second. This is a public endpoint, so I don’t see how the 10,000 requests per hour per API key would cause an issue.

  1. What could be going on here?
  2. Is there a better way to get OHLCV data for over 100 products every minute?

Thanks,
Elliott

Hi @elliot, you may consider subscribing to the WebSocket ticker channel to monitor for real time price updates: Channels. Here are a couple of notes on WebSocket API best practices:

  • Subscribing to one channel per connection is recommended over subscribing to hundreds of channels over one connection.
  • We recommend authenticating with every connection (even if not required).
1 Like

Hey Judy,

We’ll work on moving to the Websocket. However, can you answer this question:

Do requests to GET /products/BTC-USD and GET /products/BTC-USD/candles pull from the same rate-limit bucket? These paths are technically different endpoints, but I’m wondering if you guys consider them the same endpoint because they both start with /products.

Thanks

Hello @Elliott, rate limits are not at endpoint level but at ID level. So if one breaks the limit in another endpoint, it will be over the limit for any other.

Judy,

You didn’t answer my question, and you also shared incorrect information. Perhaps someone else with API rate limit experience could jump in here.

Clearing up the incorrect information, so we don’t confuse others:
Public endpoints are rate limited by IP address, NOT ID. You should have known what type of endpoint by simply looking at the URL path I shared with you. From your docs: “We throttle public endpoints by IP: 10 requests per second, up to 15 requests per second in bursts. Some endpoints may have custom rate limits.” This doc is located here: Rate limits

Back to my original question:
Do requests to GET /products/BTC-USD and GET /products/BTC-USD/candles pull from the same rate-limit bucket? These are public endpoints.

Thanks

Hello @Elliott! We apologize for the confusion regarding the previous information we provided on Rate Limits. Requests sent to Public API Endpoints are rate limited by IP Address and requests sent to Private Endpoints are rate limited by API ID.

To answer your question, yes, requests to GET /products/BTC-USD and GET /products/BTC-USD/candles are pulled from the same rate-limit bucket.

Thank you!

3 Likes