mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
Merge pull request #158 from c9s/minor/ftx-configs
This commit is contained in:
commit
2c660b716a
|
@ -67,13 +67,19 @@ MAX_API_SECRET=
|
||||||
FTX_API_KEY=
|
FTX_API_KEY=
|
||||||
FTX_API_SECRET=
|
FTX_API_SECRET=
|
||||||
# specify it if credentials are for subaccount
|
# specify it if credentials are for subaccount
|
||||||
FTX_SUBACCOUNT_NAME=
|
FTX_SUBACCOUNT=
|
||||||
|
|
||||||
MYSQL_URL=root@tcp(127.0.0.1:3306)/bbgo?parseTime=true
|
MYSQL_URL=root@tcp(127.0.0.1:3306)/bbgo?parseTime=true
|
||||||
```
|
```
|
||||||
|
|
||||||
Prepare your dotenv file `.env.local` and BBGO yaml config file `bbgo.yaml`.
|
Prepare your dotenv file `.env.local` and BBGO yaml config file `bbgo.yaml`.
|
||||||
|
|
||||||
|
The minimal bbgo.yaml could be generated by:
|
||||||
|
```shell
|
||||||
|
mkdir config
|
||||||
|
(cd config && curl -o bbgo.yaml https://raw.githubusercontent.com/c9s/bbgo/main/config/minimal.yaml)
|
||||||
|
```
|
||||||
|
|
||||||
To sync your own trade data:
|
To sync your own trade data:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
)
|
)
|
||||||
|
|
||||||
var SupportedExchanges = []types.ExchangeName{"binance", "max"}
|
var SupportedExchanges = []types.ExchangeName{"binance", "max", "ftx"}
|
||||||
|
|
||||||
// SingleExchangeStrategy represents the single Exchange strategy
|
// SingleExchangeStrategy represents the single Exchange strategy
|
||||||
type SingleExchangeStrategy interface {
|
type SingleExchangeStrategy interface {
|
||||||
|
@ -131,7 +131,6 @@ func (trader *Trader) Configure(userConfig *Config) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// AttachStrategyOn attaches the single exchange strategy on an exchange Session.
|
// AttachStrategyOn attaches the single exchange strategy on an exchange Session.
|
||||||
// Single exchange strategy is the default behavior.
|
// Single exchange strategy is the default behavior.
|
||||||
func (trader *Trader) AttachStrategyOn(session string, strategies ...SingleExchangeStrategy) error {
|
func (trader *Trader) AttachStrategyOn(session string, strategies ...SingleExchangeStrategy) error {
|
||||||
|
|
|
@ -42,7 +42,6 @@ var balancesCmd = &cobra.Command{
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
environ := bbgo.NewEnvironment()
|
environ := bbgo.NewEnvironment()
|
||||||
if err := environ.ConfigureDatabase(ctx); err != nil {
|
if err := environ.ConfigureDatabase(ctx); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -71,4 +70,3 @@ var balancesCmd = &cobra.Command{
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user