async def fetch_balance(self, params={}):
    (await self.load_markets())
    response = (await self.privateGetPaymentBalances(params))
    result = {'info': response}
    for i in range(0, len(response)):
        balance = response[i]
        currencyId = self.safe_string(balance, 'currency')
        code = self.safe_currency_code(currencyId)
        account = None
        if (code in result):
            account = result[code]
        else:
            account = self.account()
        if (balance['type'] == 'total'):
            account['total'] = self.safe_float(balance, 'value')
        if (balance['type'] == 'available'):
            account['free'] = self.safe_float(balance, 'value')
        if (balance['type'] == 'trade'):
            account['used'] = self.safe_float(balance, 'value')
        result[code] = account
    return self.parse_balance(result)
async def fetch_balance(self, params={}):
    (await self.load_markets())
    response = (await self.privateGetPaymentBalances(params))
    result = {'info': response}
    for i in range(0, len(response)):
        balance = response[i]
        currencyId = self.safe_string(balance, 'currency')
        code = self.safe_currency_code(currencyId)
        account = None
        if (code in result):
            account = result[code]
        else:
            account = self.account()
        if (balance['type'] == 'total'):
            account['total'] = self.safe_float(balance, 'value')
        if (balance['type'] == 'available'):
            account['free'] = self.safe_float(balance, 'value')
        if (balance['type'] == 'trade'):
            account['used'] = self.safe_float(balance, 'value')
        result[code] = account
    return self.parse_balance(result)