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

Method fetch_spot_markets

python/ccxt/xt.py:1006–1062  ·  view source on GitHub ↗
(self, params={})

Source from the content-addressed store, hash-verified

1004 return self.array_concat(spotMarkets, swapAndFutureMarkets)
1005
1006 def fetch_spot_markets(self, params={}):
1007 response = self.publicSpotGetSymbol(params)
1008 #
1009 # {
1010 # "rc": 0,
1011 # "mc": "SUCCESS",
1012 # "ma": [],
1013 # "result": {
1014 # "time": 1677881368812,
1015 # "version": "abb101d1543e54bee40687b135411ba0",
1016 # "symbols": [
1017 # {
1018 # "id": 640,
1019 # "symbol": "xt_usdt",
1020 # "state": "ONLINE",
1021 # "stateTime": 1554048000000,
1022 # "tradingEnabled": True,
1023 # "openapiEnabled": True,
1024 # "nextStateTime": null,
1025 # "nextState": null,
1026 # "depthMergePrecision": 5,
1027 # "baseCurrency": "xt",
1028 # "baseCurrencyPrecision": 8,
1029 # "baseCurrencyId": 128,
1030 # "quoteCurrency": "usdt",
1031 # "quoteCurrencyPrecision": 8,
1032 # "quoteCurrencyId": 11,
1033 # "pricePrecision": 4,
1034 # "quantityPrecision": 2,
1035 # "orderTypes": ["LIMIT","MARKET"],
1036 # "timeInForces": ["GTC","IOC"],
1037 # "displayWeight": 10002,
1038 # "displayLevel": "FULL",
1039 # "plates": [],
1040 # "filters":[
1041 # {
1042 # "filter": "QUOTE_QTY",
1043 # "min": "1"
1044 # },
1045 # {
1046 # "filter": "PROTECTION_LIMIT",
1047 # "buyMaxDeviation": "0.8",
1048 # "sellMaxDeviation": "4"
1049 # },
1050 # {
1051 # "filter": "PROTECTION_MARKET",
1052 # "maxDeviation": "0.02"
1053 # }
1054 # ]
1055 # },
1056 # ]
1057 # }
1058 # }
1059 #
1060 data = self.safe_value(response, 'result', {})
1061 symbols = self.safe_value(data, 'symbols', [])
1062 return self.parse_markets(symbols)
1063

Callers 1

fetch_marketsMethod · 0.95

Calls 3

parse_marketsMethod · 0.95
safe_valueMethod · 0.80
publicSpotGetSymbolMethod · 0.65

Tested by

no test coverage detected