MCPcopy Create free account
hub / github.com/ccxt/ccxt / fetch_markets

Method fetch_markets

python/ccxt/xt.py:985–1004  ·  view source on GitHub ↗

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={})

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 4

fetch_spot_marketsMethod · 0.95
array_concatMethod · 0.80
load_time_differenceMethod · 0.45

Tested by

no test coverage detected