ccxt 4.3.33__py2.py3-none-any.whl → 4.3.35__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 (204) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +1 -0
  3. ccxt/abstract/binancecoinm.py +1 -0
  4. ccxt/abstract/binanceus.py +1 -0
  5. ccxt/abstract/binanceusdm.py +1 -0
  6. ccxt/ace.py +2 -2
  7. ccxt/alpaca.py +2 -2
  8. ccxt/ascendex.py +2 -2
  9. ccxt/async_support/__init__.py +1 -1
  10. ccxt/async_support/ace.py +2 -2
  11. ccxt/async_support/alpaca.py +2 -2
  12. ccxt/async_support/ascendex.py +2 -2
  13. ccxt/async_support/base/exchange.py +56 -40
  14. ccxt/async_support/bigone.py +2 -2
  15. ccxt/async_support/binance.py +6 -5
  16. ccxt/async_support/bingx.py +4 -3
  17. ccxt/async_support/bit2c.py +1 -1
  18. ccxt/async_support/bitbank.py +1 -1
  19. ccxt/async_support/bitbns.py +1 -1
  20. ccxt/async_support/bitfinex.py +2 -2
  21. ccxt/async_support/bitfinex2.py +1 -1
  22. ccxt/async_support/bitflyer.py +1 -1
  23. ccxt/async_support/bitget.py +4 -4
  24. ccxt/async_support/bithumb.py +1 -1
  25. ccxt/async_support/bitmart.py +4 -9
  26. ccxt/async_support/bitmex.py +3 -3
  27. ccxt/async_support/bitopro.py +3 -3
  28. ccxt/async_support/bitrue.py +2 -2
  29. ccxt/async_support/bitso.py +2 -2
  30. ccxt/async_support/bitstamp.py +2 -2
  31. ccxt/async_support/bitteam.py +3 -3
  32. ccxt/async_support/bitvavo.py +2 -2
  33. ccxt/async_support/blockchaincom.py +1 -1
  34. ccxt/async_support/blofin.py +3 -3
  35. ccxt/async_support/btcalpha.py +3 -3
  36. ccxt/async_support/btcbox.py +1 -1
  37. ccxt/async_support/btcmarkets.py +6 -4
  38. ccxt/async_support/btcturk.py +1 -1
  39. ccxt/async_support/bybit.py +3 -3
  40. ccxt/async_support/cex.py +1 -1
  41. ccxt/async_support/coinbase.py +156 -58
  42. ccxt/async_support/coinbaseexchange.py +1 -1
  43. ccxt/async_support/coinbaseinternational.py +3 -3
  44. ccxt/async_support/coincheck.py +2 -2
  45. ccxt/async_support/coinex.py +28 -21
  46. ccxt/async_support/coinlist.py +2 -2
  47. ccxt/async_support/coinmate.py +2 -2
  48. ccxt/async_support/coinmetro.py +2 -2
  49. ccxt/async_support/coinone.py +1 -1
  50. ccxt/async_support/coinsph.py +2 -2
  51. ccxt/async_support/cryptocom.py +1 -1
  52. ccxt/async_support/currencycom.py +2 -2
  53. ccxt/async_support/delta.py +1 -1
  54. ccxt/async_support/deribit.py +2 -2
  55. ccxt/async_support/digifinex.py +2 -2
  56. ccxt/async_support/exmo.py +2 -2
  57. ccxt/async_support/gate.py +2 -2
  58. ccxt/async_support/gemini.py +3 -3
  59. ccxt/async_support/hitbtc.py +2 -2
  60. ccxt/async_support/hollaex.py +1 -1
  61. ccxt/async_support/htx.py +2 -2
  62. ccxt/async_support/huobijp.py +2 -2
  63. ccxt/async_support/hyperliquid.py +2 -2
  64. ccxt/async_support/idex.py +2 -2
  65. ccxt/async_support/indodax.py +2 -2
  66. ccxt/async_support/kraken.py +5 -3
  67. ccxt/async_support/krakenfutures.py +1 -1
  68. ccxt/async_support/kucoin.py +2 -2
  69. ccxt/async_support/kuna.py +2 -2
  70. ccxt/async_support/latoken.py +2 -2
  71. ccxt/async_support/lbank.py +1 -1
  72. ccxt/async_support/luno.py +1 -1
  73. ccxt/async_support/lykke.py +1 -1
  74. ccxt/async_support/mercado.py +1 -1
  75. ccxt/async_support/mexc.py +1 -1
  76. ccxt/async_support/ndax.py +2 -2
  77. ccxt/async_support/novadax.py +3 -3
  78. ccxt/async_support/oceanex.py +2 -2
  79. ccxt/async_support/okcoin.py +3 -3
  80. ccxt/async_support/okx.py +3 -3
  81. ccxt/async_support/onetrading.py +2 -2
  82. ccxt/async_support/p2b.py +2 -2
  83. ccxt/async_support/paymium.py +1 -1
  84. ccxt/async_support/phemex.py +4 -4
  85. ccxt/async_support/poloniex.py +3 -3
  86. ccxt/async_support/poloniexfutures.py +2 -2
  87. ccxt/async_support/probit.py +3 -3
  88. ccxt/async_support/timex.py +2 -2
  89. ccxt/async_support/tokocrypto.py +1 -1
  90. ccxt/async_support/tradeogre.py +1 -1
  91. ccxt/async_support/upbit.py +3 -3
  92. ccxt/async_support/wavesexchange.py +1 -1
  93. ccxt/async_support/wazirx.py +3 -3
  94. ccxt/async_support/whitebit.py +3 -3
  95. ccxt/async_support/woo.py +3 -3
  96. ccxt/async_support/woofipro.py +3 -3
  97. ccxt/async_support/yobit.py +1 -1
  98. ccxt/async_support/zaif.py +2 -2
  99. ccxt/async_support/zonda.py +1 -1
  100. ccxt/base/exchange.py +107 -76
  101. ccxt/base/types.py +0 -1
  102. ccxt/bigone.py +2 -2
  103. ccxt/binance.py +6 -5
  104. ccxt/bingx.py +4 -3
  105. ccxt/bit2c.py +1 -1
  106. ccxt/bitbank.py +1 -1
  107. ccxt/bitbns.py +1 -1
  108. ccxt/bitfinex.py +2 -2
  109. ccxt/bitfinex2.py +1 -1
  110. ccxt/bitflyer.py +1 -1
  111. ccxt/bitget.py +4 -4
  112. ccxt/bithumb.py +1 -1
  113. ccxt/bitmart.py +4 -9
  114. ccxt/bitmex.py +3 -3
  115. ccxt/bitopro.py +3 -3
  116. ccxt/bitrue.py +2 -2
  117. ccxt/bitso.py +2 -2
  118. ccxt/bitstamp.py +2 -2
  119. ccxt/bitteam.py +3 -3
  120. ccxt/bitvavo.py +2 -2
  121. ccxt/blockchaincom.py +1 -1
  122. ccxt/blofin.py +3 -3
  123. ccxt/btcalpha.py +3 -3
  124. ccxt/btcbox.py +1 -1
  125. ccxt/btcmarkets.py +6 -4
  126. ccxt/btcturk.py +1 -1
  127. ccxt/bybit.py +3 -3
  128. ccxt/cex.py +1 -1
  129. ccxt/coinbase.py +156 -58
  130. ccxt/coinbaseexchange.py +1 -1
  131. ccxt/coinbaseinternational.py +3 -3
  132. ccxt/coincheck.py +2 -2
  133. ccxt/coinex.py +28 -21
  134. ccxt/coinlist.py +2 -2
  135. ccxt/coinmate.py +2 -2
  136. ccxt/coinmetro.py +2 -2
  137. ccxt/coinone.py +1 -1
  138. ccxt/coinsph.py +2 -2
  139. ccxt/cryptocom.py +1 -1
  140. ccxt/currencycom.py +2 -2
  141. ccxt/delta.py +1 -1
  142. ccxt/deribit.py +2 -2
  143. ccxt/digifinex.py +2 -2
  144. ccxt/exmo.py +2 -2
  145. ccxt/gate.py +2 -2
  146. ccxt/gemini.py +3 -3
  147. ccxt/hitbtc.py +2 -2
  148. ccxt/hollaex.py +1 -1
  149. ccxt/htx.py +2 -2
  150. ccxt/huobijp.py +2 -2
  151. ccxt/hyperliquid.py +2 -2
  152. ccxt/idex.py +2 -2
  153. ccxt/indodax.py +2 -2
  154. ccxt/kraken.py +5 -3
  155. ccxt/krakenfutures.py +1 -1
  156. ccxt/kucoin.py +2 -2
  157. ccxt/kuna.py +2 -2
  158. ccxt/latoken.py +2 -2
  159. ccxt/lbank.py +1 -1
  160. ccxt/luno.py +1 -1
  161. ccxt/lykke.py +1 -1
  162. ccxt/mercado.py +1 -1
  163. ccxt/mexc.py +1 -1
  164. ccxt/ndax.py +2 -2
  165. ccxt/novadax.py +3 -3
  166. ccxt/oceanex.py +2 -2
  167. ccxt/okcoin.py +3 -3
  168. ccxt/okx.py +3 -3
  169. ccxt/onetrading.py +2 -2
  170. ccxt/p2b.py +2 -2
  171. ccxt/paymium.py +1 -1
  172. ccxt/phemex.py +4 -4
  173. ccxt/poloniex.py +3 -3
  174. ccxt/poloniexfutures.py +2 -2
  175. ccxt/pro/__init__.py +1 -1
  176. ccxt/pro/binance.py +331 -2
  177. ccxt/pro/bitget.py +24 -1
  178. ccxt/pro/bitmart.py +1 -1
  179. ccxt/pro/bitmex.py +98 -1
  180. ccxt/pro/bybit.py +82 -1
  181. ccxt/pro/gate.py +173 -1
  182. ccxt/pro/kraken.py +1 -1
  183. ccxt/pro/kucoinfutures.py +4 -0
  184. ccxt/pro/okx.py +244 -1
  185. ccxt/probit.py +3 -3
  186. ccxt/test/base/__init__.py +1 -0
  187. ccxt/test/base/test_crypto.py +1 -1
  188. ccxt/test/base/test_liquidation.py +50 -0
  189. ccxt/timex.py +2 -2
  190. ccxt/tokocrypto.py +1 -1
  191. ccxt/tradeogre.py +1 -1
  192. ccxt/upbit.py +3 -3
  193. ccxt/wavesexchange.py +1 -1
  194. ccxt/wazirx.py +3 -3
  195. ccxt/whitebit.py +3 -3
  196. ccxt/woo.py +3 -3
  197. ccxt/woofipro.py +3 -3
  198. ccxt/yobit.py +1 -1
  199. ccxt/zaif.py +2 -2
  200. ccxt/zonda.py +1 -1
  201. {ccxt-4.3.33.dist-info → ccxt-4.3.35.dist-info}/METADATA +4 -4
  202. {ccxt-4.3.33.dist-info → ccxt-4.3.35.dist-info}/RECORD +204 -203
  203. {ccxt-4.3.33.dist-info → ccxt-4.3.35.dist-info}/WHEEL +0 -0
  204. {ccxt-4.3.33.dist-info → ccxt-4.3.35.dist-info}/top_level.txt +0 -0
@@ -1142,7 +1142,7 @@ class timex(Exchange, ImplicitAPI):
1142
1142
  result = self.safe_value(response, 0, {})
1143
1143
  return self.parse_trading_fee(result, market)
1144
1144
 
1145
- def parse_market(self, market) -> Market:
1145
+ def parse_market(self, market: dict) -> Market:
1146
1146
  #
1147
1147
  # {
1148
1148
  # "symbol": "ETHBTC",
@@ -1572,7 +1572,7 @@ class timex(Exchange, ImplicitAPI):
1572
1572
  headers = {'authorization': secret}
1573
1573
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
1574
1574
 
1575
- def handle_errors(self, statusCode, statusText, url, method, responseHeaders, responseBody, response, requestHeaders, requestBody):
1575
+ def handle_errors(self, statusCode: int, statusText: str, url: str, method: str, responseHeaders: dict, responseBody, response, requestHeaders, requestBody):
1576
1576
  if response is None:
1577
1577
  return None
1578
1578
  if statusCode >= 400:
@@ -2331,7 +2331,7 @@ class tokocrypto(Exchange, ImplicitAPI):
2331
2331
  url += '?' + self.urlencode(params)
2332
2332
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
2333
2333
 
2334
- def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
2334
+ def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
2335
2335
  if (code == 418) or (code == 429):
2336
2336
  raise DDoSProtection(self.id + ' ' + str(code) + ' ' + reason + ' ' + body)
2337
2337
  # error response in a form: {"code": -1013, "msg": "Invalid quantity."}
@@ -581,7 +581,7 @@ class tradeogre(Exchange, ImplicitAPI):
581
581
  body = self.urlencode(params)
582
582
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
583
583
 
584
- def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
584
+ def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
585
585
  if response is None:
586
586
  return None
587
587
  if not ('success' in response):
@@ -423,7 +423,7 @@ class upbit(Exchange, ImplicitAPI):
423
423
  #
424
424
  return self.parse_markets(response)
425
425
 
426
- def parse_market(self, market) -> Market:
426
+ def parse_market(self, market: dict) -> Market:
427
427
  id = self.safe_string(market, 'market')
428
428
  quoteId, baseId = id.split('-')
429
429
  base = self.safe_currency_code(baseId)
@@ -1261,7 +1261,7 @@ class upbit(Exchange, ImplicitAPI):
1261
1261
  #
1262
1262
  return self.parse_transaction(response, currency)
1263
1263
 
1264
- def parse_transaction_status(self, status):
1264
+ def parse_transaction_status(self, status: Str):
1265
1265
  statuses: dict = {
1266
1266
  'submitting': 'pending', # 처리 중
1267
1267
  'submitted': 'pending', # 처리 완료
@@ -1801,7 +1801,7 @@ class upbit(Exchange, ImplicitAPI):
1801
1801
  headers['Content-Type'] = 'application/json'
1802
1802
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
1803
1803
 
1804
- def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
1804
+ def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
1805
1805
  if response is None:
1806
1806
  return None # fallback to default error handler
1807
1807
  #
@@ -2280,7 +2280,7 @@ class wavesexchange(Exchange, ImplicitAPI):
2280
2280
  data = self.array_concat(data, items)
2281
2281
  return self.parse_deposit_withdraw_fees(data, codes, 'id')
2282
2282
 
2283
- def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
2283
+ def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
2284
2284
  errorCode = self.safe_string(response, 'error')
2285
2285
  success = self.safe_bool(response, 'success', True)
2286
2286
  Exception = self.safe_value(self.exceptions, errorCode)
@@ -236,7 +236,7 @@ class wazirx(Exchange, ImplicitAPI):
236
236
  markets = self.safe_value(response, 'symbols', [])
237
237
  return self.parse_markets(markets)
238
238
 
239
- def parse_market(self, market) -> Market:
239
+ def parse_market(self, market: dict) -> Market:
240
240
  id = self.safe_string(market, 'symbol')
241
241
  baseId = self.safe_string(market, 'baseAsset')
242
242
  quoteId = self.safe_string(market, 'quoteAsset')
@@ -1107,7 +1107,7 @@ class wazirx(Exchange, ImplicitAPI):
1107
1107
  #
1108
1108
  return self.parse_transactions(response, currency, since, limit)
1109
1109
 
1110
- def parse_transaction_status(self, status):
1110
+ def parse_transaction_status(self, status: Str):
1111
1111
  statuses: dict = {
1112
1112
  '0': 'ok',
1113
1113
  '1': 'fail',
@@ -1187,7 +1187,7 @@ class wazirx(Exchange, ImplicitAPI):
1187
1187
  }
1188
1188
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
1189
1189
 
1190
- def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
1190
+ def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
1191
1191
  #
1192
1192
  # {"code":2098,"message":"Request out of receiving window."}
1193
1193
  #
@@ -349,7 +349,7 @@ class whitebit(Exchange, ImplicitAPI):
349
349
  #
350
350
  return self.parse_markets(markets)
351
351
 
352
- def parse_market(self, market) -> Market:
352
+ def parse_market(self, market: dict) -> Market:
353
353
  id = self.safe_string(market, 'name')
354
354
  baseId = self.safe_string(market, 'stock')
355
355
  quoteId = self.safe_string(market, 'money')
@@ -1961,7 +1961,7 @@ class whitebit(Exchange, ImplicitAPI):
1961
1961
  'info': transaction,
1962
1962
  }
1963
1963
 
1964
- def parse_transaction_status(self, status):
1964
+ def parse_transaction_status(self, status: Str):
1965
1965
  statuses: dict = {
1966
1966
  '1': 'pending',
1967
1967
  '2': 'pending',
@@ -2415,7 +2415,7 @@ class whitebit(Exchange, ImplicitAPI):
2415
2415
  }
2416
2416
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
2417
2417
 
2418
- def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
2418
+ def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
2419
2419
  if (code == 418) or (code == 429):
2420
2420
  raise DDoSProtection(self.id + ' ' + str(code) + ' ' + reason + ' ' + body)
2421
2421
  if code == 404:
ccxt/async_support/woo.py CHANGED
@@ -431,7 +431,7 @@ class woo(Exchange, ImplicitAPI):
431
431
  data = self.safe_list(response, 'rows', [])
432
432
  return self.parse_markets(data)
433
433
 
434
- def parse_market(self, market) -> Market:
434
+ def parse_market(self, market: dict) -> Market:
435
435
  marketId = self.safe_string(market, 'symbol')
436
436
  parts = marketId.split('_')
437
437
  first = self.safe_string(parts, 0)
@@ -2110,7 +2110,7 @@ class woo(Exchange, ImplicitAPI):
2110
2110
  'network': None,
2111
2111
  }
2112
2112
 
2113
- def parse_transaction_status(self, status):
2113
+ def parse_transaction_status(self, status: Str):
2114
2114
  statuses: dict = {
2115
2115
  'NEW': 'pending',
2116
2116
  'CONFIRMING': 'pending',
@@ -2400,7 +2400,7 @@ class woo(Exchange, ImplicitAPI):
2400
2400
  headers['x-api-signature'] = self.hmac(self.encode(auth), self.encode(self.secret), hashlib.sha256)
2401
2401
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
2402
2402
 
2403
- def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
2403
+ def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
2404
2404
  if not response:
2405
2405
  return None # fallback to default error handler
2406
2406
  #
@@ -397,7 +397,7 @@ class woofipro(Exchange, ImplicitAPI):
397
397
  #
398
398
  return self.safe_integer(response, 'timestamp')
399
399
 
400
- def parse_market(self, market) -> Market:
400
+ def parse_market(self, market: dict) -> Market:
401
401
  #
402
402
  # {
403
403
  # "symbol": "PERP_BTC_USDC",
@@ -2054,7 +2054,7 @@ class woofipro(Exchange, ImplicitAPI):
2054
2054
  'network': None,
2055
2055
  }
2056
2056
 
2057
- def parse_transaction_status(self, status):
2057
+ def parse_transaction_status(self, status: Str):
2058
2058
  statuses: dict = {
2059
2059
  'NEW': 'pending',
2060
2060
  'CONFIRMING': 'pending',
@@ -2507,7 +2507,7 @@ class woofipro(Exchange, ImplicitAPI):
2507
2507
  headers['orderly-signature'] = self.urlencode_base64(self.base64_to_binary(signature))
2508
2508
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
2509
2509
 
2510
- def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
2510
+ def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
2511
2511
  if not response:
2512
2512
  return None # fallback to default error handler
2513
2513
  #
@@ -1236,7 +1236,7 @@ class yobit(Exchange, ImplicitAPI):
1236
1236
  }
1237
1237
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
1238
1238
 
1239
- def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
1239
+ def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
1240
1240
  if response is None:
1241
1241
  return None # fallback to default error handler
1242
1242
  if 'success' in response:
@@ -174,7 +174,7 @@ class zaif(Exchange, ImplicitAPI):
174
174
  #
175
175
  return self.parse_markets(markets)
176
176
 
177
- def parse_market(self, market) -> Market:
177
+ def parse_market(self, market: dict) -> Market:
178
178
  id = self.safe_string(market, 'currency_pair')
179
179
  name = self.safe_string(market, 'name')
180
180
  baseId, quoteId = name.split('/')
@@ -679,7 +679,7 @@ class zaif(Exchange, ImplicitAPI):
679
679
  }
680
680
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
681
681
 
682
- def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
682
+ def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
683
683
  if response is None:
684
684
  return None
685
685
  #
@@ -1766,7 +1766,7 @@ class zonda(Exchange, ImplicitAPI):
1766
1766
  }
1767
1767
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
1768
1768
 
1769
- def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
1769
+ def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
1770
1770
  if response is None:
1771
1771
  return None # fallback to default error handler
1772
1772
  if 'code' in response: