Merge pull request #6576 from samgermain/funding-tests
funding_fee tests
This commit is contained in:
@@ -2301,11 +2301,10 @@ class Exchange:
|
||||
timeframe = self._ft_has['mark_ohlcv_timeframe']
|
||||
timeframe_ff = self._ft_has.get('funding_fee_timeframe',
|
||||
self._ft_has['mark_ohlcv_timeframe'])
|
||||
open_date = timeframe_to_prev_date(timeframe, open_date)
|
||||
|
||||
if not close_date:
|
||||
close_date = datetime.now(timezone.utc)
|
||||
open_timestamp = int(open_date.timestamp()) * 1000
|
||||
open_timestamp = int(timeframe_to_prev_date(timeframe, open_date).timestamp()) * 1000
|
||||
# close_timestamp = int(close_date.timestamp()) * 1000
|
||||
|
||||
mark_comb: PairWithTimeframe = (
|
||||
|
@@ -273,7 +273,7 @@ class FreqtradeBot(LoggingMixin):
|
||||
pair=trade.pair,
|
||||
amount=trade.amount,
|
||||
is_short=trade.is_short,
|
||||
open_date=trade.open_date
|
||||
open_date=trade.open_date_utc
|
||||
)
|
||||
trade.funding_fees = funding_fees
|
||||
else:
|
||||
@@ -1350,7 +1350,7 @@ class FreqtradeBot(LoggingMixin):
|
||||
pair=trade.pair,
|
||||
amount=trade.amount,
|
||||
is_short=trade.is_short,
|
||||
open_date=trade.open_date,
|
||||
open_date=trade.open_date_utc,
|
||||
)
|
||||
exit_type = 'exit'
|
||||
if exit_check.exit_type in (ExitType.STOP_LOSS, ExitType.TRAILING_STOP_LOSS):
|
||||
|
Reference in New Issue
Block a user