2 Star 7 Fork 10

王布衣/engine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
cache_trans.go 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
王布衣 提交于 2023-10-19 13:04 . 优化代码结构
package datasets
import (
"context"
"gitee.com/quant1x/engine/cache"
"gitee.com/quant1x/engine/datasets/base"
"gitee.com/quant1x/gotdx/quotes"
)
// TransactionRecord 成交记录
//
// 最短3秒内的合并统计数据, 与行情数据保持一致
// 不可以当作tick数据来使用
type TransactionRecord struct {
cache.DataSummary
Date string
Code string
}
func init() {
summary := mapDataSets[BaseTransaction]
_ = cache.Register(&TransactionRecord{DataSummary: summary})
}
func (r *TransactionRecord) Clone(date string, code string) DataSet {
summary := mapDataSets[BaseTransaction]
var dest = TransactionRecord{DataSummary: summary, Date: date, Code: code}
return &dest
}
func (r *TransactionRecord) GetDate() string {
return r.Date
}
func (r *TransactionRecord) GetSecurityCode() string {
return r.Code
}
func (r *TransactionRecord) Print(code string, date ...string) {
//TODO implement me
panic("implement me")
}
func (r *TransactionRecord) Init(ctx context.Context, date string) error {
_ = ctx
_ = date
return nil
}
func (r *TransactionRecord) Checkout(securityCode, date string) {
//TODO implement me
panic("implement me")
}
func (r *TransactionRecord) Check(cacheDate, featureDate string) error {
//TODO implement me
panic("implement me")
}
func (r *TransactionRecord) Filename(date, code string) string {
//TODO implement me
panic("implement me")
}
func (r *TransactionRecord) Update(date string) {
base.UpdateTickStartDate(date)
base.GetTickAll(r.GetSecurityCode())
}
func (r *TransactionRecord) Repair(date string) {
//base.GetTickAll(r.code)
base.GetTickData(r.GetSecurityCode(), date)
}
func (r *TransactionRecord) Increase(snapshot quotes.Snapshot) {
//TODO implement me
panic("implement me")
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quant1x/engine.git
git@gitee.com:quant1x/engine.git
quant1x
engine
engine
v0.5.9

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385