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

Method load_static_data

python/ccxt/test/tests_sync.py:734–750  ·  view source on GitHub ↗
(self, folder, target_exchange=None)

Source from the content-addressed store, hash-verified

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