Endpoints, limits and errors
Every partner route, the limits, and the error codes.
Base URL: https://api.krexa.xyz/api/v1/partner. Send X-API-Key and Krexa-End-User on every call.
Routes
| Method | Path | Does |
|---|---|---|
GET | /whoami | Your org, key mode and scopes. |
GET | /leaderboard | Public strategy leaderboard. |
POST | /decode | { text } or { url } → { id, confidence, backtestable }. Pass id as decodeId later. |
POST | /backtest | { decodeId, capital?, from?, to?, symbol? }. |
POST | /project | { decodeId, capital, months } → a projection. |
POST | /deep-backtest | { decodeId, venue, maxLeverage? } → starts a job. |
GET | /deep-backtest/:decodeId?venue= | Job status. |
POST | /research | { prompt, venue } → starts a research run. |
GET | /research/:id | Research status and result. |
POST | /paper | { decodeId, venue, name, startUsd } → a paper agent. |
GET | /paper | This end user's paper agents. |
GET | /paper/:id/summary | P&L and trades. |
POST | /paper/:id/pause · /resume · /stop | Control a paper agent. |
DELETE | /paper/:id | Remove a paper agent. |
POST | /chat/stream | Chat, as Server-Sent Events. |
GET · DELETE | /chat/sessions[/:id] | Chat history. |
A second POST /deep-backtest for the same idea returns the job that is running.
Safe retries
Send Idempotency-Key: <unique id> on any POST that creates something. For 24 hours, the same key with the same body returns the first answer and the header Idempotent-Replayed: true. The same key with a different body returns 422 idempotency_mismatch.
Limits
| Limit | Value |
|---|---|
| Requests per minute, test key | 60 |
| Requests per minute, live key | 300 |
| Decodes per org per day | 500 |
| Deep backtests per org per day | 50 |
| Research runs per org per day | 50 |
| Paper agents made per org per day | 100 |
| Running paper agents per org | 50 |
| Chat turns per end user per day | 100 |
Daily limits reset at 00:00 UTC. Ask Krexa if you need more. Every answer has X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. A 429 also has Retry-After (seconds).
Errors
Every error has the same shape:
{ "error": { "code": "daily_limit", "message": "…", "requestId": "…" } }| Status | code | Do this |
|---|---|---|
| 400 | invalid_request | Fix the body or headers. |
| 401 | invalid_key | Check the key. It may be revoked. |
| 401 | invalid_token | The OAuth user token is expired or not for this org. |
| 403 | scope_not_allowed | The key does not have the scope. Make a new key. |
| 404 | not_found | The id does not exist for this end user. |
| 409 | already_running | Wait for the running job. |
| 422 | idempotency_mismatch | Use a new Idempotency-Key. |
| 429 | rate_limited | Wait Retry-After seconds. |
| 429 | daily_limit | Wait for 00:00 UTC. |
| 5xx | internal | Retry with backoff. Send the requestId to support. |
