mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Update kraken calculation
This commit is contained in:
parent
d3713cf245
commit
ad28543d4d
|
@ -191,4 +191,4 @@ class Kraken(Exchange):
|
|||
df = df[(df['date'] >= open_date) & (df['date'] <= close_date)]
|
||||
fees = sum(df['open_fund'] * df['open_mark'] * amount * time_in_ratio)
|
||||
|
||||
return fees
|
||||
return fees if is_short else -fees
|
||||
|
|
|
@ -492,6 +492,7 @@ class Backtesting:
|
|||
sell_candle_time: datetime = sell_row[DATE_IDX].to_pydatetime()
|
||||
|
||||
if self.trading_mode == TradingMode.FUTURES:
|
||||
# TODO-lev: Other fees / liquidation price?
|
||||
trade.funding_fees = self.exchange.calculate_funding_fees(
|
||||
self.futures_data[trade.pair],
|
||||
amount=trade.amount,
|
||||
|
|
Loading…
Reference in New Issue
Block a user