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) {
|
func (core *Core) SaveCandle(instId string, period string, rsp *CandleData, dura time.Duration, withWs bool) {
|
||||||
leng := len(rsp.Data)
|
leng := len(rsp.Data)
|
||||||
for _, v := range rsp.Data {
|
for _, v := range rsp.Data {
|
||||||
|
tmi := ToInt64(v[0])
|
||||||
|
ts, _ := Int64ToTime(tmi)
|
||||||
candle := Candle{
|
candle := Candle{
|
||||||
InstID: instId,
|
InstID: instId,
|
||||||
Period: period,
|
Period: period,
|
||||||
Data: v,
|
Data: v,
|
||||||
From: "rest",
|
From: "rest",
|
||||||
|
Timestamp: ts,
|
||||||
LastUpdate: time.Now(),
|
LastUpdate: time.Now(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user