mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
rename StreamRequest to WebSocketCommand
This commit is contained in:
parent
35e0b1d146
commit
890fb5327a
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user