运行时依赖
版本
Configuration
安装命令
点击复制技能文档
Prediction Trade Journal
追踪 every trade, learn from outcomes, improve your edge.
When to Use This 技能
Use this 技能 when the user wants to:
See their trade 历史 追踪 win rate and P&L 生成 trading 报告s Analyze which strategies work best 设置up Flow
When user asks to 安装 or 配置 this 技能:
安装 the Simmer SDK
pip 安装 simmer-sdk
Ask for Simmer API key
They can 获取 it from simmer.markets/仪表盘 → SDK tab Store in 环境 as SIMMER_API_KEY Quick Commands # 同步 trades from API python tradejournal.py --同步
# Show recent trades python tradejournal.py --历史 10
# 生成 weekly 报告 python tradejournal.py --报告 weekly
# 导出 to CSV python tradejournal.py --导出 trades.csv
API Reference:
Base URL: https://API.simmer.markets Auth: Authorization: Bearer $SIMMER_API_KEY Trades: 获取 /API/sdk/trades How It Works 同步 - Polls /API/sdk/trades to fetch trade 历史 Store - Saves trades locally with outcome 追踪ing 追踪 - 更新s outcomes when markets resolve 报告 - 生成s win rate, P&L, and calibration analysis 命令行工具 Reference Command Description --同步 Fetch new trades from API --历史 N Show last N trades (default: 10) --同步-outcomes 更新 resolved markets --报告 dAIly/weekly/monthly 生成 summary 报告 --config Show configuration --导出 FILE.csv 导出 to CSV --dry-运行 Preview without making changes Configuration 设置ting 环境 Variable Default API Key SIMMER_API_KEY (required) Storage
Trades are stored locally in data/trades.json:
{ "trades": [{ "id": "uuid", "market_question": "Will X h应用en?", "side": "yes", "分享s": 10.5, "cost": 6.83, "outcome": { "resolved": false, "winning_side": null, "pnl_usd": null } }], "metadata": { "last_同步": "2025-01-29T...", "total_trades": 50 } }
技能 Integration
Other 技能s can enrich trades with 上下文:
from tradejournal 导入 记录_trade
# After executing a trade 记录_trade( trade_id=结果['trade_id'], source="copytrading", thesis="Mirroring whale 0x123...", confidence=0.70 )
This 添加s thesis, confidence, and source to the trade record for better analysis.
Example 报告 📓 Weekly 报告 ======================================== Period: Last 7 days Trades: 15 Total cost: $125.50 Resolved: 8 / 15 Win rate: 62.5% P&L: +$18.30
By side: 10 YES, 5 NO
Troubleshooting
"SIMMER_API_KEY 环境 variable not 设置"
设置 your API key: 导出 SIMMER_API_KEY=sk_live_...
"No trades recorded yet"
运行 python tradejournal.py --同步 to fetch trades from API
Trades not showing outcomes
运行 python tradejournal.py --同步-outcomes to 更新 resolved markets