add lastUpdate to candle and max

This commit is contained in:
zhangkun9038@dingtalk.com 2024-12-18 12:25:43 +08:00
parent 06a3db9d19
commit 9e9ff51894
2 changed files with 24 additions and 22 deletions

View File

@ -19,19 +19,20 @@ import (
)
type Candle struct {
Id string `json:"_id"`
core *Core
InstID string
Period string
Data []interface{}
From string
Timestamp time.Time
Open float64
High float64
Low float64
Close float64
VolCcy float64
Confirm bool
Id string `json:"_id"`
core *Core
InstID string
Period string
Data []interface{}
From string
Timestamp time.Time
LastUpdate time.Time `json:"lastUpdate"`
Open float64
High float64
Low float64
Close float64
VolCcy float64
Confirm bool
}
type Sample interface {
SetToKey(cr *Core) ([]interface{}, error)

19
maX.go
View File

@ -18,15 +18,16 @@ type MaXList struct {
}
type MaX struct {
InstID string `json:"instID"`
Period string `json:"period"`
Timestamp time.Time `json:"timestamp"`
KeyName string `json:"keyName"`
Data []interface{} `json:"data"`
Count int `json:"count,number"`
Ts int64 `json:"ts,number"`
AvgVal float64 `json:"avgVal,number"`
From string `json:"from,string"`
InstID string `json:"instID"`
Period string `json:"period"`
Timestamp time.Time `json:"timestamp"`
LastUpdate time.Time `json:"lastUpdate"`
KeyName string `json:"keyName"`
Data []interface{} `json:"data"`
Count int `json:"count,number"`
Ts int64 `json:"ts,number"`
AvgVal float64 `json:"avgVal,number"`
From string `json:"from,string"`
}
type WillMX struct {