add lastUpdate to candle and max

This commit is contained in:
zhangkun9038@dingtalk.com 2024-12-18 15:19:18 +08:00
parent e204315e22
commit 8528cc60d6

View File

@ -459,6 +459,9 @@ func (cl *Candle) SetToKey(core *Core) ([]interface{}, error) {
//过期时间:根号(当前candle的周期/1分钟)*10000
cl.LastUpdate = time.Now()
dt, err := json.Marshal(cl)
if err != nil {
fmt.Println("candle Save to String err:", err)
}
fmt.Println("candle Save to String: ", string(dt))
exp, err := core.PeriodToMinutes(cl.Period)
if err != nil {