From 890fb5327aa395b33f4df2483c8d92b4cb08e6b1 Mon Sep 17 00:00:00 2001 From: c9s Date: Thu, 30 Dec 2021 16:49:07 +0800 Subject: [PATCH] rename StreamRequest to WebSocketCommand --- pkg/exchange/binance/stream.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/exchange/binance/stream.go b/pkg/exchange/binance/stream.go index cfc5084f5..2515ccff5 100644 --- a/pkg/exchange/binance/stream.go +++ b/pkg/exchange/binance/stream.go @@ -10,7 +10,6 @@ import ( "time" "github.com/pkg/errors" - "github.com/sirupsen/logrus" "github.com/c9s/bbgo/pkg/depth" "github.com/c9s/bbgo/pkg/util" @@ -63,7 +62,7 @@ func init() { } } -type StreamRequest struct { +type WebSocketCommand struct { // request ID is required ID int `json:"id"` Method string `json:"method"` @@ -215,7 +214,7 @@ func NewStream(ex *Exchange, client *binance.Client, futuresClient *futures.Clie } log.Infof("subscribing channels: %+v", params) - err := stream.Conn.WriteJSON(StreamRequest{ + err := stream.Conn.WriteJSON(WebSocketCommand{ Method: "SUBSCRIBE", Params: params, ID: 1,