mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-17 15:09:59 +00:00
added okex websocket types
This commit is contained in:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user