Polygon
Ready to call this in production?
Free tier covers personal projects. Pay-as-you-go scales without a card.
Polygon
Free tier covers personal projects. Pay-as-you-go scales without a card.
Rate limiting caps how many requests your API key can send to the Polygon endpoint over a given window. TheRPC applies it to keep the service fast and fair for everyone and to protect the infrastructure behind chain ID 137 from overload. Limits operate at several levels at once — per second, per minute, per day, and on concurrent connections — so a burst and a sustained load are both bounded. The exact numbers depend on your subscription plan and Compute Unit allowance, and you can see your current limits and usage at any time in the dashboard.
When you exceed a limit on the Polygon endpoint, TheRPC returns a JSON-RPC error with code -32029 and a "Rate limit exceeded" message instead of your result. Alongside it, the HTTP response carries rate-limit metadata in its headers — X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset — so your client can see how much budget is left and when the window resets, and back off accordingly.
Three strategies keep you comfortably under your Polygon limits. Retry failed calls with exponential backoff so a brief -32029 does not cascade into more failures. Batch several reads into one JSON-RPC array to cut round trips. And replace polling loops with WebSocket subscriptions for real-time data, which on Polygon's ~2-second blocks dramatically reduces the request count. The sections below show each in practice.
For real-time data, eth_subscribe over the WebSocket endpoint replaces repeated polling with a push stream — the server notifies you when a new Polygon block or matching log appears, so you stop spending requests asking "anything new yet?" every couple of seconds. This is the single biggest win for staying under rate limits on a fast chain like Polygon. See the eth_subscribe reference for the available subscription types and examples.
X-RateLimit-Remaining and X-RateLimit-Reset on each response to see live budget per key.You can manage your quota programmatically by reading the X-RateLimit-* headers off each Polygon response and adapting — throttling or pausing as X-RateLimit-Remaining approaches zero, and resuming after X-RateLimit-Reset. Pairing this with response caching cuts request volume further: data that changes slowly, like a finalized block or a contract's bytecode on chain ID 137, can be cached and reused instead of re-fetched on every call.
Plans differ along several axes: request rate, daily quota, the number of concurrent WebSocket connections, and how many active subscriptions you can hold. Higher-tier plans also unlock the heavier Polygon capabilities — archive data for historical state queries on chain ID 137, the debug_ methods, and the trace_ API for full internal call trees. Compare the tiers and their Compute Unit allowances on the pricing page to find the right fit for your workload.
eth_subscribe to slash request count on Polygon's ~2-second blocks.