{"name": "Tradebot Operations Dashboard API", "base_url": "http://127.0.0.1:8765", "purpose": "Lovable-ready API for viewing tradebot health, raw Discord toast audit, alerts, parsed signals, risk decisions, orders, positions, outcomes, logs, and safe parser previews.", "endpoints": [{"method": "GET", "path": "/api/status", "description": "Full dashboard payload: stats, health, settings, and recent activity."}, {"method": "GET", "path": "/api/activity", "description": "Recent raw_notifications, messages, signals, decisions, orders, positions, outcomes, and app events."}, {"method": "GET", "path": "/api/health", "description": "Bot health, gate status, Discord process probe, raw-toast/canary state, and webhook status."}, {"method": "GET", "path": "/api/spec", "description": "This frontend contract."}, {"method": "POST", "path": "/api/parse", "description": "Safe parser preview. Body: {text, author_id?, channel_id?}. Does not save, trade, or contact brokers."}, {"method": "POST", "path": "/api/ingest", "description": "Bridged alert ingest. Body: {text, author_id?, channel_id?, message_id?}. Runs parser, risk checks, broker adapter, and dashboard logging."}, {"method": "POST", "path": "/api/lovable", "description": "Lovable command bridge. Body: {message}. Commands: status, start bot, stop bot, recent logs, recent trades."}, {"method": "POST", "path": "/actions", "description": "Form actions: start_notifications, stop_notifications, kill_on, kill_off."}], "required_lovable_views": ["Bot health", "Alert/message feed", "Raw Discord toast audit", "Parsed signals", "Risk decisions and rejects", "Orders and fills", "Open positions", "Measured outcomes", "Runtime settings and gates", "App logs/events", "Safe parser tester"], "safety": ["Do not add live trading controls without explicit confirmation gates.", "Do not collect or display API keys, passwords, cookies, session tokens, or Discord user tokens.", "Parser preview must remain read-only.", "Kill switch controls may only create/remove the configured local kill-switch file."]}