add lastUpdate to candle and max

This commit is contained in:
zhangkun9038@dingtalk.com 2024-12-18 15:46:40 +08:00
parent ae1554a7b5
commit df06658a2d

5
maX.go
View File

@ -49,7 +49,10 @@ func (mx MaX) SetToKey(cr *Core) ([]interface{}, error) {
} }
keyName := "ma" + cstr + "|candle" + mx.Period + "|" + mx.InstID + "|ts:" + tss keyName := "ma" + cstr + "|candle" + mx.Period + "|" + mx.InstID + "|ts:" + tss
//过期时间:根号(当前candle的周期/1分钟)*10000 //过期时间:根号(当前candle的周期/1分钟)*10000
dj, _ := json.Marshal(mx) dj, err := json.Marshal(mx)
if err != nil {
fmt.Println("maX SetToKey json marshal err: ", err)
}
extt, err := cr.GetExpiration(mx.Period) extt, err := cr.GetExpiration(mx.Period)
if err != nil { if err != nil {
fmt.Println("max SetToKey err: ", err) fmt.Println("max SetToKey err: ", err)