mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
add basic risk control to the xmaker config
This commit is contained in:
parent
bc620601f6
commit
e22a2caade
|
@ -41,16 +41,39 @@ persistence:
|
|||
sessions:
|
||||
max:
|
||||
exchange: max
|
||||
envVarPrefix: max
|
||||
envVarPrefix: MAX
|
||||
|
||||
binance:
|
||||
exchange: binance
|
||||
envVarPrefix: binance
|
||||
envVarPrefix: BINANCE
|
||||
|
||||
riskControls:
|
||||
# This is the session-based risk controller, which let you configure different risk controller by session.
|
||||
sessionBased:
|
||||
# "max" is the session name that you want to configure the risk control
|
||||
max:
|
||||
# orderExecutor is one of the risk control
|
||||
orderExecutor:
|
||||
# symbol-routed order executor
|
||||
bySymbol:
|
||||
BTCUSDT:
|
||||
# basic risk control order executor
|
||||
basic:
|
||||
# keep at least X USDT (keep cash)
|
||||
minQuoteBalance: 100.0
|
||||
|
||||
# maximum BTC balance (don't buy too much)
|
||||
maxBaseAssetBalance: 1.0
|
||||
|
||||
# minimum BTC balance (don't sell too much)
|
||||
minBaseAssetBalance: 0.01
|
||||
|
||||
maxOrderAmount: 1000.0
|
||||
|
||||
crossExchangeStrategies:
|
||||
|
||||
- mobydick:
|
||||
symbol: "BTCUSDT"
|
||||
symbol: BTCUSDT
|
||||
sourceExchange: binance
|
||||
makerExchange: max
|
||||
updateInterval: 1s
|
||||
|
|
|
@ -21,15 +21,6 @@ notifications:
|
|||
submitOrder: "$silent"
|
||||
pnL: "bbgo-pnl"
|
||||
|
||||
reportPnL:
|
||||
- averageCostBySymbols:
|
||||
- "BTCUSDT"
|
||||
- "BNBUSDT"
|
||||
of: binance
|
||||
when:
|
||||
- "@daily"
|
||||
- "@hourly"
|
||||
|
||||
persistence:
|
||||
json:
|
||||
directory: var/data
|
||||
|
@ -47,6 +38,29 @@ sessions:
|
|||
exchange: binance
|
||||
envVarPrefix: binance
|
||||
|
||||
riskControls:
|
||||
# This is the session-based risk controller, which let you configure different risk controller by session.
|
||||
sessionBased:
|
||||
# "max" is the session name that you want to configure the risk control
|
||||
max:
|
||||
# orderExecutor is one of the risk control
|
||||
orderExecutor:
|
||||
# symbol-routed order executor
|
||||
bySymbol:
|
||||
ETHUSDT:
|
||||
# basic risk control order executor
|
||||
basic:
|
||||
# keep at least X USDT (keep cash)
|
||||
minQuoteBalance: 100.0
|
||||
|
||||
# maximum ETH balance (don't buy too much)
|
||||
maxBaseAssetBalance: 10.0
|
||||
|
||||
# minimum ETH balance (don't sell too much)
|
||||
minBaseAssetBalance: 0.0
|
||||
|
||||
maxOrderAmount: 1000.0
|
||||
|
||||
crossExchangeStrategies:
|
||||
|
||||
- mobydick:
|
||||
|
|
Loading…
Reference in New Issue
Block a user