Add fix for bibox exchange
This commit is contained in:
		| @@ -15,3 +15,4 @@ from freqtrade.exchange.exchange import (market_is_active,  # noqa: F401 | ||||
|                                          symbol_is_pair) | ||||
| from freqtrade.exchange.kraken import Kraken  # noqa: F401 | ||||
| from freqtrade.exchange.binance import Binance  # noqa: F401 | ||||
| from freqtrade.exchange.bibox import Bibox  # noqa: F401 | ||||
|   | ||||
							
								
								
									
										21
									
								
								freqtrade/exchange/bibox.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								freqtrade/exchange/bibox.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| """ Bibox exchange subclass """ | ||||
| import logging | ||||
| from typing import Dict | ||||
|  | ||||
| from freqtrade.exchange import Exchange | ||||
|  | ||||
| logger = logging.getLogger(__name__) | ||||
|  | ||||
|  | ||||
| class Bibox(Exchange): | ||||
|     """ | ||||
|     Bibox exchange class. Contains adjustments needed for Freqtrade to work | ||||
|     with this exchange. | ||||
|  | ||||
|     Please note that this exchange is not included in the list of exchanges | ||||
|     officially supported by the Freqtrade development team. So some features | ||||
|     may still not work as expected. | ||||
|     """ | ||||
|  | ||||
|     # Adjust ccxt exchange API metadata info | ||||
|     _ccxt_has: Dict = {"fetchCurrencies": False} | ||||
| @@ -30,6 +30,9 @@ class Exchange: | ||||
|  | ||||
|     _config: Dict = {} | ||||
|  | ||||
|     # Adjustments to ccxt exchange API metadata info (ccxt exchange `has` options) | ||||
|     _ccxt_has: Dict = {} | ||||
|  | ||||
|     # Parameters to add directly to buy/sell calls (like agreeing to trading agreement) | ||||
|     _params: Dict = {} | ||||
|  | ||||
| @@ -152,6 +155,10 @@ class Exchange: | ||||
|         except ccxt.BaseError as e: | ||||
|             raise OperationalException(f"Initialization of ccxt failed. Reason: {e}") from e | ||||
|  | ||||
|         # Adjust ccxt API metadata info (`has` options) for the exchange | ||||
|         for k, v in self._ccxt_has.items(): | ||||
|             api.has[k] = v | ||||
|  | ||||
|         self.set_sandbox(api, exchange_config, name) | ||||
|  | ||||
|         return api | ||||
|   | ||||
		Reference in New Issue
	
	Block a user