added okex websocket types

This commit is contained in:
Ermal Guni
2018-08-05 15:14:24 +02:00
parent f9849eae31
commit ff5c1eb62b

View File

@@ -1,5 +1,7 @@
package okex
import "encoding/json"
// ContractPrice holds date and ticker price price for contracts.
type ContractPrice struct {
Date string `json:"date"`
@@ -17,6 +19,33 @@ type ContractPrice struct {
Error interface{} `json:"error_code"`
}
type MultiStreamData struct {
Channel string `json:"channel"`
Data json.RawMessage `json:"data"`
}
type TickerStreamData struct {
Buy string `json:"buy"`
Change string `json:"change"`
High string `json:"high"`
Low string `json:"low"`
Last string `json:"last"`
Sell string `json:"sell"`
DayLow string `json:"dayLow"`
DayHigh string `json:"dayHigh"`
Timestamp float64 `json:"timestamp"`
Vol string `json:"vol"`
}
type DealsStreamData = [][]string
type KlineStreamData = [][]string
type DepthStreamData struct {
Asks [][]string `json:"asks"`
Bids [][]string `json:"bids"`
Timestamp float64 `json:"timestamp"`
}
// ContractDepth response depth
type ContractDepth struct {
Asks []interface{} `json:"asks"`