Core Features
Paper Trading
Use a $10,000 virtual ledger to record simulated positions. Opens and closes require positive observed prices; missing prices stay unavailable instead of being estimated. Paper results are not broker fills, live execution, or customer portfolio returns.
How It Works
Open simulated positions
The signed-in UI supplies the latest available provider price; the API requires an explicit observed entryPrice.
Mark from provider prices
Open P&L and SL/TP checks run only for symbols with an available provider price. Missing symbols are not estimated.
Review the paper ledger
Metrics are calculated from closed simulated trades and their supplied entry/exit observations.
Opening a Position
Use the order form on the /paper-trading page, or call the API directly:
curl -X POST http://localhost:3000/api/paper-trading/open \
-H "Content-Type: application/json" \
-d '{
"symbol": "XAUUSD",
"direction": "BUY",
"quantity": 500,
"entryPrice": 2315.40,
"stopLoss": 2280.00,
"takeProfit": 2350.00
}'{
"position": {
"id": "pos_abc123",
"symbol": "XAUUSD",
"direction": "BUY",
"quantity": 500,
"entryPrice": 2315.40,
"stopLoss": 2280.00,
"takeProfit": 2350.00,
"openedAt": "2026-07-15T10:00:00.000Z"
},
"balance": 10000
}Follow One Signal Candidate
The follow endpoint records one explicitly supplied signal candidate in the virtual ledger. It requires the candidate's observed entry and rule-derived TP/SL fields; it does not subscribe the server to every future signal.
curl -X POST http://localhost:3000/api/paper-trading/follow-signal \
-H "Content-Type: application/json" \
-d '{
"id": "XAUUSD-H1-BUY",
"symbol": "XAUUSD",
"direction": "BUY",
"entry": 2315.40,
"stopLoss": 2280.00,
"takeProfit": 2350.00,
"positionSizePct": 0.05
}'Note: The page can follow candidates currently loaded in its signal panel. That browser action is not a durable server-side subscription.
Closing Positions
Close a single position
curl -X POST http://localhost:3000/api/paper-trading/close \
-H "Content-Type: application/json" \
-d '{ "positionId": "pt_abc123", "exitPrice": 2328.10 }'Close all positions
curl -X POST http://localhost:3000/api/paper-trading/close-all -H "Content-Type: application/json" -d '{ "prices": { "XAUUSD": 2328.10, "BTCUSD": 70000 } }'Reset portfolio
# Resets balance to $10,000 and clears all history
curl -X POST http://localhost:3000/api/paper-trading/resetPerformance Metrics
The stats endpoint returns metrics calculated from the signed-in user's closed paper trades:
curl http://localhost:3000/api/paper-trading/statsWin Rate
Percentage of profitable closed trades
Sharpe Ratio
Risk-adjusted return (annualized)
Max Drawdown
Largest peak-to-trough decline
Profit Factor
Gross profit / gross loss ratio
Total Return
Portfolio gain/loss from $10,000
Avg Win
Average profit on winning trades
Avg Loss
Average loss on losing trades
Open Positions
Currently active trades
Data Storage
Paper trading data is stored in PostgreSQL tables scoped to the signed-in user. The ledger includes the virtual balance, open simulated positions, observed entry/exit prices, and closed trade history. API requests require a valid TradeClaw session.
API Reference
/api/paper-trading/api/paper-trading/open/api/paper-trading/close/api/paper-trading/close-all/api/paper-trading/reset/api/paper-trading/follow-signal/api/paper-trading/stats