From 8c092d457cb2ac0cbe074c82167e1773ae2d6893 Mon Sep 17 00:00:00 2001 From: Colt 1911 <75197463+M451z@users.noreply.github.com> Date: Sat, 12 Nov 2022 18:28:51 +0300 Subject: [PATCH 1/7] Update README.md Removed the FTX option under the "Supported Exchange marketplaces" title, because of FTX bankrupt. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c0452fa85..30ad1ad2a 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,6 @@ Please read the [exchange specific notes](docs/exchanges.md) to learn about even - [X] [Binance](https://www.binance.com/) - [X] [Bittrex](https://bittrex.com/) -- [X] [FTX](https://ftx.com/#a=2258149) - [X] [Gate.io](https://www.gate.io/ref/6266643) - [X] [Huobi](http://huobi.com/) - [X] [Kraken](https://kraken.com/) From ee0e59157c6516225f94a0f9a26a8e1cd9719e56 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 12 Nov 2022 16:09:58 +0100 Subject: [PATCH 2/7] Update join relationship of orders table to selectin closes #6791 by slightly improving performance in this area. --- freqtrade/persistence/trade_model.py | 3 ++- tests/persistence/test_persistence.py | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/freqtrade/persistence/trade_model.py b/freqtrade/persistence/trade_model.py index 743aa5eba..e032b6b96 100644 --- a/freqtrade/persistence/trade_model.py +++ b/freqtrade/persistence/trade_model.py @@ -1144,7 +1144,8 @@ class Trade(_DECL_BASE, LocalTrade): id = Column(Integer, primary_key=True) - orders = relationship("Order", order_by="Order.id", cascade="all, delete-orphan", lazy="joined") + orders = relationship("Order", order_by="Order.id", cascade="all, delete-orphan", + lazy="selectin", innerjoin=True) exchange = Column(String(25), nullable=False) pair = Column(String(25), nullable=False, index=True) diff --git a/tests/persistence/test_persistence.py b/tests/persistence/test_persistence.py index 3323dd7c6..fbb639d50 100644 --- a/tests/persistence/test_persistence.py +++ b/tests/persistence/test_persistence.py @@ -2197,15 +2197,16 @@ def test_get_trades__query(fee, is_short): # without orders there should be no join issued. query1 = Trade.get_trades([], include_orders=False) - assert "JOIN orders" in str(query) - assert "JOIN orders" not in str(query1) + # Empty "with-options -> default - selectin" + assert query._with_options == () + assert query1._with_options != () create_mock_trades(fee, is_short) query = Trade.get_trades([]) query1 = Trade.get_trades([], include_orders=False) - assert "JOIN orders" in str(query) - assert "JOIN orders" not in str(query1) + assert query._with_options == () + assert query1._with_options != () def test_get_trades_backtest(): From 954da4fec9441342ae2bea4085092b08c7cbed7e Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 12 Nov 2022 19:52:10 +0100 Subject: [PATCH 3/7] Add "forcebuy error" exception log part of #7727 --- freqtrade/rpc/telegram.py | 1 + 1 file changed, 1 insertion(+) diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index 247373817..92a24f024 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -1061,6 +1061,7 @@ class Telegram(RPCHandler): try: self._rpc._rpc_force_entry(pair, price, order_side=order_side) except RPCException as e: + logger.exception("Forcebuy error!") self._send_msg(str(e)) def _force_enter_inline(self, update: Update, _: CallbackContext) -> None: From 914bdbdd83f64470ae6bd91f09d1a08a6fcf82f5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 12 Nov 2022 20:32:17 +0100 Subject: [PATCH 4/7] Remove FTX from list of supported exchanges --- docs/includes/pairlists.md | 2 +- docs/index.md | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/includes/pairlists.md b/docs/includes/pairlists.md index dd3149e98..8ae38b0d4 100644 --- a/docs/includes/pairlists.md +++ b/docs/includes/pairlists.md @@ -268,7 +268,7 @@ This option is disabled by default, and will only apply if set to > 0. The `max_value` setting removes pairs where the minimum value change is above a specified value. This is useful when an exchange has unbalanced limits. For example, if step-size = 1 (so you can only buy 1, or 2, or 3, but not 1.1 Coins) - and the price is pretty high (like 20\$) as the coin has risen sharply since the last limit adaption. As a result of the above, you can only buy for 20\$, or 40\$ - but not for 25\$. -On exchanges that deduct fees from the receiving currency (e.g. FTX) - this can result in high value coins / amounts that are unsellable as the amount is slightly below the limit. +On exchanges that deduct fees from the receiving currency (e.g. binance, FTX) - this can result in high value coins / amounts that are unsellable as the amount is slightly below the limit. The `low_price_ratio` setting removes pairs where a raise of 1 price unit (pip) is above the `low_price_ratio` ratio. This option is disabled by default, and will only apply if set to > 0. diff --git a/docs/index.md b/docs/index.md index 5b4add52c..5459eac1b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -40,7 +40,6 @@ Please read the [exchange specific notes](exchanges.md) to learn about eventual, - [X] [Binance](https://www.binance.com/) - [X] [Bittrex](https://bittrex.com/) -- [X] [FTX](https://ftx.com/#a=2258149) - [X] [Gate.io](https://www.gate.io/ref/6266643) - [X] [Huobi](http://huobi.com/) - [X] [Kraken](https://kraken.com/) From fed3bc6730ae1f12f3faae376f228565e43b8eb6 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 13 Nov 2022 10:26:27 +0100 Subject: [PATCH 5/7] Simplify Websocket Init --- freqtrade/rpc/api_server/ws/channel.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/freqtrade/rpc/api_server/ws/channel.py b/freqtrade/rpc/api_server/ws/channel.py index 3c97d05b1..88b4db9ba 100644 --- a/freqtrade/rpc/api_server/ws/channel.py +++ b/freqtrade/rpc/api_server/ws/channel.py @@ -35,8 +35,6 @@ class WebSocketChannel: # The WebSocket object self._websocket = WebSocketProxy(websocket) - # The Serializing class for the WebSocket object - self._serializer_cls = serializer_cls self.drain_timeout = drain_timeout self.throttle = throttle @@ -50,7 +48,7 @@ class WebSocketChannel: self._closed = asyncio.Event() # Wrap the WebSocket in the Serializing class - self._wrapped_ws = self._serializer_cls(self._websocket) + self._wrapped_ws = serializer_cls(self._websocket) def __repr__(self): return f"WebSocketChannel({self.channel_id}, {self.remote_addr})" From 535c365b4a0f13bdcd2421841d322fb9f814f91d Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 13 Nov 2022 10:29:24 +0100 Subject: [PATCH 6/7] Disable ftx ccxt_compat tests Their API is down due to being insolvent ... --- tests/exchange/test_ccxt_compat.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/exchange/test_ccxt_compat.py b/tests/exchange/test_ccxt_compat.py index 9f9866aba..c06cfbe14 100644 --- a/tests/exchange/test_ccxt_compat.py +++ b/tests/exchange/test_ccxt_compat.py @@ -45,16 +45,16 @@ EXCHANGES = { 'leverage_tiers_public': False, 'leverage_in_spot_market': True, }, - 'ftx': { - 'pair': 'BTC/USD', - 'stake_currency': 'USD', - 'hasQuoteVolume': True, - 'timeframe': '5m', - 'futures_pair': 'BTC/USD:USD', - 'futures': False, - 'leverage_tiers_public': False, # TODO: Set to True once implemented on CCXT - 'leverage_in_spot_market': True, - }, + # 'ftx': { + # 'pair': 'BTC/USD', + # 'stake_currency': 'USD', + # 'hasQuoteVolume': True, + # 'timeframe': '5m', + # 'futures_pair': 'BTC/USD:USD', + # 'futures': False, + # 'leverage_tiers_public': False, # TODO: Set to True once implemented on CCXT + # 'leverage_in_spot_market': True, + # }, 'kucoin': { 'pair': 'XRP/USDT', 'stake_currency': 'USDT', From c6013e58194066d4fb5afff581f28c8c747734e1 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 13 Nov 2022 12:01:20 +0100 Subject: [PATCH 7/7] Fix doc typo --- docs/data-download.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/data-download.md b/docs/data-download.md index 700ca04f4..a7b1987aa 100644 --- a/docs/data-download.md +++ b/docs/data-download.md @@ -177,13 +177,13 @@ freqtrade download-data --exchange binance --pairs ETH/USDT XRP/USDT BTC/USDT -- ### Data format -Freqtrade currently supports 3 data-formats for both OHLCV and trades data: +Freqtrade currently supports the following data-formats: * `json` - plain "text" json files * `jsongz` - a gzip-zipped version of json files * `hdf5` - a high performance datastore -* `feather` - a dataformat based on Apache Arrow -* `parquet` - columnar datastore +* `feather` - a dataformat based on Apache Arrow (OHLCV only) +* `parquet` - columnar datastore (OHLCV only) By default, OHLCV data is stored as `json` data, while trades data is stored as `jsongz` data.