def __init__(self, config={}):
    self.precision = (dict() if (self.precision is None) else self.precision)
    self.limits = (dict() if (self.limits is None) else self.limits)
    self.exceptions = (dict() if (self.exceptions is None) else self.exceptions)
    self.headers = (dict() if (self.headers is None) else self.headers)
    self.balance = (dict() if (self.balance is None) else self.balance)
    self.orderbooks = (dict() if (self.orderbooks is None) else self.orderbooks)
    self.orders = (dict() if (self.orders is None) else self.orders)
    self.trades = (dict() if (self.trades is None) else self.trades)
    self.transactions = (dict() if (self.transactions is None) else self.transactions)
    self.currencies = (dict() if (self.currencies is None) else self.currencies)
    self.options = (dict() if (self.options is None) else self.options)
    self.decimal_to_precision = decimal_to_precision
    self.number_to_string = number_to_string
    self.userAgent = default_user_agent()
    settings = self.deep_extend(self.describe(), config)
    for key in settings:
        if (hasattr(self, key) and isinstance(getattr(self, key), dict)):
            setattr(self, key, self.deep_extend(getattr(self, key), settings[key]))
        else:
            setattr(self, key, settings[key])
    if self.api:
        self.define_rest_api(self.api, 'request')
    if self.markets:
        self.set_markets(self.markets)
    cls = type(self)
    for name in dir(self):
        if ((name[0] != '_') and (name[(- 1)] != '_') and ('_' in name)):
            parts = name.split('_')
            camelcase = (parts[0] + ''.join((self.capitalize(i) for i in parts[1:])))
            attr = getattr(self, name)
            if isinstance(attr, types.MethodType):
                setattr(cls, camelcase, getattr(cls, name))
            else:
                setattr(self, camelcase, attr)
    self.tokenBucket = self.extend({'refillRate': (1.0 / self.rateLimit), 'delay': 0.001, 'capacity': 1.0, 'defaultCost': 1.0}, (getattr(self, 'tokenBucket') if hasattr(self, 'tokenBucket') else {}))
    self.session = (self.session if self.session else Session())
    self.logger = (self.logger if self.logger else logging.getLogger(__name__))
    if (self.requiresWeb3 and Web3 and (not self.web3)):
        self.web3 = Web3(HTTPProvider())
def __init__(self, config={}):
    self.precision = (dict() if (self.precision is None) else self.precision)
    self.limits = (dict() if (self.limits is None) else self.limits)
    self.exceptions = (dict() if (self.exceptions is None) else self.exceptions)
    self.headers = (dict() if (self.headers is None) else self.headers)
    self.balance = (dict() if (self.balance is None) else self.balance)
    self.orderbooks = (dict() if (self.orderbooks is None) else self.orderbooks)
    self.orders = (dict() if (self.orders is None) else self.orders)
    self.trades = (dict() if (self.trades is None) else self.trades)
    self.transactions = (dict() if (self.transactions is None) else self.transactions)
    self.currencies = (dict() if (self.currencies is None) else self.currencies)
    self.options = (dict() if (self.options is None) else self.options)
    self.decimal_to_precision = decimal_to_precision
    self.number_to_string = number_to_string
    self.userAgent = default_user_agent()
    settings = self.deep_extend(self.describe(), config)
    for key in settings:
        if (hasattr(self, key) and isinstance(getattr(self, key), dict)):
            setattr(self, key, self.deep_extend(getattr(self, key), settings[key]))
        else:
            setattr(self, key, settings[key])
    if self.api:
        self.define_rest_api(self.api, 'request')
    if self.markets:
        self.set_markets(self.markets)
    cls = type(self)
    for name in dir(self):
        if ((name[0] != '_') and (name[(- 1)] != '_') and ('_' in name)):
            parts = name.split('_')
            camelcase = (parts[0] + .join((self.capitalize(i) for i in parts[1:])))
            attr = getattr(self, name)
            if isinstance(attr, types.MethodType):
                setattr(cls, camelcase, getattr(cls, name))
            else:
                setattr(self, camelcase, attr)
    self.tokenBucket = self.extend({'refillRate': (1.0 / self.rateLimit), 'delay': 0.001, 'capacity': 1.0, 'defaultCost': 1.0}, (getattr(self, 'tokenBucket') if hasattr(self, 'tokenBucket') else {}))
    self.session = (self.session if self.session else Session())
    self.logger = (self.logger if self.logger else logging.getLogger(__name__))
    if (self.requiresWeb3 and Web3 and (not self.web3)):
        self.web3 = Web3(HTTPProvider())