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 {
|
type Candle struct {
|
||||||
Id string `json:"_id"`
|
Id string `json:"_id"`
|
||||||
core *Core
|
core *Core
|
||||||
InstID string
|
InstID string `json:"instId"`
|
||||||
Period string
|
Period string `json:"period"`
|
||||||
Data []interface{}
|
Data []interface{}
|
||||||
From string
|
From string `json:"from"`
|
||||||
Timestamp time.Time
|
Timestamp time.Time `json:""`
|
||||||
LastUpdate time.Time `json:"lastUpdate"`
|
LastUpdate time.Time `json:"lastUpdate"`
|
||||||
Open float64
|
Open float64 `json:"open"`
|
||||||
High float64
|
High float64 `json:"higth"`
|
||||||
Low float64
|
Low float64 `json:"low"`
|
||||||
Close float64
|
Close float64 `json:"close"`
|
||||||
VolCcy float64
|
VolCcy float64 `json:"volCcy"`
|
||||||
Confirm bool
|
Confirm bool `json:"confirm"`
|
||||||
}
|
}
|
||||||
type Sample interface {
|
type Sample interface {
|
||||||
SetToKey(cr *Core) ([]interface{}, error)
|
SetToKey(cr *Core) ([]interface{}, error)
|
||||||
|
2
maX.go
2
maX.go
@ -21,7 +21,7 @@ type MaX struct {
|
|||||||
Id string `json:"_id"`
|
Id string `json:"_id"`
|
||||||
InstID string `json:"instID"`
|
InstID string `json:"instID"`
|
||||||
Period string `json:"period"`
|
Period string `json:"period"`
|
||||||
Timestamp time.Time `json:"Timestamp"`
|
Timestamp time.Time `json:"timestamp"`
|
||||||
LastUpdate time.Time `json:"lastUpdate"`
|
LastUpdate time.Time `json:"lastUpdate"`
|
||||||
KeyName string `json:"keyName"`
|
KeyName string `json:"keyName"`
|
||||||
Data []interface{} `json:"data"`
|
Data []interface{} `json:"data"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user