mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
fix: remove maker/buyer/taker/sellerCommission
This commit is contained in:
parent
25b5eddc03
commit
39572c5fe0
|
@ -53,8 +53,8 @@ backtest:
|
||||||
- BTCUSDT
|
- BTCUSDT
|
||||||
account:
|
account:
|
||||||
max:
|
max:
|
||||||
makerCommission: 15
|
makerFeeRate: 15
|
||||||
takerCommission: 15
|
takerFeeRate: 15
|
||||||
balances:
|
balances:
|
||||||
BTC: 0.0
|
BTC: 0.0
|
||||||
USDT: 10000.0
|
USDT: 10000.0
|
||||||
|
|
|
@ -31,8 +31,8 @@ backtest:
|
||||||
- USDTTWD
|
- USDTTWD
|
||||||
account:
|
account:
|
||||||
max:
|
max:
|
||||||
makerCommission: 15
|
makerFeeRate: 15
|
||||||
takerCommission: 15
|
takerFeeRate: 15
|
||||||
balances:
|
balances:
|
||||||
BTC: 0.0
|
BTC: 0.0
|
||||||
USDT: 10_000.0
|
USDT: 10_000.0
|
||||||
|
|
|
@ -46,10 +46,8 @@ backtest:
|
||||||
- BTCUSDT
|
- BTCUSDT
|
||||||
account:
|
account:
|
||||||
binance:
|
binance:
|
||||||
makerCommission: 15
|
makerFeeRate: 15
|
||||||
takerCommission: 15
|
takerFeeRate: 15
|
||||||
buyerCommission: 0
|
|
||||||
sellerCommission: 0
|
|
||||||
balances:
|
balances:
|
||||||
BTC: 0.1
|
BTC: 0.1
|
||||||
USDT: 10000.0
|
USDT: 10000.0
|
||||||
|
|
|
@ -47,8 +47,8 @@ backtest:
|
||||||
- LINKUSDT
|
- LINKUSDT
|
||||||
account:
|
account:
|
||||||
binance:
|
binance:
|
||||||
makerCommission: 15
|
makerFeeRate: 15
|
||||||
takerCommission: 15
|
takerFeeRate: 15
|
||||||
balances:
|
balances:
|
||||||
LINK: 0.0
|
LINK: 0.0
|
||||||
USDT: 10000.0
|
USDT: 10000.0
|
||||||
|
|
|
@ -109,10 +109,6 @@ type BacktestAccount struct {
|
||||||
MakerFeeRate fixedpoint.Value `json:"makerFeeRate"`
|
MakerFeeRate fixedpoint.Value `json:"makerFeeRate"`
|
||||||
TakerFeeRate fixedpoint.Value `json:"takerFeeRate"`
|
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"`
|
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"
|
startTime: "2020-01-01"
|
||||||
account:
|
account:
|
||||||
binance:
|
binance:
|
||||||
makerCommission: 15
|
makerFeeRate: 15
|
||||||
takerCommission: 15
|
takerFeeRate: 15
|
||||||
buyerCommission: 0
|
|
||||||
sellerCommission: 0
|
|
||||||
balances:
|
balances:
|
||||||
BTC: 1.0
|
BTC: 1.0
|
||||||
USDT: 5000.0
|
USDT: 5000.0
|
||||||
|
|
|
@ -457,8 +457,6 @@ func (e *Exchange) QuerySpotAccount(ctx context.Context) (*types.Account, error)
|
||||||
|
|
||||||
a := &types.Account{
|
a := &types.Account{
|
||||||
AccountType: types.AccountTypeSpot,
|
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
|
CanDeposit: account.CanDeposit, // if can transfer in asset
|
||||||
CanTrade: account.CanTrade, // if can trade
|
CanTrade: account.CanTrade, // if can trade
|
||||||
CanWithdraw: account.CanWithdraw, // if can transfer out asset
|
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{
|
a := &types.Account{
|
||||||
MakerCommission: ftxAccount.MakerFee,
|
|
||||||
TakerCommission: ftxAccount.TakerFee,
|
|
||||||
TotalAccountValue: ftxAccount.TotalAccountValue,
|
TotalAccountValue: ftxAccount.TotalAccountValue,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -340,9 +340,6 @@ func TestExchange_QueryAccount(t *testing.T) {
|
||||||
}
|
}
|
||||||
expected.Locked = expected.Locked.Sub(expected.Available)
|
expected.Locked = expected.Locked.Sub(expected.Available)
|
||||||
assert.Equal(t, expected, b)
|
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) {
|
func TestExchange_QueryMarkets(t *testing.T) {
|
||||||
|
|
|
@ -217,10 +217,6 @@ type Account struct {
|
||||||
MakerFeeRate fixedpoint.Value `json:"makerFeeRate,omitempty"`
|
MakerFeeRate fixedpoint.Value `json:"makerFeeRate,omitempty"`
|
||||||
TakerFeeRate fixedpoint.Value `json:"takerFeeRate,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"`
|
TotalAccountValue fixedpoint.Value `json:"totalAccountValue,omitempty"`
|
||||||
|
|
||||||
CanDeposit bool `json:"canDeposit"`
|
CanDeposit bool `json:"canDeposit"`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user