async def fetch_balance(self, params={}):
    if ((not ('userid' in params)) and (self.apiKey is None)):
        raise ArgumentsRequired((self.id + ' fetchDeposits() requires self.apiKey or userid argument'))
    (await self.load_markets())
    request = {'userid': self.apiKey}
    balances = (await self.publicGetBalance(self.extend(request, params)))
    result = {'info': balances}
    for i in range(0, len(balances)):
        balance = balances[i]
        currencyId = self.safe_string(balance, 'code')
        code = self.safe_currency_code(currencyId, None)
        account = self.account()
        account['free'] = self.safe_string(balance, 'free')
        account['used'] = self.safe_string(balance, 'used')
        result[code] = account
    return self.parse_balance(result, False)
async def fetch_balance(self, params={}):
    if ((not ('userid' in params)) and (self.apiKey is None)):
        raise ArgumentsRequired((self.id + ' fetchDeposits() requires self.apiKey or userid argument'))
    (await self.load_markets())
    request = {'userid': self.apiKey}
    balances = (await self.publicGetBalance(self.extend(request, params)))
    result = {'info': balances}
    for i in range(0, len(balances)):
        balance = balances[i]
        currencyId = self.safe_string(balance, 'code')
        code = self.safe_currency_code(currencyId, None)
        account = self.account()
        account['free'] = self.safe_string(balance, 'free')
        account['used'] = self.safe_string(balance, 'used')
        result[code] = account
    return self.parse_balance(result, False)