Merge pull request #2525 from hroff-1902/exchange-bibox
Add fix for bibox exchange
This commit is contained in:
commit
17c11b2afa
@ -15,3 +15,4 @@ from freqtrade.exchange.exchange import (market_is_active, # noqa: F401
|
|||||||
symbol_is_pair)
|
symbol_is_pair)
|
||||||
from freqtrade.exchange.kraken import Kraken # noqa: F401
|
from freqtrade.exchange.kraken import Kraken # noqa: F401
|
||||||
from freqtrade.exchange.binance import Binance # noqa: F401
|
from freqtrade.exchange.binance import Binance # noqa: F401
|
||||||
|
from freqtrade.exchange.bibox import Bibox # noqa: F401
|
||||||
|
22
freqtrade/exchange/bibox.py
Normal file
22
freqtrade/exchange/bibox.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
""" 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.
|
||||||
|
"""
|
||||||
|
|
||||||
|
# fetchCurrencies API point requires authentication for Bibox,
|
||||||
|
# so switch it off for Freqtrade load_markets()
|
||||||
|
_ccxt_config: Dict = {"has": {"fetchCurrencies": False}}
|
@ -30,6 +30,9 @@ class Exchange:
|
|||||||
|
|
||||||
_config: Dict = {}
|
_config: Dict = {}
|
||||||
|
|
||||||
|
# Parameters to add directly to ccxt sync/async initialization.
|
||||||
|
_ccxt_config: Dict = {}
|
||||||
|
|
||||||
# Parameters to add directly to buy/sell calls (like agreeing to trading agreement)
|
# Parameters to add directly to buy/sell calls (like agreeing to trading agreement)
|
||||||
_params: Dict = {}
|
_params: Dict = {}
|
||||||
|
|
||||||
@ -91,10 +94,17 @@ class Exchange:
|
|||||||
self._trades_pagination_arg = self._ft_has['trades_pagination_arg']
|
self._trades_pagination_arg = self._ft_has['trades_pagination_arg']
|
||||||
|
|
||||||
# Initialize ccxt objects
|
# Initialize ccxt objects
|
||||||
|
ccxt_config = self._ccxt_config.copy()
|
||||||
|
ccxt_config = deep_merge_dicts(exchange_config.get('ccxt_config', {}),
|
||||||
|
ccxt_config)
|
||||||
self._api = self._init_ccxt(
|
self._api = self._init_ccxt(
|
||||||
exchange_config, ccxt_kwargs=exchange_config.get('ccxt_config'))
|
exchange_config, ccxt_kwargs=ccxt_config)
|
||||||
|
|
||||||
|
ccxt_async_config = self._ccxt_config.copy()
|
||||||
|
ccxt_async_config = deep_merge_dicts(exchange_config.get('ccxt_async_config', {}),
|
||||||
|
ccxt_async_config)
|
||||||
self._api_async = self._init_ccxt(
|
self._api_async = self._init_ccxt(
|
||||||
exchange_config, ccxt_async, ccxt_kwargs=exchange_config.get('ccxt_async_config'))
|
exchange_config, ccxt_async, ccxt_kwargs=ccxt_async_config)
|
||||||
|
|
||||||
logger.info('Using Exchange "%s"', self.name)
|
logger.info('Using Exchange "%s"', self.name)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user