Explorar o código

Add trade lifecycle documentation to project structure

Carles Sentis hai 3 días
pai
achega
a949823c98
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      docs/project-structure.md

+ 8 - 0
docs/project-structure.md

@@ -51,6 +51,7 @@ trader_hyperliquid/
 │   ├── 🚀 setup.md            # Setup guide
 │   ├── 🏗️ project-structure.md # This file
 │   ├── 🚀 deployment.md       # Deployment guide
+│   ├── 📈 trade-lifecycle.md # NEW: Trade lifecycle explanation
 │   └── 🔧 system-integration.md # System integration
 ├── 📂 config/                  # Configuration files
 │   └── 📄 .env.example        # Environment template
@@ -361,6 +362,13 @@ The bot has been refactored from a monolithic 4,627-line file into a professiona
 ### **🏗️ docs/project-structure.md**
 **This file - complete project organization**
 
+### **📈 docs/trade-lifecycle.md**
+**NEW: Detailed explanation of trade lifecycle management**
+- How trade statuses (pending, open, filled, cancelled) are tracked
+- Database schema (`orders`, `trades` tables)
+- Interaction between `TradingEngine`, `TradingStats`, and `MarketMonitor`
+- Handling of stop losses, pending SLs, and external trades
+
 ### **🚀 docs/deployment.md**
 **Production deployment guide**
 - Server setup