bbgo_origin/pkg/exchange/kucoin/kucoinapi/websocket.go

17 lines
420 B
Go
Raw Normal View History

2021-12-22 16:30:17 +00:00
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)
}