config.log_cycle
Log trading cycle metrics to track AI agent performance, including PnL, win rate, positions, and budget usage for dashboard analysis.
Instructions
Record an AI agent's trading cycle metrics to the database for dashboard tracking and performance analysis. Stores PnL, win rate, positions, budget usage, and notes. Call this after each automated trading cycle.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_name | Yes | Name of the AI agent logging this cycle | |
| strategy | Yes | Trading strategy used in this cycle (e.g. 'copy_top_traders', 'stink_bids') | |
| status | No | Cycle outcome: ok=normal, warning=minor issue, risk_alert=needs attention, error=failed | ok |
| positions_open | No | Number of currently open positions | |
| positions_closed | No | Number of positions closed this cycle | |
| realized_pnl | No | Realized profit/loss in USDC from closed positions | |
| unrealized_pnl | No | Unrealized profit/loss in USDC from open positions | |
| win_rate | No | Win rate as a decimal (0.0-1.0) | |
| budget_used | No | Amount of daily budget spent in USDC | |
| budget_limit | No | Total daily budget limit in USDC | |
| actions_taken | No | Comma-separated list of actions taken (e.g. 'bought YES on Bitcoin market') | |
| notes | No | Free-text notes about this cycle |