From e88b022cd475d09d2a610b0575fd6a1e8f56f080 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 25 Feb 2022 12:07:09 +0100 Subject: [PATCH 01/13] Version bump 2022.2 --- freqtrade/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py index 54cecbec2..e7d2dbf1b 100644 --- a/freqtrade/__init__.py +++ b/freqtrade/__init__.py @@ -1,5 +1,5 @@ """ Freqtrade bot """ -__version__ = '2022.1' +__version__ = '2022.2' if __version__ == 'develop': From f9d10a7fadea7d6bfb7564e8804993bed51fa1bd Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 26 Feb 2022 08:35:50 +0100 Subject: [PATCH 02/13] Version bump 2022.2.1 --- freqtrade/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py index e7d2dbf1b..90f5dab78 100644 --- a/freqtrade/__init__.py +++ b/freqtrade/__init__.py @@ -1,5 +1,5 @@ """ Freqtrade bot """ -__version__ = '2022.2' +__version__ = '2022.2.1' if __version__ == 'develop': From e90e3cead063535e32476c8ef91d5fe1ffb91307 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 9 Mar 2022 17:35:41 +0100 Subject: [PATCH 03/13] Map usdt fiat to correct coingecko fiat --- freqtrade/rpc/fiat_convert.py | 1 + 1 file changed, 1 insertion(+) diff --git a/freqtrade/rpc/fiat_convert.py b/freqtrade/rpc/fiat_convert.py index 82a6a4778..70f3647b6 100644 --- a/freqtrade/rpc/fiat_convert.py +++ b/freqtrade/rpc/fiat_convert.py @@ -23,6 +23,7 @@ coingecko_mapping = { 'eth': 'ethereum', 'bnb': 'binancecoin', 'sol': 'solana', + 'usdt': 'tether', } From 4d8d30ea39b4fe8d5e5953d87efc5d5f93404cab Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 21 Mar 2022 06:34:33 +0100 Subject: [PATCH 04/13] Version bump to 2022.2.2 --- freqtrade/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py index 90f5dab78..f047d98b4 100644 --- a/freqtrade/__init__.py +++ b/freqtrade/__init__.py @@ -1,5 +1,5 @@ """ Freqtrade bot """ -__version__ = '2022.2.1' +__version__ = '2022.2.2' if __version__ == 'develop': From fe6c62e144fb525f37b234ab125940c86cc8500a Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 27 Mar 2022 15:09:16 +0200 Subject: [PATCH 05/13] Version bump 2022.3 --- freqtrade/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py index f6a9caa0e..349c1def1 100644 --- a/freqtrade/__init__.py +++ b/freqtrade/__init__.py @@ -1,5 +1,5 @@ """ Freqtrade bot """ -__version__ = '2022.2.2' +__version__ = '2022.3' if 'dev' in __version__: try: From 7615c4e904759b08960fb49abc9d5b287c046a7a Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 1 May 2022 11:19:32 +0200 Subject: [PATCH 06/13] Version bump 2022.4 --- freqtrade/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py index 349c1def1..42ab285d7 100644 --- a/freqtrade/__init__.py +++ b/freqtrade/__init__.py @@ -1,5 +1,5 @@ """ Freqtrade bot """ -__version__ = '2022.3' +__version__ = '2022.4' if 'dev' in __version__: try: From e7f5252074c2cd0d4d89875143701a11e3f8aaed Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 1 May 2022 16:49:11 +0200 Subject: [PATCH 07/13] Version bump 2022.4.1 --- freqtrade/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py index 42ab285d7..60ae39670 100644 --- a/freqtrade/__init__.py +++ b/freqtrade/__init__.py @@ -1,5 +1,5 @@ """ Freqtrade bot """ -__version__ = '2022.4' +__version__ = '2022.4.1' if 'dev' in __version__: try: From 2c750fdb09379cd4bde489b97479346af1801def Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 3 May 2022 19:42:17 +0200 Subject: [PATCH 08/13] Reduce no stake amount verbosity closes #6768 --- freqtrade/freqtradebot.py | 1 - 1 file changed, 1 deletion(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index b6f0daeed..c20c14861 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -599,7 +599,6 @@ class FreqtradeBot(LoggingMixin): pair, price, stake_amount, trade_side, enter_tag, trade) if not stake_amount: - logger.info(f"No stake amount to enter a trade for {pair}.") return False if pos_adjust: From 5b76ae452f5aa2599d0e9ab53348f25155319780 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 3 May 2022 18:03:45 +0200 Subject: [PATCH 09/13] Fix fee handling for futures trades --- freqtrade/exchange/exchange.py | 7 +++++-- tests/exchange/test_exchange.py | 24 ++++++++++++++++++------ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 82dcacb51..b300156b5 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1613,7 +1613,9 @@ class Exchange: order['fee']['cost'] / safe_value_fallback2(order, order, 'filled', 'amount'), 8) elif fee_curr in self.get_pair_quote_currency(order['symbol']): # Quote currency - divide by cost - return round(order['fee']['cost'] / order['cost'], 8) if order['cost'] else None + return round(self._contracts_to_amount( + order['symbol'], order['fee']['cost']) / order['cost'], + 8) if order['cost'] else None else: # If Fee currency is a different currency if not order['cost']: @@ -1628,7 +1630,8 @@ class Exchange: fee_to_quote_rate = self._config['exchange'].get('unknown_fee_rate', None) if not fee_to_quote_rate: return None - return round((order['fee']['cost'] * fee_to_quote_rate) / order['cost'], 8) + return round((self._contracts_to_amount( + order['symbol'], order['fee']['cost']) * fee_to_quote_rate) / order['cost'], 8) def extract_cost_curr_rate(self, order: Dict) -> Tuple[float, str, Optional[float]]: """ diff --git a/tests/exchange/test_exchange.py b/tests/exchange/test_exchange.py index 689ffa4ce..9faf404cd 100644 --- a/tests/exchange/test_exchange.py +++ b/tests/exchange/test_exchange.py @@ -4151,7 +4151,10 @@ def test__order_contracts_to_amount( 'cost': 60.0, 'filled': None, 'remaining': 30.0, - 'fee': 0.06, + 'fee': { + 'currency': 'USDT', + 'cost': 0.06, + }, 'fees': [{ 'currency': 'USDT', 'cost': 0.06, @@ -4178,7 +4181,10 @@ def test__order_contracts_to_amount( 'cost': 80.0, 'filled': None, 'remaining': 40.0, - 'fee': 0.08, + 'fee': { + 'currency': 'USDT', + 'cost': 0.08, + }, 'fees': [{ 'currency': 'USDT', 'cost': 0.08, @@ -4212,12 +4218,18 @@ def test__order_contracts_to_amount( 'info': {}, }, ] + order1_bef = orders[0] + order2_bef = orders[1] + order1 = exchange._order_contracts_to_amount(deepcopy(order1_bef)) + order2 = exchange._order_contracts_to_amount(deepcopy(order2_bef)) + assert order1['amount'] == order1_bef['amount'] * contract_size + assert order1['cost'] == order1_bef['cost'] * contract_size - order1 = exchange._order_contracts_to_amount(orders[0]) - order2 = exchange._order_contracts_to_amount(orders[1]) + assert order2['amount'] == order2_bef['amount'] * contract_size + assert order2['cost'] == order2_bef['cost'] * contract_size + + # Don't fail exchange._order_contracts_to_amount(orders[2]) - assert order1['amount'] == 30.0 * contract_size - assert order2['amount'] == 40.0 * contract_size @pytest.mark.parametrize('pair,contract_size,trading_mode', [ From 851c5dad309345516da2fd485b7e45d68eb79acb Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 3 May 2022 20:37:29 +0200 Subject: [PATCH 10/13] Version bump 2022.4.2 --- freqtrade/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py index 60ae39670..e7f2f9d6f 100644 --- a/freqtrade/__init__.py +++ b/freqtrade/__init__.py @@ -1,5 +1,5 @@ """ Freqtrade bot """ -__version__ = '2022.4.1' +__version__ = '2022.4.2' if 'dev' in __version__: try: From fab197edf284ddb843d96fb238bde6510d6377b6 Mon Sep 17 00:00:00 2001 From: DJCrashdummy Date: Tue, 10 May 2022 10:33:04 +0000 Subject: [PATCH 11/13] corrected minor "typo" in formatting --- docs/includes/pairlists.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/includes/pairlists.md b/docs/includes/pairlists.md index cec5ceb19..5b5e285fe 100644 --- a/docs/includes/pairlists.md +++ b/docs/includes/pairlists.md @@ -44,7 +44,7 @@ It uses configuration from `exchange.pair_whitelist` and `exchange.pair_blacklis ```json "pairlists": [ {"method": "StaticPairList"} - ], +], ``` By default, only currently enabled pairs are allowed. From a1d54f5ae0b2e7e2a9a303f64ef88b905512cfb9 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 28 May 2022 09:49:58 +0200 Subject: [PATCH 12/13] Version bump 2022.5 --- freqtrade/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py index e7f2f9d6f..29506905b 100644 --- a/freqtrade/__init__.py +++ b/freqtrade/__init__.py @@ -1,5 +1,5 @@ """ Freqtrade bot """ -__version__ = '2022.4.2' +__version__ = '2022.5' if 'dev' in __version__: try: From c57db0a33063049b60fd009b31bd6d9798dd0fb2 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 1 Jun 2022 06:34:28 +0200 Subject: [PATCH 13/13] Version bump 2022.5.1 --- freqtrade/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py index 29506905b..4a7da02b0 100644 --- a/freqtrade/__init__.py +++ b/freqtrade/__init__.py @@ -1,5 +1,5 @@ """ Freqtrade bot """ -__version__ = '2022.5' +__version__ = '2022.5.1' if 'dev' in __version__: try: