The SnapTrade API uses a number of safety mechanisms to protect against bursts of incoming traffic and help maximize its stability.
Customer who send many requests in quick succession might see error responses that show up as HTTP status code 429.
Every SnapTrade client is ratelimited to 100 requests per minute by default. If you have a large number of users and would like to request a higher ratelimit, please contact your Customer Success Manager.
Common Causes and Mitigations
There are a number of situations that may cause your ratelimiting to kick in. Here are a few scenarios and suggested mitigations:
- Aggressive daily syncs: syncing user portfolios all-at-once will increase the chance that you hit your ratelimit threshold. These data syncs should be spaced out over a reasonable period of time.
- Increased user signup volumes: sometimes our customers will do an email blast to announce a new integration with SnapTrade. To prevent hitting ratelimits, it is prudent to space out these requests so users onboard over a period of time
Best Practices for Handling 429s
You should add logic to your integration to watch for 429
responses from our API, and handle them with a retry mechanism.
The retry mechanism should use exponential backoff, and ideally have some randomness baked in to prevent thundering herd problems.