Krexa Docs

Partner quick start

Put Krexa strategy testing, paper trading and chat inside your own product.

The Partner API lets your platform decode a trading idea, backtest it, and run it on paper for your users. Your users never need a Krexa account.

1. Get a key

Sign in at krexa.xyz/developers. Krexa staff add your org first. Then make a key.

KeyUse
kxp_test_…Build and test. 60 requests per minute.
kxp_live_…Production. 300 requests per minute.

You see the key one time. Keep it on your server. Never put it in a browser or a mobile app.

2. Make your first call

Every call sends two headers:

  • X-API-Key: kxp_… — your key.
  • Krexa-End-User: <id> — your own id for the person (1–128 characters of A-Z a-z 0-9 _ . : -). Krexa keeps each id's data apart. Do not send emails or names.
curl https://api.krexa.xyz/api/v1/partner/whoami \
  -H "X-API-Key: $KREXA_KEY" \
  -H "Krexa-End-User: user_123"

3. Use the SDK

npm install @krexa-xyz/sdk
import { KrexaPartner, isRefused } from '@krexa-xyz/sdk';

const krexa = new KrexaPartner({ apiKey: process.env.KREXA_KEY! });
const user = krexa.forUser('user_123');

const idea = await user.decode({ text: 'Buy BTC when RSI(14) < 30, sell when > 70' });
const result = await user.backtest({ decodeId: idea.id, capital: 10_000 });
if (isRefused(result)) console.log('Not testable:', result);
else console.log(result);

What you can build

StepEndpointScope
Decode an idea (text or URL)POST /decoderesearch
Quick backtestPOST /backtestresearch
Deep backtest on a venuePOST /deep-backtestresearch
AI research runPOST /researchresearch
Paper trade (no real money)POST /paperpaper
Chat (streams)POST /chat/streamchat
Event pushPOST /webhookswebhooks

All paths start with https://api.krexa.xyz/api/v1/partner. See Endpoints.

Live trading

Live keys can not trade real money by default. Krexa turns on live for an org only after a review. Even then, the end user approves each deploy on krexa.xyz.