From 2ec9627fe6d39abbb1a5a564fef3e3f1b8ffe23e Mon Sep 17 00:00:00 2001 From: "zhangkun9038@dingtalk.com" Date: Wed, 18 Dec 2024 16:40:18 +0800 Subject: [PATCH] add lastUpdate to candle and max --- candle.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/candle.go b/candle.go index 954de99..9d70191 100644 --- a/candle.go +++ b/candle.go @@ -179,12 +179,14 @@ func IsModOf(curInt int64, duration time.Duration) bool { func (core *Core) SaveCandle(instId string, period string, rsp *CandleData, dura time.Duration, withWs bool) { leng := len(rsp.Data) for _, v := range rsp.Data { - + tmi := ToInt64(v[0]) + ts, _ := Int64ToTime(tmi) candle := Candle{ InstID: instId, Period: period, Data: v, From: "rest", + Timestamp: ts, LastUpdate: time.Now(), }