fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market https://www.gate.com/docs/developers/apiv4/en/#get-currency-pair-ticker-information https://www.gate.com/docs/developers/apiv4/en/#get-all-futures-trading-s
(self, symbols: Strings = None, params={})
| 2892 | }, market) |
| 2893 | |
| 2894 | def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers: |
| 2895 | """ |
| 2896 | fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market |
| 2897 | |
| 2898 | https://www.gate.com/docs/developers/apiv4/en/#get-currency-pair-ticker-information |
| 2899 | https://www.gate.com/docs/developers/apiv4/en/#get-all-futures-trading-statistics |
| 2900 | https://www.gate.com/docs/developers/apiv4/en/#get-all-futures-trading-statistics-2 |
| 2901 | https://www.gate.com/docs/developers/apiv4/en/#query-options-market-ticker-information |
| 2902 | |
| 2903 | :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| 2904 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 2905 | :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/?id=ticker-structure>` |
| 2906 | """ |
| 2907 | self.load_markets() |
| 2908 | symbols = self.market_symbols(symbols) |
| 2909 | first = self.safe_string(symbols, 0) |
| 2910 | market = None |
| 2911 | if first is not None: |
| 2912 | market = self.market(first) |
| 2913 | type, query = self.handle_market_type_and_params('fetchTickers', market, params) |
| 2914 | request, requestParams = self.prepare_request(None, type, query) |
| 2915 | response: dict |
| 2916 | request['timezone'] = 'utc0' # default to utc |
| 2917 | if type == 'spot' or type == 'margin': |
| 2918 | response = self.publicSpotGetTickers(self.extend(request, requestParams)) |
| 2919 | elif type == 'swap': |
| 2920 | response = self.publicFuturesGetSettleTickers(self.extend(request, requestParams)) |
| 2921 | elif type == 'future': |
| 2922 | response = self.publicDeliveryGetSettleTickers(self.extend(request, requestParams)) |
| 2923 | elif type == 'option': |
| 2924 | self.check_required_argument('fetchTickers', symbols, 'symbols') |
| 2925 | marketId = self.safe_string(market, 'id') |
| 2926 | optionParts = marketId.split('-') |
| 2927 | request['underlying'] = self.safe_string(optionParts, 0) |
| 2928 | response = self.publicOptionsGetTickers(self.extend(request, requestParams)) |
| 2929 | else: |
| 2930 | raise NotSupported(self.id + ' fetchTickers() not support self market type, provide symbols or set params["defaultType"] to one from spot/margin/swap/future/option') |
| 2931 | return self.parse_tickers(response, symbols) |
| 2932 | |
| 2933 | def parse_balance_helper(self, entry): |
| 2934 | account = self.account() |
nothing calls this directly
no test coverage detected