mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +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"
|
"github.com/pkg/errors"
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
|
|
||||||
"github.com/c9s/bbgo/pkg/datasource/csvsource"
|
|
||||||
"github.com/c9s/bbgo/pkg/datatype"
|
"github.com/c9s/bbgo/pkg/datatype"
|
||||||
"github.com/c9s/bbgo/pkg/dynamic"
|
"github.com/c9s/bbgo/pkg/dynamic"
|
||||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||||
|
@ -152,7 +151,7 @@ type Backtest struct {
|
||||||
|
|
||||||
// sync 1 second interval KLines
|
// sync 1 second interval KLines
|
||||||
SyncSecKLines bool `json:"syncSecKLines,omitempty" yaml:"syncSecKLines,omitempty"`
|
SyncSecKLines bool `json:"syncSecKLines,omitempty" yaml:"syncSecKLines,omitempty"`
|
||||||
CsvSource *csvsource.CsvConfig `json:"csvConfig,omitempty" yaml:"csvConfig,omitempty"`
|
CsvSource *CsvSourceConfig `json:"csvConfig,omitempty" yaml:"csvConfig,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *Backtest) GetAccount(n string) BacktestAccount {
|
func (b *Backtest) GetAccount(n string) BacktestAccount {
|
||||||
|
@ -708,3 +707,8 @@ func reUnmarshal(conf interface{}, tpe interface{}) (interface{}, error) {
|
||||||
|
|
||||||
return val.Elem().Interface(), nil
|
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"
|
"github.com/c9s/bbgo/pkg/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CsvConfig struct {
|
|
||||||
Market types.MarketType `json:"market"`
|
|
||||||
Granularity types.MarketDataType `json:"granularity"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type CsvTick struct {
|
type CsvTick struct {
|
||||||
Exchange types.ExchangeName `json:"exchange"`
|
Exchange types.ExchangeName `json:"exchange"`
|
||||||
Market types.MarketType `json:"market"`
|
Market types.MarketType `json:"market"`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user