fetches the last price for multiple markets https://hashkeyglobal-apidoc.readme.io/reference/get-symbol-price-ticker :param str[] [symbols]: unified symbols of the markets to fetch the last prices :param dict [params]: extra parameters specific to the exchange API
(self, symbols: Strings = None, params={})
| 1689 | }, market) |
| 1690 | |
| 1691 | def fetch_last_prices(self, symbols: Strings = None, params={}) -> LastPrices: |
| 1692 | """ |
| 1693 | fetches the last price for multiple markets |
| 1694 | |
| 1695 | https://hashkeyglobal-apidoc.readme.io/reference/get-symbol-price-ticker |
| 1696 | |
| 1697 | :param str[] [symbols]: unified symbols of the markets to fetch the last prices |
| 1698 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 1699 | :param str [params.symbol]: the id of the market to fetch last price for |
| 1700 | :returns dict: a dictionary of lastprices structures |
| 1701 | """ |
| 1702 | self.load_markets() |
| 1703 | symbols = self.market_symbols(symbols) |
| 1704 | request = {} |
| 1705 | response = self.publicGetQuoteV1TickerPrice(self.extend(request, params)) |
| 1706 | # |
| 1707 | # [ |
| 1708 | # { |
| 1709 | # "s": "BTCUSDT-PERPETUAL", |
| 1710 | # "p": "64871" |
| 1711 | # }, |
| 1712 | # ... |
| 1713 | # ] |
| 1714 | # |
| 1715 | return self.parse_last_prices(response, symbols) |
| 1716 | |
| 1717 | def parse_last_price(self, entry, market: Market = None) -> LastPrice: |
| 1718 | marketId = self.safe_string(entry, 's') |
nothing calls this directly
no test coverage detected