mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-24 15:55:14 +00:00
doc: update sync configuration doc
This commit is contained in:
parent
08ae53ba16
commit
5732555c2c
|
@ -1,6 +1,7 @@
|
||||||
# Sync Private Trading Data
|
# Sync Private Trading Data
|
||||||
|
|
||||||
You can use the following configuration (add this to your bbgo.yaml) to sync your private trading data, like closed orders and trades:
|
You can use the following configuration (add this to your bbgo.yaml) to sync your private trading data, like closed
|
||||||
|
orders and trades:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
sync:
|
sync:
|
||||||
|
@ -12,6 +13,14 @@ sync:
|
||||||
- binance
|
- binance
|
||||||
- max
|
- max
|
||||||
|
|
||||||
|
# optional, if you want to insert the trades and orders from the websocket stream
|
||||||
|
# if you're running multiple bbgo instance, you should avoid setting this on
|
||||||
|
userDataStream:
|
||||||
|
# if you set this, all received trades will be written into the database
|
||||||
|
trades: true
|
||||||
|
# if you set this, all received filled orders will be written into the database
|
||||||
|
filledOrders: true
|
||||||
|
|
||||||
# symbols is the symbol you want to sync
|
# symbols is the symbol you want to sync
|
||||||
# If not defined, BBGO will try to guess your symbols by your existing account balances
|
# If not defined, BBGO will try to guess your symbols by your existing account balances
|
||||||
symbols:
|
symbols:
|
||||||
|
|
|
@ -476,6 +476,7 @@ func (environ *Environment) BindSync(userConfig *Config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, session := range environ.sessions {
|
for _, session := range environ.sessions {
|
||||||
|
// if trade sync is on, we will write all received trades
|
||||||
if userConfig.Sync.UserDataStream.Trades {
|
if userConfig.Sync.UserDataStream.Trades {
|
||||||
session.UserDataStream.OnTradeUpdate(tradeWriter)
|
session.UserDataStream.OnTradeUpdate(tradeWriter)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user