Krexa Docs

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

MethodPathDoes
GET/whoamiYour org, key mode and scopes.
GET/leaderboardPublic 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/:idResearch status and result.
POST/paper{ decodeId, venue, name, startUsd } → a paper agent.
GET/paperThis end user's paper agents.
GET/paper/:id/summaryP&L and trades.
POST/paper/:id/pause · /resume · /stopControl a paper agent.
DELETE/paper/:idRemove a paper agent.
POST/chat/streamChat, 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

LimitValue
Requests per minute, test key60
Requests per minute, live key300
Decodes per org per day500
Deep backtests per org per day50
Research runs per org per day50
Paper agents made per org per day100
Running paper agents per org50
Chat turns per end user per day100

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": "…" } }
StatuscodeDo this
400invalid_requestFix the body or headers.
401invalid_keyCheck the key. It may be revoked.
401invalid_tokenThe OAuth user token is expired or not for this org.
403scope_not_allowedThe key does not have the scope. Make a new key.
404not_foundThe id does not exist for this end user.
409already_runningWait for the running job.
422idempotency_mismatchUse a new Idempotency-Key.
429rate_limitedWait Retry-After seconds.
429daily_limitWait for 00:00 UTC.
5xxinternalRetry with backoff. Send the requestId to support.