add lastUpdate to candle and max
This commit is contained in:
parent
0cc94d2e5d
commit
2ec9627fe6
@ -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(),
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user