We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
askVolume and bidVolume in VolumePairList
Hi,

I come back with the discussion with @hroff-1902 we have about askVolume and bidVolume.
If i have well understood it filtered based on the volume of the best bid/ask.

It means like if Bitcoin have a bid with 30 dollar and a shitcoin have a bid at 3000 dollar it will update  the pairlist and put before in the list shitcoin vs BTC ?

Many tks.
askVolume and bidVolume in VolumePairList
Hi,

I come back with the discussion with @hroff-1902 we have about askVolume and bidVolume.
If i have well understood it filtered based on the volume of the best bid/ask.

It means like if Bitcoin have a bid with 30 dollar and a shitcoin have a bid at 3000 dollar it will update  the pairlist and put before in the list shitcoin vs BTC ?

Many tks.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `freqtrade/configuration/deprecated_settings.py`
Content:
```
1 """
2 Functions to handle deprecated settings
3 """
4 
5 import logging
6 from typing import Any, Dict
7 
8 from freqtrade.exceptions import OperationalException
9 
10 
11 logger = logging.getLogger(__name__)
12 
13 
14 def check_conflicting_settings(config: Dict[str, Any],
15                                section1: str, name1: str,
16                                section2: str, name2: str) -> None:
17     section1_config = config.get(section1, {})
18     section2_config = config.get(section2, {})
19     if name1 in section1_config and name2 in section2_config:
20         raise OperationalException(
21             f"Conflicting settings `{section1}.{name1}` and `{section2}.{name2}` "
22             "(DEPRECATED) detected in the configuration file. "
23             "This deprecated setting will be removed in the next versions of Freqtrade. "
24             f"Please delete it from your configuration and use the `{section1}.{name1}` "
25             "setting instead."
26         )
27 
28 
29 def process_deprecated_setting(config: Dict[str, Any],
30                                section1: str, name1: str,
31                                section2: str, name2: str) -> None:
32     section2_config = config.get(section2, {})
33 
34     if name2 in section2_config:
35         logger.warning(
36             "DEPRECATED: "
37             f"The `{section2}.{name2}` setting is deprecated and "
38             "will be removed in the next versions of Freqtrade. "
39             f"Please use the `{section1}.{name1}` setting in your configuration instead."
40         )
41         section1_config = config.get(section1, {})
42         section1_config[name1] = section2_config[name2]
43 
44 
45 def process_temporary_deprecated_settings(config: Dict[str, Any]) -> None:
46 
47     check_conflicting_settings(config, 'ask_strategy', 'use_sell_signal',
48                                'experimental', 'use_sell_signal')
49     check_conflicting_settings(config, 'ask_strategy', 'sell_profit_only',
50                                'experimental', 'sell_profit_only')
51     check_conflicting_settings(config, 'ask_strategy', 'ignore_roi_if_buy_signal',
52                                'experimental', 'ignore_roi_if_buy_signal')
53 
54     process_deprecated_setting(config, 'ask_strategy', 'use_sell_signal',
55                                'experimental', 'use_sell_signal')
56     process_deprecated_setting(config, 'ask_strategy', 'sell_profit_only',
57                                'experimental', 'sell_profit_only')
58     process_deprecated_setting(config, 'ask_strategy', 'ignore_roi_if_buy_signal',
59                                'experimental', 'ignore_roi_if_buy_signal')
60 
61     if not config.get('pairlists') and not config.get('pairlists'):
62         config['pairlists'] = [{'method': 'StaticPairList'}]
63         logger.warning(
64             "DEPRECATED: "
65             "Pairlists must be defined explicitly in the future."
66             "Defaulting to StaticPairList for now.")
67 
68     if config.get('pairlist', {}).get("method") == 'VolumePairList':
69         logger.warning(
70             "DEPRECATED: "
71             f"Using VolumePairList in pairlist is deprecated and must be moved to pairlists. "
72             "Please refer to the docs on configuration details")
73         pl = {'method': 'VolumePairList'}
74         pl.update(config.get('pairlist', {}).get('config'))
75         config['pairlists'].append(pl)
76 
77     if config.get('pairlist', {}).get('config', {}).get('precision_filter'):
78         logger.warning(
79             "DEPRECATED: "
80             f"Using precision_filter setting is deprecated and has been replaced by"
81             "PrecisionFilter. Please refer to the docs on configuration details")
82         config['pairlists'].append({'method': 'PrecisionFilter'})
83 
84     if (config.get('edge', {}).get('enabled', False)
85        and 'capital_available_percentage' in config.get('edge', {})):
86         logger.warning(
87             "DEPRECATED: "
88             "Using 'edge.capital_available_percentage' has been deprecated in favor of "
89             "'tradable_balance_ratio'. Please migrate your configuration to "
90             "'tradable_balance_ratio' and remove 'capital_available_percentage' "
91             "from the edge configuration."
92         )
93
```

Path: `freqtrade/pairlist/VolumePairList.py`
Content:
```
1 """
2 Volume PairList provider
3 
4 Provides lists as configured in config.json
5 
6  """
7 import logging
8 from datetime import datetime
9 from typing import Any, Dict, List
10 
11 from freqtrade.exceptions import OperationalException
12 from freqtrade.pairlist.IPairList import IPairList
13 
14 logger = logging.getLogger(__name__)
15 
16 SORT_VALUES = ['askVolume', 'bidVolume', 'quoteVolume']
17 
18 
19 class VolumePairList(IPairList):
20 
21     def __init__(self, exchange, pairlistmanager, config: Dict[str, Any], pairlistconfig: dict,
22                  pairlist_pos: int) -> None:
23         super().__init__(exchange, pairlistmanager, config, pairlistconfig, pairlist_pos)
24 
25         if 'number_assets' not in self._pairlistconfig:
26             raise OperationalException(
27                 f'`number_assets` not specified. Please check your configuration '
28                 'for "pairlist.config.number_assets"')
29         self._number_pairs = self._pairlistconfig['number_assets']
30         self._sort_key = self._pairlistconfig.get('sort_key', 'quoteVolume')
31         self._min_value = self._pairlistconfig.get('min_value', 0)
32         self.refresh_period = self._pairlistconfig.get('refresh_period', 1800)
33 
34         if not self._exchange.exchange_has('fetchTickers'):
35             raise OperationalException(
36                 'Exchange does not support dynamic whitelist.'
37                 'Please edit your config and restart the bot'
38             )
39         if not self._validate_keys(self._sort_key):
40             raise OperationalException(
41                 f'key {self._sort_key} not in {SORT_VALUES}')
42 
43     @property
44     def needstickers(self) -> bool:
45         """
46         Boolean property defining if tickers are necessary.
47         If no Pairlist requries tickers, an empty List is passed
48         as tickers argument to filter_pairlist
49         """
50         return True
51 
52     def _validate_keys(self, key):
53         return key in SORT_VALUES
54 
55     def short_desc(self) -> str:
56         """
57         Short whitelist method description - used for startup-messages
58         """
59         return f"{self.name} - top {self._pairlistconfig['number_assets']} volume pairs."
60 
61     def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:
62         """
63         Filters and sorts pairlist and returns the whitelist again.
64         Called on each bot iteration - please use internal caching if necessary
65         :param pairlist: pairlist to filter or sort
66         :param tickers: Tickers (from exchange.get_tickers()). May be cached.
67         :return: new whitelist
68         """
69         # Generate dynamic whitelist
70         # Must always run if this pairlist is not the first in the list.
71         if (self._pairlist_pos != 0 or
72                 (self._last_refresh + self.refresh_period < datetime.now().timestamp())):
73 
74             self._last_refresh = int(datetime.now().timestamp())
75             pairs = self._gen_pair_whitelist(pairlist, tickers,
76                                              self._config['stake_currency'],
77                                              self._sort_key, self._min_value)
78         else:
79             pairs = pairlist
80         self.log_on_refresh(logger.info, f"Searching {self._number_pairs} pairs: {pairs}")
81         return pairs
82 
83     def _gen_pair_whitelist(self, pairlist: List[str], tickers: Dict,
84                             base_currency: str, key: str, min_val: int) -> List[str]:
85         """
86         Updates the whitelist with with a dynamically generated list
87         :param base_currency: base currency as str
88         :param key: sort key (defaults to 'quoteVolume')
89         :param tickers: Tickers (from exchange.get_tickers()).
90         :return: List of pairs
91         """
92         if self._pairlist_pos == 0:
93             # If VolumePairList is the first in the list, use fresh pairlist
94             # Check if pair quote currency equals to the stake currency.
95             filtered_tickers = [v for k, v in tickers.items()
96                                 if (self._exchange.get_pair_quote_currency(k) == base_currency
97                                     and v[key] is not None)]
98         else:
99             # If other pairlist is in front, use the incomming pairlist.
100             filtered_tickers = [v for k, v in tickers.items() if k in pairlist]
101 
102         if min_val > 0:
103             filtered_tickers = list(filter(lambda t: t[key] > min_val, filtered_tickers))
104 
105         sorted_tickers = sorted(filtered_tickers, reverse=True, key=lambda t: t[key])
106 
107         # Validate whitelist to only have active market pairs
108         pairs = self._whitelist_for_active_markets([s['symbol'] for s in sorted_tickers])
109         pairs = self._verify_blacklist(pairs, aswarning=False)
110         # Limit to X number of pairs
111         pairs = pairs[:self._number_pairs]
112 
113         return pairs
114
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/freqtrade/configuration/deprecated_settings.py b/freqtrade/configuration/deprecated_settings.py
--- a/freqtrade/configuration/deprecated_settings.py
+++ b/freqtrade/configuration/deprecated_settings.py
@@ -58,29 +58,6 @@
     process_deprecated_setting(config, 'ask_strategy', 'ignore_roi_if_buy_signal',
                                'experimental', 'ignore_roi_if_buy_signal')
 
-    if not config.get('pairlists') and not config.get('pairlists'):
-        config['pairlists'] = [{'method': 'StaticPairList'}]
-        logger.warning(
-            "DEPRECATED: "
-            "Pairlists must be defined explicitly in the future."
-            "Defaulting to StaticPairList for now.")
-
-    if config.get('pairlist', {}).get("method") == 'VolumePairList':
-        logger.warning(
-            "DEPRECATED: "
-            f"Using VolumePairList in pairlist is deprecated and must be moved to pairlists. "
-            "Please refer to the docs on configuration details")
-        pl = {'method': 'VolumePairList'}
-        pl.update(config.get('pairlist', {}).get('config'))
-        config['pairlists'].append(pl)
-
-    if config.get('pairlist', {}).get('config', {}).get('precision_filter'):
-        logger.warning(
-            "DEPRECATED: "
-            f"Using precision_filter setting is deprecated and has been replaced by"
-            "PrecisionFilter. Please refer to the docs on configuration details")
-        config['pairlists'].append({'method': 'PrecisionFilter'})
-
     if (config.get('edge', {}).get('enabled', False)
        and 'capital_available_percentage' in config.get('edge', {})):
         logger.warning(
diff --git a/freqtrade/pairlist/VolumePairList.py b/freqtrade/pairlist/VolumePairList.py
--- a/freqtrade/pairlist/VolumePairList.py
+++ b/freqtrade/pairlist/VolumePairList.py
@@ -39,6 +39,10 @@
         if not self._validate_keys(self._sort_key):
             raise OperationalException(
                 f'key {self._sort_key} not in {SORT_VALUES}')
+        if self._sort_key != 'quoteVolume':
+            logger.warning(
+                "DEPRECATED: using any key other than quoteVolume for VolumePairList is deprecated."
+                )
 
     @property
     def needstickers(self) -> bool:

{"golden_diff": "diff --git a/freqtrade/configuration/deprecated_settings.py b/freqtrade/configuration/deprecated_settings.py\n--- a/freqtrade/configuration/deprecated_settings.py\n+++ b/freqtrade/configuration/deprecated_settings.py\n@@ -58,29 +58,6 @@\n     process_deprecated_setting(config, 'ask_strategy', 'ignore_roi_if_buy_signal',\n                                'experimental', 'ignore_roi_if_buy_signal')\n \n-    if not config.get('pairlists') and not config.get('pairlists'):\n-        config['pairlists'] = [{'method': 'StaticPairList'}]\n-        logger.warning(\n-            \"DEPRECATED: \"\n-            \"Pairlists must be defined explicitly in the future.\"\n-            \"Defaulting to StaticPairList for now.\")\n-\n-    if config.get('pairlist', {}).get(\"method\") == 'VolumePairList':\n-        logger.warning(\n-            \"DEPRECATED: \"\n-            f\"Using VolumePairList in pairlist is deprecated and must be moved to pairlists. \"\n-            \"Please refer to the docs on configuration details\")\n-        pl = {'method': 'VolumePairList'}\n-        pl.update(config.get('pairlist', {}).get('config'))\n-        config['pairlists'].append(pl)\n-\n-    if config.get('pairlist', {}).get('config', {}).get('precision_filter'):\n-        logger.warning(\n-            \"DEPRECATED: \"\n-            f\"Using precision_filter setting is deprecated and has been replaced by\"\n-            \"PrecisionFilter. Please refer to the docs on configuration details\")\n-        config['pairlists'].append({'method': 'PrecisionFilter'})\n-\n     if (config.get('edge', {}).get('enabled', False)\n        and 'capital_available_percentage' in config.get('edge', {})):\n         logger.warning(\ndiff --git a/freqtrade/pairlist/VolumePairList.py b/freqtrade/pairlist/VolumePairList.py\n--- a/freqtrade/pairlist/VolumePairList.py\n+++ b/freqtrade/pairlist/VolumePairList.py\n@@ -39,6 +39,10 @@\n         if not self._validate_keys(self._sort_key):\n             raise OperationalException(\n                 f'key {self._sort_key} not in {SORT_VALUES}')\n+        if self._sort_key != 'quoteVolume':\n+            logger.warning(\n+                \"DEPRECATED: using any key other than quoteVolume for VolumePairList is deprecated.\"\n+                )\n \n     @property\n     def needstickers(self) -> bool:\n", "issue": "askVolume and bidVolume in VolumePairList\nHi,\r\n\r\nI come back with the discussion with @hroff-1902 we have about askVolume and bidVolume.\r\nIf i have well understood it filtered based on the volume of the best bid/ask.\r\n\r\nIt means like if Bitcoin have a bid with 30 dollar and a shitcoin have a bid at 3000 dollar it will update  the pairlist and put before in the list shitcoin vs BTC ?\r\n\r\nMany tks.\naskVolume and bidVolume in VolumePairList\nHi,\r\n\r\nI come back with the discussion with @hroff-1902 we have about askVolume and bidVolume.\r\nIf i have well understood it filtered based on the volume of the best bid/ask.\r\n\r\nIt means like if Bitcoin have a bid with 30 dollar and a shitcoin have a bid at 3000 dollar it will update  the pairlist and put before in the list shitcoin vs BTC ?\r\n\r\nMany tks.\n", "before_files": [{"content": "\"\"\"\nFunctions to handle deprecated settings\n\"\"\"\n\nimport logging\nfrom typing import Any, Dict\n\nfrom freqtrade.exceptions import OperationalException\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef check_conflicting_settings(config: Dict[str, Any],\n                               section1: str, name1: str,\n                               section2: str, name2: str) -> None:\n    section1_config = config.get(section1, {})\n    section2_config = config.get(section2, {})\n    if name1 in section1_config and name2 in section2_config:\n        raise OperationalException(\n            f\"Conflicting settings `{section1}.{name1}` and `{section2}.{name2}` \"\n            \"(DEPRECATED) detected in the configuration file. \"\n            \"This deprecated setting will be removed in the next versions of Freqtrade. \"\n            f\"Please delete it from your configuration and use the `{section1}.{name1}` \"\n            \"setting instead.\"\n        )\n\n\ndef process_deprecated_setting(config: Dict[str, Any],\n                               section1: str, name1: str,\n                               section2: str, name2: str) -> None:\n    section2_config = config.get(section2, {})\n\n    if name2 in section2_config:\n        logger.warning(\n            \"DEPRECATED: \"\n            f\"The `{section2}.{name2}` setting is deprecated and \"\n            \"will be removed in the next versions of Freqtrade. \"\n            f\"Please use the `{section1}.{name1}` setting in your configuration instead.\"\n        )\n        section1_config = config.get(section1, {})\n        section1_config[name1] = section2_config[name2]\n\n\ndef process_temporary_deprecated_settings(config: Dict[str, Any]) -> None:\n\n    check_conflicting_settings(config, 'ask_strategy', 'use_sell_signal',\n                               'experimental', 'use_sell_signal')\n    check_conflicting_settings(config, 'ask_strategy', 'sell_profit_only',\n                               'experimental', 'sell_profit_only')\n    check_conflicting_settings(config, 'ask_strategy', 'ignore_roi_if_buy_signal',\n                               'experimental', 'ignore_roi_if_buy_signal')\n\n    process_deprecated_setting(config, 'ask_strategy', 'use_sell_signal',\n                               'experimental', 'use_sell_signal')\n    process_deprecated_setting(config, 'ask_strategy', 'sell_profit_only',\n                               'experimental', 'sell_profit_only')\n    process_deprecated_setting(config, 'ask_strategy', 'ignore_roi_if_buy_signal',\n                               'experimental', 'ignore_roi_if_buy_signal')\n\n    if not config.get('pairlists') and not config.get('pairlists'):\n        config['pairlists'] = [{'method': 'StaticPairList'}]\n        logger.warning(\n            \"DEPRECATED: \"\n            \"Pairlists must be defined explicitly in the future.\"\n            \"Defaulting to StaticPairList for now.\")\n\n    if config.get('pairlist', {}).get(\"method\") == 'VolumePairList':\n        logger.warning(\n            \"DEPRECATED: \"\n            f\"Using VolumePairList in pairlist is deprecated and must be moved to pairlists. \"\n            \"Please refer to the docs on configuration details\")\n        pl = {'method': 'VolumePairList'}\n        pl.update(config.get('pairlist', {}).get('config'))\n        config['pairlists'].append(pl)\n\n    if config.get('pairlist', {}).get('config', {}).get('precision_filter'):\n        logger.warning(\n            \"DEPRECATED: \"\n            f\"Using precision_filter setting is deprecated and has been replaced by\"\n            \"PrecisionFilter. Please refer to the docs on configuration details\")\n        config['pairlists'].append({'method': 'PrecisionFilter'})\n\n    if (config.get('edge', {}).get('enabled', False)\n       and 'capital_available_percentage' in config.get('edge', {})):\n        logger.warning(\n            \"DEPRECATED: \"\n            \"Using 'edge.capital_available_percentage' has been deprecated in favor of \"\n            \"'tradable_balance_ratio'. Please migrate your configuration to \"\n            \"'tradable_balance_ratio' and remove 'capital_available_percentage' \"\n            \"from the edge configuration.\"\n        )\n", "path": "freqtrade/configuration/deprecated_settings.py"}, {"content": "\"\"\"\nVolume PairList provider\n\nProvides lists as configured in config.json\n\n \"\"\"\nimport logging\nfrom datetime import datetime\nfrom typing import Any, Dict, List\n\nfrom freqtrade.exceptions import OperationalException\nfrom freqtrade.pairlist.IPairList import IPairList\n\nlogger = logging.getLogger(__name__)\n\nSORT_VALUES = ['askVolume', 'bidVolume', 'quoteVolume']\n\n\nclass VolumePairList(IPairList):\n\n    def __init__(self, exchange, pairlistmanager, config: Dict[str, Any], pairlistconfig: dict,\n                 pairlist_pos: int) -> None:\n        super().__init__(exchange, pairlistmanager, config, pairlistconfig, pairlist_pos)\n\n        if 'number_assets' not in self._pairlistconfig:\n            raise OperationalException(\n                f'`number_assets` not specified. Please check your configuration '\n                'for \"pairlist.config.number_assets\"')\n        self._number_pairs = self._pairlistconfig['number_assets']\n        self._sort_key = self._pairlistconfig.get('sort_key', 'quoteVolume')\n        self._min_value = self._pairlistconfig.get('min_value', 0)\n        self.refresh_period = self._pairlistconfig.get('refresh_period', 1800)\n\n        if not self._exchange.exchange_has('fetchTickers'):\n            raise OperationalException(\n                'Exchange does not support dynamic whitelist.'\n                'Please edit your config and restart the bot'\n            )\n        if not self._validate_keys(self._sort_key):\n            raise OperationalException(\n                f'key {self._sort_key} not in {SORT_VALUES}')\n\n    @property\n    def needstickers(self) -> bool:\n        \"\"\"\n        Boolean property defining if tickers are necessary.\n        If no Pairlist requries tickers, an empty List is passed\n        as tickers argument to filter_pairlist\n        \"\"\"\n        return True\n\n    def _validate_keys(self, key):\n        return key in SORT_VALUES\n\n    def short_desc(self) -> str:\n        \"\"\"\n        Short whitelist method description - used for startup-messages\n        \"\"\"\n        return f\"{self.name} - top {self._pairlistconfig['number_assets']} volume pairs.\"\n\n    def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:\n        \"\"\"\n        Filters and sorts pairlist and returns the whitelist again.\n        Called on each bot iteration - please use internal caching if necessary\n        :param pairlist: pairlist to filter or sort\n        :param tickers: Tickers (from exchange.get_tickers()). May be cached.\n        :return: new whitelist\n        \"\"\"\n        # Generate dynamic whitelist\n        # Must always run if this pairlist is not the first in the list.\n        if (self._pairlist_pos != 0 or\n                (self._last_refresh + self.refresh_period < datetime.now().timestamp())):\n\n            self._last_refresh = int(datetime.now().timestamp())\n            pairs = self._gen_pair_whitelist(pairlist, tickers,\n                                             self._config['stake_currency'],\n                                             self._sort_key, self._min_value)\n        else:\n            pairs = pairlist\n        self.log_on_refresh(logger.info, f\"Searching {self._number_pairs} pairs: {pairs}\")\n        return pairs\n\n    def _gen_pair_whitelist(self, pairlist: List[str], tickers: Dict,\n                            base_currency: str, key: str, min_val: int) -> List[str]:\n        \"\"\"\n        Updates the whitelist with with a dynamically generated list\n        :param base_currency: base currency as str\n        :param key: sort key (defaults to 'quoteVolume')\n        :param tickers: Tickers (from exchange.get_tickers()).\n        :return: List of pairs\n        \"\"\"\n        if self._pairlist_pos == 0:\n            # If VolumePairList is the first in the list, use fresh pairlist\n            # Check if pair quote currency equals to the stake currency.\n            filtered_tickers = [v for k, v in tickers.items()\n                                if (self._exchange.get_pair_quote_currency(k) == base_currency\n                                    and v[key] is not None)]\n        else:\n            # If other pairlist is in front, use the incomming pairlist.\n            filtered_tickers = [v for k, v in tickers.items() if k in pairlist]\n\n        if min_val > 0:\n            filtered_tickers = list(filter(lambda t: t[key] > min_val, filtered_tickers))\n\n        sorted_tickers = sorted(filtered_tickers, reverse=True, key=lambda t: t[key])\n\n        # Validate whitelist to only have active market pairs\n        pairs = self._whitelist_for_active_markets([s['symbol'] for s in sorted_tickers])\n        pairs = self._verify_blacklist(pairs, aswarning=False)\n        # Limit to X number of pairs\n        pairs = pairs[:self._number_pairs]\n\n        return pairs\n", "path": "freqtrade/pairlist/VolumePairList.py"}], "after_files": [{"content": "\"\"\"\nFunctions to handle deprecated settings\n\"\"\"\n\nimport logging\nfrom typing import Any, Dict\n\nfrom freqtrade.exceptions import OperationalException\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef check_conflicting_settings(config: Dict[str, Any],\n                               section1: str, name1: str,\n                               section2: str, name2: str) -> None:\n    section1_config = config.get(section1, {})\n    section2_config = config.get(section2, {})\n    if name1 in section1_config and name2 in section2_config:\n        raise OperationalException(\n            f\"Conflicting settings `{section1}.{name1}` and `{section2}.{name2}` \"\n            \"(DEPRECATED) detected in the configuration file. \"\n            \"This deprecated setting will be removed in the next versions of Freqtrade. \"\n            f\"Please delete it from your configuration and use the `{section1}.{name1}` \"\n            \"setting instead.\"\n        )\n\n\ndef process_deprecated_setting(config: Dict[str, Any],\n                               section1: str, name1: str,\n                               section2: str, name2: str) -> None:\n    section2_config = config.get(section2, {})\n\n    if name2 in section2_config:\n        logger.warning(\n            \"DEPRECATED: \"\n            f\"The `{section2}.{name2}` setting is deprecated and \"\n            \"will be removed in the next versions of Freqtrade. \"\n            f\"Please use the `{section1}.{name1}` setting in your configuration instead.\"\n        )\n        section1_config = config.get(section1, {})\n        section1_config[name1] = section2_config[name2]\n\n\ndef process_temporary_deprecated_settings(config: Dict[str, Any]) -> None:\n\n    check_conflicting_settings(config, 'ask_strategy', 'use_sell_signal',\n                               'experimental', 'use_sell_signal')\n    check_conflicting_settings(config, 'ask_strategy', 'sell_profit_only',\n                               'experimental', 'sell_profit_only')\n    check_conflicting_settings(config, 'ask_strategy', 'ignore_roi_if_buy_signal',\n                               'experimental', 'ignore_roi_if_buy_signal')\n\n    process_deprecated_setting(config, 'ask_strategy', 'use_sell_signal',\n                               'experimental', 'use_sell_signal')\n    process_deprecated_setting(config, 'ask_strategy', 'sell_profit_only',\n                               'experimental', 'sell_profit_only')\n    process_deprecated_setting(config, 'ask_strategy', 'ignore_roi_if_buy_signal',\n                               'experimental', 'ignore_roi_if_buy_signal')\n\n    if (config.get('edge', {}).get('enabled', False)\n       and 'capital_available_percentage' in config.get('edge', {})):\n        logger.warning(\n            \"DEPRECATED: \"\n            \"Using 'edge.capital_available_percentage' has been deprecated in favor of \"\n            \"'tradable_balance_ratio'. Please migrate your configuration to \"\n            \"'tradable_balance_ratio' and remove 'capital_available_percentage' \"\n            \"from the edge configuration.\"\n        )\n", "path": "freqtrade/configuration/deprecated_settings.py"}, {"content": "\"\"\"\nVolume PairList provider\n\nProvides lists as configured in config.json\n\n \"\"\"\nimport logging\nfrom datetime import datetime\nfrom typing import Any, Dict, List\n\nfrom freqtrade.exceptions import OperationalException\nfrom freqtrade.pairlist.IPairList import IPairList\n\nlogger = logging.getLogger(__name__)\n\nSORT_VALUES = ['askVolume', 'bidVolume', 'quoteVolume']\n\n\nclass VolumePairList(IPairList):\n\n    def __init__(self, exchange, pairlistmanager, config: Dict[str, Any], pairlistconfig: dict,\n                 pairlist_pos: int) -> None:\n        super().__init__(exchange, pairlistmanager, config, pairlistconfig, pairlist_pos)\n\n        if 'number_assets' not in self._pairlistconfig:\n            raise OperationalException(\n                f'`number_assets` not specified. Please check your configuration '\n                'for \"pairlist.config.number_assets\"')\n        self._number_pairs = self._pairlistconfig['number_assets']\n        self._sort_key = self._pairlistconfig.get('sort_key', 'quoteVolume')\n        self._min_value = self._pairlistconfig.get('min_value', 0)\n        self.refresh_period = self._pairlistconfig.get('refresh_period', 1800)\n\n        if not self._exchange.exchange_has('fetchTickers'):\n            raise OperationalException(\n                'Exchange does not support dynamic whitelist.'\n                'Please edit your config and restart the bot'\n            )\n        if not self._validate_keys(self._sort_key):\n            raise OperationalException(\n                f'key {self._sort_key} not in {SORT_VALUES}')\n        if self._sort_key != 'quoteVolume':\n            logger.warning(\n                \"DEPRECATED: using any key other than quoteVolume for VolumePairList is deprecated.\"\n                )\n\n    @property\n    def needstickers(self) -> bool:\n        \"\"\"\n        Boolean property defining if tickers are necessary.\n        If no Pairlist requries tickers, an empty List is passed\n        as tickers argument to filter_pairlist\n        \"\"\"\n        return True\n\n    def _validate_keys(self, key):\n        return key in SORT_VALUES\n\n    def short_desc(self) -> str:\n        \"\"\"\n        Short whitelist method description - used for startup-messages\n        \"\"\"\n        return f\"{self.name} - top {self._pairlistconfig['number_assets']} volume pairs.\"\n\n    def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:\n        \"\"\"\n        Filters and sorts pairlist and returns the whitelist again.\n        Called on each bot iteration - please use internal caching if necessary\n        :param pairlist: pairlist to filter or sort\n        :param tickers: Tickers (from exchange.get_tickers()). May be cached.\n        :return: new whitelist\n        \"\"\"\n        # Generate dynamic whitelist\n        # Must always run if this pairlist is not the first in the list.\n        if (self._pairlist_pos != 0 or\n                (self._last_refresh + self.refresh_period < datetime.now().timestamp())):\n\n            self._last_refresh = int(datetime.now().timestamp())\n            pairs = self._gen_pair_whitelist(pairlist, tickers,\n                                             self._config['stake_currency'],\n                                             self._sort_key, self._min_value)\n        else:\n            pairs = pairlist\n        self.log_on_refresh(logger.info, f\"Searching {self._number_pairs} pairs: {pairs}\")\n        return pairs\n\n    def _gen_pair_whitelist(self, pairlist: List[str], tickers: Dict,\n                            base_currency: str, key: str, min_val: int) -> List[str]:\n        \"\"\"\n        Updates the whitelist with with a dynamically generated list\n        :param base_currency: base currency as str\n        :param key: sort key (defaults to 'quoteVolume')\n        :param tickers: Tickers (from exchange.get_tickers()).\n        :return: List of pairs\n        \"\"\"\n        if self._pairlist_pos == 0:\n            # If VolumePairList is the first in the list, use fresh pairlist\n            # Check if pair quote currency equals to the stake currency.\n            filtered_tickers = [v for k, v in tickers.items()\n                                if (self._exchange.get_pair_quote_currency(k) == base_currency\n                                    and v[key] is not None)]\n        else:\n            # If other pairlist is in front, use the incomming pairlist.\n            filtered_tickers = [v for k, v in tickers.items() if k in pairlist]\n\n        if min_val > 0:\n            filtered_tickers = list(filter(lambda t: t[key] > min_val, filtered_tickers))\n\n        sorted_tickers = sorted(filtered_tickers, reverse=True, key=lambda t: t[key])\n\n        # Validate whitelist to only have active market pairs\n        pairs = self._whitelist_for_active_markets([s['symbol'] for s in sorted_tickers])\n        pairs = self._verify_blacklist(pairs, aswarning=False)\n        # Limit to X number of pairs\n        pairs = pairs[:self._number_pairs]\n\n        return pairs\n", "path": "freqtrade/pairlist/VolumePairList.py"}]}