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