retrieves data on all markets for xt https://doc.xt.com/#market2symbol https://doc.xt.com/#futures_quotesgetSymbols :param dict params: extra parameters specific to the xt api endpoint :returns dict[]: an array of objects representing market data
(self, params={})
| 983 | return result |
| 984 | |
| 985 | def fetch_markets(self, params={}) -> List[Market]: |
| 986 | """ |
| 987 | retrieves data on all markets for xt |
| 988 | |
| 989 | https://doc.xt.com/#market2symbol |
| 990 | https://doc.xt.com/#futures_quotesgetSymbols |
| 991 | |
| 992 | :param dict params: extra parameters specific to the xt api endpoint |
| 993 | :returns dict[]: an array of objects representing market data |
| 994 | """ |
| 995 | if self.options['adjustForTimeDifference']: |
| 996 | self.load_time_difference() |
| 997 | promisesUnresolved = [ |
| 998 | self.fetch_spot_markets(params), |
| 999 | self.fetch_swap_and_future_markets(params), |
| 1000 | ] |
| 1001 | promises = promisesUnresolved |
| 1002 | spotMarkets = promises[0] |
| 1003 | swapAndFutureMarkets = promises[1] |
| 1004 | return self.array_concat(spotMarkets, swapAndFutureMarkets) |
| 1005 | |
| 1006 | def fetch_spot_markets(self, params={}): |
| 1007 | response = self.publicSpotGetSymbol(params) |
nothing calls this directly
no test coverage detected