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

Method parse_balance

python/ccxt/ascendex.py:916–930  ·  view source on GitHub ↗
(self, response)

Source from the content-addressed store, hash-verified

914 ]
915
916 def parse_balance(self, response) -> Balances:
917 result = {
918 'info': response,
919 'timestamp': None,
920 'datetime': None,
921 }
922 balances = self.safe_list(response, 'data', [])
923 for i in range(0, len(balances)):
924 balance = balances[i]
925 code = self.safe_currency_code(self.safe_string(balance, 'asset'))
926 account = self.account()
927 account['free'] = self.safe_string(balance, 'availableBalance')
928 account['total'] = self.safe_string(balance, 'totalBalance')
929 result[code] = account
930 return self.safe_balance(result)
931
932 def parse_margin_balance(self, response):
933 result = {

Callers 1

fetch_balanceMethod · 0.95

Calls 6

safe_listMethod · 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