Initial commit

This commit is contained in:
jackyu66git
2026-05-03 16:54:36 +08:00
commit 719f0a061d
22 changed files with 2436 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
package exchange
import "time"
// WithPing returns a copy of pc with PingInterval set.
// Use this in each exchange's Run() before calling b.Conn.Run().
func WithPing(pc *PriceConnector, interval time.Duration) *PriceConnector {
pc.PingInterval = interval
return pc
}
// Standard ping intervals per exchange
const (
PingBitget = 25 * time.Second // Bitget requires ping within 30s
PingNormal = 45 * time.Second // General keepalive
)