mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 00:05:15 +00:00
backtest: fix tests for fee
This commit is contained in:
parent
db622fbb55
commit
3a225fe7c7
|
@ -249,7 +249,8 @@ func TestSimplePriceMatching_LimitBuyTakerOrder(t *testing.T) {
|
|||
assert.Equal(t, fixedpoint.NewFromFloat(100.0).Add(createdOrder.Quantity).String(), btc.Available.String())
|
||||
|
||||
usedQuoteAmount := createdOrder.AveragePrice.Mul(createdOrder.Quantity)
|
||||
assert.Equal(t, usdt.Available.String(), fixedpoint.NewFromFloat(1000000.0).Sub(usedQuoteAmount).String())
|
||||
assert.Equal(t, "USDT", trade.FeeCurrency)
|
||||
assert.Equal(t, usdt.Available.String(), fixedpoint.NewFromFloat(1000000.0).Sub(usedQuoteAmount).Sub(trade.Fee).String())
|
||||
}
|
||||
|
||||
func TestSimplePriceMatching_StopLimitOrderBuy(t *testing.T) {
|
||||
|
@ -497,7 +498,6 @@ func TestSimplePriceMatching_PlaceLimitOrder(t *testing.T) {
|
|||
assert.Len(t, trades, 4)
|
||||
}
|
||||
|
||||
|
||||
func TestSimplePriceMatching_LimitTakerOrder(t *testing.T) {
|
||||
account := getTestAccount()
|
||||
market := getTestMarket()
|
||||
|
|
Loading…
Reference in New Issue
Block a user