MCPcopy Create free account
hub / github.com/ccxt/ccxt / parse_balance

Method parse_balance

python/ccxt/extended.py:1448–1458  ·  view source on GitHub ↗
(self, response)

Source from the content-addressed store, hash-verified

1446 return self.parse_balance(data)
1447
1448 def parse_balance(self, response) -> Balances:
1449 result = {'info': response}
1450 for i in range(0, len(response)):
1451 balance = self.safe_dict(response, i, {})
1452 currencyId = self.safe_string(balance, 'asset')
1453 code = self.safe_currency_code(currencyId)
1454 account = self.account()
1455 account['free'] = self.safe_string(balance, 'availableToWithdraw')
1456 account['total'] = self.safe_string(balance, 'balance')
1457 result[code] = account
1458 return self.safe_balance(result)
1459
1460 def fetch_account(self, params={}) -> Account:
1461 """

Callers 1

fetch_balanceMethod · 0.95

Calls 6

safe_dictMethod · 0.80
safe_stringMethod · 0.80
safe_balanceMethod · 0.80
rangeFunction · 0.50
safe_currency_codeMethod · 0.45
accountMethod · 0.45

Tested by

no test coverage detected