add lastUpdate to candle and max

This commit is contained in:
zhangkun9038@dingtalk.com 2024-12-18 12:56:03 +08:00
parent 9e9ff51894
commit b17c657863

View File

@ -181,10 +181,11 @@ func (core *Core) SaveCandle(instId string, period string, rsp *CandleData, dura
for _, v := range rsp.Data {
candle := Candle{
InstID: instId,
Period: period,
Data: v,
From: "rest",
InstID: instId,
Period: period,
Data: v,
From: "rest",
LastUpdate: time.Now(),
}
data := candle.Data
tsi, _ := strconv.ParseInt(data[0].(string), 10, 64)