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

Method parse_account

python/ccxt/extended.py:1528–1538  ·  view source on GitHub ↗
(self, account: dict)

Source from the content-addressed store, hash-verified

1526 return self.parse_accounts(data)
1527
1528 def parse_account(self, account: dict) -> Account:
1529 accountIndex = self.safe_integer(account, 'accountIndex')
1530 type = None
1531 if accountIndex is not None:
1532 type = 'main' if (accountIndex == 0) else 'subaccount'
1533 return {
1534 'id': self.safe_string_2(account, 'accountId', 'id'),
1535 'type': type,
1536 'code': None,
1537 'info': account,
1538 }
1539
1540 def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
1541 """

Callers 1

fetch_accountMethod · 0.95

Calls 2

safe_integerMethod · 0.80
safe_string_2Method · 0.80

Tested by

no test coverage detected