mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Added OKCoin Websocket kline handling.
This commit is contained in:
@@ -546,7 +546,13 @@ func (o *OKCoin) WebsocketClient(currencies []string) {
|
||||
}
|
||||
// to-do: convert from string array to trade struct
|
||||
case strings.Contains(channelStr, "kline"):
|
||||
// to-do
|
||||
klines := []interface{}{}
|
||||
err := JSONDecode(dataJSON, &klines)
|
||||
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
continue
|
||||
}
|
||||
case strings.Contains(channelStr, "spot") && strings.Contains(channelStr, "realtrades"):
|
||||
if string(dataJSON) == "null" {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user