Overview
The LEXX Trading API gives your code the same powers as the LEXX Terminal: place and manage orders on connected exchanges, run and control trading bots, and monitor balances, positions and PnL — all through one consistent REST API plus a real-time WebSocket.
| REST base URL | https://api.lexx-trade.com/api/v2 |
| WebSocket | wss://api.lexx-trade.com/api/v2/ws |
| Authentication | Ed25519 request signatures — see Authentication |
| Format | JSON in / JSON out; every success is { data, meta } — see Conventions |
| Environments | Production only — there is currently no testnet/sandbox. Test with a read-tier key first, then trade with small amounts |
New here? The Quickstart takes you from zero to an authenticated call in about 10 minutes.
What you can do
| Area | Endpoints | What they give you |
|---|---|---|
| Server | GET /server/time · GET /server/status · GET /server/version · GET /ping |
Connectivity checks, clock sync for signing, service health. /server/* need no authentication; /ping does (it is an authenticated health check — live prod returns 401 without a signature) |
| Exchange | GET /exchange/supported · GET/POST /exchange/hedge-mode |
List available exchanges; read or toggle hedge mode on futures accounts |
| Orders | POST/GET /orders · DELETE /orders/{id} · POST /orders/{id}/split · GET /orders/trades |
7 order types (market, limit, stop, take-profit, …), open-orders cache, cancel, split a limit order into up to 50 price levels, fill history |
| Bots | POST/GET /bots · GET/PATCH/DELETE /bots/{id} · POST /bots/{id}/runs · DELETE /bots/{id}/runs/{runId} · POST …/message · batch endpoints |
Create, configure, start, stop and command trading bots — 7 strategy types, batch operations on up to 20 bots per request |
| Portfolio | GET /portfolio · GET /portfolio/positions (+/history) · leverage, margin-mode, margin-type · dust (+convert) |
Balances and totals, open and historical positions, leverage and margin configuration, dust conversion |
| Account | — | API keys are managed only in the LEXX Terminal UI; the Public API deliberately exposes no key management |
The seven bot strategies: FIBO (Fibonacci grid built for the “Aftershock” strategy), CHANNEL (channel trading: GRID / LEVELS / SCALE), SQUEEZE (squeeze/price-drop trading — buys a sharp drop, sells the bounce), INTRADAY (level bounce/breakout with laddered takes), ALGO (bracket / TP-SL / TWAP primitives), ALARM (price/RSI alerts), NOTIFY (market scanner — the API counterpart of the terminal’s “Monitoring” block). Each has a dedicated guide — start at Bots overview.
Supported exchanges
Three exchanges — Binance, OKX, Bybit — expose seven exchange accounts addressable via the exchange parameter:
binance-spot · binance-futures · okx-spot · okx-futures · okx-swap · bybit-spot ·
bybit-futures
Use GET /exchange/supported for the live list. Orders and bots work on every supported
exchange. Account-configuration features are exchange-specific:
| Feature | binance-spot | binance-futures | okx-* | bybit-* |
|---|---|---|---|---|
Dust (/portfolio/dust*) |
✓ | ✓ | ✓ | ✗ |
Margin mode (/portfolio/margin-mode) |
✗ | ✗ | ✓ | ✓ (portfolio vs regular) |
Hedge mode (/exchange/hedge-mode) |
✗ (spot) | ✓ | ✓ | ✓ |
Leverage brackets (/portfolio/leverage-brackets) |
✗ | ✓ | ✓ | ✓ |
⚠️ Calling a feature on an exchange that does not support it currently returns
500 INTERNAL_ERRORwith a descriptive message (the restriction is enforced inside the per-exchange provider), not a400. Treat the matrix above as the source of truth.
What the API deliberately does not do
Knowing the boundaries saves you a day of searching:
- No market data. There is no public orderbook, ticker or candle feed — neither REST nor WebSocket. Use the exchanges’ own public APIs for market data; the LEXX API is about your account.
- No per-fill stream. The WebSocket emits order lifecycle events (
ORDER_CREATE,ORDER_UPDATE), not individual fills. Fill history is REST:GET /orders/trades. - No key management endpoints. Keys are created, restricted and revoked only in the Terminal UI — so a leaked API key can never mint new keys.
Ground rules at a glance
- Authentication: three headers, Ed25519 signature over
timestamp + METHOD + path + body— Authentication. - Money is strings. All monetary values are string-encoded decimals; never parse them as floats — Conventions.
- Time is Unix milliseconds. Everywhere: parameters, responses, WebSocket.
- Rate limits are per-route sliding windows scaled by your subscription tier — read the
X-RateLimit-*headers and see Rate limits. - Retries are safe when you combine idempotency keys with fresh signatures — Idempotency.
- Errors always look the same:
{ error: { code, status, message }, meta }— Errors.
Version
This documentation describes API v2.0 (/api/v2 path; meta.version: "v2.0"). One legacy
quirk survives for compatibility: GET /ping responds in the v1 envelope — every other
endpoint uses the v2 { data, meta } shape.
Verified against API spec v2.0.0 · 2026-07-11