candle 和 max里的字段在json序列化时统一了字段名子
This commit is contained in:
parent
921349c1bc
commit
2e862caeaa
20
candle.go
20
candle.go
@ -21,18 +21,18 @@ import (
|
||||
type Candle struct {
|
||||
Id string `json:"_id"`
|
||||
core *Core
|
||||
InstID string
|
||||
Period string
|
||||
InstID string `json:"instId"`
|
||||
Period string `json:"period"`
|
||||
Data []interface{}
|
||||
From string
|
||||
Timestamp time.Time
|
||||
From string `json:"from"`
|
||||
Timestamp time.Time `json:""`
|
||||
LastUpdate time.Time `json:"lastUpdate"`
|
||||
Open float64
|
||||
High float64
|
||||
Low float64
|
||||
Close float64
|
||||
VolCcy float64
|
||||
Confirm bool
|
||||
Open float64 `json:"open"`
|
||||
High float64 `json:"higth"`
|
||||
Low float64 `json:"low"`
|
||||
Close float64 `json:"close"`
|
||||
VolCcy float64 `json:"volCcy"`
|
||||
Confirm bool `json:"confirm"`
|
||||
}
|
||||
type Sample interface {
|
||||
SetToKey(cr *Core) ([]interface{}, error)
|
||||
|
2
maX.go
2
maX.go
@ -21,7 +21,7 @@ type MaX struct {
|
||||
Id string `json:"_id"`
|
||||
InstID string `json:"instID"`
|
||||
Period string `json:"period"`
|
||||
Timestamp time.Time `json:"Timestamp"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
LastUpdate time.Time `json:"lastUpdate"`
|
||||
KeyName string `json:"keyName"`
|
||||
Data []interface{} `json:"data"`
|
||||
|
Loading…
x
Reference in New Issue
Block a user