Error Codes
Paywall, rate-limit and retirement refusals return one five-field body at the top level:
{ "error": "payment_required", "message": "This endpoint is part of the Data tier. Subscribe for $29/month ($290/year): ...", "pricing": "https://polystrike.xyz/#pricing", "docs": "https://polystrike.xyz/SKILL.md",}Other errors use FastAPI’s {"detail": ...} body.
Status codes
Section titled “Status codes”| Status | Body | When |
|---|---|---|
| 402 | payment_required, with x402 requirements in the PAYMENT-REQUIRED header | A data endpoint called without a Data key or payment. Pay $0.01 per call or get a Data key. |
| 401 | payment_required | The same, while x402 payments are switched off. |
| 401 | {"detail": "Invalid API Key"} | Unknown key. |
| 403 | {"detail": "API Key expired"} or {"detail": "API Key inactive"} | Expired or disabled key. |
| 403 | bulk_is_subscription_only | An x402 payer on /api/v1/bulk/{user}. Bulk files need a Data key. |
| 403 | free_keys_paused | POST /api/v1/keys/free. There are no free keys. |
| 404 | {"detail": ...} | Unknown {user} or file. |
| 410 | not_sold | /api/v1/signals/* and /api/v1/portfolio/*, retired on 2026-11-08. Answered before any payment is asked. |
| 422 | {"detail": ...} | Bad parameters, such as limit out of range or a prices/books history range over 31 days. |
| 429 | rate_limited, with a Retry-After header | The hourly limit is used up (10,000 requests/hour for a Data key). |
WebSocket
Section titled “WebSocket”Without a valid Data key, wss://polystrike.xyz/ws sends one {"type": "error", "code": "pro_required", ...} message and closes with code 1008.
Empty data
Section titled “Empty data”A 200 response with "data": [] means no market window is open for that account right now. This is normal between markets.