Default Limits
The Provider API enforces per-key rate limits to ensure fair usage and protect upstream providers.| Tier | Limit | Window |
|---|---|---|
| Default | 100 requests | 1 minute |
Need higher limits? Contact us at support@perps.studio for enterprise rate limit tiers.
Rate Limit Headers
Every response includes headers to help you track your usage:| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the window |
X-RateLimit-Reset | Unix timestamp (seconds) when the window resets |
Exceeding the Limit
When you exceed the rate limit, the API returns a429 Too Many Requests response:
Retry-After header indicates how many seconds to wait before retrying.
Best Practices
Use WebSockets for Real-Time Data
Use WebSockets for Real-Time Data
Instead of polling REST endpoints for orderbook or price updates, subscribe to WebSocket channels. WebSocket subscriptions do not count against REST rate limits.
Batch Where Possible
Batch Where Possible
Use bulk endpoints like
GET /v1/perps/:provider/prices to fetch all prices in a single request instead of querying individual markets.Implement Exponential Backoff
Implement Exponential Backoff
When you receive a
429, wait the number of seconds in the Retry-After header, then retry with exponential backoff:Cache Static Data
Cache Static Data
Market metadata, provider info, and other slowly-changing data should be cached locally. Markets data typically changes less than once per day.
Upstream Provider Limits
The Provider API also respects each upstream provider’s rate limits. If an upstream provider rejects a request due to their own limits, you will receive a503 Service Unavailable with the PROVIDER_UNAVAILABLE error code.
| Provider | Upstream Limit |
|---|---|
| Hyperliquid | 1,200 requests/min |
| Aster DEX | 2,400 requests/min |
| Polymarket | 600 requests/min |