diff --git a/docs/configuration.md b/docs/configuration.md index 074c9a577..80ad534d8 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -225,6 +225,7 @@ Mandatory parameters are marked as **Required**, which means that they are requi | `exchange.skip_open_order_update` | Skips open order updates on startup should the exchange cause problems. Only relevant in live conditions.
*Defaults to `false`*
**Datatype:** Boolean | `exchange.unknown_fee_rate` | Fallback value to use when calculating trading fees. This can be useful for exchanges which have fees in non-tradable currencies. The value provided here will be multiplied with the "fee cost".
*Defaults to `None`
**Datatype:** float | `exchange.log_responses` | Log relevant exchange responses. For debug mode only - use with care.
*Defaults to `false`*
**Datatype:** Boolean +| `exchange.only_from_ccxt` | Prevent data-download from data.binance.vision. Leaving this as false can greatly speed up downloads, but may be problematic if the site is not available.
*Defaults to `false`*
**Datatype:** Boolean | `experimental.block_bad_exchanges` | Block exchanges known to not work with freqtrade. Leave on default unless you want to test if that exchange works now.
*Defaults to `true`.*
**Datatype:** Boolean | | **Plugins** | `edge.*` | Please refer to [edge configuration document](edge.md) for detailed explanation of all possible configuration options. diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index 2509955be..4c4271570 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -110,13 +110,11 @@ class Binance(Exchange): candle_type: CandleType, is_new_pair: bool = False, until_ms: int | None = None, - only_from_ccxt: bool = False, ) -> DataFrame: """ Overwrite to introduce "fast new pair" functionality by detecting the pair's listing date Does not work for other exchanges, which don't return the earliest data when called with "0" :param candle_type: Any of the enum CandleType (must match trading mode!) - :param only_from_ccxt: Only download data using the API provided by CCXT """ if is_new_pair: x = self.loop.run_until_complete( @@ -136,7 +134,7 @@ class Binance(Exchange): ) return DataFrame(columns=DEFAULT_DATAFRAME_COLUMNS) - if only_from_ccxt: + if self._config["exchange"].get("only_from_ccxt", False): return super().get_historic_ohlcv( pair=pair, timeframe=timeframe, @@ -146,6 +144,7 @@ class Binance(Exchange): until_ms=until_ms, ) else: + # Download from data.binance.vision return self.get_historic_ohlcv_fast( pair=pair, timeframe=timeframe, diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 983ee8f0a..f2515f7eb 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -2230,7 +2230,6 @@ class Exchange: candle_type: CandleType, is_new_pair: bool = False, until_ms: int | None = None, - only_from_ccxt: bool = False, ) -> DataFrame: """ Get candle history using asyncio and returns the list of candles. @@ -2242,7 +2241,6 @@ class Exchange: :param candle_type: '', mark, index, premiumIndex, or funding_rate :param is_new_pair: used by binance subclass to allow "fast" new pair downloading :param until_ms: Timestamp in milliseconds to get history up to - :param only_from_ccxt: Only download data using the API provided by CCXT :return: Dataframe with candle (OHLCV) data """ pair, _, _, data, _ = self.loop.run_until_complete(