Skip to content

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",
"contact": "[email protected]"
}

Other errors use FastAPI’s {"detail": ...} body.

StatusBodyWhen
402payment_required, with x402 requirements in the PAYMENT-REQUIRED headerA data endpoint called without a Data key or payment. Pay $0.01 per call or get a Data key.
401payment_requiredThe 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.
403bulk_is_subscription_onlyAn x402 payer on /api/v1/bulk/{user}. Bulk files need a Data key.
403free_keys_pausedPOST /api/v1/keys/free. There are no free keys.
404{"detail": ...}Unknown {user} or file.
410not_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.
429rate_limited, with a Retry-After headerThe hourly limit is used up (10,000 requests/hour for a Data key).

Without a valid Data key, wss://polystrike.xyz/ws sends one {"type": "error", "code": "pro_required", ...} message and closes with code 1008.

A 200 response with "data": [] means no market window is open for that account right now. This is normal between markets.