Added OKCoin Websocket kline handling.

This commit is contained in:
Adrian Gallagher
2015-04-09 22:12:08 +10:00
parent f73484800c
commit 6065af0bc1

View File

@@ -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