fix: remove maker/buyer/taker/sellerCommission

This commit is contained in:
zenix 2022-03-07 14:20:49 +09:00
parent 25b5eddc03
commit 39572c5fe0
10 changed files with 10 additions and 29 deletions

View File

@ -53,8 +53,8 @@ backtest:
- BTCUSDT
account:
max:
makerCommission: 15
takerCommission: 15
makerFeeRate: 15
takerFeeRate: 15
balances:
BTC: 0.0
USDT: 10000.0

View File

@ -31,8 +31,8 @@ backtest:
- USDTTWD
account:
max:
makerCommission: 15
takerCommission: 15
makerFeeRate: 15
takerFeeRate: 15
balances:
BTC: 0.0
USDT: 10_000.0

View File

@ -46,10 +46,8 @@ backtest:
- BTCUSDT
account:
binance:
makerCommission: 15
takerCommission: 15
buyerCommission: 0
sellerCommission: 0
makerFeeRate: 15
takerFeeRate: 15
balances:
BTC: 0.1
USDT: 10000.0

View File

@ -47,8 +47,8 @@ backtest:
- LINKUSDT
account:
binance:
makerCommission: 15
takerCommission: 15
makerFeeRate: 15
takerFeeRate: 15
balances:
LINK: 0.0
USDT: 10000.0

View File

@ -109,10 +109,6 @@ type BacktestAccount struct {
MakerFeeRate fixedpoint.Value `json:"makerFeeRate"`
TakerFeeRate fixedpoint.Value `json:"takerFeeRate"`
MakerCommission fixedpoint.Value `json:"makerCommission"`
TakerCommission fixedpoint.Value `json:"takerCommission"`
BuyerCommission int `json:"buyerCommission"`
SellerCommission int `json:"sellerCommission"`
Balances BacktestAccountBalanceMap `json:"balances" yaml:"balances"`
}

View File

@ -15,10 +15,8 @@ backtest:
startTime: "2020-01-01"
account:
binance:
makerCommission: 15
takerCommission: 15
buyerCommission: 0
sellerCommission: 0
makerFeeRate: 15
takerFeeRate: 15
balances:
BTC: 1.0
USDT: 5000.0

View File

@ -457,8 +457,6 @@ func (e *Exchange) QuerySpotAccount(ctx context.Context) (*types.Account, error)
a := &types.Account{
AccountType: types.AccountTypeSpot,
MakerCommission: fixedpoint.NewFromFloat(float64(account.MakerCommission) * 0.0001),
TakerCommission: fixedpoint.NewFromFloat(float64(account.TakerCommission) * 0.0001),
CanDeposit: account.CanDeposit, // if can transfer in asset
CanTrade: account.CanTrade, // if can trade
CanWithdraw: account.CanWithdraw, // if can transfer out asset

View File

@ -177,8 +177,6 @@ func (e *Exchange) QueryAccount(ctx context.Context) (*types.Account, error) {
}
a := &types.Account{
MakerCommission: ftxAccount.MakerFee,
TakerCommission: ftxAccount.TakerFee,
TotalAccountValue: ftxAccount.TotalAccountValue,
}

View File

@ -340,9 +340,6 @@ func TestExchange_QueryAccount(t *testing.T) {
}
expected.Locked = expected.Locked.Sub(expected.Available)
assert.Equal(t, expected, b)
assert.Equal(t, fixedpoint.NewFromFloat(0.0002), resp.MakerCommission)
assert.Equal(t, fixedpoint.NewFromFloat(0.0005), resp.TakerCommission)
}
func TestExchange_QueryMarkets(t *testing.T) {

View File

@ -217,10 +217,6 @@ type Account struct {
MakerFeeRate fixedpoint.Value `json:"makerFeeRate,omitempty"`
TakerFeeRate fixedpoint.Value `json:"takerFeeRate,omitempty"`
// bps. 0.15% fee will be 15.
MakerCommission fixedpoint.Value `json:"makerCommission,omitempty"`
TakerCommission fixedpoint.Value `json:"takerCommission,omitempty"`
TotalAccountValue fixedpoint.Value `json:"totalAccountValue,omitempty"`
CanDeposit bool `json:"canDeposit"`