mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
rename StreamRequest to WebSocketCommand
This commit is contained in:
parent
35e0b1d146
commit
890fb5327a
|
@ -10,7 +10,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
|
|
||||||
"github.com/c9s/bbgo/pkg/depth"
|
"github.com/c9s/bbgo/pkg/depth"
|
||||||
"github.com/c9s/bbgo/pkg/util"
|
"github.com/c9s/bbgo/pkg/util"
|
||||||
|
@ -63,7 +62,7 @@ func init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type StreamRequest struct {
|
type WebSocketCommand struct {
|
||||||
// request ID is required
|
// request ID is required
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
Method string `json:"method"`
|
Method string `json:"method"`
|
||||||
|
@ -215,7 +214,7 @@ func NewStream(ex *Exchange, client *binance.Client, futuresClient *futures.Clie
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("subscribing channels: %+v", params)
|
log.Infof("subscribing channels: %+v", params)
|
||||||
err := stream.Conn.WriteJSON(StreamRequest{
|
err := stream.Conn.WriteJSON(WebSocketCommand{
|
||||||
Method: "SUBSCRIBE",
|
Method: "SUBSCRIBE",
|
||||||
Params: params,
|
Params: params,
|
||||||
ID: 1,
|
ID: 1,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user