fetch all the accounts associated with a profile https://hashkeyglobal-apidoc.readme.io/reference/query-sub-account :param dict [params]: extra parameters specific to the exchange API endpoint :returns dict: a dictionary of `account structures <https://docs.ccxt.co
(self, params={})
| 2197 | } |
| 2198 | |
| 2199 | def fetch_accounts(self, params={}) -> List[Account]: |
| 2200 | """ |
| 2201 | fetch all the accounts associated with a profile |
| 2202 | |
| 2203 | https://hashkeyglobal-apidoc.readme.io/reference/query-sub-account |
| 2204 | |
| 2205 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 2206 | :returns dict: a dictionary of `account structures <https://docs.ccxt.com/?id=account-structure>` indexed by the account type |
| 2207 | """ |
| 2208 | self.load_markets() |
| 2209 | response = self.privateGetApiV1AccountType(params) |
| 2210 | # |
| 2211 | # [ |
| 2212 | # { |
| 2213 | # "accountId": "1732885739589466112", |
| 2214 | # "accountLabel": "Main Trading Account", |
| 2215 | # "accountType": 1, |
| 2216 | # "accountIndex": 0 |
| 2217 | # }, |
| 2218 | # ... |
| 2219 | # ] |
| 2220 | # |
| 2221 | return self.parse_accounts(response, params) |
| 2222 | |
| 2223 | def parse_account(self, account): |
| 2224 | accountLabel = self.safe_string(account, 'accountLabel') |
nothing calls this directly
no test coverage detected