fix: Bitget WS keepalive — send text ping, not WebSocket PingMessage

Bitget v2 WS requires a text message "ping" every 30s, not a WebSocket
PingMessage control frame (opcode 0x9). Using the wrong ping type caused
a silent failure: connection stays up and subscription succeeds, but NO
ticker data is pushed — zero errors, zero reconnection logs.

Changes:
- connector.go: Add TextPing bool flag, send text 'ping' when set
- bitget.go: Set TextPing=true, handle text 'pong', add debug logging
- scanner.go: Expand to 179 overlapping Bitget+HL coins
This commit is contained in:
jackyu66git
2026-05-04 00:33:03 +08:00
parent e04a165d69
commit 2ed6ffc747
5 changed files with 45246 additions and 22 deletions
+13 -5
View File
@@ -76,13 +76,21 @@ func main() {
sigCh := make(chan os.Signal, 1)
signal.Notify(sigCh, os.Interrupt, syscall.SIGUSR1)
// Collect symbols
// Collect symbols — skip exchanges the coin isn't listed on
var bnSymbols, bgSymbols, hlSymbols, dydxSymbols []string
for _, c := range TrackedCoins {
bnSymbols = append(bnSymbols, c.BN)
bgSymbols = append(bgSymbols, c.BG)
hlSymbols = append(hlSymbols, c.HL)
dydxSymbols = append(dydxSymbols, c.HL)
if c.BN != "" {
bnSymbols = append(bnSymbols, c.BN)
}
if c.BG != "" {
bgSymbols = append(bgSymbols, c.BG)
}
if c.HL != "" {
hlSymbols = append(hlSymbols, c.HL)
}
if c.HL != "" {
dydxSymbols = append(dydxSymbols, c.HL)
}
}
// Start all exchange WS connections