exchange: adjust tests for order fee-amount protection

This commit is contained in:
Raphanus Lo 2022-08-02 15:12:14 +08:00
parent 76489873ee
commit d76245cb43
2 changed files with 25 additions and 8 deletions

View File

@ -82,16 +82,25 @@ func TestLoadConfig(t *testing.T) {
assert.Equal(t, map[string]interface{}{
"sessions": map[string]interface{}{
"max": map[string]interface{}{
"exchange": "max",
"envVarPrefix": "MAX",
"takerFeeRate": 0.,
"makerFeeRate": 0.,
"exchange": "max",
"envVarPrefix": "MAX",
"takerFeeRate": 0.,
"makerFeeRate": 0.,
"modifyOrderAmountForFee": false,
},
"binance": map[string]interface{}{
"exchange": "binance",
"envVarPrefix": "BINANCE",
"takerFeeRate": 0.,
"makerFeeRate": 0.,
"exchange": "binance",
"envVarPrefix": "BINANCE",
"takerFeeRate": 0.,
"makerFeeRate": 0.,
"modifyOrderAmountForFee": false,
},
"ftx": map[string]interface{}{
"exchange": "ftx",
"envVarPrefix": "FTX",
"takerFeeRate": 0.,
"makerFeeRate": 0.,
"modifyOrderAmountForFee": true,
},
},
"build": map[string]interface{}{

View File

@ -5,11 +5,19 @@ sessions:
envVarPrefix: MAX
takerFeeRate: 0
makerFeeRate: 0
modifyOrderAmountForFee: false
binance:
exchange: binance
envVarPrefix: BINANCE
takerFeeRate: 0
makerFeeRate: 0
modifyOrderAmountForFee: false
ftx:
exchange: ftx
envVarPrefix: FTX
takerFeeRate: 0
makerFeeRate: 0
modifyOrderAmountForFee: true
exchangeStrategies:
- on: ["binance"]