Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/theonetrade/ai-trading-mcp/llms.txt

Use this file to discover all available pages before exploring further.

Paper trading mode lets you run the complete AI trading rig against live Binance market data without touching real money. Candle feeds, order-book snapshots, TP/SL computation, engine validation, and the full audit trail all behave exactly as they do in live mode. The only thing that stays simulated is order execution — fills happen inside the engine, not on the exchange.

What Paper Mode Does

When you launch with --paper, the process starts one Live.background() instance per symbol in your whitelist. Each instance subscribes to real Binance OHLCV data and order-book snapshots via ccxt. The engine computes entry cost, take-profit, and stop-loss levels from real price feeds and validates every open_position and close_position call through the same chain it uses in live mode. The MCP bridge on 127.0.0.1:60051 is live, the dashboard on :60050 is live, and every get_status response is dumped to disk before it leaves the process. No Binance API keys are needed.

Prerequisites

  • Telegram session authorised — session.txt exists in content/manual.strategy/ (run npm start -- --session to create it)
  • Workspace packages built — npm run build completed without errors

Starting Paper Trading

1

Optionally set your symbol whitelist

The default whitelist is 13 pairs. To trade a different set, export CC_SYMBOL_LIST before starting:
export CC_SYMBOL_LIST="BTCUSDT,ETHUSDT,SOLUSDT"
Leave the variable unset to use the full default list: BTCUSDT, POLUSDT, ZECUSDT, HYPEUSDT, DOGEUSDT, SOLUSDT, PENGUUSDT, TRXUSDT, HBARUSDT, NEARUSDT, FARTCOINUSDT, ETHUSDT, PUMPUSDT
2

Launch the trading process

npm start -- --paper --entry ./content/manual.strategy/manual.strategy.ts --ui
This starts:
  • One Live.background() per whitelisted symbol, each pulling real candles from Binance via ccxt
  • The web dashboard on http://localhost:60050 (dump viewer included)
  • The MCP HTTP bridge on 127.0.0.1:60051, wired by config/setup.config.ts’s serve() call
3

Attach Claude Code

In a separate terminal, start the stdio MCP server and open Claude Code:
npm run start:claude
mcp.servers.json wires npx @backtest-kit/mcp as a stdio server so Claude Code can reach the bridge automatically.
4

Verify the connection

Ask Claude a basic portfolio question to confirm the feed and engine are both live:
which symbols are trading right now?
A healthy response lists all active symbols with current prices and a digest of the last 15 Telegram feed posts. If Claude reports a timeout, the Telegram session may need to be re-authorised.

What Paper Mode Does and Doesn’t Do

What it does

  • Fetches real OHLCV candles and order-book snapshots from Binance via ccxt
  • Computes TP/SL and entry cost from real prices, using the same engine logic as live mode
  • Validates every open_position and close_position call through the full engine chain
  • Persists signals, storage, notifications, and session state to dump/data/ across restarts
  • Dumps every get_status response to dump/mcp/<minute-stamp>.md before it leaves the process
  • Streams engine events to dump/report/*.jsonl

What it doesn't do

  • Send any order to Binance — fills are simulated inside the engine
  • Require BINANCE_API_KEY or BINANCE_API_SECRET to be set
  • Use modules/live.module.ts; the broker adapter is never loaded

The Dashboard

The web UI served on http://localhost:60050 includes a built-in dump viewer. Open it in any browser after starting the trading process. The viewer renders the markdown files from dump/mcp/ with images resolved relatively from dump/images/ — every get_status snapshot the model has seen is one click away. The dump viewer is particularly useful during paper sessions to verify what Claude saw before each trade decision, and to review the basis notes the agent attached to positions.
The default 13-symbol whitelist is defined in packages/main/src/config/params.ts and parsed from the CC_SYMBOL_LIST environment variable at startup. Adding or removing symbols takes effect on the next process restart. Symbols outside the whitelist cannot be traded regardless of what the feed says — the engine rejects them before the strategy layer is reached.
For details on customising the whitelist, see Symbol Whitelist.

Build docs developers (and LLMs) love