feat: real trading mode, auto-stop after 5 trades, HL testnet support
- config.json: test_mode=false, ready for sim/testnet trading - trader.go: auto-stop after 5 real trades, exchange response logging, Stop()/Start() API, shuttingDown flag for graceful stop - dashboard.go: POST /api/stop + POST /api/start endpoints, trading status in SSE stats - exchange/hyperliquid.go: switch HL WS to testnet endpoint - exchange/hyperliquid_trade.go: switch REST to testnet endpoint, support base64 + 32-byte EVM private keys - main.go: listen on trader.StopCh (graceful, no process exit) - scanner.go: trim TrackedCoins to only 6 core coins (DOGE/LINK/ONDO/OP/WIF/ARB) - .gitignore: ignore main binary
This commit is contained in:
@@ -152,6 +152,10 @@ func main() {
|
||||
cancel() // B#1: cancel context to stop all WS goroutines
|
||||
runLoop = false
|
||||
|
||||
case <-trader.StopCh:
|
||||
log.Println("[Monitor] 5 real trades completed — trading stopped. System still running (dashboard active)")
|
||||
log.Println("[Monitor] Use POST /api/start to resume trading, POST /api/stop to stop manually")
|
||||
|
||||
case <-statusTick.C:
|
||||
snap := store.GetAll()
|
||||
count := 0
|
||||
|
||||
Reference in New Issue
Block a user