Files
2026-05-03 16:54:36 +08:00

17 lines
441 B
Go

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
)