tickerInfo id

This commit is contained in:
zhangkun9038@dingtalk.com 2024-12-23 15:15:37 +08:00
parent 041e79fff0
commit db7fe10de5

View File

@ -5,12 +5,14 @@ import (
"fmt"
"reflect"
"strconv"
"time"
)
type TickerInfo struct {
Id string `json:"_id"`
InstID string `json:"instID"`
Last float64 `json:"last"`
LastUpdate time.Time `json:"lastUpdate"`
InstType string `json:"instType"`
VolCcy24h float64 `json:"volCcy24h"`
Ts int64 `json:"ts"`
@ -32,6 +34,7 @@ func (tir *TickerInfoResp) Convert() TickerInfo {
Last: ToFloat64(tir.Last),
VolCcy24h: ToFloat64(tir.VolCcy24h),
Ts: ToInt64(tir.Ts),
LastUpdate: time.Now(),
}
return ti
}