Initial commit
This commit is contained in:
@@ -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
|
||||
)
|
||||
Reference in New Issue
Block a user