From b17c657863ee1a987fdc2b83fcb03c4fcf411e32 Mon Sep 17 00:00:00 2001 From: "zhangkun9038@dingtalk.com" Date: Wed, 18 Dec 2024 12:56:03 +0800 Subject: [PATCH] add lastUpdate to candle and max --- candle.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/candle.go b/candle.go index a5bfdb5..792764f 100644 --- a/candle.go +++ b/candle.go @@ -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)