mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-15 20:31:43 +00:00
chore: move fallback param to config directly
This commit is contained in:
@@ -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.<br>*Defaults to `false`*<br> **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".<br>*Defaults to `None`<br> **Datatype:** float
|
||||
| `exchange.log_responses` | Log relevant exchange responses. For debug mode only - use with care.<br>*Defaults to `false`*<br> **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.<br>*Defaults to `false`*<br> **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. <br>*Defaults to `true`.* <br> **Datatype:** Boolean
|
||||
| | **Plugins**
|
||||
| `edge.*` | Please refer to [edge configuration document](edge.md) for detailed explanation of all possible configuration options.
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user