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
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.3.33'
25
+ __version__ = '4.3.35'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
ccxt/abstract/binance.py CHANGED
@@ -4,6 +4,7 @@ from ccxt.base.types import Entry
4
4
  class ImplicitAPI:
5
5
  sapi_get_system_status = sapiGetSystemStatus = Entry('system/status', 'sapi', 'GET', {'cost': 0.1})
6
6
  sapi_get_accountsnapshot = sapiGetAccountSnapshot = Entry('accountSnapshot', 'sapi', 'GET', {'cost': 240})
7
+ sapi_get_account_info = sapiGetAccountInfo = Entry('account/info', 'sapi', 'GET', {'cost': 0.1})
7
8
  sapi_get_margin_asset = sapiGetMarginAsset = Entry('margin/asset', 'sapi', 'GET', {'cost': 1})
8
9
  sapi_get_margin_pair = sapiGetMarginPair = Entry('margin/pair', 'sapi', 'GET', {'cost': 1})
9
10
  sapi_get_margin_allassets = sapiGetMarginAllAssets = Entry('margin/allAssets', 'sapi', 'GET', {'cost': 0.1})
@@ -4,6 +4,7 @@ from ccxt.base.types import Entry
4
4
  class ImplicitAPI:
5
5
  sapi_get_system_status = sapiGetSystemStatus = Entry('system/status', 'sapi', 'GET', {'cost': 0.1})
6
6
  sapi_get_accountsnapshot = sapiGetAccountSnapshot = Entry('accountSnapshot', 'sapi', 'GET', {'cost': 240})
7
+ sapi_get_account_info = sapiGetAccountInfo = Entry('account/info', 'sapi', 'GET', {'cost': 0.1})
7
8
  sapi_get_margin_asset = sapiGetMarginAsset = Entry('margin/asset', 'sapi', 'GET', {'cost': 1})
8
9
  sapi_get_margin_pair = sapiGetMarginPair = Entry('margin/pair', 'sapi', 'GET', {'cost': 1})
9
10
  sapi_get_margin_allassets = sapiGetMarginAllAssets = Entry('margin/allAssets', 'sapi', 'GET', {'cost': 0.1})
@@ -4,6 +4,7 @@ from ccxt.base.types import Entry
4
4
  class ImplicitAPI:
5
5
  sapi_get_system_status = sapiGetSystemStatus = Entry('system/status', 'sapi', 'GET', {'cost': 0.1})
6
6
  sapi_get_accountsnapshot = sapiGetAccountSnapshot = Entry('accountSnapshot', 'sapi', 'GET', {'cost': 240})
7
+ sapi_get_account_info = sapiGetAccountInfo = Entry('account/info', 'sapi', 'GET', {'cost': 0.1})
7
8
  sapi_get_margin_asset = sapiGetMarginAsset = Entry('margin/asset', 'sapi', 'GET', {'cost': 1})
8
9
  sapi_get_margin_pair = sapiGetMarginPair = Entry('margin/pair', 'sapi', 'GET', {'cost': 1})
9
10
  sapi_get_margin_allassets = sapiGetMarginAllAssets = Entry('margin/allAssets', 'sapi', 'GET', {'cost': 0.1})
@@ -4,6 +4,7 @@ from ccxt.base.types import Entry
4
4
  class ImplicitAPI:
5
5
  sapi_get_system_status = sapiGetSystemStatus = Entry('system/status', 'sapi', 'GET', {'cost': 0.1})
6
6
  sapi_get_accountsnapshot = sapiGetAccountSnapshot = Entry('accountSnapshot', 'sapi', 'GET', {'cost': 240})
7
+ sapi_get_account_info = sapiGetAccountInfo = Entry('account/info', 'sapi', 'GET', {'cost': 0.1})
7
8
  sapi_get_margin_asset = sapiGetMarginAsset = Entry('margin/asset', 'sapi', 'GET', {'cost': 1})
8
9
  sapi_get_margin_pair = sapiGetMarginPair = Entry('margin/pair', 'sapi', 'GET', {'cost': 1})
9
10
  sapi_get_margin_allassets = sapiGetMarginAllAssets = Entry('margin/allAssets', 'sapi', 'GET', {'cost': 0.1})
ccxt/ace.py CHANGED
@@ -202,7 +202,7 @@ class ace(Exchange, ImplicitAPI):
202
202
  #
203
203
  return self.parse_markets(response)
204
204
 
205
- def parse_market(self, market) -> Market:
205
+ def parse_market(self, market: dict) -> Market:
206
206
  baseId = self.safe_string(market, 'base')
207
207
  base = self.safe_currency_code(baseId)
208
208
  quoteId = self.safe_string(market, 'quote')
@@ -1000,7 +1000,7 @@ class ace(Exchange, ImplicitAPI):
1000
1000
  url = self.urls['api'][api] + url
1001
1001
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
1002
1002
 
1003
- def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
1003
+ def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
1004
1004
  if response is None:
1005
1005
  return None # fallback to the default error handler
1006
1006
  feedback = self.id + ' ' + body
ccxt/alpaca.py CHANGED
@@ -772,7 +772,7 @@ class alpaca(Exchange, ImplicitAPI):
772
772
  # "message": "order is not found."
773
773
  # }
774
774
  #
775
- return self.safe_value(response, 'message', {})
775
+ return self.parse_order(response)
776
776
 
777
777
  def cancel_all_orders(self, symbol: Str = None, params={}):
778
778
  """
@@ -1064,7 +1064,7 @@ class alpaca(Exchange, ImplicitAPI):
1064
1064
  url = url + endpoint
1065
1065
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
1066
1066
 
1067
- def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
1067
+ def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
1068
1068
  if response is None:
1069
1069
  return None # default error handler
1070
1070
  # {
ccxt/ascendex.py CHANGED
@@ -2440,7 +2440,7 @@ class ascendex(Exchange, ImplicitAPI):
2440
2440
  transactions = self.safe_list(data, 'data', [])
2441
2441
  return self.parse_transactions(transactions, currency, since, limit)
2442
2442
 
2443
- def parse_transaction_status(self, status):
2443
+ def parse_transaction_status(self, status: Str):
2444
2444
  statuses: dict = {
2445
2445
  'reviewing': 'pending',
2446
2446
  'pending': 'pending',
@@ -3309,7 +3309,7 @@ class ascendex(Exchange, ImplicitAPI):
3309
3309
  url = self.urls['api']['rest'] + url
3310
3310
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
3311
3311
 
3312
- def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
3312
+ def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
3313
3313
  if response is None:
3314
3314
  return None # fallback to default error handler
3315
3315
  #
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.33'
7
+ __version__ = '4.3.35'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/async_support/ace.py CHANGED
@@ -202,7 +202,7 @@ class ace(Exchange, ImplicitAPI):
202
202
  #
203
203
  return self.parse_markets(response)
204
204
 
205
- def parse_market(self, market) -> Market:
205
+ def parse_market(self, market: dict) -> Market:
206
206
  baseId = self.safe_string(market, 'base')
207
207
  base = self.safe_currency_code(baseId)
208
208
  quoteId = self.safe_string(market, 'quote')
@@ -1000,7 +1000,7 @@ class ace(Exchange, ImplicitAPI):
1000
1000
  url = self.urls['api'][api] + url
1001
1001
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
1002
1002
 
1003
- def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
1003
+ def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
1004
1004
  if response is None:
1005
1005
  return None # fallback to the default error handler
1006
1006
  feedback = self.id + ' ' + body
@@ -772,7 +772,7 @@ class alpaca(Exchange, ImplicitAPI):
772
772
  # "message": "order is not found."
773
773
  # }
774
774
  #
775
- return self.safe_value(response, 'message', {})
775
+ return self.parse_order(response)
776
776
 
777
777
  async def cancel_all_orders(self, symbol: Str = None, params={}):
778
778
  """
@@ -1064,7 +1064,7 @@ class alpaca(Exchange, ImplicitAPI):
1064
1064
  url = url + endpoint
1065
1065
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
1066
1066
 
1067
- def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
1067
+ def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
1068
1068
  if response is None:
1069
1069
  return None # default error handler
1070
1070
  # {
@@ -2440,7 +2440,7 @@ class ascendex(Exchange, ImplicitAPI):
2440
2440
  transactions = self.safe_list(data, 'data', [])
2441
2441
  return self.parse_transactions(transactions, currency, since, limit)
2442
2442
 
2443
- def parse_transaction_status(self, status):
2443
+ def parse_transaction_status(self, status: Str):
2444
2444
  statuses: dict = {
2445
2445
  'reviewing': 'pending',
2446
2446
  'pending': 'pending',
@@ -3309,7 +3309,7 @@ class ascendex(Exchange, ImplicitAPI):
3309
3309
  url = self.urls['api']['rest'] + url
3310
3310
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
3311
3311
 
3312
- def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
3312
+ def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
3313
3313
  if response is None:
3314
3314
  return None # fallback to default error handler
3315
3315
  #
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.3.33'
5
+ __version__ = '4.3.35'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -568,6 +568,22 @@ class Exchange(BaseExchange):
568
568
  async def fetch_trades_ws(self, symbol: str, since: Int = None, limit: Int = None, params={}):
569
569
  raise NotSupported(self.id + ' fetchTradesWs() is not supported yet')
570
570
 
571
+ async def watch_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}):
572
+ if self.has['watchLiquidationsForSymbols']:
573
+ return self.watch_liquidations_for_symbols([symbol], since, limit, params)
574
+ raise NotSupported(self.id + ' watchLiquidations() is not supported yet')
575
+
576
+ async def watch_liquidations_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}):
577
+ raise NotSupported(self.id + ' watchLiquidationsForSymbols() is not supported yet')
578
+
579
+ async def watch_my_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}):
580
+ if self.has['watchMyLiquidationsForSymbols']:
581
+ return self.watch_my_liquidations_for_symbols([symbol], since, limit, params)
582
+ raise NotSupported(self.id + ' watchMyLiquidations() is not supported yet')
583
+
584
+ async def watch_my_liquidations_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}):
585
+ raise NotSupported(self.id + ' watchMyLiquidationsForSymbols() is not supported yet')
586
+
571
587
  async def watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}):
572
588
  raise NotSupported(self.id + ' watchTrades() is not supported yet')
573
589
 
@@ -594,7 +610,7 @@ class Exchange(BaseExchange):
594
610
 
595
611
  async def fetch_margin_mode(self, symbol: str, params={}):
596
612
  if self.has['fetchMarginModes']:
597
- marginModes = await self.fetchMarginModes([symbol], params)
613
+ marginModes = await self.fetch_margin_modes([symbol], params)
598
614
  return self.safe_dict(marginModes, symbol)
599
615
  else:
600
616
  raise NotSupported(self.id + ' fetchMarginMode() is not supported yet')
@@ -603,7 +619,7 @@ class Exchange(BaseExchange):
603
619
  raise NotSupported(self.id + ' fetchMarginModes() is not supported yet')
604
620
 
605
621
  async def fetch_rest_order_book_safe(self, symbol, limit=None, params={}):
606
- fetchSnapshotMaxRetries = self.handleOption('watchOrderBook', 'maxRetries', 3)
622
+ fetchSnapshotMaxRetries = self.handle_option('watchOrderBook', 'maxRetries', 3)
607
623
  for i in range(0, fetchSnapshotMaxRetries):
608
624
  try:
609
625
  orderBook = await self.fetch_order_book(symbol, limit, params)
@@ -641,7 +657,7 @@ class Exchange(BaseExchange):
641
657
  raise NotSupported(self.id + ' watchFundingRates() is not supported yet')
642
658
 
643
659
  async def watch_funding_rates_for_symbols(self, symbols: List[str], params={}):
644
- return await self.watchFundingRates(symbols, params)
660
+ return await self.watch_funding_rates(symbols, params)
645
661
 
646
662
  async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}):
647
663
  raise NotSupported(self.id + ' transfer() is not supported yet')
@@ -657,7 +673,7 @@ class Exchange(BaseExchange):
657
673
 
658
674
  async def fetch_leverage(self, symbol: str, params={}):
659
675
  if self.has['fetchLeverages']:
660
- leverages = await self.fetchLeverages([symbol], params)
676
+ leverages = await self.fetch_leverages([symbol], params)
661
677
  return self.safe_dict(leverages, symbol)
662
678
  else:
663
679
  raise NotSupported(self.id + ' fetchLeverage() is not supported yet')
@@ -836,12 +852,12 @@ class Exchange(BaseExchange):
836
852
  return await self.edit_order(id, symbol, 'limit', side, amount, price, params)
837
853
 
838
854
  async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
839
- await self.cancelOrder(id, symbol)
855
+ await self.cancel_order(id, symbol)
840
856
  return await self.create_order(symbol, type, side, amount, price, params)
841
857
 
842
858
  async def edit_order_ws(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
843
- await self.cancelOrderWs(id, symbol)
844
- return await self.createOrderWs(symbol, type, side, amount, price, params)
859
+ await self.cancel_order_ws(id, symbol)
860
+ return await self.create_order_ws(symbol, type, side, amount, price, params)
845
861
 
846
862
  async def fetch_permissions(self, params={}):
847
863
  raise NotSupported(self.id + ' fetchPermissions() is not supported yet')
@@ -859,7 +875,7 @@ class Exchange(BaseExchange):
859
875
  raise NotSupported(self.id + ' watchPositions() is not supported yet')
860
876
 
861
877
  async def watch_position_for_symbols(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={}):
862
- return await self.watchPositions(symbols, since, limit, params)
878
+ return await self.watch_positions(symbols, since, limit, params)
863
879
 
864
880
  async def fetch_positions_for_symbol(self, symbol: str, params={}):
865
881
  """
@@ -939,14 +955,14 @@ class Exchange(BaseExchange):
939
955
  async def fetch_deposit_withdraw_fee(self, code: str, params={}):
940
956
  if not self.has['fetchDepositWithdrawFees']:
941
957
  raise NotSupported(self.id + ' fetchDepositWithdrawFee() is not supported yet')
942
- fees = await self.fetchDepositWithdrawFees([code], params)
958
+ fees = await self.fetch_deposit_withdraw_fees([code], params)
943
959
  return self.safe_value(fees, code)
944
960
 
945
961
  async def fetch_cross_borrow_rate(self, code: str, params={}):
946
962
  await self.load_markets()
947
963
  if not self.has['fetchBorrowRates']:
948
964
  raise NotSupported(self.id + ' fetchCrossBorrowRate() is not supported yet')
949
- borrowRates = await self.fetchCrossBorrowRates(params)
965
+ borrowRates = await self.fetch_cross_borrow_rates(params)
950
966
  rate = self.safe_value(borrowRates, code)
951
967
  if rate is None:
952
968
  raise ExchangeError(self.id + ' fetchCrossBorrowRate() could not find the borrow rate for currency code ' + code)
@@ -981,7 +997,7 @@ class Exchange(BaseExchange):
981
997
  await self.load_markets()
982
998
  market = self.market(symbol)
983
999
  symbol = market['symbol']
984
- tickers = await self.fetchTickerWs(symbol, params)
1000
+ tickers = await self.fetch_ticker_ws(symbol, params)
985
1001
  ticker = self.safe_dict(tickers, symbol)
986
1002
  if ticker is None:
987
1003
  raise NullResponse(self.id + ' fetchTickers() could not find a ticker for ' + symbol)
@@ -1067,7 +1083,7 @@ class Exchange(BaseExchange):
1067
1083
  if trailingTriggerPrice is not None:
1068
1084
  params['trailingTriggerPrice'] = trailingTriggerPrice
1069
1085
  if self.has['createTrailingAmountOrderWs']:
1070
- return await self.createOrderWs(symbol, type, side, amount, price, params)
1086
+ return await self.create_order_ws(symbol, type, side, amount, price, params)
1071
1087
  raise NotSupported(self.id + ' createTrailingAmountOrderWs() is not supported yet')
1072
1088
 
1073
1089
  async def create_trailing_percent_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, trailingPercent=None, trailingTriggerPrice=None, params={}):
@@ -1111,7 +1127,7 @@ class Exchange(BaseExchange):
1111
1127
  if trailingTriggerPrice is not None:
1112
1128
  params['trailingTriggerPrice'] = trailingTriggerPrice
1113
1129
  if self.has['createTrailingPercentOrderWs']:
1114
- return await self.createOrderWs(symbol, type, side, amount, price, params)
1130
+ return await self.create_order_ws(symbol, type, side, amount, price, params)
1115
1131
  raise NotSupported(self.id + ' createTrailingPercentOrderWs() is not supported yet')
1116
1132
 
1117
1133
  async def create_market_order_with_cost(self, symbol: str, side: OrderSide, cost: float, params={}):
@@ -1161,7 +1177,7 @@ class Exchange(BaseExchange):
1161
1177
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1162
1178
  """
1163
1179
  if self.has['createMarketOrderWithCostWs'] or (self.has['createMarketBuyOrderWithCostWs'] and self.has['createMarketSellOrderWithCostWs']):
1164
- return await self.createOrderWs(symbol, 'market', side, cost, 1, params)
1180
+ return await self.create_order_ws(symbol, 'market', side, cost, 1, params)
1165
1181
  raise NotSupported(self.id + ' createMarketOrderWithCostWs() is not supported yet')
1166
1182
 
1167
1183
  async def create_trigger_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, triggerPrice: Num = None, params={}):
@@ -1199,7 +1215,7 @@ class Exchange(BaseExchange):
1199
1215
  raise ArgumentsRequired(self.id + ' createTriggerOrderWs() requires a triggerPrice argument')
1200
1216
  params['triggerPrice'] = triggerPrice
1201
1217
  if self.has['createTriggerOrderWs']:
1202
- return await self.createOrderWs(symbol, type, side, amount, price, params)
1218
+ return await self.create_order_ws(symbol, type, side, amount, price, params)
1203
1219
  raise NotSupported(self.id + ' createTriggerOrderWs() is not supported yet')
1204
1220
 
1205
1221
  async def create_stop_loss_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, stopLossPrice: Num = None, params={}):
@@ -1237,7 +1253,7 @@ class Exchange(BaseExchange):
1237
1253
  raise ArgumentsRequired(self.id + ' createStopLossOrderWs() requires a stopLossPrice argument')
1238
1254
  params['stopLossPrice'] = stopLossPrice
1239
1255
  if self.has['createStopLossOrderWs']:
1240
- return await self.createOrderWs(symbol, type, side, amount, price, params)
1256
+ return await self.create_order_ws(symbol, type, side, amount, price, params)
1241
1257
  raise NotSupported(self.id + ' createStopLossOrderWs() is not supported yet')
1242
1258
 
1243
1259
  async def create_take_profit_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, takeProfitPrice: Num = None, params={}):
@@ -1275,7 +1291,7 @@ class Exchange(BaseExchange):
1275
1291
  raise ArgumentsRequired(self.id + ' createTakeProfitOrderWs() requires a takeProfitPrice argument')
1276
1292
  params['takeProfitPrice'] = takeProfitPrice
1277
1293
  if self.has['createTakeProfitOrderWs']:
1278
- return await self.createOrderWs(symbol, type, side, amount, price, params)
1294
+ return await self.create_order_ws(symbol, type, side, amount, price, params)
1279
1295
  raise NotSupported(self.id + ' createTakeProfitOrderWs() is not supported yet')
1280
1296
 
1281
1297
  async def create_order_with_take_profit_and_stop_loss(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, takeProfit: Num = None, stopLoss: Num = None, params={}):
@@ -1327,7 +1343,7 @@ class Exchange(BaseExchange):
1327
1343
  """
1328
1344
  params = self.set_take_profit_and_stop_loss_params(symbol, type, side, amount, price, takeProfit, stopLoss, params)
1329
1345
  if self.has['createOrderWithTakeProfitAndStopLossWs']:
1330
- return await self.createOrderWs(symbol, type, side, amount, price, params)
1346
+ return await self.create_order_ws(symbol, type, side, amount, price, params)
1331
1347
  raise NotSupported(self.id + ' createOrderWithTakeProfitAndStopLossWs() is not supported yet')
1332
1348
 
1333
1349
  async def create_orders(self, orders: List[OrderRequest], params={}):
@@ -1358,7 +1374,7 @@ class Exchange(BaseExchange):
1358
1374
  raise NotSupported(self.id + ' cancelAllOrdersWs() is not supported yet')
1359
1375
 
1360
1376
  async def cancel_unified_order(self, order, params={}):
1361
- return self.cancelOrder(self.safe_string(order, 'id'), self.safe_string(order, 'symbol'), params)
1377
+ return self.cancel_order(self.safe_string(order, 'id'), self.safe_string(order, 'symbol'), params)
1362
1378
 
1363
1379
  async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1364
1380
  if self.has['fetchOpenOrders'] and self.has['fetchClosedOrders']:
@@ -1382,7 +1398,7 @@ class Exchange(BaseExchange):
1382
1398
 
1383
1399
  async def fetch_open_orders_ws(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1384
1400
  if self.has['fetchOrdersWs']:
1385
- orders = await self.fetchOrdersWs(symbol, since, limit, params)
1401
+ orders = await self.fetch_orders_ws(symbol, since, limit, params)
1386
1402
  return self.filter_by(orders, 'status', 'open')
1387
1403
  raise NotSupported(self.id + ' fetchOpenOrdersWs() is not supported yet')
1388
1404
 
@@ -1397,7 +1413,7 @@ class Exchange(BaseExchange):
1397
1413
 
1398
1414
  async def fetch_closed_orders_ws(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1399
1415
  if self.has['fetchOrdersWs']:
1400
- orders = await self.fetchOrdersWs(symbol, since, limit, params)
1416
+ orders = await self.fetch_orders_ws(symbol, since, limit, params)
1401
1417
  return self.filter_by(orders, 'status', 'closed')
1402
1418
  raise NotSupported(self.id + ' fetchClosedOrdersWs() is not supported yet')
1403
1419
 
@@ -1468,7 +1484,7 @@ class Exchange(BaseExchange):
1468
1484
 
1469
1485
  async def fetch_deposit_address(self, code: str, params={}):
1470
1486
  if self.has['fetchDepositAddresses']:
1471
- depositAddresses = await self.fetchDepositAddresses([code], params)
1487
+ depositAddresses = await self.fetch_deposit_addresses([code], params)
1472
1488
  depositAddress = self.safe_value(depositAddresses, code)
1473
1489
  if depositAddress is None:
1474
1490
  raise InvalidAddress(self.id + ' fetchDepositAddress() could not find a deposit address for ' + code + ', make sure you have created a corresponding deposit address in your wallet on the exchange website')
@@ -1477,7 +1493,7 @@ class Exchange(BaseExchange):
1477
1493
  elif self.has['fetchDepositAddressesByNetwork']:
1478
1494
  network = self.safe_string(params, 'network')
1479
1495
  params = self.omit(params, 'network')
1480
- addressStructures = await self.fetchDepositAddressesByNetwork(code, params)
1496
+ addressStructures = await self.fetch_deposit_addresses_by_network(code, params)
1481
1497
  if network is not None:
1482
1498
  return self.safe_dict(addressStructures, network)
1483
1499
  else:
@@ -1491,37 +1507,37 @@ class Exchange(BaseExchange):
1491
1507
  return await self.create_order(symbol, 'limit', side, amount, price, params)
1492
1508
 
1493
1509
  async def create_limit_order_ws(self, symbol: str, side: OrderSide, amount: float, price: float, params={}):
1494
- return await self.createOrderWs(symbol, 'limit', side, amount, price, params)
1510
+ return await self.create_order_ws(symbol, 'limit', side, amount, price, params)
1495
1511
 
1496
1512
  async def create_market_order(self, symbol: str, side: OrderSide, amount: float, price: Num = None, params={}):
1497
1513
  return await self.create_order(symbol, 'market', side, amount, price, params)
1498
1514
 
1499
1515
  async def create_market_order_ws(self, symbol: str, side: OrderSide, amount: float, price: Num = None, params={}):
1500
- return await self.createOrderWs(symbol, 'market', side, amount, price, params)
1516
+ return await self.create_order_ws(symbol, 'market', side, amount, price, params)
1501
1517
 
1502
1518
  async def create_limit_buy_order(self, symbol: str, amount: float, price: float, params={}):
1503
1519
  return await self.create_order(symbol, 'limit', 'buy', amount, price, params)
1504
1520
 
1505
1521
  async def create_limit_buy_order_ws(self, symbol: str, amount: float, price: float, params={}):
1506
- return await self.createOrderWs(symbol, 'limit', 'buy', amount, price, params)
1522
+ return await self.create_order_ws(symbol, 'limit', 'buy', amount, price, params)
1507
1523
 
1508
1524
  async def create_limit_sell_order(self, symbol: str, amount: float, price: float, params={}):
1509
1525
  return await self.create_order(symbol, 'limit', 'sell', amount, price, params)
1510
1526
 
1511
1527
  async def create_limit_sell_order_ws(self, symbol: str, amount: float, price: float, params={}):
1512
- return await self.createOrderWs(symbol, 'limit', 'sell', amount, price, params)
1528
+ return await self.create_order_ws(symbol, 'limit', 'sell', amount, price, params)
1513
1529
 
1514
1530
  async def create_market_buy_order(self, symbol: str, amount: float, params={}):
1515
1531
  return await self.create_order(symbol, 'market', 'buy', amount, None, params)
1516
1532
 
1517
1533
  async def create_market_buy_order_ws(self, symbol: str, amount: float, params={}):
1518
- return await self.createOrderWs(symbol, 'market', 'buy', amount, None, params)
1534
+ return await self.create_order_ws(symbol, 'market', 'buy', amount, None, params)
1519
1535
 
1520
1536
  async def create_market_sell_order(self, symbol: str, amount: float, params={}):
1521
1537
  return await self.create_order(symbol, 'market', 'sell', amount, None, params)
1522
1538
 
1523
1539
  async def create_market_sell_order_ws(self, symbol: str, amount: float, params={}):
1524
- return await self.createOrderWs(symbol, 'market', 'sell', amount, None, params)
1540
+ return await self.create_order_ws(symbol, 'market', 'sell', amount, None, params)
1525
1541
 
1526
1542
  async def load_time_difference(self, params={}):
1527
1543
  serverTime = await self.fetch_time(params)
@@ -1549,7 +1565,7 @@ class Exchange(BaseExchange):
1549
1565
  if not self.has['createPostOnlyOrderWs']:
1550
1566
  raise NotSupported(self.id + 'createPostOnlyOrderWs() is not supported yet')
1551
1567
  query = self.extend(params, {'postOnly': True})
1552
- return await self.createOrderWs(symbol, type, side, amount, price, query)
1568
+ return await self.create_order_ws(symbol, type, side, amount, price, query)
1553
1569
 
1554
1570
  async def create_reduce_only_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
1555
1571
  if not self.has['createReduceOnlyOrder']:
@@ -1561,7 +1577,7 @@ class Exchange(BaseExchange):
1561
1577
  if not self.has['createReduceOnlyOrderWs']:
1562
1578
  raise NotSupported(self.id + 'createReduceOnlyOrderWs() is not supported yet')
1563
1579
  query = self.extend(params, {'reduceOnly': True})
1564
- return await self.createOrderWs(symbol, type, side, amount, price, query)
1580
+ return await self.create_order_ws(symbol, type, side, amount, price, query)
1565
1581
 
1566
1582
  async def create_stop_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, stopPrice: Num = None, params={}):
1567
1583
  if not self.has['createStopOrder']:
@@ -1577,7 +1593,7 @@ class Exchange(BaseExchange):
1577
1593
  if stopPrice is None:
1578
1594
  raise ArgumentsRequired(self.id + ' createStopOrderWs() requires a stopPrice argument')
1579
1595
  query = self.extend(params, {'stopPrice': stopPrice})
1580
- return await self.createOrderWs(symbol, type, side, amount, price, query)
1596
+ return await self.create_order_ws(symbol, type, side, amount, price, query)
1581
1597
 
1582
1598
  async def create_stop_limit_order(self, symbol: str, side: OrderSide, amount: float, price: float, stopPrice: float, params={}):
1583
1599
  if not self.has['createStopLimitOrder']:
@@ -1589,7 +1605,7 @@ class Exchange(BaseExchange):
1589
1605
  if not self.has['createStopLimitOrderWs']:
1590
1606
  raise NotSupported(self.id + ' createStopLimitOrderWs() is not supported yet')
1591
1607
  query = self.extend(params, {'stopPrice': stopPrice})
1592
- return await self.createOrderWs(symbol, 'limit', side, amount, price, query)
1608
+ return await self.create_order_ws(symbol, 'limit', side, amount, price, query)
1593
1609
 
1594
1610
  async def create_stop_market_order(self, symbol: str, side: OrderSide, amount: float, stopPrice: float, params={}):
1595
1611
  if not self.has['createStopMarketOrder']:
@@ -1601,7 +1617,7 @@ class Exchange(BaseExchange):
1601
1617
  if not self.has['createStopMarketOrderWs']:
1602
1618
  raise NotSupported(self.id + ' createStopMarketOrderWs() is not supported yet')
1603
1619
  query = self.extend(params, {'stopPrice': stopPrice})
1604
- return await self.createOrderWs(symbol, 'market', side, amount, None, query)
1620
+ return await self.create_order_ws(symbol, 'market', side, amount, None, query)
1605
1621
 
1606
1622
  async def fetch_last_prices(self, symbols: Strings = None, params={}):
1607
1623
  raise NotSupported(self.id + ' fetchLastPrices() is not supported yet')
@@ -1628,7 +1644,7 @@ class Exchange(BaseExchange):
1628
1644
  symbol = market['symbol']
1629
1645
  if not market['contract']:
1630
1646
  raise BadSymbol(self.id + ' fetchFundingRate() supports contract markets only')
1631
- rates = await self.fetchFundingRates([symbol], params)
1647
+ rates = await self.fetch_funding_rates([symbol], params)
1632
1648
  rate = self.safe_value(rates, symbol)
1633
1649
  if rate is None:
1634
1650
  raise NullResponse(self.id + ' fetchFundingRate() returned no data for ' + symbol)
@@ -1702,7 +1718,7 @@ class Exchange(BaseExchange):
1702
1718
  :returns dict: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
1703
1719
  """
1704
1720
  if self.has['fetchDepositsWithdrawals']:
1705
- return await self.fetchDepositsWithdrawals(code, since, limit, params)
1721
+ return await self.fetch_deposits_withdrawals(code, since, limit, params)
1706
1722
  else:
1707
1723
  raise NotSupported(self.id + ' fetchTransactions() is not supported yet')
1708
1724
 
@@ -1836,7 +1852,7 @@ class Exchange(BaseExchange):
1836
1852
  try:
1837
1853
  if cursorValue is not None:
1838
1854
  if cursorIncrement is not None:
1839
- cursorValue = self.parseToInt(cursorValue) + cursorIncrement
1855
+ cursorValue = self.parse_to_int(cursorValue) + cursorIncrement
1840
1856
  params[cursorSent] = cursorValue
1841
1857
  response = None
1842
1858
  if method == 'fetchAccounts':
@@ -1867,7 +1883,7 @@ class Exchange(BaseExchange):
1867
1883
  if errors > maxRetries:
1868
1884
  raise e
1869
1885
  i += 1
1870
- sorted = self.sortCursorPaginatedResult(result)
1886
+ sorted = self.sort_cursor_paginated_result(result)
1871
1887
  key = 0 if (method == 'fetchOHLCV') else 'timestamp'
1872
1888
  return self.filter_by_since_limit(sorted, since, limit, key)
1873
1889
 
@@ -1898,7 +1914,7 @@ class Exchange(BaseExchange):
1898
1914
  if errors > maxRetries:
1899
1915
  raise e
1900
1916
  i += 1
1901
- sorted = self.sortCursorPaginatedResult(result)
1917
+ sorted = self.sort_cursor_paginated_result(result)
1902
1918
  key = 0 if (method == 'fetchOHLCV') else 'timestamp'
1903
1919
  return self.filter_by_since_limit(sorted, since, limit, key)
1904
1920
 
@@ -1781,7 +1781,7 @@ class bigone(Exchange, ImplicitAPI):
1781
1781
  'info': response,
1782
1782
  }
1783
1783
 
1784
- def parse_transaction_status(self, status):
1784
+ def parse_transaction_status(self, status: Str):
1785
1785
  statuses: dict = {
1786
1786
  # what are other statuses here?
1787
1787
  'WITHHOLD': 'ok', # deposits
@@ -2095,7 +2095,7 @@ class bigone(Exchange, ImplicitAPI):
2095
2095
  data = self.safe_dict(response, 'data', {})
2096
2096
  return self.parse_transaction(data, currency)
2097
2097
 
2098
- def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
2098
+ def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
2099
2099
  if response is None:
2100
2100
  return None # fallback to default error handler
2101
2101
  #
@@ -263,6 +263,7 @@ class binance(Exchange, ImplicitAPI):
263
263
  'system/status': 0.1,
264
264
  # these endpoints require self.apiKey
265
265
  'accountSnapshot': 240, # Weight(IP): 2400 => cost = 0.1 * 2400 = 240
266
+ 'account/info': 0.1,
266
267
  'margin/asset': 1, # Weight(IP): 10 => cost = 0.1 * 10 = 1
267
268
  'margin/pair': 1,
268
269
  'margin/allAssets': 0.1,
@@ -3043,7 +3044,7 @@ class binance(Exchange, ImplicitAPI):
3043
3044
  result.append(self.parse_market(markets[i]))
3044
3045
  return result
3045
3046
 
3046
- def parse_market(self, market) -> Market:
3047
+ def parse_market(self, market: dict) -> Market:
3047
3048
  swap = False
3048
3049
  future = False
3049
3050
  option = False
@@ -4750,7 +4751,7 @@ class binance(Exchange, ImplicitAPI):
4750
4751
  cancelId = self.safe_string_2(params, 'cancelNewClientOrderId', 'cancelOrigClientOrderId')
4751
4752
  if cancelId is None:
4752
4753
  request['cancelOrderId'] = id # user can provide either cancelOrderId, cancelOrigClientOrderId or cancelOrigClientOrderId
4753
- # remove timeInForce from params because PO is only used by self.is_post_onlyand it's not a valid value for Binance
4754
+ # remove timeInForce from params because PO is only used by self.is_post_only and it's not a valid value for Binance
4754
4755
  if self.safe_string(params, 'timeInForce') == 'PO':
4755
4756
  params = self.omit(params, ['timeInForce'])
4756
4757
  params = self.omit(params, ['quoteOrderQty', 'cost', 'stopPrice', 'newClientOrderId', 'clientOrderId', 'postOnly'])
@@ -5810,7 +5811,7 @@ class binance(Exchange, ImplicitAPI):
5810
5811
  request['timeInForce'] = self.options['defaultTimeInForce'] # 'GTC' = Good To Cancel(default), 'IOC' = Immediate Or Cancel
5811
5812
  if not isPortfolioMargin and market['contract'] and postOnly:
5812
5813
  request['timeInForce'] = 'GTX'
5813
- # remove timeInForce from params because PO is only used by self.is_post_onlyand it's not a valid value for Binance
5814
+ # remove timeInForce from params because PO is only used by self.is_post_only and it's not a valid value for Binance
5814
5815
  if self.safe_string(params, 'timeInForce') == 'PO':
5815
5816
  params = self.omit(params, 'timeInForce')
5816
5817
  requestParams = self.omit(params, ['type', 'newClientOrderId', 'clientOrderId', 'postOnly', 'stopLossPrice', 'takeProfitPrice', 'stopPrice', 'triggerPrice', 'trailingTriggerPrice', 'trailingPercent', 'quoteOrderQty', 'cost', 'test'])
@@ -10225,7 +10226,7 @@ class binance(Exchange, ImplicitAPI):
10225
10226
  url += '?' + self.urlencode(params)
10226
10227
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
10227
10228
 
10228
- def get_exceptions_by_url(self, url, exactOrBroad):
10229
+ def get_exceptions_by_url(self, url: str, exactOrBroad: str):
10229
10230
  marketType = None
10230
10231
  hostname = self.hostname if (self.hostname is not None) else 'binance.com'
10231
10232
  if url.startswith('https://api.' + hostname + '/'):
@@ -10243,7 +10244,7 @@ class binance(Exchange, ImplicitAPI):
10243
10244
  return self.safe_dict(exceptionsForMarketType, exactOrBroad, {})
10244
10245
  return {}
10245
10246
 
10246
- def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
10247
+ def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
10247
10248
  if (code == 418) or (code == 429):
10248
10249
  raise DDoSProtection(self.id + ' ' + str(code) + ' ' + reason + ' ' + body)
10249
10250
  # error response in a form: {"code": -1013, "msg": "Invalid quantity."}
@@ -636,7 +636,7 @@ class bingx(Exchange, ImplicitAPI):
636
636
  markets = self.safe_list(response, 'data', [])
637
637
  return self.parse_markets(markets)
638
638
 
639
- def parse_market(self, market) -> Market:
639
+ def parse_market(self, market: dict) -> Market:
640
640
  id = self.safe_string(market, 'symbol')
641
641
  symbolParts = id.split('-')
642
642
  baseId = symbolParts[0]
@@ -1986,7 +1986,8 @@ class bingx(Exchange, ImplicitAPI):
1986
1986
  #
1987
1987
  if isinstance(response, str):
1988
1988
  # broken api engine : order-ids are too long numbers(i.e. 1742930526912864656)
1989
- # and json.loadscan not handle them in JS, so we have to use .parse_json # however, when order has an attached SL/TP, their value types need extra parsing
1989
+ # and json.loadscan not handle them in JS, so we have to use .parseJson
1990
+ # however, when order has an attached SL/TP, their value types need extra parsing
1990
1991
  response = self.fix_stringified_json_members(response)
1991
1992
  response = self.parse_json(response)
1992
1993
  data = self.safe_value(response, 'data', {})
@@ -4264,7 +4265,7 @@ class bingx(Exchange, ImplicitAPI):
4264
4265
  super(bingx, self).set_sandbox_mode(enable)
4265
4266
  self.options['sandboxMode'] = enable
4266
4267
 
4267
- def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
4268
+ def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
4268
4269
  if response is None:
4269
4270
  return None # fallback to default error handler
4270
4271
  #
@@ -846,7 +846,7 @@ class bit2c(Exchange, ImplicitAPI):
846
846
  }
847
847
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
848
848
 
849
- def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
849
+ def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
850
850
  if response is None:
851
851
  return None # fallback to default error handler
852
852
  #