Merge pull request #6168 from samgermain/todos

Futures dust warning
This commit is contained in:
Matthias 2022-01-06 10:44:25 +01:00 committed by GitHub
commit 04f2097002
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1538,11 +1538,12 @@ class FreqtradeBot(LoggingMixin):
""" """
Applies the fee to amount (either from Order or from Trades). Applies the fee to amount (either from Order or from Trades).
Can eat into dust if more than the required asset is available. Can eat into dust if more than the required asset is available.
Can't happen in Futures mode - where Fees are always in settlement currency,
never in base currency.
""" """
self.wallets.update() self.wallets.update()
if fee_abs != 0 and self.wallets.get_free(trade_base_currency) >= amount: if fee_abs != 0 and self.wallets.get_free(trade_base_currency) >= amount:
# Eat into dust if we own more than base currency # Eat into dust if we own more than base currency
# TODO-lev: settle currency for futures
logger.info(f"Fee amount for {trade} was in base currency - " logger.info(f"Fee amount for {trade} was in base currency - "
f"Eating Fee {fee_abs} into dust.") f"Eating Fee {fee_abs} into dust.")
elif fee_abs != 0: elif fee_abs != 0: