ccxt 4.4.52__py2.py3-none-any.whl → 4.4.57__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. ccxt/__init__.py +1 -3
  2. ccxt/abstract/binance.py +0 -1
  3. ccxt/abstract/binancecoinm.py +0 -1
  4. ccxt/abstract/binanceus.py +0 -1
  5. ccxt/abstract/binanceusdm.py +0 -1
  6. ccxt/ace.py +3 -0
  7. ccxt/alpaca.py +5 -0
  8. ccxt/ascendex.py +2 -1
  9. ccxt/async_support/__init__.py +1 -3
  10. ccxt/async_support/ace.py +3 -0
  11. ccxt/async_support/alpaca.py +5 -0
  12. ccxt/async_support/ascendex.py +2 -1
  13. ccxt/async_support/base/exchange.py +24 -7
  14. ccxt/async_support/bigone.py +5 -0
  15. ccxt/async_support/binance.py +54 -54
  16. ccxt/async_support/bingx.py +25 -29
  17. ccxt/async_support/bit2c.py +3 -0
  18. ccxt/async_support/bitbank.py +3 -0
  19. ccxt/async_support/bitbns.py +3 -0
  20. ccxt/async_support/bitfinex.py +6 -1
  21. ccxt/async_support/bitflyer.py +6 -1
  22. ccxt/async_support/bitget.py +9 -5
  23. ccxt/async_support/bithumb.py +3 -1
  24. ccxt/async_support/bitmart.py +22 -12
  25. ccxt/async_support/bitmex.py +99 -93
  26. ccxt/async_support/bitopro.py +7 -2
  27. ccxt/async_support/bitrue.py +4 -0
  28. ccxt/async_support/bitso.py +5 -2
  29. ccxt/async_support/bitstamp.py +3 -0
  30. ccxt/async_support/bitteam.py +5 -0
  31. ccxt/async_support/bitvavo.py +4 -0
  32. ccxt/async_support/blockchaincom.py +4 -0
  33. ccxt/async_support/blofin.py +3 -0
  34. ccxt/async_support/btcalpha.py +5 -0
  35. ccxt/async_support/btcbox.py +3 -2
  36. ccxt/async_support/btcmarkets.py +5 -0
  37. ccxt/async_support/btcturk.py +3 -0
  38. ccxt/async_support/bybit.py +13 -5
  39. ccxt/async_support/cex.py +2 -0
  40. ccxt/async_support/coinbase.py +20 -13
  41. ccxt/async_support/coinbaseexchange.py +5 -0
  42. ccxt/async_support/coinbaseinternational.py +23 -4
  43. ccxt/async_support/coincatch.py +3 -0
  44. ccxt/async_support/coincheck.py +2 -0
  45. ccxt/async_support/coinex.py +6 -2
  46. ccxt/async_support/coinlist.py +5 -0
  47. ccxt/async_support/coinmate.py +4 -0
  48. ccxt/async_support/coinmetro.py +9 -5
  49. ccxt/async_support/coinone.py +3 -0
  50. ccxt/async_support/coinsph.py +4 -0
  51. ccxt/async_support/coinspot.py +1 -0
  52. ccxt/async_support/cryptocom.py +5 -0
  53. ccxt/async_support/currencycom.py +3 -0
  54. ccxt/async_support/defx.py +5 -0
  55. ccxt/async_support/delta.py +4 -1
  56. ccxt/async_support/deribit.py +15 -28
  57. ccxt/async_support/digifinex.py +10 -5
  58. ccxt/async_support/ellipx.py +9 -5
  59. ccxt/async_support/exmo.py +7 -4
  60. ccxt/async_support/gate.py +5 -1
  61. ccxt/async_support/gemini.py +3 -0
  62. ccxt/async_support/hashkey.py +5 -4
  63. ccxt/async_support/hitbtc.py +6 -2
  64. ccxt/async_support/hollaex.py +7 -2
  65. ccxt/async_support/htx.py +8 -1
  66. ccxt/async_support/huobijp.py +5 -0
  67. ccxt/async_support/hyperliquid.py +9 -4
  68. ccxt/async_support/idex.py +5 -1
  69. ccxt/async_support/independentreserve.py +4 -0
  70. ccxt/async_support/indodax.py +3 -0
  71. ccxt/async_support/kraken.py +7 -5
  72. ccxt/async_support/krakenfutures.py +5 -2
  73. ccxt/async_support/kucoin.py +13 -6
  74. ccxt/async_support/kucoinfutures.py +5 -1
  75. ccxt/async_support/kuna.py +3 -0
  76. ccxt/async_support/latoken.py +4 -0
  77. ccxt/async_support/lbank.py +6 -1
  78. ccxt/async_support/luno.py +6 -1
  79. ccxt/async_support/mercado.py +4 -0
  80. ccxt/async_support/mexc.py +10 -9
  81. ccxt/async_support/ndax.py +6 -1
  82. ccxt/async_support/novadax.py +5 -0
  83. ccxt/async_support/oceanex.py +6 -2
  84. ccxt/async_support/okcoin.py +4 -0
  85. ccxt/async_support/okx.py +17 -5
  86. ccxt/async_support/onetrading.py +4 -0
  87. ccxt/async_support/oxfun.py +3 -0
  88. ccxt/async_support/p2b.py +3 -0
  89. ccxt/async_support/paradex.py +8 -2
  90. ccxt/async_support/phemex.py +10 -4
  91. ccxt/async_support/poloniex.py +6 -3
  92. ccxt/async_support/poloniexfutures.py +5 -1
  93. ccxt/async_support/probit.py +4 -0
  94. ccxt/async_support/timex.py +4 -0
  95. ccxt/async_support/tokocrypto.py +5 -0
  96. ccxt/async_support/tradeogre.py +2 -0
  97. ccxt/async_support/upbit.py +5 -2
  98. ccxt/async_support/vertex.py +6 -2
  99. ccxt/async_support/wavesexchange.py +20 -3
  100. ccxt/async_support/wazirx.py +2 -0
  101. ccxt/async_support/whitebit.py +5 -4
  102. ccxt/async_support/woo.py +15 -5
  103. ccxt/async_support/woofipro.py +23 -9
  104. ccxt/async_support/xt.py +5 -0
  105. ccxt/async_support/yobit.py +5 -2
  106. ccxt/async_support/zaif.py +2 -0
  107. ccxt/async_support/zonda.py +2 -0
  108. ccxt/base/exchange.py +96 -54
  109. ccxt/base/types.py +1 -1
  110. ccxt/bigone.py +5 -0
  111. ccxt/binance.py +54 -54
  112. ccxt/bingx.py +25 -29
  113. ccxt/bit2c.py +3 -0
  114. ccxt/bitbank.py +3 -0
  115. ccxt/bitbns.py +3 -0
  116. ccxt/bitfinex.py +6 -1
  117. ccxt/bitflyer.py +6 -1
  118. ccxt/bitget.py +9 -5
  119. ccxt/bithumb.py +3 -1
  120. ccxt/bitmart.py +22 -12
  121. ccxt/bitmex.py +99 -93
  122. ccxt/bitopro.py +7 -2
  123. ccxt/bitrue.py +4 -0
  124. ccxt/bitso.py +5 -2
  125. ccxt/bitstamp.py +3 -0
  126. ccxt/bitteam.py +5 -0
  127. ccxt/bitvavo.py +4 -0
  128. ccxt/blockchaincom.py +4 -0
  129. ccxt/blofin.py +3 -0
  130. ccxt/btcalpha.py +5 -0
  131. ccxt/btcbox.py +3 -2
  132. ccxt/btcmarkets.py +5 -0
  133. ccxt/btcturk.py +3 -0
  134. ccxt/bybit.py +13 -5
  135. ccxt/cex.py +2 -0
  136. ccxt/coinbase.py +20 -13
  137. ccxt/coinbaseexchange.py +5 -0
  138. ccxt/coinbaseinternational.py +23 -4
  139. ccxt/coincatch.py +3 -0
  140. ccxt/coincheck.py +2 -0
  141. ccxt/coinex.py +6 -2
  142. ccxt/coinlist.py +5 -0
  143. ccxt/coinmate.py +4 -0
  144. ccxt/coinmetro.py +9 -5
  145. ccxt/coinone.py +3 -0
  146. ccxt/coinsph.py +4 -0
  147. ccxt/coinspot.py +1 -0
  148. ccxt/cryptocom.py +5 -0
  149. ccxt/currencycom.py +3 -0
  150. ccxt/defx.py +5 -0
  151. ccxt/delta.py +4 -1
  152. ccxt/deribit.py +15 -28
  153. ccxt/digifinex.py +10 -5
  154. ccxt/ellipx.py +9 -5
  155. ccxt/exmo.py +7 -4
  156. ccxt/gate.py +5 -1
  157. ccxt/gemini.py +3 -0
  158. ccxt/hashkey.py +5 -4
  159. ccxt/hitbtc.py +6 -2
  160. ccxt/hollaex.py +7 -2
  161. ccxt/htx.py +8 -1
  162. ccxt/huobijp.py +5 -0
  163. ccxt/hyperliquid.py +9 -4
  164. ccxt/idex.py +5 -1
  165. ccxt/independentreserve.py +4 -0
  166. ccxt/indodax.py +3 -0
  167. ccxt/kraken.py +7 -5
  168. ccxt/krakenfutures.py +5 -2
  169. ccxt/kucoin.py +13 -6
  170. ccxt/kucoinfutures.py +5 -1
  171. ccxt/kuna.py +3 -0
  172. ccxt/latoken.py +4 -0
  173. ccxt/lbank.py +6 -1
  174. ccxt/luno.py +6 -1
  175. ccxt/mercado.py +4 -0
  176. ccxt/mexc.py +10 -9
  177. ccxt/ndax.py +6 -1
  178. ccxt/novadax.py +5 -0
  179. ccxt/oceanex.py +6 -2
  180. ccxt/okcoin.py +4 -0
  181. ccxt/okx.py +17 -5
  182. ccxt/onetrading.py +4 -0
  183. ccxt/oxfun.py +3 -0
  184. ccxt/p2b.py +3 -0
  185. ccxt/paradex.py +8 -2
  186. ccxt/phemex.py +10 -4
  187. ccxt/poloniex.py +6 -3
  188. ccxt/poloniexfutures.py +5 -1
  189. ccxt/pro/__init__.py +1 -1
  190. ccxt/pro/binance.py +2 -2
  191. ccxt/pro/bitcoincom.py +1 -4
  192. ccxt/pro/bitget.py +3 -3
  193. ccxt/pro/bitopro.py +1 -1
  194. ccxt/pro/bybit.py +7 -2
  195. ccxt/pro/cex.py +1 -1
  196. ccxt/pro/coincatch.py +3 -3
  197. ccxt/pro/mexc.py +3 -3
  198. ccxt/pro/okx.py +1 -1
  199. ccxt/probit.py +4 -0
  200. ccxt/test/tests_async.py +57 -30
  201. ccxt/test/tests_sync.py +57 -30
  202. ccxt/timex.py +4 -0
  203. ccxt/tokocrypto.py +5 -0
  204. ccxt/tradeogre.py +2 -0
  205. ccxt/upbit.py +5 -2
  206. ccxt/vertex.py +6 -2
  207. ccxt/wavesexchange.py +20 -3
  208. ccxt/wazirx.py +2 -0
  209. ccxt/whitebit.py +5 -4
  210. ccxt/woo.py +15 -5
  211. ccxt/woofipro.py +23 -9
  212. ccxt/xt.py +5 -0
  213. ccxt/yobit.py +5 -2
  214. ccxt/zaif.py +2 -0
  215. ccxt/zonda.py +2 -0
  216. {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/METADATA +225 -143
  217. {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/RECORD +220 -223
  218. ccxt/abstract/lykke.py +0 -29
  219. ccxt/async_support/lykke.py +0 -1370
  220. ccxt/lykke.py +0 -1370
  221. {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/LICENSE.txt +0 -0
  222. {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/WHEEL +0 -0
  223. {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/top_level.txt +0 -0
ccxt/test/tests_async.py CHANGED
@@ -49,16 +49,16 @@ class testMainClass:
49
49
  if self.request_tests and self.response_tests:
50
50
  await self.run_static_request_tests(exchange_id, symbol_argv)
51
51
  await self.run_static_response_tests(exchange_id, symbol_argv)
52
- return
52
+ return True
53
53
  if self.response_tests:
54
54
  await self.run_static_response_tests(exchange_id, symbol_argv)
55
- return
55
+ return True
56
56
  if self.request_tests:
57
57
  await self.run_static_request_tests(exchange_id, symbol_argv) # symbol here is the testname
58
- return
58
+ return True
59
59
  if self.id_tests:
60
60
  await self.run_broker_id_tests()
61
- return
61
+ return True
62
62
  new_line = '\n'
63
63
  dump(new_line + '' + new_line + '' + '[INFO] TESTING ', self.ext, {
64
64
  'exchange': exchange_id,
@@ -103,6 +103,7 @@ class testMainClass:
103
103
  self.test_files = get_test_files_sync(properties, self.ws_tests)
104
104
  else:
105
105
  self.test_files = await get_test_files(properties, self.ws_tests)
106
+ return True
106
107
 
107
108
  def load_credentials_from_env(self, exchange):
108
109
  exchange_id = exchange.id
@@ -125,8 +126,12 @@ class testMainClass:
125
126
  keys_local = get_root_dir() + 'keys.local.json'
126
127
  keys_global_exists = io_file_exists(keys_global)
127
128
  keys_local_exists = io_file_exists(keys_local)
128
- global_settings = io_file_read(keys_global) if keys_global_exists else {}
129
- local_settings = io_file_read(keys_local) if keys_local_exists else {}
129
+ global_settings = {}
130
+ if keys_global_exists:
131
+ global_settings = io_file_read(keys_global)
132
+ local_settings = {}
133
+ if keys_local_exists:
134
+ local_settings = io_file_read(keys_local)
130
135
  all_settings = exchange.deep_extend(global_settings, local_settings)
131
136
  exchange_settings = exchange.safe_value(all_settings, exchange_id, {})
132
137
  if exchange_settings:
@@ -177,7 +182,7 @@ class testMainClass:
177
182
  exchange.options['checksum'] = False
178
183
  # todo: temporary skip for php
179
184
  if 'OrderBook' in method_name and self.ext == 'php':
180
- return
185
+ return True
181
186
  skipped_properties_for_method = self.get_skips(exchange, method_name)
182
187
  is_load_markets = (method_name == 'loadMarkets')
183
188
  is_fetch_currencies = (method_name == 'fetchCurrencies')
@@ -185,7 +190,7 @@ class testMainClass:
185
190
  is_feature_test = (method_name == 'features')
186
191
  # if this is a private test, and the implementation was already tested in public, then no need to re-test it in private test (exception is fetchCurrencies, because our approach in base exchange)
187
192
  if not is_public and (method_name in self.checked_public_tests) and not is_fetch_currencies:
188
- return
193
+ return True
189
194
  skip_message = None
190
195
  supported_by_exchange = (method_name in exchange.has) and exchange.has[method_name]
191
196
  if not is_load_markets and (len(self.only_specific_tests) > 0 and not exchange.in_array(method_name, self.only_specific_tests)):
@@ -203,7 +208,7 @@ class testMainClass:
203
208
  if skip_message:
204
209
  if self.info:
205
210
  dump(self.add_padding(skip_message, 25), name, method_name)
206
- return
211
+ return True
207
212
  if self.info:
208
213
  args_stringified = '(' + exchange.json(args) + ')' # args.join() breaks when we provide a list of symbols or multidimensional array; "args.toString()" breaks bcz of "array to string conversion"
209
214
  dump(self.add_padding('[INFO] TESTING', 25), name, method_name, args_stringified)
@@ -216,7 +221,7 @@ class testMainClass:
216
221
  # add to the list of successed tests
217
222
  if is_public:
218
223
  self.checked_public_tests[method_name] = True
219
- return
224
+ return True
220
225
 
221
226
  def get_skips(self, exchange, method_name):
222
227
  final_skips = {}
@@ -285,10 +290,10 @@ class testMainClass:
285
290
  is_on_maintenance = (isinstance(e, OnMaintenance))
286
291
  is_exchange_not_available = (isinstance(e, ExchangeNotAvailable))
287
292
  should_fail = None
288
- return_success = None
293
+ ret_success = None
289
294
  if is_load_markets:
290
295
  # if "loadMarkets" does not succeed, we must return "false" to caller method, to stop tests continual
291
- return_success = False
296
+ ret_success = False
292
297
  # we might not break exchange tests, if exchange is on maintenance at this moment
293
298
  if is_on_maintenance:
294
299
  should_fail = False
@@ -299,20 +304,19 @@ class testMainClass:
299
304
  if is_exchange_not_available and not is_on_maintenance:
300
305
  # break exchange tests if "ExchangeNotAvailable" exception is thrown, but it's not maintenance
301
306
  should_fail = True
302
- return_success = False
307
+ ret_success = False
303
308
  else:
304
309
  # in all other cases of OperationFailed, show Warning, but don't mark test as failed
305
310
  should_fail = False
306
- return_success = True
311
+ ret_success = True
307
312
  # output the message
308
313
  fail_type = '[TEST_FAILURE]' if should_fail else '[TEST_WARNING]'
309
314
  dump(fail_type, 'Method could not be tested due to a repeated Network/Availability issues', ' | ', exchange.id, method_name, args_stringified, exception_message(e))
310
- return return_success
315
+ return ret_success
311
316
  else:
312
317
  # wait and retry again
313
318
  # (increase wait time on every retry)
314
319
  await exchange.sleep((i + 1) * 1000)
315
- continue
316
320
  else:
317
321
  # if it's loadMarkets, then fail test, because it's mandatory for tests
318
322
  if is_load_markets:
@@ -376,6 +380,7 @@ class testMainClass:
376
380
  tests['fetchPremiumIndexOHLCV'] = [symbol]
377
381
  self.public_tests = tests
378
382
  await self.run_tests(exchange, tests, True)
383
+ return True
379
384
 
380
385
  async def run_tests(self, exchange, tests, is_public_test):
381
386
  test_names = list(tests.keys())
@@ -400,6 +405,7 @@ class testMainClass:
400
405
  dump('[TEST_FAILURE]', exchange.id, test_prefix_string, 'Failed methods : ' + errors_string)
401
406
  if self.info:
402
407
  dump(self.add_padding('[INFO] END ' + test_prefix_string + ' ' + exchange.id, 25))
408
+ return True
403
409
 
404
410
  async def load_exchange(self, exchange):
405
411
  result = await self.test_safe('loadMarkets', exchange, [], True)
@@ -520,11 +526,12 @@ class testMainClass:
520
526
  if exchange.has['swap'] and swap_symbol is not None:
521
527
  exchange.options['defaultType'] = 'swap'
522
528
  await self.run_private_tests(exchange, swap_symbol)
529
+ return True
523
530
 
524
531
  async def run_private_tests(self, exchange, symbol):
525
532
  if not exchange.check_required_credentials(False):
526
533
  dump('[INFO] Skipping private tests', 'Keys not found')
527
- return
534
+ return True
528
535
  code = self.get_exchange_code(exchange)
529
536
  # if (exchange.deepExtendedTest) {
530
537
  # await test ('InvalidNonce', exchange, symbol);
@@ -594,14 +601,14 @@ class testMainClass:
594
601
  proxy_test_name = self.proxy_test_file_name
595
602
  # todo: temporary skip for sync py
596
603
  if self.ext == 'py' and is_sync():
597
- return
604
+ return True
598
605
  # try proxy several times
599
606
  max_retries = 3
600
607
  exception = None
601
608
  for j in range(0, max_retries):
602
609
  try:
603
610
  await self.test_method(proxy_test_name, exchange, [], True)
604
- return # if successfull, then end the test
611
+ return True # if successfull, then end the test
605
612
  except Exception as e:
606
613
  exception = e
607
614
  await exchange.sleep(j * 1000)
@@ -610,12 +617,13 @@ class testMainClass:
610
617
  error_message = '[TEST_FAILURE] Failed ' + proxy_test_name + ' : ' + exception_message(exception)
611
618
  # temporary comment the below, because c# transpilation failure
612
619
  # throw new Exchange Error (errorMessage.toString ());
613
- dump('[TEST_WARNING]' + str(error_message))
620
+ dump('[TEST_WARNING]' + error_message)
621
+ return True
614
622
 
615
623
  async def start_test(self, exchange, symbol):
616
624
  # we do not need to test aliases
617
625
  if exchange.alias:
618
- return
626
+ return True
619
627
  if self.sandbox or get_exchange_prop(exchange, 'sandbox'):
620
628
  exchange.set_sandbox_mode(True)
621
629
  try:
@@ -623,7 +631,7 @@ class testMainClass:
623
631
  if not result:
624
632
  if not is_sync():
625
633
  await close(exchange)
626
- return
634
+ return True
627
635
  # if (exchange.id === 'binance') {
628
636
  # # we test proxies functionality just for one random exchange on each build, because proxy functionality is not exchange-specific, instead it's all done from base methods, so just one working sample would mean it works for all ccxt exchanges
629
637
  # # await this.testProxies (exchange);
@@ -798,13 +806,15 @@ class testMainClass:
798
806
  return True # c# requ
799
807
 
800
808
  def assert_new_and_stored_output(self, exchange, skip_keys, new_output, stored_output, strict_type_check=True, asserting_key=None):
809
+ res = True
801
810
  try:
802
- return self.assert_new_and_stored_output_inner(exchange, skip_keys, new_output, stored_output, strict_type_check, asserting_key)
811
+ res = self.assert_new_and_stored_output_inner(exchange, skip_keys, new_output, stored_output, strict_type_check, asserting_key)
803
812
  except Exception as e:
804
813
  if self.info:
805
814
  error_message = self.var_to_string(new_output) + '(calculated)' + ' != ' + self.var_to_string(stored_output) + '(stored)'
806
815
  dump('[TEST_FAILURE_DETAIL]' + error_message)
807
816
  raise e
817
+ return res
808
818
 
809
819
  def var_to_string(self, obj=None):
810
820
  new_string = None
@@ -833,11 +843,11 @@ class testMainClass:
833
843
  if (stored_url_query is None) and (new_url_query is None):
834
844
  # might be a get request without any query parameters
835
845
  # example: https://api.gateio.ws/api/v4/delivery/usdt/positions
836
- return
846
+ return True
837
847
  stored_url_params = self.urlencoded_to_dict(stored_url_query)
838
848
  new_url_params = self.urlencoded_to_dict(new_url_query)
839
849
  self.assert_new_and_stored_output(exchange, skip_keys, new_url_params, stored_url_params)
840
- return
850
+ return True
841
851
  if type == 'json' and (stored_output is not None) and (new_output is not None):
842
852
  if isinstance(stored_output, str):
843
853
  stored_output = json_parse(stored_output)
@@ -854,6 +864,7 @@ class testMainClass:
854
864
  stored_output = self.urlencoded_to_dict(stored_output)
855
865
  new_output = self.urlencoded_to_dict(new_output)
856
866
  self.assert_new_and_stored_output(exchange, skip_keys, new_output, stored_output)
867
+ return True
857
868
 
858
869
  def assert_static_response_output(self, exchange, skip_keys, computed_result, stored_result):
859
870
  self.assert_new_and_stored_output(exchange, skip_keys, computed_result, stored_result, False)
@@ -889,8 +900,9 @@ class testMainClass:
889
900
  self.assert_static_request_output(exchange, type, skip_keys, data['url'], request_url, call_output, output)
890
901
  except Exception as e:
891
902
  self.request_tests_failed = True
892
- error_message = '[' + self.lang + '][STATIC_REQUEST]' + '[' + exchange.id + ']' + '[' + method + ']' + '[' + data['description'] + ']' + str(e)
903
+ error_message = '[' + self.lang + '][STATIC_REQUEST]' + '[' + exchange.id + ']' + '[' + method + ']' + '[' + data['description'] + ']' + exception_message(e)
893
904
  dump('[TEST_FAILURE]' + error_message)
905
+ return True
894
906
 
895
907
  async def test_response_statically(self, exchange, method, skip_keys, data):
896
908
  expected_result = exchange.safe_value(data, 'parsedResponse')
@@ -904,9 +916,10 @@ class testMainClass:
904
916
  self.assert_static_response_output(mocked_exchange, skip_keys, unified_result_sync, expected_result)
905
917
  except Exception as e:
906
918
  self.response_tests_failed = True
907
- error_message = '[' + self.lang + '][STATIC_RESPONSE]' + '[' + exchange.id + ']' + '[' + method + ']' + '[' + data['description'] + ']' + str(e)
919
+ error_message = '[' + self.lang + '][STATIC_RESPONSE]' + '[' + exchange.id + ']' + '[' + method + ']' + '[' + data['description'] + ']' + exception_message(e)
908
920
  dump('[TEST_FAILURE]' + error_message)
909
921
  set_fetch_response(exchange, None) # reset state
922
+ return True
910
923
 
911
924
  def init_offline_exchange(self, exchange_name):
912
925
  markets = self.load_markets_from_file(exchange_name)
@@ -942,7 +955,8 @@ class testMainClass:
942
955
  'leverageBrackets': {},
943
956
  },
944
957
  })
945
- exchange.currencies = currencies # not working in python if assigned in the config dict
958
+ exchange.currencies = currencies
959
+ # not working in python if assigned in the config dict
946
960
  return exchange
947
961
 
948
962
  async def test_exchange_request_statically(self, exchange_name, exchange_data, test_name=None):
@@ -990,6 +1004,9 @@ class testMainClass:
990
1004
  is_disabled_c_sharp = exchange.safe_bool(result, 'disabledCS', False)
991
1005
  if is_disabled_c_sharp and (self.lang == 'C#'):
992
1006
  continue
1007
+ is_disabled_go = exchange.safe_bool(result, 'disabledGO', False)
1008
+ if is_disabled_go and (self.lang == 'GO'):
1009
+ continue
993
1010
  type = exchange.safe_string(exchange_data, 'outputType')
994
1011
  skip_keys = exchange.safe_value(exchange_data, 'skipKeys', [])
995
1012
  await self.test_request_statically(exchange, method, result, type, skip_keys)
@@ -1041,6 +1058,9 @@ class testMainClass:
1041
1058
  continue
1042
1059
  if (test_name is not None) and (test_name != description):
1043
1060
  continue
1061
+ is_disabled_go = exchange.safe_bool(result, 'disabledGO', False)
1062
+ if is_disabled_go and (self.lang == 'GO'):
1063
+ continue
1044
1064
  skip_keys = exchange.safe_value(exchange_data, 'skipKeys', [])
1045
1065
  await self.test_response_statically(exchange, method, skip_keys, result)
1046
1066
  # reset options
@@ -1065,12 +1085,13 @@ class testMainClass:
1065
1085
 
1066
1086
  async def run_static_request_tests(self, target_exchange=None, test_name=None):
1067
1087
  await self.run_static_tests('request', target_exchange, test_name)
1088
+ return True
1068
1089
 
1069
1090
  async def run_static_tests(self, type, target_exchange=None, test_name=None):
1070
1091
  folder = get_root_dir() + './ts/src/test/static/' + type + '/'
1071
1092
  static_data = self.load_static_data(folder, target_exchange)
1072
1093
  if static_data is None:
1073
- return
1094
+ return True
1074
1095
  exchanges = list(static_data.keys())
1075
1096
  exchange = init_exchange('Exchange', {}) # tmp to do the calculations until we have the ast-transpiler transpiling this code
1076
1097
  promises = []
@@ -1095,7 +1116,7 @@ class testMainClass:
1095
1116
  self.request_tests_failed = True
1096
1117
  else:
1097
1118
  self.response_tests_failed = True
1098
- error_message = '[' + self.lang + '][STATIC_REQUEST]' + str(e)
1119
+ error_message = '[' + self.lang + '][STATIC_REQUEST]' + exception_message(e)
1099
1120
  dump('[TEST_FAILURE]' + error_message)
1100
1121
  if self.request_tests_failed or self.response_tests_failed:
1101
1122
  exit_script(1)
@@ -1109,6 +1130,7 @@ class testMainClass:
1109
1130
  # --- Init of mockResponses tests functions------------------------------------
1110
1131
  # -----------------------------------------------------------------------------
1111
1132
  await self.run_static_tests('response', exchange_name, test)
1133
+ return True
1112
1134
 
1113
1135
  async def run_broker_id_tests(self):
1114
1136
  # -----------------------------------------------------------------------------
@@ -1119,6 +1141,7 @@ class testMainClass:
1119
1141
  success_message = '[' + self.lang + '][TEST_SUCCESS] brokerId tests passed.'
1120
1142
  dump('[INFO]' + success_message)
1121
1143
  exit_script(0)
1144
+ return True
1122
1145
 
1123
1146
  async def test_binance(self):
1124
1147
  exchange = self.init_offline_exchange('binance')
@@ -1372,6 +1395,7 @@ class testMainClass:
1372
1395
  assert req_headers['X-SOURCE-KEY'] == id, 'bingx - id: ' + id + ' not in headers.'
1373
1396
  if not is_sync():
1374
1397
  await close(exchange)
1398
+ return True
1375
1399
 
1376
1400
  async def test_phemex(self):
1377
1401
  exchange = self.init_offline_exchange('phemex')
@@ -1386,6 +1410,7 @@ class testMainClass:
1386
1410
  assert client_order_id.startswith(id_string), 'phemex - clOrdID: ' + client_order_id + ' does not start with id: ' + id_string
1387
1411
  if not is_sync():
1388
1412
  await close(exchange)
1413
+ return True
1389
1414
 
1390
1415
  async def test_blofin(self):
1391
1416
  exchange = self.init_offline_exchange('blofin')
@@ -1400,6 +1425,7 @@ class testMainClass:
1400
1425
  assert broker_id.startswith(id_string), 'blofin - brokerId: ' + broker_id + ' does not start with id: ' + id_string
1401
1426
  if not is_sync():
1402
1427
  await close(exchange)
1428
+ return True
1403
1429
 
1404
1430
  async def test_hyperliquid(self):
1405
1431
  exchange = self.init_offline_exchange('hyperliquid')
@@ -1413,6 +1439,7 @@ class testMainClass:
1413
1439
  assert broker_id == id, 'hyperliquid - brokerId: ' + broker_id + ' does not start with id: ' + id
1414
1440
  if not is_sync():
1415
1441
  await close(exchange)
1442
+ return True
1416
1443
 
1417
1444
  async def test_coinbaseinternational(self):
1418
1445
  exchange = self.init_offline_exchange('coinbaseinternational')