def fetch_balance(self, params={}):
    self.load_markets()
    lowercaseCurrencies = []
    currencies = list(self.currencies.keys())
    for i in range(0, len(currencies)):
        currency = currencies[i]
        lowercaseCurrencies.append(currency.lower())
    request = {'currencies': ','.join(lowercaseCurrencies)}
    response = self.userPostBalance(self.extend(request, params))
    result = {'info': response}
    for i in range(0, len(response)):
        balance = response[i]
        currencyId = self.safe_string(balance['currency'], 'name')
        code = self.safe_currency_code(currencyId)
        account = self.account()
        account['free'] = self.safe_float(balance, 'available')
        blocked = self.safe_float(balance, 'blocked')
        inOrders = self.safe_float(balance, 'inOrders')
        withdrawing = self.safe_float(balance, 'withdrawing')
        account['used'] = self.sum(blocked, inOrders, withdrawing)
        result[code] = account
    return self.parse_balance(result)
def fetch_balance(self, params={}):
    self.load_markets()
    lowercaseCurrencies = []
    currencies = list(self.currencies.keys())
    for i in range(0, len(currencies)):
        currency = currencies[i]
        lowercaseCurrencies.append(currency.lower())
    request = {'currencies': ','.join(lowercaseCurrencies)}
    response = self.userPostBalance(self.extend(request, params))
    result = {'info': response}
    for i in range(0, len(response)):
        balance = response[i]
        currencyId = self.safe_string(balance['currency'], 'name')
        code = self.safe_currency_code(currencyId)
        account = self.account()
        account['free'] = self.safe_float(balance, 'available')
        blocked = self.safe_float(balance, 'blocked')
        inOrders = self.safe_float(balance, 'inOrders')
        withdrawing = self.safe_float(balance, 'withdrawing')
        account['used'] = self.sum(blocked, inOrders, withdrawing)
        result[code] = account
    return self.parse_balance(result)