Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteTableMapCache ¶
func DeleteTableMapCache()
func InitDbEngine ¶
Types ¶
type Kline ¶
type Kline struct { Id int64 `xorm:"autoincr pk" json:"-"` OpenAt time.Time `xorm:"notnull timestamp unique(open_at)" json:"open_at"` //开盘时间 Open string `xorm:"decimal(40, 20) notnull" json:"open"` //开盘价 High string `xorm:"decimal(40, 20) notnull" json:"high"` // 最高价 Low string `xorm:"decimal(40, 20) notnull" json:"low"` //最低价 Close string `xorm:"decimal(40, 20) notnull" json:"close"` //收盘价(当前K线未结束的即为最新价) Volume string `xorm:"decimal(40, 20) notnull" json:"volume"` //成交量 CloseAt time.Time `xorm:"timestamp notnull default CURRENT_TIMESTAMP" json:"close_at"` // 收盘时间 Amount string `xorm:"decimal(40, 20) notnull" json:"amount"` //成交额 TradeCnt int64 `json:"trade_count"` //成交笔数 CreateTime time.Time `xorm:"timestamp created" json:"-"` UpdateTime time.Time `xorm:"timestamp updated" json:"-"` // contains filtered or unexported fields }
type Period ¶
type Period string
const ( PERIOD_M1 Period = "m1" PERIOD_M3 Period = "m3" PERIOD_M5 Period = "m5" PERIOD_M15 Period = "m15" PERIOD_M30 Period = "m30" PERIOD_H1 Period = "h1" PERIOD_H2 Period = "h2" PERIOD_H4 Period = "h4" PERIOD_H6 Period = "h6" PERIOD_H8 Period = "h8" PERIOD_H12 Period = "h12" PERIOD_D1 Period = "d1" PERIOD_D3 Period = "d3" PERIOD_W1 Period = "w1" PERIOD_MN Period = "mn" )
type TradeLog ¶
type TradeLog struct { Id int64 `xorm:"autoincr pk"` Symbol string `xorm:"-"` At time.Time `xorm:"notnull"` Price string `xorm:"decimal(40, 20) notnull"` Quantity string `xorm:"decimal(40, 20) notnull"` Amount string `xorm:"decimal(40, 20) notnull"` AskId string `xorm:"varchar(64) notnull unique(ask_bid)"` BidId string `xorm:"varchar(64) notnull unique(ask_bid)"` // contains filtered or unexported fields }
func PushTradeLog ¶
func (*TradeLog) SetTableName ¶
Click to show internal directories.
Click to hide internal directories.