ccxt 4.2.30__py2.py3-none-any.whl → 4.2.34__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.

Potentially problematic release.


This version of ccxt might be problematic. Click here for more details.

Files changed (244) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/coinbase.py +10 -0
  3. ccxt/abstract/okx.py +12 -1
  4. ccxt/ace.py +4 -3
  5. ccxt/alpaca.py +1 -1
  6. ccxt/ascendex.py +6 -6
  7. ccxt/async_support/__init__.py +1 -1
  8. ccxt/async_support/ace.py +4 -3
  9. ccxt/async_support/alpaca.py +1 -1
  10. ccxt/async_support/ascendex.py +6 -6
  11. ccxt/async_support/base/exchange.py +62 -39
  12. ccxt/async_support/bigone.py +25 -5
  13. ccxt/async_support/binance.py +17 -16
  14. ccxt/async_support/bingx.py +10 -9
  15. ccxt/async_support/bit2c.py +13 -1
  16. ccxt/async_support/bitbank.py +2 -2
  17. ccxt/async_support/bitbns.py +1 -1
  18. ccxt/async_support/bitfinex.py +5 -5
  19. ccxt/async_support/bitfinex2.py +386 -40
  20. ccxt/async_support/bitflyer.py +5 -5
  21. ccxt/async_support/bitforex.py +4 -1
  22. ccxt/async_support/bitget.py +11 -11
  23. ccxt/async_support/bithumb.py +2 -2
  24. ccxt/async_support/bitmart.py +9 -9
  25. ccxt/async_support/bitmex.py +3 -3
  26. ccxt/async_support/bitopro.py +2 -2
  27. ccxt/async_support/bitrue.py +8 -8
  28. ccxt/async_support/bitso.py +4 -4
  29. ccxt/async_support/bitstamp.py +2 -2
  30. ccxt/async_support/bitteam.py +1 -1
  31. ccxt/async_support/bitvavo.py +3 -3
  32. ccxt/async_support/bl3p.py +1 -1
  33. ccxt/async_support/blockchaincom.py +3 -3
  34. ccxt/async_support/btcalpha.py +1 -1
  35. ccxt/async_support/btcbox.py +1 -1
  36. ccxt/async_support/btcmarkets.py +2 -2
  37. ccxt/async_support/btcturk.py +1 -1
  38. ccxt/async_support/bybit.py +9 -9
  39. ccxt/async_support/cex.py +1 -1
  40. ccxt/async_support/coinbase.py +16 -6
  41. ccxt/async_support/coinbasepro.py +2 -2
  42. ccxt/async_support/coincheck.py +1 -1
  43. ccxt/async_support/coinex.py +9 -9
  44. ccxt/async_support/coinlist.py +4 -4
  45. ccxt/async_support/coinmate.py +2 -2
  46. ccxt/async_support/coinmetro.py +2 -2
  47. ccxt/async_support/coinone.py +1 -1
  48. ccxt/async_support/coinsph.py +2 -2
  49. ccxt/async_support/coinspot.py +1 -1
  50. ccxt/async_support/cryptocom.py +14 -14
  51. ccxt/async_support/currencycom.py +1 -1
  52. ccxt/async_support/delta.py +2 -2
  53. ccxt/async_support/deribit.py +5 -4
  54. ccxt/async_support/digifinex.py +6 -6
  55. ccxt/async_support/exmo.py +2 -2
  56. ccxt/async_support/gate.py +41 -37
  57. ccxt/async_support/gemini.py +2 -2
  58. ccxt/async_support/hitbtc.py +5 -5
  59. ccxt/async_support/hollaex.py +2 -2
  60. ccxt/async_support/htx.py +11 -11
  61. ccxt/async_support/huobijp.py +4 -4
  62. ccxt/async_support/idex.py +2 -2
  63. ccxt/async_support/independentreserve.py +2 -2
  64. ccxt/async_support/indodax.py +2 -2
  65. ccxt/async_support/kraken.py +45 -5
  66. ccxt/async_support/krakenfutures.py +8 -5
  67. ccxt/async_support/kucoin.py +8 -8
  68. ccxt/async_support/kucoinfutures.py +4 -4
  69. ccxt/async_support/kuna.py +2 -2
  70. ccxt/async_support/latoken.py +3 -3
  71. ccxt/async_support/lbank.py +5 -4
  72. ccxt/async_support/luno.py +1 -1
  73. ccxt/async_support/lykke.py +2 -2
  74. ccxt/async_support/mercado.py +2 -2
  75. ccxt/async_support/mexc.py +7 -6
  76. ccxt/async_support/ndax.py +2 -2
  77. ccxt/async_support/novadax.py +4 -4
  78. ccxt/async_support/oceanex.py +1 -1
  79. ccxt/async_support/okcoin.py +5 -5
  80. ccxt/async_support/okx.py +26 -12
  81. ccxt/async_support/onetrading.py +2 -2
  82. ccxt/async_support/p2b.py +1 -1
  83. ccxt/async_support/paymium.py +3 -3
  84. ccxt/async_support/phemex.py +13 -13
  85. ccxt/async_support/poloniex.py +4 -4
  86. ccxt/async_support/poloniexfutures.py +4 -1
  87. ccxt/async_support/probit.py +5 -5
  88. ccxt/async_support/timex.py +2 -2
  89. ccxt/async_support/tokocrypto.py +4 -4
  90. ccxt/async_support/upbit.py +2 -2
  91. ccxt/async_support/wavesexchange.py +4 -3
  92. ccxt/async_support/wazirx.py +1 -1
  93. ccxt/async_support/whitebit.py +6 -6
  94. ccxt/async_support/woo.py +6 -6
  95. ccxt/async_support/yobit.py +41 -2
  96. ccxt/async_support/zaif.py +2 -2
  97. ccxt/async_support/zonda.py +4 -4
  98. ccxt/base/exchange.py +77 -44
  99. ccxt/base/types.py +10 -0
  100. ccxt/bigone.py +25 -5
  101. ccxt/binance.py +17 -16
  102. ccxt/bingx.py +10 -9
  103. ccxt/bit2c.py +13 -1
  104. ccxt/bitbank.py +2 -2
  105. ccxt/bitbns.py +1 -1
  106. ccxt/bitfinex.py +5 -5
  107. ccxt/bitfinex2.py +386 -40
  108. ccxt/bitflyer.py +5 -5
  109. ccxt/bitforex.py +4 -1
  110. ccxt/bitget.py +11 -11
  111. ccxt/bithumb.py +2 -2
  112. ccxt/bitmart.py +9 -9
  113. ccxt/bitmex.py +3 -3
  114. ccxt/bitopro.py +2 -2
  115. ccxt/bitrue.py +8 -8
  116. ccxt/bitso.py +4 -4
  117. ccxt/bitstamp.py +2 -2
  118. ccxt/bitteam.py +1 -1
  119. ccxt/bitvavo.py +3 -3
  120. ccxt/bl3p.py +1 -1
  121. ccxt/blockchaincom.py +3 -3
  122. ccxt/btcalpha.py +1 -1
  123. ccxt/btcbox.py +1 -1
  124. ccxt/btcmarkets.py +2 -2
  125. ccxt/btcturk.py +1 -1
  126. ccxt/bybit.py +9 -9
  127. ccxt/cex.py +1 -1
  128. ccxt/coinbase.py +16 -6
  129. ccxt/coinbasepro.py +2 -2
  130. ccxt/coincheck.py +1 -1
  131. ccxt/coinex.py +9 -9
  132. ccxt/coinlist.py +4 -4
  133. ccxt/coinmate.py +2 -2
  134. ccxt/coinmetro.py +2 -2
  135. ccxt/coinone.py +1 -1
  136. ccxt/coinsph.py +2 -2
  137. ccxt/coinspot.py +1 -1
  138. ccxt/cryptocom.py +14 -14
  139. ccxt/currencycom.py +1 -1
  140. ccxt/delta.py +2 -2
  141. ccxt/deribit.py +5 -4
  142. ccxt/digifinex.py +6 -6
  143. ccxt/exmo.py +2 -2
  144. ccxt/gate.py +41 -37
  145. ccxt/gemini.py +2 -2
  146. ccxt/hitbtc.py +5 -5
  147. ccxt/hollaex.py +2 -2
  148. ccxt/htx.py +11 -11
  149. ccxt/huobijp.py +4 -4
  150. ccxt/idex.py +2 -2
  151. ccxt/independentreserve.py +2 -2
  152. ccxt/indodax.py +2 -2
  153. ccxt/kraken.py +45 -5
  154. ccxt/krakenfutures.py +8 -5
  155. ccxt/kucoin.py +8 -8
  156. ccxt/kucoinfutures.py +4 -4
  157. ccxt/kuna.py +2 -2
  158. ccxt/latoken.py +3 -3
  159. ccxt/lbank.py +5 -4
  160. ccxt/luno.py +1 -1
  161. ccxt/lykke.py +2 -2
  162. ccxt/mercado.py +2 -2
  163. ccxt/mexc.py +7 -6
  164. ccxt/ndax.py +2 -2
  165. ccxt/novadax.py +4 -4
  166. ccxt/oceanex.py +1 -1
  167. ccxt/okcoin.py +5 -5
  168. ccxt/okx.py +26 -12
  169. ccxt/onetrading.py +2 -2
  170. ccxt/p2b.py +1 -1
  171. ccxt/paymium.py +3 -3
  172. ccxt/phemex.py +13 -13
  173. ccxt/poloniex.py +4 -4
  174. ccxt/poloniexfutures.py +4 -1
  175. ccxt/pro/__init__.py +1 -1
  176. ccxt/pro/alpaca.py +8 -4
  177. ccxt/pro/ascendex.py +1 -2
  178. ccxt/pro/binance.py +14 -10
  179. ccxt/pro/bingx.py +1 -1
  180. ccxt/pro/bitfinex.py +21 -22
  181. ccxt/pro/bitfinex2.py +13 -15
  182. ccxt/pro/bitget.py +3 -1
  183. ccxt/pro/bitmart.py +3 -7
  184. ccxt/pro/bitmex.py +4 -6
  185. ccxt/pro/bitopro.py +2 -4
  186. ccxt/pro/bitrue.py +1 -1
  187. ccxt/pro/bitstamp.py +2 -3
  188. ccxt/pro/bitvavo.py +10 -5
  189. ccxt/pro/blockchaincom.py +22 -22
  190. ccxt/pro/bybit.py +5 -5
  191. ccxt/pro/cex.py +7 -7
  192. ccxt/pro/coinbase.py +3 -2
  193. ccxt/pro/coinbasepro.py +1 -1
  194. ccxt/pro/coinex.py +15 -13
  195. ccxt/pro/currencycom.py +5 -6
  196. ccxt/pro/deribit.py +4 -4
  197. ccxt/pro/exmo.py +15 -13
  198. ccxt/pro/gate.py +1 -1
  199. ccxt/pro/gemini.py +4 -2
  200. ccxt/pro/hitbtc.py +10 -9
  201. ccxt/pro/hollaex.py +2 -2
  202. ccxt/pro/htx.py +6 -6
  203. ccxt/pro/huobijp.py +3 -4
  204. ccxt/pro/idex.py +1 -1
  205. ccxt/pro/independentreserve.py +14 -13
  206. ccxt/pro/kraken.py +10 -14
  207. ccxt/pro/krakenfutures.py +10 -6
  208. ccxt/pro/kucoin.py +10 -10
  209. ccxt/pro/kucoinfutures.py +11 -10
  210. ccxt/pro/lbank.py +10 -10
  211. ccxt/pro/luno.py +12 -14
  212. ccxt/pro/mexc.py +3 -2
  213. ccxt/pro/ndax.py +7 -11
  214. ccxt/pro/okcoin.py +7 -10
  215. ccxt/pro/okx.py +6 -9
  216. ccxt/pro/onetrading.py +16 -15
  217. ccxt/pro/p2b.py +5 -3
  218. ccxt/pro/phemex.py +16 -11
  219. ccxt/pro/poloniex.py +6 -4
  220. ccxt/pro/poloniexfutures.py +13 -9
  221. ccxt/pro/probit.py +15 -12
  222. ccxt/pro/upbit.py +8 -8
  223. ccxt/pro/wazirx.py +6 -3
  224. ccxt/pro/woo.py +9 -7
  225. ccxt/probit.py +5 -5
  226. ccxt/test/base/test_order_book.py +7 -7
  227. ccxt/test/base/test_shared_methods.py +1 -1
  228. ccxt/test/test_async.py +86 -36
  229. ccxt/test/test_sync.py +86 -36
  230. ccxt/timex.py +2 -2
  231. ccxt/tokocrypto.py +4 -4
  232. ccxt/upbit.py +2 -2
  233. ccxt/wavesexchange.py +4 -3
  234. ccxt/wazirx.py +1 -1
  235. ccxt/whitebit.py +6 -6
  236. ccxt/woo.py +6 -6
  237. ccxt/yobit.py +41 -2
  238. ccxt/zaif.py +2 -2
  239. ccxt/zonda.py +4 -4
  240. {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/METADATA +10 -10
  241. ccxt-4.2.34.dist-info/RECORD +438 -0
  242. ccxt-4.2.30.dist-info/RECORD +0 -438
  243. {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/WHEEL +0 -0
  244. {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/top_level.txt +0 -0
ccxt/test/test_sync.py CHANGED
@@ -26,7 +26,7 @@ import ccxt.pro as ccxtpro # noqa: E402
26
26
  from ccxt.base.errors import NotSupported
27
27
  from ccxt.base.errors import ProxyError
28
28
  from ccxt.base.errors import OperationFailed
29
- from ccxt.base.errors import ExchangeError
29
+ # from ccxt.base.errors import ExchangeError
30
30
  from ccxt.base.errors import ExchangeNotAvailable
31
31
  from ccxt.base.errors import OnMaintenance
32
32
  from ccxt.base.errors import AuthenticationError
@@ -127,6 +127,7 @@ class baseMainTestClass():
127
127
  response_tests_failed = False
128
128
  response_tests = False
129
129
  ws_tests = False
130
+ load_keys = False
130
131
  skipped_methods = {}
131
132
  check_public_tests = {}
132
133
  test_files = {}
@@ -145,6 +146,9 @@ def dump(*args):
145
146
  print(' '.join([str(arg) for arg in args]))
146
147
 
147
148
 
149
+ def convert_ascii(str):
150
+ return str # stub
151
+
148
152
  def json_parse(elem):
149
153
  return json.loads(elem)
150
154
 
@@ -269,6 +273,7 @@ class testMainClass(baseMainTestClass):
269
273
  self.private_test = get_cli_arg_value('--private')
270
274
  self.private_test_only = get_cli_arg_value('--privateOnly')
271
275
  self.sandbox = get_cli_arg_value('--sandbox')
276
+ self.load_keys = get_cli_arg_value('--loadKeys')
272
277
  self.ws_tests = get_cli_arg_value('--ws')
273
278
 
274
279
  def init(self, exchange_id, symbol_argv):
@@ -287,11 +292,12 @@ class testMainClass(baseMainTestClass):
287
292
  self.run_broker_id_tests()
288
293
  return
289
294
  symbol_str = symbol_argv if symbol_argv is not None else 'all'
290
- dump(self.new_line + '' + self.new_line + '' + '[INFO] TESTING ', self.ext, {
295
+ exchange_object = {
291
296
  'exchange': exchange_id,
292
297
  'symbol': symbol_str,
293
298
  'isWs': self.ws_tests,
294
- }, self.new_line)
299
+ }
300
+ dump(self.new_line + '' + self.new_line + '' + '[INFO] TESTING ', self.ext, json_stringify(exchange_object), self.new_line)
295
301
  exchange_args = {
296
302
  'verbose': self.verbose,
297
303
  'debug': self.debug,
@@ -299,6 +305,8 @@ class testMainClass(baseMainTestClass):
299
305
  'timeout': 30000,
300
306
  }
301
307
  exchange = init_exchange(exchange_id, exchange_args, self.ws_tests)
308
+ if exchange.alias:
309
+ exit_script(0)
302
310
  self.import_files(exchange)
303
311
  assert len(list(self.test_files.keys())) > 0, 'Test files were not loaded' # ensure test files are found & filled
304
312
  self.expand_settings(exchange)
@@ -372,7 +380,7 @@ class testMainClass(baseMainTestClass):
372
380
  # others
373
381
  timeout = exchange.safe_value(skipped_settings_for_exchange, 'timeout')
374
382
  if timeout is not None:
375
- exchange.timeout = timeout
383
+ exchange.timeout = exchange.parse_to_int(timeout)
376
384
  if get_cli_arg_value('--useProxy'):
377
385
  exchange.http_proxy = exchange.safe_string(skipped_settings_for_exchange, 'httpProxy')
378
386
  exchange.https_proxy = exchange.safe_string(skipped_settings_for_exchange, 'httpsProxy')
@@ -444,6 +452,7 @@ class testMainClass(baseMainTestClass):
444
452
  # if it was passed successfully, add to the list of successfull tests
445
453
  if is_public:
446
454
  self.checked_public_tests[method_name] = True
455
+ return
447
456
 
448
457
  def test_safe(self, method_name, exchange, args=[], is_public=False):
449
458
  # `testSafe` method does not throw an exception, instead mutes it. The reason we
@@ -504,6 +513,7 @@ class testMainClass(baseMainTestClass):
504
513
  else:
505
514
  dump('[TEST_FAILURE]', exception_message(e), self.exchange_hint(exchange), method_name, args_stringified)
506
515
  return False
516
+ return True
507
517
 
508
518
  def run_public_tests(self, exchange, symbol):
509
519
  tests = {
@@ -700,7 +710,7 @@ class testMainClass(baseMainTestClass):
700
710
  dump('[INFO] Skipping private tests', 'Keys not found')
701
711
  return
702
712
  code = self.get_exchange_code(exchange)
703
- # if (exchange.extendedTest) {
713
+ # if (exchange.deepExtendedTest) {
704
714
  # test ('InvalidNonce', exchange, symbol);
705
715
  # test ('OrderNotFound', exchange, symbol);
706
716
  # test ('InvalidOrder', exchange, symbol);
@@ -777,7 +787,7 @@ class testMainClass(baseMainTestClass):
777
787
  exception = e
778
788
  # if exception was set, then throw it
779
789
  if exception:
780
- raise ExchangeError('[TEST_FAILURE] Failed ' + proxy_test_name + ' : ' + exception_message(exception))
790
+ error_message = '[TEST_FAILURE] Failed ' + proxy_test_name + ' : ' + exception_message(exception)
781
791
 
782
792
  def start_test(self, exchange, symbol):
783
793
  # we do not need to test aliases
@@ -880,9 +890,9 @@ class testMainClass(baseMainTestClass):
880
890
 
881
891
  def assert_new_and_stored_output(self, exchange, skip_keys, new_output, stored_output, strict_type_check=True, asserting_key=None):
882
892
  if is_null_value(new_output) and is_null_value(stored_output):
883
- return
893
+ return True
884
894
  if not new_output and not stored_output:
885
- return
895
+ return True
886
896
  if (isinstance(stored_output, dict)) and (isinstance(new_output, dict)):
887
897
  stored_output_keys = list(stored_output.keys())
888
898
  new_output_keys = list(new_output.keys())
@@ -914,7 +924,7 @@ class testMainClass(baseMainTestClass):
914
924
  new_output_string = str(sanitized_new_output) if sanitized_new_output else 'undefined'
915
925
  stored_output_string = str(sanitized_stored_output) if sanitized_stored_output else 'undefined'
916
926
  message_error = 'output value mismatch:' + new_output_string + ' != ' + stored_output_string
917
- if strict_type_check:
927
+ if strict_type_check and (self.lang != 'C#'):
918
928
  # upon building the request we want strict type check to make sure all the types are correct
919
929
  # when comparing the response we want to allow some flexibility, because a 50.0 can be equal to 50 after saving it to the json file
920
930
  self.assert_static_error(sanitized_new_output == sanitized_stored_output, message_error, stored_output, new_output, asserting_key)
@@ -923,11 +933,34 @@ class testMainClass(baseMainTestClass):
923
933
  is_string = (isinstance(sanitized_new_output, str)) or (isinstance(sanitized_stored_output, str))
924
934
  is_undefined = (sanitized_new_output is None) or (sanitized_stored_output is None) # undefined is a perfetly valid value
925
935
  if is_boolean or is_string or is_undefined:
926
- self.assert_static_error(new_output_string == stored_output_string, message_error, stored_output, new_output, asserting_key)
936
+ if self.lang == 'C#':
937
+ # tmp c# number comparsion
938
+ is_number = False
939
+ try:
940
+ exchange.parse_to_numeric(sanitized_new_output)
941
+ is_number = True
942
+ except Exception as e:
943
+ # if we can't parse it to number, then it's not a number
944
+ is_number = False
945
+ if is_number:
946
+ self.assert_static_error(exchange.parse_to_numeric(sanitized_new_output) == exchange.parse_to_numeric(sanitized_stored_output), message_error, stored_output, new_output, asserting_key)
947
+ return True
948
+ else:
949
+ self.assert_static_error(convert_ascii(new_output_string) == convert_ascii(stored_output_string), message_error, stored_output, new_output, asserting_key)
950
+ return True
951
+ else:
952
+ self.assert_static_error(convert_ascii(new_output_string) == convert_ascii(stored_output_string), message_error, stored_output, new_output, asserting_key)
953
+ return True
927
954
  else:
928
- numeric_new_output = exchange.parse_to_numeric(new_output_string)
929
- numeric_stored_output = exchange.parse_to_numeric(stored_output_string)
930
- self.assert_static_error(numeric_new_output == numeric_stored_output, message_error, stored_output, new_output, asserting_key)
955
+ if self.lang == 'C#':
956
+ stringified_new_output = exchange.number_to_string(sanitized_new_output)
957
+ stringified_stored_output = exchange.number_to_string(sanitized_stored_output)
958
+ self.assert_static_error(str(stringified_new_output) == str(stringified_stored_output), message_error, stored_output, new_output, asserting_key)
959
+ else:
960
+ numeric_new_output = exchange.parse_to_numeric(new_output_string)
961
+ numeric_stored_output = exchange.parse_to_numeric(stored_output_string)
962
+ self.assert_static_error(numeric_new_output == numeric_stored_output, message_error, stored_output, new_output, asserting_key)
963
+ return True # c# requ
931
964
 
932
965
  def assert_static_request_output(self, exchange, type, skip_keys, stored_url, request_url, stored_output, new_output):
933
966
  if stored_url != request_url:
@@ -951,12 +984,12 @@ class testMainClass(baseMainTestClass):
951
984
  new_url_params = self.urlencoded_to_dict(new_url_query)
952
985
  self.assert_new_and_stored_output(exchange, skip_keys, new_url_params, stored_url_params)
953
986
  return
954
- if type == 'json':
987
+ if type == 'json' and (stored_output is not None) and (new_output is not None):
955
988
  if isinstance(stored_output, str):
956
989
  stored_output = json_parse(stored_output)
957
990
  if isinstance(new_output, str):
958
991
  new_output = json_parse(new_output)
959
- elif type == 'urlencoded':
992
+ elif type == 'urlencoded' and (stored_output is not None) and (new_output is not None):
960
993
  stored_output = self.urlencoded_to_dict(stored_output)
961
994
  new_output = self.urlencoded_to_dict(new_output)
962
995
  elif type == 'both':
@@ -1070,8 +1103,9 @@ class testMainClass(baseMainTestClass):
1070
1103
  skip_keys = exchange.safe_value(exchange_data, 'skipKeys', [])
1071
1104
  self.test_method_statically(exchange, method, result, type, skip_keys)
1072
1105
  # reset options
1073
- exchange.options = old_exchange_options
1106
+ exchange.options = exchange.deep_extend(old_exchange_options, {})
1074
1107
  close(exchange)
1108
+ return True # in c# methods that will be used with promiseAll need to return something
1075
1109
 
1076
1110
  def test_exchange_response_statically(self, exchange_name, exchange_data, test_name=None):
1077
1111
  exchange = self.init_offline_exchange(exchange_name)
@@ -1091,16 +1125,20 @@ class testMainClass(baseMainTestClass):
1091
1125
  is_disabled = exchange.safe_value(result, 'disabled', False)
1092
1126
  if is_disabled:
1093
1127
  continue
1128
+ is_disabled_c_sharp = exchange.safe_value(result, 'disabledCS', False)
1129
+ if is_disabled_c_sharp and (self.lang == 'C#'):
1130
+ continue
1094
1131
  is_disabled_php = exchange.safe_value(result, 'disabledPHP', False)
1095
- if is_disabled_php and (self.ext == 'php'):
1132
+ if is_disabled_php and (self.lang == 'PHP'):
1096
1133
  continue
1097
1134
  if (test_name is not None) and (test_name != description):
1098
1135
  continue
1099
1136
  skip_keys = exchange.safe_value(exchange_data, 'skipKeys', [])
1100
1137
  self.test_response_statically(exchange, method, skip_keys, result)
1101
1138
  # reset options
1102
- exchange.options = old_exchange_options
1139
+ exchange.options = exchange.deep_extend(old_exchange_options, {})
1103
1140
  close(exchange)
1141
+ return True # in c# methods that will be used with promiseAll need to return something
1104
1142
 
1105
1143
  def get_number_of_tests_from_exchange(self, exchange, exchange_data):
1106
1144
  sum = 0
@@ -1170,7 +1208,7 @@ class testMainClass(baseMainTestClass):
1170
1208
  except Exception as e:
1171
1209
  spot_order_request = self.urlencoded_to_dict(exchange.last_request_body)
1172
1210
  client_order_id = spot_order_request['newClientOrderId']
1173
- assert client_order_id.startswith(spot_id), 'spot clientOrderId does not start with spotId'
1211
+ assert client_order_id.startswith(str(spot_id)), 'spot clientOrderId does not start with spotId'
1174
1212
  swap_id = 'x-xcKtGhcu'
1175
1213
  swap_order_request = None
1176
1214
  try:
@@ -1183,10 +1221,11 @@ class testMainClass(baseMainTestClass):
1183
1221
  except Exception as e:
1184
1222
  swap_inverse_order_request = self.urlencoded_to_dict(exchange.last_request_body)
1185
1223
  client_order_id_spot = swap_order_request['newClientOrderId']
1186
- assert client_order_id_spot.startswith(swap_id), 'swap clientOrderId does not start with swapId'
1224
+ assert client_order_id_spot.startswith(str(swap_id)), 'swap clientOrderId does not start with swapId'
1187
1225
  client_order_id_inverse = swap_inverse_order_request['newClientOrderId']
1188
- assert client_order_id_inverse.startswith(swap_id), 'swap clientOrderIdInverse does not start with swapId'
1226
+ assert client_order_id_inverse.startswith(str(swap_id)), 'swap clientOrderIdInverse does not start with swapId'
1189
1227
  close(exchange)
1228
+ return True
1190
1229
 
1191
1230
  def test_okx(self):
1192
1231
  exchange = self.init_offline_exchange('okx')
@@ -1197,7 +1236,7 @@ class testMainClass(baseMainTestClass):
1197
1236
  except Exception as e:
1198
1237
  spot_order_request = json_parse(exchange.last_request_body)
1199
1238
  client_order_id = spot_order_request[0]['clOrdId'] # returns order inside array
1200
- assert client_order_id.startswith(id), 'spot clientOrderId does not start with id'
1239
+ assert client_order_id.startswith(str(id)), 'spot clientOrderId does not start with id'
1201
1240
  assert spot_order_request[0]['tag'] == id, 'id different from spot tag'
1202
1241
  swap_order_request = None
1203
1242
  try:
@@ -1205,9 +1244,10 @@ class testMainClass(baseMainTestClass):
1205
1244
  except Exception as e:
1206
1245
  swap_order_request = json_parse(exchange.last_request_body)
1207
1246
  client_order_id_spot = swap_order_request[0]['clOrdId']
1208
- assert client_order_id_spot.startswith(id), 'swap clientOrderId does not start with id'
1247
+ assert client_order_id_spot.startswith(str(id)), 'swap clientOrderId does not start with id'
1209
1248
  assert swap_order_request[0]['tag'] == id, 'id different from swap tag'
1210
1249
  close(exchange)
1250
+ return True
1211
1251
 
1212
1252
  def test_cryptocom(self):
1213
1253
  exchange = self.init_offline_exchange('cryptocom')
@@ -1220,6 +1260,7 @@ class testMainClass(baseMainTestClass):
1220
1260
  request = json_parse(exchange.last_request_body)
1221
1261
  assert request['params']['broker_id'] == id, 'id different from broker_id'
1222
1262
  close(exchange)
1263
+ return True
1223
1264
 
1224
1265
  def test_bybit(self):
1225
1266
  exchange = self.init_offline_exchange('bybit')
@@ -1233,6 +1274,7 @@ class testMainClass(baseMainTestClass):
1233
1274
  req_headers = exchange.last_request_headers
1234
1275
  assert req_headers['Referer'] == id, 'id not in headers'
1235
1276
  close(exchange)
1277
+ return True
1236
1278
 
1237
1279
  def test_kucoin(self):
1238
1280
  exchange = self.init_offline_exchange('kucoin')
@@ -1247,19 +1289,21 @@ class testMainClass(baseMainTestClass):
1247
1289
  id = 'ccxt'
1248
1290
  assert req_headers['KC-API-PARTNER'] == id, 'id not in headers'
1249
1291
  close(exchange)
1292
+ return True
1250
1293
 
1251
1294
  def test_kucoinfutures(self):
1252
- kucoin = self.init_offline_exchange('kucoinfutures')
1295
+ exchange = self.init_offline_exchange('kucoinfutures')
1253
1296
  req_headers = None
1254
1297
  id = 'ccxtfutures'
1255
- assert kucoin.options['partner']['future']['id'] == id, 'id not in options'
1256
- assert kucoin.options['partner']['future']['key'] == '1b327198-f30c-4f14-a0ac-918871282f15', 'key not in options'
1298
+ assert exchange.options['partner']['future']['id'] == id, 'id not in options'
1299
+ assert exchange.options['partner']['future']['key'] == '1b327198-f30c-4f14-a0ac-918871282f15', 'key not in options'
1257
1300
  try:
1258
- kucoin.create_order('BTC/USDT:USDT', 'limit', 'buy', 1, 20000)
1301
+ exchange.create_order('BTC/USDT:USDT', 'limit', 'buy', 1, 20000)
1259
1302
  except Exception as e:
1260
- req_headers = kucoin.last_request_headers
1303
+ req_headers = exchange.last_request_headers
1261
1304
  assert req_headers['KC-API-PARTNER'] == id, 'id not in headers'
1262
- close(kucoin)
1305
+ close(exchange)
1306
+ return True
1263
1307
 
1264
1308
  def test_bitget(self):
1265
1309
  exchange = self.init_offline_exchange('bitget')
@@ -1272,6 +1316,7 @@ class testMainClass(baseMainTestClass):
1272
1316
  req_headers = exchange.last_request_headers
1273
1317
  assert req_headers['X-CHANNEL-API-CODE'] == id, 'id not in headers'
1274
1318
  close(exchange)
1319
+ return True
1275
1320
 
1276
1321
  def test_mexc(self):
1277
1322
  exchange = self.init_offline_exchange('mexc')
@@ -1285,6 +1330,7 @@ class testMainClass(baseMainTestClass):
1285
1330
  req_headers = exchange.last_request_headers
1286
1331
  assert req_headers['source'] == id, 'id not in headers'
1287
1332
  close(exchange)
1333
+ return True
1288
1334
 
1289
1335
  def test_htx(self):
1290
1336
  exchange = self.init_offline_exchange('htx')
@@ -1296,7 +1342,7 @@ class testMainClass(baseMainTestClass):
1296
1342
  except Exception as e:
1297
1343
  spot_order_request = json_parse(exchange.last_request_body)
1298
1344
  client_order_id = spot_order_request['client-order-id']
1299
- assert client_order_id.startswith(id), 'spot clientOrderId does not start with id'
1345
+ assert client_order_id.startswith(str(id)), 'spot clientOrderId does not start with id'
1300
1346
  # swap test
1301
1347
  swap_order_request = None
1302
1348
  try:
@@ -1309,10 +1355,11 @@ class testMainClass(baseMainTestClass):
1309
1355
  except Exception as e:
1310
1356
  swap_inverse_order_request = json_parse(exchange.last_request_body)
1311
1357
  client_order_id_spot = swap_order_request['channel_code']
1312
- assert client_order_id_spot.startswith(id), 'swap channel_code does not start with id'
1358
+ assert client_order_id_spot.startswith(str(id)), 'swap channel_code does not start with id'
1313
1359
  client_order_id_inverse = swap_inverse_order_request['channel_code']
1314
- assert client_order_id_inverse.startswith(id), 'swap inverse channel_code does not start with id'
1360
+ assert client_order_id_inverse.startswith(str(id)), 'swap inverse channel_code does not start with id'
1315
1361
  close(exchange)
1362
+ return True
1316
1363
 
1317
1364
  def test_woo(self):
1318
1365
  exchange = self.init_offline_exchange('woo')
@@ -1324,7 +1371,7 @@ class testMainClass(baseMainTestClass):
1324
1371
  except Exception as e:
1325
1372
  spot_order_request = self.urlencoded_to_dict(exchange.last_request_body)
1326
1373
  broker_id = spot_order_request['broker_id']
1327
- assert broker_id.startswith(id), 'broker_id does not start with id'
1374
+ assert broker_id.startswith(str(id)), 'broker_id does not start with id'
1328
1375
  # swap test
1329
1376
  stop_order_request = None
1330
1377
  try:
@@ -1334,8 +1381,9 @@ class testMainClass(baseMainTestClass):
1334
1381
  except Exception as e:
1335
1382
  stop_order_request = json_parse(exchange.last_request_body)
1336
1383
  client_order_id_spot = stop_order_request['brokerId']
1337
- assert client_order_id_spot.startswith(id), 'brokerId does not start with id'
1384
+ assert client_order_id_spot.startswith(str(id)), 'brokerId does not start with id'
1338
1385
  close(exchange)
1386
+ return True
1339
1387
 
1340
1388
  def test_bitmart(self):
1341
1389
  exchange = self.init_offline_exchange('bitmart')
@@ -1349,6 +1397,7 @@ class testMainClass(baseMainTestClass):
1349
1397
  req_headers = exchange.last_request_headers
1350
1398
  assert req_headers['X-BM-BROKER-ID'] == id, 'id not in headers'
1351
1399
  close(exchange)
1400
+ return True
1352
1401
 
1353
1402
  def test_coinex(self):
1354
1403
  exchange = self.init_offline_exchange('coinex')
@@ -1360,8 +1409,9 @@ class testMainClass(baseMainTestClass):
1360
1409
  except Exception as e:
1361
1410
  spot_order_request = json_parse(exchange.last_request_body)
1362
1411
  client_order_id = spot_order_request['client_id']
1363
- assert client_order_id.startswith(id), 'clientOrderId does not start with id'
1412
+ assert client_order_id.startswith(str(id)), 'clientOrderId does not start with id'
1364
1413
  close(exchange)
1414
+ return True
1365
1415
 
1366
1416
  def test_bingx(self):
1367
1417
  exchange = self.init_offline_exchange('bingx')
@@ -1385,7 +1435,7 @@ class testMainClass(baseMainTestClass):
1385
1435
  except Exception as e:
1386
1436
  request = json_parse(exchange.last_request_body)
1387
1437
  client_order_id = request['clOrdID']
1388
- assert client_order_id.startswith(id), 'clOrdID does not start with id'
1438
+ assert client_order_id.startswith(str(id)), 'clOrdID does not start with id'
1389
1439
  close(exchange)
1390
1440
 
1391
1441
  # ***** AUTO-TRANSPILER-END *****
ccxt/timex.py CHANGED
@@ -109,7 +109,7 @@ class timex(Exchange, ImplicitAPI):
109
109
  'rest': 'https://plasma-relay-backend.timex.io',
110
110
  },
111
111
  'www': 'https://timex.io',
112
- 'doc': 'https://docs.timex.io',
112
+ 'doc': 'https://plasma-relay-backend.timex.io/swagger-ui/index.html',
113
113
  'referral': 'https://timex.io/?refcode=1x27vNkTbP1uwkCck',
114
114
  },
115
115
  'api': {
@@ -686,7 +686,7 @@ class timex(Exchange, ImplicitAPI):
686
686
  #
687
687
  return self.parse_balance(response)
688
688
 
689
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
689
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
690
690
  """
691
691
  create a trade order
692
692
  :param str symbol: unified symbol of the market to create an order in
ccxt/tokocrypto.py CHANGED
@@ -1335,9 +1335,9 @@ class tokocrypto(Exchange, ImplicitAPI):
1335
1335
  # "timestamp":1659666786943
1336
1336
  # }
1337
1337
  #
1338
- return self.parse_balance(response, type, marginMode)
1338
+ return self.parse_balance_custom(response, type, marginMode)
1339
1339
 
1340
- def parse_balance(self, response, type=None, marginMode=None):
1340
+ def parse_balance_custom(self, response, type=None, marginMode=None):
1341
1341
  timestamp = self.safe_integer(response, 'updateTime')
1342
1342
  result = {
1343
1343
  'info': response,
@@ -1537,7 +1537,7 @@ class tokocrypto(Exchange, ImplicitAPI):
1537
1537
  }
1538
1538
  return self.safe_string(statuses, status, status)
1539
1539
 
1540
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1540
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1541
1541
  """
1542
1542
  create a trade order
1543
1543
  :see: https://www.tokocrypto.com/apidocs/#new-order--signed
@@ -2217,7 +2217,7 @@ class tokocrypto(Exchange, ImplicitAPI):
2217
2217
  'fee': fee,
2218
2218
  }
2219
2219
 
2220
- def withdraw(self, code: str, amount, address, tag=None, params={}):
2220
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2221
2221
  """
2222
2222
  :see: https://www.tokocrypto.com/apidocs/#withdraw-signed
2223
2223
  make a withdrawal
ccxt/upbit.py CHANGED
@@ -984,7 +984,7 @@ class upbit(Exchange, ImplicitAPI):
984
984
  #
985
985
  return self.parse_ohlcvs(response, market, timeframe, since, limit)
986
986
 
987
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
987
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
988
988
  """
989
989
  create a trade order
990
990
  :see: https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8%ED%95%98%EA%B8%B0
@@ -1640,7 +1640,7 @@ class upbit(Exchange, ImplicitAPI):
1640
1640
  raise AddressPending(self.id + ' is generating ' + code + ' deposit address, call fetchDepositAddress or createDepositAddress one more time later to retrieve the generated address')
1641
1641
  return self.parse_deposit_address(response)
1642
1642
 
1643
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1643
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1644
1644
  """
1645
1645
  :see: https://docs.upbit.com/reference/디지털자산-출금하기
1646
1646
  :see: https://docs.upbit.com/reference/%EC%9B%90%ED%99%94-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0
ccxt/wavesexchange.py CHANGED
@@ -1198,7 +1198,8 @@ class wavesexchange(Exchange, ImplicitAPI):
1198
1198
  # precise.decimals should be integer
1199
1199
  precise.decimals = self.parse_to_int(Precise.string_sub(self.number_to_string(precise.decimals), self.number_to_string(scale)))
1200
1200
  precise.reduce()
1201
- return precise
1201
+ stringValue = str(precise)
1202
+ return stringValue
1202
1203
 
1203
1204
  def currency_from_precision(self, currency, amount):
1204
1205
  scale = self.currencies[currency]['precision']
@@ -1223,7 +1224,7 @@ class wavesexchange(Exchange, ImplicitAPI):
1223
1224
  return {'WAVES': 1}
1224
1225
  return rates
1225
1226
 
1226
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1227
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1227
1228
  """
1228
1229
  create a trade order
1229
1230
  :param str symbol: unified symbol of the market to create an order in
@@ -2288,7 +2289,7 @@ class wavesexchange(Exchange, ImplicitAPI):
2288
2289
  raise ExchangeError(self.id + ' ' + body)
2289
2290
  return None
2290
2291
 
2291
- def withdraw(self, code: str, amount, address, tag=None, params={}):
2292
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2292
2293
  """
2293
2294
  make a withdrawal
2294
2295
  :param str code: unified currency code
ccxt/wazirx.py CHANGED
@@ -774,7 +774,7 @@ class wazirx(Exchange, ImplicitAPI):
774
774
  response = self.privateDeleteOrder(self.extend(request, params))
775
775
  return self.parse_order(response)
776
776
 
777
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
777
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
778
778
  """
779
779
  :see: https://docs.wazirx.com/#new-order-trade
780
780
  create a trade order
ccxt/whitebit.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.whitebit import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, MarketType, Market, Order, OrderBook, OrderSide, OrderType, Str, Bool, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, MarketType, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Str, Bool, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -32,7 +32,7 @@ class whitebit(Exchange, ImplicitAPI):
32
32
  'name': 'WhiteBit',
33
33
  'version': 'v4',
34
34
  'countries': ['EE'],
35
- 'rateLimit': 500,
35
+ 'rateLimit': 50,
36
36
  'pro': True,
37
37
  'has': {
38
38
  'CORS': None,
@@ -1129,7 +1129,7 @@ class whitebit(Exchange, ImplicitAPI):
1129
1129
  #
1130
1130
  return self.safe_integer(response, 'time')
1131
1131
 
1132
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1132
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1133
1133
  """
1134
1134
  create a trade order
1135
1135
  :see: https://docs.whitebit.com/private/http-trade-v4/#create-limit-order
@@ -1594,7 +1594,7 @@ class whitebit(Exchange, ImplicitAPI):
1594
1594
  'info': response,
1595
1595
  }
1596
1596
 
1597
- def set_leverage(self, leverage, symbol: Str = None, params={}):
1597
+ def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
1598
1598
  """
1599
1599
  set the level of leverage for a market
1600
1600
  :see: https://docs.whitebit.com/private/http-trade-v4/#change-collateral-account-leverage
@@ -1616,7 +1616,7 @@ class whitebit(Exchange, ImplicitAPI):
1616
1616
  # "leverage": 5
1617
1617
  # }
1618
1618
 
1619
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
1619
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
1620
1620
  """
1621
1621
  transfer currency internally between wallets on the same account
1622
1622
  :see: https://docs.whitebit.com/private/http-main-v4/#transfer-between-main-and-trade-balances
@@ -1661,7 +1661,7 @@ class whitebit(Exchange, ImplicitAPI):
1661
1661
  'status': None,
1662
1662
  }
1663
1663
 
1664
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1664
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1665
1665
  """
1666
1666
  make a withdrawal
1667
1667
  :see: https://docs.whitebit.com/private/http-main-v4/#create-withdraw-request
ccxt/woo.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.woo import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, MarketType, Market, Order, OrderBook, OrderSide, OrderType, Num, Str, Bool, Strings, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, MarketType, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Num, Str, Bool, Strings, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -796,7 +796,7 @@ class woo(Exchange, ImplicitAPI):
796
796
  params['trailingTriggerPrice'] = trailingTriggerPrice
797
797
  return self.create_order(symbol, type, side, amount, price, params)
798
798
 
799
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
799
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
800
800
  """
801
801
  create a trade order
802
802
  :see: https://docs.woo.org/#send-order
@@ -833,7 +833,7 @@ class woo(Exchange, ImplicitAPI):
833
833
  stopLoss = self.safe_value(params, 'stopLoss')
834
834
  takeProfit = self.safe_value(params, 'takeProfit')
835
835
  algoType = self.safe_string(params, 'algoType')
836
- trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activatedPrice', price)
836
+ trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activatedPrice', self.number_to_string(price))
837
837
  trailingAmount = self.safe_string_2(params, 'trailingAmount', 'callbackValue')
838
838
  trailingPercent = self.safe_string_2(params, 'trailingPercent', 'callbackRate')
839
839
  isTrailingAmountOrder = trailingAmount is not None
@@ -1920,7 +1920,7 @@ class woo(Exchange, ImplicitAPI):
1920
1920
  }
1921
1921
  return self.safe_string(statuses, status, status)
1922
1922
 
1923
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
1923
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
1924
1924
  """
1925
1925
  transfer currency internally between wallets on the same account
1926
1926
  :param str code: unified currency code
@@ -2038,7 +2038,7 @@ class woo(Exchange, ImplicitAPI):
2038
2038
  }
2039
2039
  return self.safe_string(statuses, status, status)
2040
2040
 
2041
- def withdraw(self, code: str, amount, address, tag=None, params={}):
2041
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2042
2042
  """
2043
2043
  make a withdrawal
2044
2044
  :param str code: unified currency code
@@ -2444,7 +2444,7 @@ class woo(Exchange, ImplicitAPI):
2444
2444
  'leverage': leverage,
2445
2445
  }
2446
2446
 
2447
- def set_leverage(self, leverage, symbol: Str = None, params={}):
2447
+ def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2448
2448
  self.load_markets()
2449
2449
  if (leverage < 1) or (leverage > 20):
2450
2450
  raise BadRequest(self.id + ' leverage should be between 1 and 20')
ccxt/yobit.py CHANGED
@@ -749,7 +749,7 @@ class yobit(Exchange, ImplicitAPI):
749
749
  }
750
750
  return result
751
751
 
752
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
752
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
753
753
  """
754
754
  :see: https://yobit.net/en/api
755
755
  create a trade order
@@ -1125,14 +1125,32 @@ class yobit(Exchange, ImplicitAPI):
1125
1125
  address = self.safe_string(response['return'], 'address')
1126
1126
  self.check_address(address)
1127
1127
  return {
1128
+ 'id': None,
1128
1129
  'currency': code,
1129
1130
  'address': address,
1130
1131
  'tag': None,
1131
1132
  'network': None,
1132
1133
  'info': response,
1134
+ 'txid': None,
1135
+ 'type': None,
1136
+ 'amount': None,
1137
+ 'status': None,
1138
+ 'timestamp': None,
1139
+ 'datetime': None,
1140
+ 'addressFrom': None,
1141
+ 'addressTo': None,
1142
+ 'tagFrom': None,
1143
+ 'tagTo': None,
1144
+ 'updated': None,
1145
+ 'comment': None,
1146
+ 'fee': {
1147
+ 'currency': None,
1148
+ 'cost': None,
1149
+ 'rate': None,
1150
+ },
1133
1151
  }
1134
1152
 
1135
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1153
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1136
1154
  """
1137
1155
  :see: https://yobit.net/en/api
1138
1156
  make a withdrawal
@@ -1159,6 +1177,27 @@ class yobit(Exchange, ImplicitAPI):
1159
1177
  return {
1160
1178
  'info': response,
1161
1179
  'id': None,
1180
+ 'txid': None,
1181
+ 'type': None,
1182
+ 'currency': None,
1183
+ 'network': None,
1184
+ 'amount': None,
1185
+ 'status': None,
1186
+ 'timestamp': None,
1187
+ 'datetime': None,
1188
+ 'address': None,
1189
+ 'addressFrom': None,
1190
+ 'addressTo': None,
1191
+ 'tag': None,
1192
+ 'tagFrom': None,
1193
+ 'tagTo': None,
1194
+ 'updated': None,
1195
+ 'comment': None,
1196
+ 'fee': {
1197
+ 'currency': None,
1198
+ 'cost': None,
1199
+ 'rate': None,
1200
+ },
1162
1201
  }
1163
1202
 
1164
1203
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):