mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
fix: remove maker/buyer/taker/sellerCommission
This commit is contained in:
parent
25b5eddc03
commit
39572c5fe0
|
@ -53,8 +53,8 @@ backtest:
|
|||
- BTCUSDT
|
||||
account:
|
||||
max:
|
||||
makerCommission: 15
|
||||
takerCommission: 15
|
||||
makerFeeRate: 15
|
||||
takerFeeRate: 15
|
||||
balances:
|
||||
BTC: 0.0
|
||||
USDT: 10000.0
|
||||
|
|
|
@ -31,8 +31,8 @@ backtest:
|
|||
- USDTTWD
|
||||
account:
|
||||
max:
|
||||
makerCommission: 15
|
||||
takerCommission: 15
|
||||
makerFeeRate: 15
|
||||
takerFeeRate: 15
|
||||
balances:
|
||||
BTC: 0.0
|
||||
USDT: 10_000.0
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -47,8 +47,8 @@ backtest:
|
|||
- LINKUSDT
|
||||
account:
|
||||
binance:
|
||||
makerCommission: 15
|
||||
takerCommission: 15
|
||||
makerFeeRate: 15
|
||||
takerFeeRate: 15
|
||||
balances:
|
||||
LINK: 0.0
|
||||
USDT: 10000.0
|
||||
|
|
|
@ -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"`
|
||||
}
|
||||
|
||||
|
|
6
pkg/bbgo/testdata/backtest.yaml
vendored
6
pkg/bbgo/testdata/backtest.yaml
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user