Paper Trading
name: paper-trading
by brs999 · published 2026-03-22
$ claw add gh:brs999/brs999-paper-trader---
name: paper-trading
description: Run a structured paper-trading loop with SQLite-backed event logging, position tracking, and PnL review. Use when opening/closing simulated trades, journaling thesis notes, checking portfolio status, or generating weekly performance summaries.
metadata:
{
"openclaw":
{
"emoji": "📓",
"requires": { "bins": ["node"] },
},
}
---
# Paper Trading
SQLite-backed paper trading with immutable event logs.
Asset identity:
When to Use
Use this skill when the user wants to:
Database
Default DB path:
~/.openclaw/paper-trading.dbOverride with `--db <path>`.
Commands
Use the script:
node --experimental-strip-types {baseDir}/scripts/paper_trading.ts --helpEnvironment notes:
1) Initialize account
node --experimental-strip-types {baseDir}/scripts/paper_trading.ts init \
--account main \
--name "Main Paper Account" \
--base-currency USD \
--starting-balance 100002) Log market snapshot (for unrealized PnL)
node --experimental-strip-types {baseDir}/scripts/paper_trading.ts snapshot \
--symbol BTC \
--mint 6p6xgHyF7AeE6TZk8x9mNQd2r2hH7r4mYJ8t6x6hYfSR \
--price 62000 \
--source dexscreener3) Open position
node --experimental-strip-types {baseDir}/scripts/paper_trading.ts open \
--account main \
--symbol BTC \
--mint 6p6xgHyF7AeE6TZk8x9mNQd2r2hH7r4mYJ8t6x6hYfSR \
--side LONG \
--qty 0.1 \
--price 62000 \
--fee 4 \
--stop-price 60500 \
--take-price 65000 \
--max-risk-pct 1.5 \
--note "Breakout + volume confirmation"4) Update stop/take
node --experimental-strip-types {baseDir}/scripts/paper_trading.ts set-levels \
--account main \
--symbol BTC \
--mint 6p6xgHyF7AeE6TZk8x9mNQd2r2hH7r4mYJ8t6x6hYfSR \
--side LONG \
--stop-price 61200 \
--take-price 66000 \
--note "Move stop to reduce downside"5) Close position
node --experimental-strip-types {baseDir}/scripts/paper_trading.ts close \
--account main \
--symbol BTC \
--mint 6p6xgHyF7AeE6TZk8x9mNQd2r2hH7r4mYJ8t6x6hYfSR \
--side LONG \
--qty 0.05 \
--price 63500 \
--fee 3 \
--note "Partial take profit"6) Journal note
node --experimental-strip-types {baseDir}/scripts/paper_trading.ts note \
--account main \
--symbol BTC \
--side LONG \
--note "Invalidation if daily close < 61k" \
--tags thesis risk macro7) Portfolio status
node --experimental-strip-types {baseDir}/scripts/paper_trading.ts status --account main
node --experimental-strip-types {baseDir}/scripts/paper_trading.ts status --account main --format json --pretty8) Weekly review
node --experimental-strip-types {baseDir}/scripts/paper_trading.ts review --account main
node --experimental-strip-types {baseDir}/scripts/paper_trading.ts review --account main --format json --prettyWorkflow
1. Keep snapshots updated for symbols with open positions, always with `--mint` and `--source dexscreener`.
2. Open trades only with explicit stop and risk cap (`--max-risk-pct`).
3. Log every change as an event, do not edit old events.
4. Run `status` after each trade and `review` at week end.
Notes
Validation
Run the full paper-trading test suite:
node --test {baseDir}/tests/paper_trading.test.mjsMore tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...