API Rate Limits & Quotas

Understand API usage limits, quotas, and best practices for optimizing API calls to stay within rate limits.

Rate Limits

Endpoint CategoryLimitWindow
Market Data (quotes)100per minute
Backtesting (run)10per hour
AI Assistant30per hour
Paper Trading (orders)50per minute
General API1000per hour

Optimization Best Practices

💡 Batch Requests

Use multi-quote endpoint instead of multiple single-quote calls. One request for 10 symbols instead of 10 requests.

💡 Cache Aggressively

Don't fetch same data repeatedly. Cache quotes for 1-5 seconds. Cache historical data for hours.

💡 Use WebSockets for Real-Time

For continuously updating data (quotes, positions), use WebSocket streaming instead of polling REST API.

💡 Handle 429 Errors

When rate limited, wait for reset time in response header. Implement exponential backoff: wait 1s, 2s, 4s, etc.