mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-23 15:25:14 +00:00
bbgo: move CsvConfig to bbgo package
This commit is contained in:
parent
4d84308b99
commit
dae140aacc
|
@ -12,7 +12,6 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/datasource/csvsource"
|
||||
"github.com/c9s/bbgo/pkg/datatype"
|
||||
"github.com/c9s/bbgo/pkg/dynamic"
|
||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||
|
@ -151,8 +150,8 @@ type Backtest struct {
|
|||
Sessions []string `json:"sessions" yaml:"sessions"`
|
||||
|
||||
// sync 1 second interval KLines
|
||||
SyncSecKLines bool `json:"syncSecKLines,omitempty" yaml:"syncSecKLines,omitempty"`
|
||||
CsvSource *csvsource.CsvConfig `json:"csvConfig,omitempty" yaml:"csvConfig,omitempty"`
|
||||
SyncSecKLines bool `json:"syncSecKLines,omitempty" yaml:"syncSecKLines,omitempty"`
|
||||
CsvSource *CsvSourceConfig `json:"csvConfig,omitempty" yaml:"csvConfig,omitempty"`
|
||||
}
|
||||
|
||||
func (b *Backtest) GetAccount(n string) BacktestAccount {
|
||||
|
@ -708,3 +707,8 @@ func reUnmarshal(conf interface{}, tpe interface{}) (interface{}, error) {
|
|||
|
||||
return val.Elem().Interface(), nil
|
||||
}
|
||||
|
||||
type CsvSourceConfig struct {
|
||||
Market types.MarketType `json:"market"`
|
||||
Granularity types.MarketDataType `json:"granularity"`
|
||||
}
|
||||
|
|
|
@ -5,11 +5,6 @@ import (
|
|||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
type CsvConfig struct {
|
||||
Market types.MarketType `json:"market"`
|
||||
Granularity types.MarketDataType `json:"granularity"`
|
||||
}
|
||||
|
||||
type CsvTick struct {
|
||||
Exchange types.ExchangeName `json:"exchange"`
|
||||
Market types.MarketType `json:"market"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user