Understand API usage limits, quotas, and best practices for optimizing API calls to stay within rate limits.
| Endpoint Category | Limit | Window |
|---|---|---|
| Market Data (quotes) | 100 | per minute |
| Backtesting (run) | 10 | per hour |
| AI Assistant | 30 | per hour |
| Paper Trading (orders) | 50 | per minute |
| General API | 1000 | per hour |
Use multi-quote endpoint instead of multiple single-quote calls. One request for 10 symbols instead of 10 requests.
Don't fetch same data repeatedly. Cache quotes for 1-5 seconds. Cache historical data for hours.
For continuously updating data (quotes, positions), use WebSocket streaming instead of polling REST API.
When rate limited, wait for reset time in response header. Implement exponential backoff: wait 1s, 2s, 4s, etc.