Multi-bot crypto trading with an AI that won't hallucinate prices.
Three simultaneous trading bots across BTC, SOL, and WTI. Evidence pre-gathered before every model call.
The core problem with AI-assisted trading is simple: language models don't know current prices. Most implementations ask the model to decide, then check reality. We reversed it — gather all evidence first, hand it to the model as structured context, never ask it to recall market data from parametric memory.
Evidence first. Decision second.
Three parallel trading bots operating on Hyperliquid DEX: BTC perpetuals, SOL perpetuals, and WTI oil CFDs. Each bot runs its own evidence-gathering and decision loop on independent schedules.
The AI model never makes a trade decision from memory. Before every model call, the bot pre-gathers live price data, order book depth, recent trade history, funding rates, and computed technical indicator values — then passes all of it as structured context. Price hallucination is architecturally impossible.
OpenRouter handles model routing — different model strategies can be tested per asset class without changing bot logic. Switching from one frontier model to another requires changing a single config value, not a code rewrite.
A chat interface lets the operator query live position state in natural language: "What's the current BTC position and why did we enter?" The answer is grounded in real-time position data — the assistant has no way to confabulate a trade that didn't happen.
What the bot gathers before every call.
Live mid price, best bid/ask, order book depth at 5 levels, 24h volume, and recent trade history — fetched from Hyperliquid's API immediately before each model call.
RSI, MACD, Bollinger Bands, ATR, EMA crossovers computed via pandas-ta on live OHLCV data. All indicator values are computed fresh and included as numeric context in the prompt.
Current position size, entry price, unrealized PnL, funding rate (hourly), and open order state — all included so the model reasons about actual exposure, not hypothetical positions.
Python FastAPI backend orchestrates bot loops, position tracking, Hyperliquid SDK order execution, and the chat API endpoint — all as separate async tasks within one process.
What it runs on.
Need AI-assisted trading logic
that can't hallucinate prices?
The evidence pre-gathering pattern works for any domain where accurate real-world data matters. Let's talk.
Start the conversation →