From 0df26e05702e9a5deac4d9a43178de643117fb22 Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 8 Jun 2021 12:32:29 +0800 Subject: [PATCH] binance: adjust listen key keep alive to 20 minutes --- pkg/exchange/binance/stream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/exchange/binance/stream.go b/pkg/exchange/binance/stream.go index bd03f479b..bed6c3976 100644 --- a/pkg/exchange/binance/stream.go +++ b/pkg/exchange/binance/stream.go @@ -409,7 +409,7 @@ func (s *Stream) ping(ctx context.Context) { // Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. // It's recommended to send a ping about every 30 minutes. func (s *Stream) listenKeyKeepAlive(ctx context.Context, listenKey string) { - keepAliveTicker := time.NewTicker(1 * time.Minute) + keepAliveTicker := time.NewTicker(20 * time.Minute) defer keepAliveTicker.Stop() // if we exit, we should invalidate the existing listen key