diff --git a/exchanges/okex/okex_types.go b/exchanges/okex/okex_types.go index 180eb7f0..403962d4 100644 --- a/exchanges/okex/okex_types.go +++ b/exchanges/okex/okex_types.go @@ -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"`