mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
futures position no need to deduct fees
This commit is contained in:
parent
d90cf43d5a
commit
53f3df5ccf
|
@ -373,10 +373,14 @@ func (p *Position) AddTrade(td Trade) (profit fixedpoint.Value, netProfit fixedp
|
|||
switch td.FeeCurrency {
|
||||
|
||||
case p.BaseCurrency:
|
||||
quantity = quantity.Sub(fee)
|
||||
if !td.IsFutures {
|
||||
quantity = quantity.Sub(fee)
|
||||
}
|
||||
|
||||
case p.QuoteCurrency:
|
||||
quoteQuantity = quoteQuantity.Sub(fee)
|
||||
if !td.IsFutures {
|
||||
quoteQuantity = quoteQuantity.Sub(fee)
|
||||
}
|
||||
|
||||
default:
|
||||
if p.ExchangeFeeRates != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user