From 75628403b0f548261c9fc0418ce95bf3c1624844 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 20 Jul 2023 07:23:13 +0200 Subject: [PATCH] Invert order_props_in_contracts logic - cost is almost never in contracts --- freqtrade/exchange/binance.py | 1 + freqtrade/exchange/exchange.py | 2 +- freqtrade/exchange/gate.py | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index 8075d775a..e8be804cb 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -34,6 +34,7 @@ class Binance(Exchange): "tickers_have_price": False, "floor_leverage": True, "stop_price_type_field": "workingType", + "order_props_in_contracts": ['amount', 'cost', 'filled', 'remaining'], "stop_price_type_value_mapping": { PriceType.LAST: "CONTRACT_PRICE", PriceType.MARK: "MARK_PRICE", diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 2cf98c266..44c593541 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -82,7 +82,7 @@ class Exchange: "ccxt_futures_name": "swap", "fee_cost_in_contracts": False, # Fee cost needs contract conversion "needs_trading_fees": False, # use fetch_trading_fees to cache fees - "order_props_in_contracts": ['amount', 'cost', 'filled', 'remaining'], + "order_props_in_contracts": ['amount', 'filled', 'remaining'], # Override createMarketBuyOrderRequiresPrice where ccxt has it wrong "marketOrderRequiresPrice": False, } diff --git a/freqtrade/exchange/gate.py b/freqtrade/exchange/gate.py index eceab4ec1..8ea7f2b20 100644 --- a/freqtrade/exchange/gate.py +++ b/freqtrade/exchange/gate.py @@ -34,7 +34,6 @@ class Gate(Exchange): "needs_trading_fees": True, "marketOrderRequiresPrice": False, "fee_cost_in_contracts": False, # Set explicitly to false for clarity - "order_props_in_contracts": ['amount', 'filled', 'remaining'], "stop_price_type_field": "price_type", "stop_price_type_value_mapping": { PriceType.LAST: 0,