fetches all available currencies on an exchange https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-metadata :param dict [params]: extra parameters specific to the exchange API endpoint :returns dict: an a
(self, params={})
| 431 | return self.safe_integer(response, 'time') |
| 432 | |
| 433 | def fetch_currencies(self, params={}) -> Currencies: |
| 434 | """ |
| 435 | fetches all available currencies on an exchange |
| 436 | |
| 437 | https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-metadata |
| 438 | |
| 439 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 440 | :returns dict: an associative dictionary of currencies |
| 441 | """ |
| 442 | if self.check_required_credentials(False): |
| 443 | self.initialize_client() |
| 444 | request = { |
| 445 | # 'type': 'meta', |
| 446 | 'type': 'spotMeta', |
| 447 | } |
| 448 | response = self.publicPostInfo(self.extend(request, params)) |
| 449 | # |
| 450 | # [ |
| 451 | # { |
| 452 | # "universe": [ |
| 453 | # { |
| 454 | # "maxLeverage": 50, |
| 455 | # "name": "SOL", |
| 456 | # "onlyIsolated": False, |
| 457 | # "szDecimals": 2 |
| 458 | # } |
| 459 | # ] |
| 460 | # } |
| 461 | # ] |
| 462 | # |
| 463 | # spotMeta = self.publicPostInfo({'type': 'spotMeta'}) |
| 464 | tokens = self.safe_list(response, 'tokens', []) |
| 465 | # meta = self.safe_list(response, 'universe', []) |
| 466 | self.options['cachedCurrenciesById'] = {} # used to map hip3 markets |
| 467 | return self.parse_currencies(tokens) |
| 468 | |
| 469 | def parse_currency(self, rawCurrency: dict) -> Currency: |
| 470 | # id = i |
nothing calls this directly
no test coverage detected