An LLM trading agent that reads the market as numbers and keeps memory of its closed trades.
Once per closed candle (4h on the public deployment) it sends the numeric indicator stack, the price action, the news context and its trade memory to a text model, then checks the answer with deterministic rules before a paper trade is booked. The chart is rendered for the dashboard and Discord only — the model never receives an image.
- trading
- simulated capital (paper)
- executor
- exchange testnet, no real funds
- tests
- 2,931, ~142 s full suite, ruff and pyright clean
- providers
- Command Code (live, deepseek/deepseek-v4.1-flash), OpenCode Go, DeepSeek, Google, OpenRouter, LM Studio
Numbers, not pictures
The model reads the indicator stack, the price action and the deterministic pattern list. A 16-cycle ablation on 2026-11-22 showed the chart image changed the signal no more than sending the same prompt twice, so the image was dropped from the request. Trend strength and pattern quality claims are still checked against computed values.
Memory of closed trades
Closed trades are embedded with BAAI/bge-base-en-v1.5 (768 dimensions) into ChromaDB. Before each decision the bot retrieves the three most similar past trades. Each closed trade gets a surprise ratio, and rules carry it, so a lucky outcome is annotated rather than treated as a rule.
Deterministic limits around the model
The model proposes a trade; the symbol guard, the position cap and stop/target validation are deterministic. When the model gives no size, a fallback from the config is used (1–3%, by confidence).
Reasoning and execution are separate processes
The engine emits one JSON decision; a second service places CCXT orders and writes a verdict journal the engine reads back, so the bot confirms what happened to its order instead of assuming it.
Development history
Built by one developer in the evenings. The repository holds 2,931 collected tests, an AGENTS.md per package under src/, and a separate executor service that runs against an exchange testnet.
Read the full history →Articles
One analysis cycle, step by step
Market data, indicators, the prompt, the model call and the checks that run after it.
Vector memory
How closed trades become embeddings the bot retrieves before a decision.
Paper → live: the executor
Why order placement is a separate service, and what is missing before real capital.
Sources
Every number on this page comes from a file in the repository:
chart 1920x1080 (humans) src/analyzer/pattern_engine/chart_generator.py
market data, 50 lvls src/analyzer/data_fetcher.py (limit=50)
trade memory 768D src/trading/vector_memory.py (BAAI/bge-base-en-v1.5)
risk limits, pre-entry src/trading/position_management.py
agent docs AGENTS.md + one per package under src/ (src/trading, src/analyzer, ...)
tests 2,931 python -m pytest tests -q -> 0 failures, ~142 sRisk disclaimer: experimental software, not financial advice. It trades simulated capital by default and has lost money on paper during development.Full disclaimer.