MCPcopy Index your code
hub / github.com/ccxt/ccxt / load_static_data

Method load_static_data

python/ccxt/test/tests_async.py:737–753  ·  view source on GitHub ↗
(self, folder, target_exchange=None)

Source from the content-addressed store, hash-verified

735 return content
736
737 def load_static_data(self, folder, target_exchange=None):
738 result = {}
739 if target_exchange:
740 # read a single exchange
741 path = folder + target_exchange + '.json'
742 if not io_file_exists(path):
743 dump('[WARN] tests not found: ' + path)
744 return None
745 result[target_exchange] = io_file_read(path)
746 return result
747 files = io_dir_read(folder)
748 for i in range(0, len(files)):
749 file = files[i]
750 exchange_name = file.replace('.json', '')
751 content = io_file_read(folder + file)
752 result[exchange_name] = content
753 return result
754
755 def remove_hostnamefrom_url(self, url):
756 if url is None:

Callers 1

run_static_testsMethod · 0.95

Calls 6

io_file_existsFunction · 0.90
dumpFunction · 0.90
io_file_readFunction · 0.90
io_dir_readFunction · 0.90
replaceMethod · 0.80
rangeFunction · 0.50

Tested by

no test coverage detected