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

Method fetch_accounts

python/ccxt/aftermath.py:643–667  ·  view source on GitHub ↗

https://testnet.aftermath.finance/docs/#/CCXT/accounts query for accounts owned by the walletAddress. An Account is needed for all trading methods. :param dict [params]: extra parameters specific to the exchange API endpoint :returns Array: a list of `account struc

(self, params={})

Source from the content-addressed store, hash-verified

641 return self.safe_balance(result)
642
643 def fetch_accounts(self, params={}) -> List[Account]:
644 """
645
646 https://testnet.aftermath.finance/docs/#/CCXT/accounts
647
648 query for accounts owned by the walletAddress. An Account is needed for all trading methods.
649 :param dict [params]: extra parameters specific to the exchange API endpoint
650 :returns Array: a list of `account structures <https://github.com/ccxt/ccxt/wiki/Manual#accounts>`
651 """
652 self.load_markets()
653 request = {
654 'address': self.walletAddress,
655 }
656 response = self.privatePostAccounts(self.extend(request, params))
657 #
658 # [
659 # {
660 # "id": "0x22c5e3d2f5bcfd4351a62cd70874878b7923b56d79d04225ed96370a7ac844c4",
661 # "type": "primary",
662 # "code": "USDC",
663 # "accountNumber": 14822
664 # }
665 # ]
666 #
667 return self.parse_accounts(response)
668
669 def parse_account(self, account: dict) -> Account:
670 return {

Callers

nothing calls this directly

Calls 4

parse_accountsMethod · 0.80
privatePostAccountsMethod · 0.65
load_marketsMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected