tickerInfo id
This commit is contained in:
parent
041e79fff0
commit
db7fe10de5
@ -5,12 +5,14 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TickerInfo struct {
|
type TickerInfo struct {
|
||||||
Id string `json:"_id"`
|
Id string `json:"_id"`
|
||||||
InstID string `json:"instID"`
|
InstID string `json:"instID"`
|
||||||
Last float64 `json:"last"`
|
Last float64 `json:"last"`
|
||||||
|
LastUpdate time.Time `json:"lastUpdate"`
|
||||||
InstType string `json:"instType"`
|
InstType string `json:"instType"`
|
||||||
VolCcy24h float64 `json:"volCcy24h"`
|
VolCcy24h float64 `json:"volCcy24h"`
|
||||||
Ts int64 `json:"ts"`
|
Ts int64 `json:"ts"`
|
||||||
@ -32,6 +34,7 @@ func (tir *TickerInfoResp) Convert() TickerInfo {
|
|||||||
Last: ToFloat64(tir.Last),
|
Last: ToFloat64(tir.Last),
|
||||||
VolCcy24h: ToFloat64(tir.VolCcy24h),
|
VolCcy24h: ToFloat64(tir.VolCcy24h),
|
||||||
Ts: ToInt64(tir.Ts),
|
Ts: ToInt64(tir.Ts),
|
||||||
|
LastUpdate: time.Now(),
|
||||||
}
|
}
|
||||||
return ti
|
return ti
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user