bbgo_origin/pkg/exchange/kucoin/kucoinapi/websocket.go
2021-12-23 02:50:56 +08:00

17 lines
420 B
Go

package kucoinapi
import "encoding/json"
type WebSocketCommand struct {
Id int64 `json:"id"`
Type string `json:"type"`
Topic string `json:"topic"`
PrivateChannel bool `json:"privateChannel"`
Response bool `json:"response"`
}
func (c *WebSocketCommand) JSON() ([]byte, error) {
type tt WebSocketCommand
var a = (*tt)(c)
return json.Marshal(a)
}