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/) 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. 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/) 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/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})" 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: 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', 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():