04 / agents · trading / 2026
AI Trading Agent
LLMs trade crypto perps head to head. Each model gets a $1,000 book, reads the market every five minutes and acts through tool calls, with the same code running on paper, testnet and mainnet.
Role
Solo build
Stack
Python / FastAPI / SQLAlchemy / PostgreSQL / OpenRouter / Lighter SDK / React / Recharts / Tailwind
- modes: paper, testnet, live
3
modes: paper, testnet, live
- decision loop per model
5 min
decision loop per model
- unit tests
23
unit tests

Overview
Traduze puts LLMs in charge of a trading account and lets them compete. Each model you register gets its own $1,000 book and trades crypto perpetuals on Lighter, a zk-rollup perps exchange: SOL and HYPE at up to 10× leverage, ZEC at 5×. Every five minutes each model reads the market, reasons about it and acts through tool calls. A leaderboard ranks the models by PnL.
It's an experiment harness, not a claim about returns. The interesting engineering is the plumbing that lets the same agent run safely on paper, on testnet and with real money.
One decision, every five minutes
- Market snapshotLighter API
5-minute and 4-hour candles for every market
- Indicatorspython
Mid prices, EMA20 and MACD computed in-house; last 10 points per timeframe
- Prompt assemblycontext
Indicators, open positions, available cash, account value, invocation count
- Model callLLM
Any OpenRouter model, given exactly two tools
|| tool execution
createPositionsymbol · side · quantity
closeAllPositionflatten the whole book
- LogPostgres
Invocation, reasoning and every tool call stored for the dashboard
↺ A separate tracker snapshots every model's account value every 2 minutes for the chart and the leaderboard.
Paper, testnet, live
The agent never knows which world it's trading in. Execution sits behind a single TradingBackend interface, and a global mode switch picks the implementation:
| Mode | Execution | Money | Guardrail |
|---|---|---|---|
| Sandbox | Paper ledger with margin accounting, marked to the latest close | $1,000 simulated | Default on boot |
| Testnet | Real orders on Lighter testnet | Faucet funds | Per-model testnet keys |
| Live | Real orders on Lighter mainnet | Real | Confirm dialog + admin token |
Hard parts and decisions
- A paper ledger that behaves like an exchange. Opening a position reserves initial margin at the market's leverage and is rejected if cash can't cover it. Closing returns the margin plus realised PnL, and open positions are marked to the latest close. The model faces the same constraints in sandbox that it would live.
- Rules the model can't talk its way around. Tool schemas restrict symbols and sides to fixed enums. The prompt spells out the exchange rules (one position at a time, close-all only), and the backend enforces margin no matter what the model asks for.
- Fading the model. The executor currently inverts every call before it reaches the exchange: when the model goes long, the bot goes short. This tests whether model conviction works better as a contrarian signal, and it's one line to switch off.
- Fail closed. Switching modes and adding or editing models require an admin token, compared in constant time. With no token configured, those endpoints refuse to work at all. Exchange API keys are write-only: once saved, the UI only shows whether they're set.
- Bring any model. A model is just a row: an OpenRouter model slug plus optional exchange credentials. Adding a new challenger to the leaderboard is a form, not a deploy.
Where it stands
- Each invocation is a single model call whose tool calls run once. There's no multi-step re-prompting or reflection yet; that's the next iteration.
- There's no backtest yet. For now the leaderboard, in sandbox and live, is the evaluation.
- 23 unit tests cover the indicator maths, the paper-trading ledger, backend selection and leaderboard ranking.