feat: enhance trade tracking with fees, PnL, and refined logging (v1.7.3)
- Implement real-time fee and realized PnL tracking using get_executions. - Rename 'side' column to 'trade' in CSV log and dashboard (Enter/Exit labels). - Add automatic CSV header migration (side -> trade). - Enhance dashboard with session PnL (USD/BTC), total fees, and used leverage. - Improve signal detection with candle-internal crossover logic. - Add robust retry mechanism with failure window tracking. - Sync exchange leverage automatically based on direction. - Update config with robustness and mode-specific leverage settings.
This commit is contained in:
@ -36,10 +36,10 @@ uvicorn src.api.server:app --reload --host 0.0.0.0 --port 8000
|
||||
### Testing
|
||||
```bash
|
||||
# Test database connection
|
||||
python test_db.py
|
||||
python -c "from src.data_collector.database import get_db; print('Database connection test successful')"
|
||||
|
||||
# Run single test (no existing test framework found but for any future tests)
|
||||
python -m pytest <test_file>.py::test_<function_name> -v
|
||||
# Run single test (using pytest framework)
|
||||
python -m pytest tests/ -v -k "test_function_name"
|
||||
```
|
||||
|
||||
### Environment Setup
|
||||
@ -157,4 +157,4 @@ DB_PASSWORD=your_password
|
||||
- Only add dependencies to requirements.txt when necessary
|
||||
- Check for conflicts with existing dependencies
|
||||
- Keep dependency versions pinned to avoid breaking changes
|
||||
- Avoid adding heavyweight dependencies unless truly required
|
||||
- Avoid adding heavyweight dependencies unless truly required
|
||||
Reference in New Issue
Block a user