How voyzer10/claude-trading-bot works
This is a paper-trading bot with a Next.js dashboard and FastAPI APIs. The main workflow is dashboard controls and monitoring → the persistent runner scans enabled markets → strategies produce decisions → paper.py simulates trades and records state → the dashboard presents positions, performance, alerts, and operations. Research/backtests form a separate evaluation path. V6 adds a distinct paper-trading pipeline and read-only API. Several runner and API implementation details are unsampled, so links rely on README statements where noted; the V6 links use the supplied source index and excerpts.
Main entry points: live.py Market runner · index.py Dashboard API · Dashboard.tsx Dashboard · portfolio.py Book portfolio
Components 23
Dashboard
- Dashboard
components/Dashboard.tsx - Settings and controls
components/Settings.tsx - Dashboard API
api/index.py - Operations API
api/_ops.py - Charts and opinion
api/_chart.py
Trading runner
- Market runner
live.py - Market scanners
scan_nse.py - Market agents
auto_crypto.py - US agent tools
us/trader-scanner/scan.py - Paper trading
paper.py - Trade alerts
alerts.py
V6 paper system
- V6 read API
api_v6/app.py - V6 views
api_v6/views.py - Validated market data
scanner_v6/data/candle_models.py - Structure and liquidity
scanner_v6/structure/choch.py - Setup confirmation
scanner_v6/entry/confirmation.py - Paper execution
scanner_v6/exit/execution.py - Book portfolio
v6_runtime/portfolio.py - V6 ledger
v6_runtime/ledger.py
Research and backtests
- V6 backtest engine
v6_runtime/backtest/engine.py - Research backtests
research.py
Other components
- Trader
- Market data providers
Connections 25
- Trader → Dashboard: uses
README.md - Dashboard → Settings and controls: renders
components/Dashboard.tsx - Dashboard → Dashboard API: requests data
- Settings and controls → Dashboard API: sends controls
- Dashboard API → Operations API: routes operations
api/index.py - Dashboard API → Charts and opinion: routes charts
api/index.py - Operations API → Market runner: controls runner
README.md - Market runner → Market scanners: scans markets
README.md - Market runner → Market agents: runs agents
README.md - Market runner → Paper trading: simulates trades
README.md - Market runner → US agent tools: runs US tools
- Paper trading → Trade alerts: emits trade alerts
- Market data providers → Market scanners: supplies prices
- Trader → V6 read API: queries
api_v6/app.py - V6 read API → V6 views: dispatches reads
api_v6/app.py - V6 views → V6 ledger: reads ledger
api_v6/views.py - Validated market data → Structure and liquidity: provides candles
scanner_v6/structure/choch.py - Structure and liquidity → Setup confirmation: provides setup events
scanner_v6/entry/confirmation.py - Setup confirmation → Paper execution: provides confirmed setups
scanner_v6/exit/execution.py - Book portfolio → Paper execution: runs instrument streams
v6_runtime/portfolio.py - Book portfolio → V6 ledger: records book state
v6_runtime/portfolio.py - Market data providers → V6 backtest engine: supplies datasets
- V6 backtest engine → Book portfolio: simulates portfolio
v6_runtime/backtest/engine.py - Trader → Research backtests: evaluates strategies
README.md - Trader → V6 backtest engine: runs V6 backtests