Error Codes
All errors return a JSON body with a detail field explaining the issue.
{ "detail": "Invalid API key" }HTTP Status Codes
Section titled “HTTP Status Codes”| Code | Meaning | Common Cause |
|---|---|---|
200 | OK | Request succeeded |
400 | Bad Request | Missing required parameter, invalid wallet address |
401 | Unauthorized | Missing or invalid X-API-Key on a Pro-only endpoint |
422 | Unprocessable Entity | Parameter validation failed (e.g. limit out of range) |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Upstream data source unavailable |
503 | Service Unavailable | Server overloaded or in maintenance |
Rate Limit Errors (429)
Section titled “Rate Limit Errors (429)”When you exceed the rate limit, the response body will include:
{ "detail": "Rate limit exceeded. Try again in 60 seconds." }| Tier | Limit |
|---|---|
| Free (Anonymous) | 100 requests / hour (per IP) |
| Pro | 10,000 requests / hour (per API key) |
Rate limits reset on a rolling 1-hour window.
Authentication Errors (401)
Section titled “Authentication Errors (401)”Endpoints that require a Pro key return 401 if:
- The
X-API-Keyheader is missing - The key is invalid or expired
- The key doesn’t have Pro tier access
Affected endpoints: /prediction/elon, /signals/elon, /portfolio/elon
Validation Errors (422)
Section titled “Validation Errors (422)”The /meta/elon/tweets endpoint accepts limit and offset query parameters for Pro users. Invalid values produce a 422:
# This will 422 — limit max is 100curl -H "X-API-Key: ps_pro_..." \ "https://polystrike.xyz/api/v1/meta/elon/tweets?limit=500"Valid ranges:
limit: 1–100 (Pro only; free tier is fixed at 15)offset: 0 or any non-negative integer
Empty Data (200)
Section titled “Empty Data (200)”A 200 response with "data": [] means there are no active Elon tweet markets right now. This is normal between events. Check back when a new market opens on Polymarket.