mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-17 01:14:40 +08:00
feat: add multi-exchange order sync and position tracking
- Add order sync implementations for Hyperliquid, Bybit, OKX, Bitget, Aster - Add position snapshot functionality for exchange position reset - Update TraderOrder and TraderFill structures with exchange_type field - Add exchange sync tests - Update frontend charts components - Remove deprecated position_sync.go
This commit is contained in:
6
main.go
6
main.go
@@ -11,7 +11,6 @@ import (
|
||||
"nofx/manager"
|
||||
"nofx/mcp"
|
||||
"nofx/store"
|
||||
"nofx/trader"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
@@ -115,11 +114,6 @@ func main() {
|
||||
logger.Warnf("⚠️ Failed to restore backtest history: %v", err)
|
||||
}
|
||||
|
||||
// Start position sync manager (detects manual closures, TP/SL triggers)
|
||||
positionSyncManager := trader.NewPositionSyncManager(st, 0) // 0 = use default 10s interval
|
||||
positionSyncManager.Start()
|
||||
defer positionSyncManager.Stop()
|
||||
|
||||
// Load all traders from database to memory (may auto-start traders with IsRunning=true)
|
||||
if err := traderManager.LoadTradersFromStore(st); err != nil {
|
||||
logger.Fatalf("❌ Failed to load traders: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user