You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
3.2 KiB

2 months ago
package structure
// SpotsKline
// @Description:
type SpotsKline struct {
Ch string `json:"ch"`
Status string `json:"status"`
Ts int64 `json:"ts"`
Data []struct {
ID int `json:"id"`
Open float64 `json:"open"`
Close float64 `json:"close"`
Low float64 `json:"low"`
High float64 `json:"high"`
Amount float64 `json:"amount"`
Vol float64 `json:"vol"`
Count int `json:"count"`
} `json:"data"`
}
// SpotsMerged
// @Description:
type SpotsMerged struct {
Ch string `json:"ch"`
Status string `json:"status"`
Ts int64 `json:"ts"`
Tick struct {
ID int64 `json:"id"`
Version int64 `json:"version"`
Open float64 `json:"open"`
Close float64 `json:"close"`
Low float64 `json:"low"`
High float64 `json:"high"`
Amount float64 `json:"amount"`
Vol float64 `json:"vol"`
Count int `json:"count"`
Bid []float64 `json:"bid"`
Ask []float64 `json:"ask"`
} `json:"tick"`
}
// SpotsTickers
// @Description:
type SpotsTickers struct {
Data []struct {
Symbol string `json:"symbol"`
Open float64 `json:"open"`
High float64 `json:"high"`
Low float64 `json:"low"`
Close float64 `json:"close"`
Amount float64 `json:"amount"`
Vol float64 `json:"vol"`
Count int `json:"count"`
Bid float64 `json:"bid"`
BidSize float64 `json:"bidSize"`
Ask float64 `json:"ask"`
AskSize float64 `json:"askSize"`
} `json:"data"`
Status string `json:"status"`
Ts int64 `json:"ts"`
}
// SpotsDepth
// @Description:
type SpotsDepth struct {
Ch string `json:"ch"`
Status string `json:"status"`
Ts int64 `json:"ts"`
Tick struct {
Ts int64 `json:"ts"`
Version int64 `json:"version"`
Bids [][]float64 `json:"bids"`
Asks [][]float64 `json:"asks"`
} `json:"tick"`
}
// SpotsTrade
// @Description:
type SpotsTrade struct {
Ch string `json:"ch"`
Status string `json:"status"`
Ts int64 `json:"ts"`
Tick struct {
ID int64 `json:"id"`
Ts int64 `json:"ts"`
Data []struct {
ID int64 `json:"id"`
Ts int64 `json:"ts"`
TradeID int64 `json:"trade_id"`
Amount float64 `json:"amount"`
Price float64 `json:"price"`
Direction string `json:"direction"`
} `json:"data"`
} `json:"tick"`
}
// SpotsHistoryTrade
// @Description:
type SpotsHistoryTrade struct {
Ch string `json:"ch"`
Status string `json:"status"`
Ts int64 `json:"ts"`
Data []struct {
ID int64 `json:"id"`
Ts int64 `json:"ts"`
Data []struct {
ID int64 `json:"id"`
Ts int64 `json:"ts"`
TradeID int64 `json:"trade_id"`
Amount float64 `json:"amount"`
Price float64 `json:"price"`
Direction string `json:"direction"`
} `json:"data"`
} `json:"data"`
}
// SpotsDetail
// @Description:
type SpotsDetail struct {
Ch string `json:"ch"`
Status string `json:"status"`
Ts int64 `json:"ts"`
Tick struct {
ID int64 `json:"id"`
Low float64 `json:"low"`
High float64 `json:"high"`
Open float64 `json:"open"`
Close float64 `json:"close"`
Vol float64 `json:"vol"`
Amount float64 `json:"amount"`
Version int64 `json:"version"`
Count int `json:"count"`
} `json:"tick"`
}