ccxt 4.4.99__py2.py3-none-any.whl → 4.4.100__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/bingx.py +1 -0
  3. ccxt/alpaca.py +1 -1
  4. ccxt/apex.py +1 -1
  5. ccxt/ascendex.py +1 -1
  6. ccxt/async_support/__init__.py +1 -1
  7. ccxt/async_support/alpaca.py +1 -1
  8. ccxt/async_support/apex.py +1 -1
  9. ccxt/async_support/ascendex.py +1 -1
  10. ccxt/async_support/base/exchange.py +44 -9
  11. ccxt/async_support/base/ws/client.py +3 -1
  12. ccxt/async_support/bigone.py +1 -1
  13. ccxt/async_support/binance.py +3 -2
  14. ccxt/async_support/bingx.py +33 -4
  15. ccxt/async_support/bitbank.py +1 -1
  16. ccxt/async_support/bitfinex.py +4 -1
  17. ccxt/async_support/bitflyer.py +1 -1
  18. ccxt/async_support/bitget.py +32 -14
  19. ccxt/async_support/bithumb.py +1 -1
  20. ccxt/async_support/bitmart.py +2 -2
  21. ccxt/async_support/bitmex.py +3 -2
  22. ccxt/async_support/bitopro.py +1 -1
  23. ccxt/async_support/bitrue.py +2 -2
  24. ccxt/async_support/bitso.py +1 -1
  25. ccxt/async_support/bitstamp.py +1 -1
  26. ccxt/async_support/bittrade.py +1 -1
  27. ccxt/async_support/bitvavo.py +1 -1
  28. ccxt/async_support/blockchaincom.py +1 -1
  29. ccxt/async_support/blofin.py +1 -1
  30. ccxt/async_support/btcmarkets.py +1 -1
  31. ccxt/async_support/bybit.py +2 -2
  32. ccxt/async_support/coinbase.py +1 -1
  33. ccxt/async_support/coinbaseexchange.py +1 -1
  34. ccxt/async_support/coinbaseinternational.py +1 -1
  35. ccxt/async_support/coincatch.py +2 -2
  36. ccxt/async_support/coinex.py +3 -3
  37. ccxt/async_support/coinmate.py +1 -1
  38. ccxt/async_support/coinsph.py +1 -1
  39. ccxt/async_support/cryptocom.py +1 -1
  40. ccxt/async_support/defx.py +2 -2
  41. ccxt/async_support/delta.py +1 -1
  42. ccxt/async_support/deribit.py +1 -1
  43. ccxt/async_support/digifinex.py +2 -2
  44. ccxt/async_support/ellipx.py +1 -1
  45. ccxt/async_support/exmo.py +1 -1
  46. ccxt/async_support/foxbit.py +3 -3
  47. ccxt/async_support/gate.py +17 -2
  48. ccxt/async_support/gemini.py +1 -1
  49. ccxt/async_support/hashkey.py +2 -2
  50. ccxt/async_support/hibachi.py +1 -1
  51. ccxt/async_support/hitbtc.py +2 -2
  52. ccxt/async_support/hollaex.py +1 -1
  53. ccxt/async_support/htx.py +4 -3
  54. ccxt/async_support/hyperliquid.py +71 -29
  55. ccxt/async_support/independentreserve.py +1 -1
  56. ccxt/async_support/indodax.py +1 -1
  57. ccxt/async_support/kraken.py +1 -1
  58. ccxt/async_support/krakenfutures.py +2 -1
  59. ccxt/async_support/kucoin.py +2 -2
  60. ccxt/async_support/kucoinfutures.py +2 -1
  61. ccxt/async_support/lbank.py +2 -2
  62. ccxt/async_support/mercado.py +1 -1
  63. ccxt/async_support/mexc.py +9 -2
  64. ccxt/async_support/modetrade.py +93 -2
  65. ccxt/async_support/ndax.py +1 -1
  66. ccxt/async_support/novadax.py +1 -1
  67. ccxt/async_support/okcoin.py +1 -1
  68. ccxt/async_support/okx.py +2 -2
  69. ccxt/async_support/onetrading.py +33 -0
  70. ccxt/async_support/oxfun.py +1 -1
  71. ccxt/async_support/p2b.py +32 -0
  72. ccxt/async_support/paradex.py +2 -1
  73. ccxt/async_support/phemex.py +2 -2
  74. ccxt/async_support/poloniex.py +2 -2
  75. ccxt/async_support/probit.py +36 -1
  76. ccxt/async_support/tokocrypto.py +1 -1
  77. ccxt/async_support/upbit.py +1 -1
  78. ccxt/async_support/vertex.py +1 -1
  79. ccxt/async_support/wavesexchange.py +1 -1
  80. ccxt/async_support/whitebit.py +2 -2
  81. ccxt/async_support/woo.py +4 -4
  82. ccxt/async_support/woofipro.py +93 -2
  83. ccxt/async_support/xt.py +2 -2
  84. ccxt/async_support/yobit.py +1 -1
  85. ccxt/async_support/zaif.py +1 -1
  86. ccxt/async_support/zonda.py +1 -1
  87. ccxt/base/exchange.py +11 -9
  88. ccxt/base/types.py +1 -0
  89. ccxt/bigone.py +1 -1
  90. ccxt/binance.py +3 -2
  91. ccxt/bingx.py +33 -4
  92. ccxt/bitbank.py +1 -1
  93. ccxt/bitfinex.py +4 -1
  94. ccxt/bitflyer.py +1 -1
  95. ccxt/bitget.py +32 -14
  96. ccxt/bithumb.py +1 -1
  97. ccxt/bitmart.py +2 -2
  98. ccxt/bitmex.py +3 -2
  99. ccxt/bitopro.py +1 -1
  100. ccxt/bitrue.py +2 -2
  101. ccxt/bitso.py +1 -1
  102. ccxt/bitstamp.py +1 -1
  103. ccxt/bittrade.py +1 -1
  104. ccxt/bitvavo.py +1 -1
  105. ccxt/blockchaincom.py +1 -1
  106. ccxt/blofin.py +1 -1
  107. ccxt/btcmarkets.py +1 -1
  108. ccxt/bybit.py +2 -2
  109. ccxt/coinbase.py +1 -1
  110. ccxt/coinbaseexchange.py +1 -1
  111. ccxt/coinbaseinternational.py +1 -1
  112. ccxt/coincatch.py +2 -2
  113. ccxt/coinex.py +3 -3
  114. ccxt/coinmate.py +1 -1
  115. ccxt/coinsph.py +1 -1
  116. ccxt/cryptocom.py +1 -1
  117. ccxt/defx.py +2 -2
  118. ccxt/delta.py +1 -1
  119. ccxt/deribit.py +1 -1
  120. ccxt/digifinex.py +2 -2
  121. ccxt/ellipx.py +1 -1
  122. ccxt/exmo.py +1 -1
  123. ccxt/foxbit.py +3 -3
  124. ccxt/gate.py +17 -2
  125. ccxt/gemini.py +1 -1
  126. ccxt/hashkey.py +2 -2
  127. ccxt/hibachi.py +1 -1
  128. ccxt/hitbtc.py +2 -2
  129. ccxt/hollaex.py +1 -1
  130. ccxt/htx.py +4 -3
  131. ccxt/hyperliquid.py +71 -29
  132. ccxt/independentreserve.py +1 -1
  133. ccxt/indodax.py +1 -1
  134. ccxt/kraken.py +1 -1
  135. ccxt/krakenfutures.py +2 -1
  136. ccxt/kucoin.py +2 -2
  137. ccxt/kucoinfutures.py +2 -1
  138. ccxt/lbank.py +2 -2
  139. ccxt/mercado.py +1 -1
  140. ccxt/mexc.py +9 -2
  141. ccxt/modetrade.py +93 -2
  142. ccxt/ndax.py +1 -1
  143. ccxt/novadax.py +1 -1
  144. ccxt/okcoin.py +1 -1
  145. ccxt/okx.py +2 -2
  146. ccxt/onetrading.py +33 -0
  147. ccxt/oxfun.py +1 -1
  148. ccxt/p2b.py +32 -0
  149. ccxt/paradex.py +2 -1
  150. ccxt/phemex.py +2 -2
  151. ccxt/poloniex.py +2 -2
  152. ccxt/pro/__init__.py +1 -1
  153. ccxt/pro/binance.py +2 -1
  154. ccxt/pro/bitvavo.py +1 -1
  155. ccxt/pro/bybit.py +1 -0
  156. ccxt/pro/coinex.py +1 -1
  157. ccxt/pro/hyperliquid.py +99 -12
  158. ccxt/pro/kucoin.py +1 -1
  159. ccxt/pro/kucoinfutures.py +1 -1
  160. ccxt/pro/mexc.py +328 -139
  161. ccxt/pro/okx.py +2 -1
  162. ccxt/pro/oxfun.py +1 -1
  163. ccxt/probit.py +36 -1
  164. ccxt/protobuf/__init__.py +0 -0
  165. ccxt/protobuf/mexc/PrivateAccountV3Api_pb2.py +37 -0
  166. ccxt/protobuf/mexc/PrivateDealsV3Api_pb2.py +37 -0
  167. ccxt/protobuf/mexc/PrivateOrdersV3Api_pb2.py +37 -0
  168. ccxt/protobuf/mexc/PublicAggreBookTickerV3Api_pb2.py +37 -0
  169. ccxt/protobuf/mexc/PublicAggreDealsV3Api_pb2.py +39 -0
  170. ccxt/protobuf/mexc/PublicAggreDepthsV3Api_pb2.py +39 -0
  171. ccxt/protobuf/mexc/PublicBookTickerBatchV3Api_pb2.py +38 -0
  172. ccxt/protobuf/mexc/PublicBookTickerV3Api_pb2.py +37 -0
  173. ccxt/protobuf/mexc/PublicDealsV3Api_pb2.py +39 -0
  174. ccxt/protobuf/mexc/PublicIncreaseDepthsBatchV3Api_pb2.py +38 -0
  175. ccxt/protobuf/mexc/PublicIncreaseDepthsV3Api_pb2.py +39 -0
  176. ccxt/protobuf/mexc/PublicLimitDepthsV3Api_pb2.py +39 -0
  177. ccxt/protobuf/mexc/PublicMiniTickerV3Api_pb2.py +37 -0
  178. ccxt/protobuf/mexc/PublicMiniTickersV3Api_pb2.py +38 -0
  179. ccxt/protobuf/mexc/PublicSpotKlineV3Api_pb2.py +37 -0
  180. ccxt/protobuf/mexc/PushDataV3ApiWrapper_pb2.py +52 -0
  181. ccxt/protobuf/mexc/__init__.py +0 -0
  182. ccxt/tokocrypto.py +1 -1
  183. ccxt/upbit.py +1 -1
  184. ccxt/vertex.py +1 -1
  185. ccxt/wavesexchange.py +1 -1
  186. ccxt/whitebit.py +2 -2
  187. ccxt/woo.py +4 -4
  188. ccxt/woofipro.py +93 -2
  189. ccxt/xt.py +2 -2
  190. ccxt/yobit.py +1 -1
  191. ccxt/zaif.py +1 -1
  192. ccxt/zonda.py +1 -1
  193. {ccxt-4.4.99.dist-info → ccxt-4.4.100.dist-info}/METADATA +5 -5
  194. {ccxt-4.4.99.dist-info → ccxt-4.4.100.dist-info}/RECORD +197 -179
  195. {ccxt-4.4.99.dist-info → ccxt-4.4.100.dist-info}/LICENSE.txt +0 -0
  196. {ccxt-4.4.99.dist-info → ccxt-4.4.100.dist-info}/WHEEL +0 -0
  197. {ccxt-4.4.99.dist-info → ccxt-4.4.100.dist-info}/top_level.txt +0 -0
@@ -2416,6 +2416,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
2416
2416
  https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-futures
2417
2417
 
2418
2418
  :param dict [params]: extra parameters specific to the exchange API endpoint
2419
+ :param dict [params.code]: the unified currency code to fetch the balance for, if not provided, the default .options['fetchBalance']['code'] will be used
2419
2420
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
2420
2421
  """
2421
2422
  await self.load_markets()
@@ -3217,7 +3218,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
3217
3218
  'marginMode': marginMode,
3218
3219
  })
3219
3220
 
3220
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3221
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
3221
3222
  """
3222
3223
  set the level of leverage for a market
3223
3224
 
@@ -968,7 +968,7 @@ class lbank(Exchange, ImplicitAPI):
968
968
  timestamp = self.milliseconds()
969
969
  if market['swap']:
970
970
  return self.parse_order_book(orderbook, market['symbol'], timestamp, 'bids', 'asks', 'price', 'volume')
971
- return self.parse_order_book(orderbook, market['symbol'], timestamp, 'bids', 'asks', 1, 0)
971
+ return self.parse_order_book(orderbook, market['symbol'], timestamp, 'bids', 'asks')
972
972
 
973
973
  def parse_trade(self, trade: dict, market: Market = None) -> Trade:
974
974
  #
@@ -2235,7 +2235,7 @@ class lbank(Exchange, ImplicitAPI):
2235
2235
  'tag': tag,
2236
2236
  }
2237
2237
 
2238
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2238
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2239
2239
  """
2240
2240
  make a withdrawal
2241
2241
 
@@ -704,7 +704,7 @@ class mercado(Exchange, ImplicitAPI):
704
704
  order = self.safe_dict(responseData, 'order')
705
705
  return self.parse_order(order, market)
706
706
 
707
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
707
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
708
708
  """
709
709
  make a withdrawal
710
710
  :param str code: unified currency code
@@ -488,6 +488,12 @@ class mexc(Exchange, ImplicitAPI):
488
488
  'ZKSYNC': 'ZKSYNCERA',
489
489
  'TRC20': 'TRX',
490
490
  'TON': 'TONCOIN',
491
+ 'ARBITRUM': 'ARB',
492
+ 'STX': 'STACKS',
493
+ 'LUNC': 'LUNA',
494
+ 'STARK': 'STARKNET',
495
+ 'APT': 'APTOS',
496
+ 'PEAQ': 'PEAQEVM',
491
497
  'AVAXC': 'AVAX_CCHAIN',
492
498
  'ERC20': 'ETH',
493
499
  'ACA': 'ACALA',
@@ -517,6 +523,7 @@ class mexc(Exchange, ImplicitAPI):
517
523
  # 'DNX': 'Dynex(DNX)',
518
524
  # 'DOGE': 'Dogecoin(DOGE)',
519
525
  # 'DOT': 'Polkadot(DOT)',
526
+ 'DOT': 'DOTASSETHUB',
520
527
  # 'DYM': 'Dymension(DYM)',
521
528
  'ETHF': 'ETF',
522
529
  'HRC20': 'HECO',
@@ -4056,7 +4063,7 @@ class mexc(Exchange, ImplicitAPI):
4056
4063
  """
4057
4064
  return await self.modify_margin_helper(symbol, amount, 'ADD', params)
4058
4065
 
4059
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
4066
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
4060
4067
  """
4061
4068
  set the level of leverage for a market
4062
4069
 
@@ -5242,7 +5249,7 @@ class mexc(Exchange, ImplicitAPI):
5242
5249
  }
5243
5250
  return self.safe_string(statuses, status, status)
5244
5251
 
5245
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
5252
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
5246
5253
  """
5247
5254
  make a withdrawal
5248
5255
 
@@ -1025,6 +1025,97 @@ class modetrade(Exchange, ImplicitAPI):
1025
1025
  sorted = self.sort_by(rates, 'timestamp')
1026
1026
  return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
1027
1027
 
1028
+ def parse_income(self, income, market: Market = None):
1029
+ #
1030
+ # {
1031
+ # "symbol": "PERP_ETH_USDC",
1032
+ # "funding_rate": 0.00046875,
1033
+ # "mark_price": 2100,
1034
+ # "funding_fee": 0.000016,
1035
+ # "payment_type": "Pay",
1036
+ # "status": "Accrued",
1037
+ # "created_time": 1682235722003,
1038
+ # "updated_time": 1682235722003
1039
+ # }
1040
+ #
1041
+ marketId = self.safe_string(income, 'symbol')
1042
+ symbol = self.safe_symbol(marketId, market)
1043
+ amount = self.safe_string(income, 'funding_fee')
1044
+ code = self.safe_currency_code('USDC')
1045
+ timestamp = self.safe_integer(income, 'updated_time')
1046
+ rate = self.safe_number(income, 'funding_rate')
1047
+ paymentType = self.safe_string(income, 'payment_type')
1048
+ amount = Precise.string_neg(amount) if (paymentType == 'Pay') else amount
1049
+ return {
1050
+ 'info': income,
1051
+ 'symbol': symbol,
1052
+ 'code': code,
1053
+ 'timestamp': timestamp,
1054
+ 'datetime': self.iso8601(timestamp),
1055
+ 'id': None,
1056
+ 'amount': self.parse_number(amount),
1057
+ 'rate': rate,
1058
+ }
1059
+
1060
+ async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1061
+ """
1062
+ fetch the history of funding payments paid and received on self account
1063
+
1064
+ https://orderly.network/docs/build-on-omnichain/evm-api/restful-api/private/get-funding-fee-history
1065
+
1066
+ :param str [symbol]: unified market symbol
1067
+ :param int [since]: the earliest time in ms to fetch funding history for
1068
+ :param int [limit]: the maximum number of funding history structures to retrieve
1069
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1070
+ :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1071
+ :returns dict: a `funding history structure <https://docs.ccxt.com/#/?id=funding-history-structure>`
1072
+ """
1073
+ await self.load_markets()
1074
+ paginate = False
1075
+ paginate, params = self.handle_option_and_params(params, 'fetchFundingHistory', 'paginate')
1076
+ if paginate:
1077
+ return await self.fetch_paginated_call_incremental('fetchFundingHistory', symbol, since, limit, params, 'page', 500)
1078
+ request: dict = {}
1079
+ market: Market = None
1080
+ if symbol is not None:
1081
+ market = self.market(symbol)
1082
+ request['symbol'] = market['id']
1083
+ if since is not None:
1084
+ request['start_t'] = since
1085
+ until = self.safe_integer(params, 'until') # unified in milliseconds
1086
+ params = self.omit(params, ['until'])
1087
+ if until is not None:
1088
+ request['end_t'] = until
1089
+ if limit is not None:
1090
+ request['size'] = min(limit, 500)
1091
+ response = await self.v1PrivateGetFundingFeeHistory(self.extend(request, params))
1092
+ #
1093
+ # {
1094
+ # "success": True,
1095
+ # "timestamp": 1702989203989,
1096
+ # "data": {
1097
+ # "meta": {
1098
+ # "total": 9,
1099
+ # "records_per_page": 25,
1100
+ # "current_page": 1
1101
+ # },
1102
+ # "rows": [{
1103
+ # "symbol": "PERP_ETH_USDC",
1104
+ # "funding_rate": 0.00046875,
1105
+ # "mark_price": 2100,
1106
+ # "funding_fee": 0.000016,
1107
+ # "payment_type": "Pay",
1108
+ # "status": "Accrued",
1109
+ # "created_time": 1682235722003,
1110
+ # "updated_time": 1682235722003
1111
+ # }]
1112
+ # }
1113
+ # }
1114
+ #
1115
+ data = self.safe_dict(response, 'data', {})
1116
+ rows = self.safe_list(data, 'rows', [])
1117
+ return self.parse_incomes(rows, market, since, limit)
1118
+
1028
1119
  async def fetch_trading_fees(self, params={}) -> TradingFees:
1029
1120
  """
1030
1121
  fetch the trading fees for multiple markets
@@ -2330,7 +2421,7 @@ class modetrade(Exchange, ImplicitAPI):
2330
2421
  def sign_message(self, message, privateKey):
2331
2422
  return self.sign_hash(self.hash_message(message), privateKey[-64:])
2332
2423
 
2333
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2424
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2334
2425
  """
2335
2426
  make a withdrawal
2336
2427
 
@@ -2460,7 +2551,7 @@ class modetrade(Exchange, ImplicitAPI):
2460
2551
  data = self.safe_dict(response, 'data', {})
2461
2552
  return self.parse_leverage(data, market)
2462
2553
 
2463
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2554
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
2464
2555
  """
2465
2556
  set the level of leverage for a market
2466
2557
 
@@ -2357,7 +2357,7 @@ class ndax(Exchange, ImplicitAPI):
2357
2357
  'network': None,
2358
2358
  }
2359
2359
 
2360
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2360
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2361
2361
  """
2362
2362
  make a withdrawal
2363
2363
  :param str code: unified currency code
@@ -1301,7 +1301,7 @@ class novadax(Exchange, ImplicitAPI):
1301
1301
  }
1302
1302
  return self.safe_string(statuses, status, 'failed')
1303
1303
 
1304
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1304
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1305
1305
  """
1306
1306
  make a withdrawal
1307
1307
 
@@ -2416,7 +2416,7 @@ class okcoin(Exchange, ImplicitAPI):
2416
2416
  }
2417
2417
  return self.safe_string(statuses, status, status)
2418
2418
 
2419
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2419
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2420
2420
  """
2421
2421
 
2422
2422
  https://www.okcoin.com/docs-v5/en/#rest-api-funding-withdrawal
ccxt/async_support/okx.py CHANGED
@@ -4955,7 +4955,7 @@ class okx(Exchange, ImplicitAPI):
4955
4955
  first = self.safe_string(keys, 0)
4956
4956
  return self.safe_dict(response, first)
4957
4957
 
4958
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
4958
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
4959
4959
  """
4960
4960
  make a withdrawal
4961
4961
 
@@ -6352,7 +6352,7 @@ class okx(Exchange, ImplicitAPI):
6352
6352
  sorted = self.sort_by(result, 'timestamp')
6353
6353
  return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
6354
6354
 
6355
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
6355
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
6356
6356
  """
6357
6357
  set the level of leverage for a market
6358
6358
 
@@ -42,6 +42,9 @@ class onetrading(Exchange, ImplicitAPI):
42
42
  'future': False,
43
43
  'option': False,
44
44
  'addMargin': False,
45
+ 'borrowCrossMargin': False,
46
+ 'borrowIsolatedMargin': False,
47
+ 'borrowMargin': False,
45
48
  'cancelAllOrders': True,
46
49
  'cancelOrder': True,
47
50
  'cancelOrders': True,
@@ -54,9 +57,14 @@ class onetrading(Exchange, ImplicitAPI):
54
57
  'createStopMarketOrder': False,
55
58
  'createStopOrder': True,
56
59
  'fetchAccounts': False,
60
+ 'fetchAllGreeks': False,
57
61
  'fetchBalance': True,
62
+ 'fetchBorrowInterest': False,
63
+ 'fetchBorrowRate': False,
58
64
  'fetchBorrowRateHistories': False,
59
65
  'fetchBorrowRateHistory': False,
66
+ 'fetchBorrowRates': False,
67
+ 'fetchBorrowRatesPerSymbol': False,
60
68
  'fetchClosedOrders': True,
61
69
  'fetchCrossBorrowRate': False,
62
70
  'fetchCrossBorrowRates': False,
@@ -68,21 +76,41 @@ class onetrading(Exchange, ImplicitAPI):
68
76
  'fetchDeposits': False,
69
77
  'fetchDepositsWithdrawals': False,
70
78
  'fetchFundingHistory': False,
79
+ 'fetchFundingInterval': False,
80
+ 'fetchFundingIntervals': False,
71
81
  'fetchFundingRate': False,
72
82
  'fetchFundingRateHistory': False,
73
83
  'fetchFundingRates': False,
84
+ 'fetchGreeks': False,
74
85
  'fetchIndexOHLCV': False,
75
86
  'fetchIsolatedBorrowRate': False,
76
87
  'fetchIsolatedBorrowRates': False,
88
+ 'fetchIsolatedPositions': False,
77
89
  'fetchLedger': False,
78
90
  'fetchLeverage': False,
91
+ 'fetchLeverages': False,
92
+ 'fetchLeverageTiers': False,
93
+ 'fetchLiquidations': False,
94
+ 'fetchLongShortRatio': False,
95
+ 'fetchLongShortRatioHistory': False,
96
+ 'fetchMarginAdjustmentHistory': False,
79
97
  'fetchMarginMode': False,
98
+ 'fetchMarginModes': False,
99
+ 'fetchMarketLeverageTiers': False,
80
100
  'fetchMarkets': True,
81
101
  'fetchMarkOHLCV': False,
102
+ 'fetchMarkPrice': False,
103
+ 'fetchMarkPrices': False,
104
+ 'fetchMyLiquidations': False,
105
+ 'fetchMySettlementHistory': False,
82
106
  'fetchMyTrades': True,
83
107
  'fetchOHLCV': True,
108
+ 'fetchOpenInterest': False,
84
109
  'fetchOpenInterestHistory': False,
110
+ 'fetchOpenInterests': False,
85
111
  'fetchOpenOrders': True,
112
+ 'fetchOption': False,
113
+ 'fetchOptionChain': False,
86
114
  'fetchOrder': True,
87
115
  'fetchOrderBook': True,
88
116
  'fetchOrders': False,
@@ -95,6 +123,7 @@ class onetrading(Exchange, ImplicitAPI):
95
123
  'fetchPositionsHistory': False,
96
124
  'fetchPositionsRisk': False,
97
125
  'fetchPremiumIndexOHLCV': False,
126
+ 'fetchSettlementHistory': False,
98
127
  'fetchTicker': True,
99
128
  'fetchTickers': True,
100
129
  'fetchTime': True,
@@ -106,9 +135,13 @@ class onetrading(Exchange, ImplicitAPI):
106
135
  'fetchTransactions': False,
107
136
  'fetchTransfer': False,
108
137
  'fetchTransfers': False,
138
+ 'fetchUnderlyingAssets': False,
139
+ 'fetchVolatilityHistory': False,
109
140
  'fetchWithdrawal': False,
110
141
  'fetchWithdrawals': False,
111
142
  'reduceMargin': False,
143
+ 'repayCrossMargin': False,
144
+ 'repayIsolatedMargin': False,
112
145
  'setLeverage': False,
113
146
  'setMargin': False,
114
147
  'setMarginMode': False,
@@ -2024,7 +2024,7 @@ class oxfun(Exchange, ImplicitAPI):
2024
2024
  }
2025
2025
  return self.safe_string(statuses, status, status)
2026
2026
 
2027
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2027
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2028
2028
  """
2029
2029
  make a withdrawal
2030
2030
 
ccxt/async_support/p2b.py CHANGED
@@ -34,6 +34,9 @@ class p2b(Exchange, ImplicitAPI):
34
34
  'future': False,
35
35
  'option': False,
36
36
  'addMargin': False,
37
+ 'borrowCrossMargin': False,
38
+ 'borrowIsolatedMargin': False,
39
+ 'borrowMargin': False,
37
40
  'cancelAllOrders': False,
38
41
  'cancelOrder': True,
39
42
  'cancelOrders': False,
@@ -49,9 +52,14 @@ class p2b(Exchange, ImplicitAPI):
49
52
  'createStopMarketOrder': False,
50
53
  'createStopOrder': False,
51
54
  'fetchAccounts': False,
55
+ 'fetchAllGreeks': False,
52
56
  'fetchBalance': True,
53
57
  'fetchBorrowInterest': False,
58
+ 'fetchBorrowRate': False,
59
+ 'fetchBorrowRateHistories': False,
54
60
  'fetchBorrowRateHistory': False,
61
+ 'fetchBorrowRates': False,
62
+ 'fetchBorrowRatesPerSymbol': False,
55
63
  'fetchClosedOrders': True,
56
64
  'fetchCrossBorrowRate': False,
57
65
  'fetchCrossBorrowRates': False,
@@ -62,23 +70,42 @@ class p2b(Exchange, ImplicitAPI):
62
70
  'fetchDeposits': False,
63
71
  'fetchDepositsWithdrawals': False,
64
72
  'fetchFundingHistory': False,
73
+ 'fetchFundingInterval': False,
74
+ 'fetchFundingIntervals': False,
65
75
  'fetchFundingRate': False,
66
76
  'fetchFundingRateHistory': False,
67
77
  'fetchFundingRates': False,
78
+ 'fetchGreeks': False,
68
79
  'fetchIndexOHLCV': False,
69
80
  'fetchIsolatedBorrowRate': False,
70
81
  'fetchIsolatedBorrowRates': False,
82
+ 'fetchIsolatedPositions': False,
71
83
  'fetchLedger': False,
72
84
  'fetchLedgerEntry': False,
85
+ 'fetchLeverage': False,
86
+ 'fetchLeverages': False,
73
87
  'fetchLeverageTiers': False,
88
+ 'fetchLiquidations': False,
89
+ 'fetchLongShortRatio': False,
90
+ 'fetchLongShortRatioHistory': False,
91
+ 'fetchMarginAdjustmentHistory': False,
92
+ 'fetchMarginMode': False,
93
+ 'fetchMarginModes': False,
74
94
  'fetchMarketLeverageTiers': False,
75
95
  'fetchMarkets': True,
76
96
  'fetchMarkOHLCV': False,
97
+ 'fetchMarkPrice': False,
98
+ 'fetchMarkPrices': False,
99
+ 'fetchMyLiquidations': False,
100
+ 'fetchMySettlementHistory': False,
77
101
  'fetchMyTrades': True,
78
102
  'fetchOHLCV': True,
79
103
  'fetchOpenInterest': False,
80
104
  'fetchOpenInterestHistory': False,
105
+ 'fetchOpenInterests': False,
81
106
  'fetchOpenOrders': True,
107
+ 'fetchOption': False,
108
+ 'fetchOptionChain': False,
82
109
  'fetchOrderBook': True,
83
110
  'fetchOrderBooks': False,
84
111
  'fetchOrders': False,
@@ -91,6 +118,7 @@ class p2b(Exchange, ImplicitAPI):
91
118
  'fetchPositionsHistory': False,
92
119
  'fetchPositionsRisk': False,
93
120
  'fetchPremiumIndexOHLCV': False,
121
+ 'fetchSettlementHistory': False,
94
122
  'fetchTicker': True,
95
123
  'fetchTickers': True,
96
124
  'fetchTrades': True,
@@ -99,10 +127,14 @@ class p2b(Exchange, ImplicitAPI):
99
127
  'fetchTransactionFees': False,
100
128
  'fetchTransactions': False,
101
129
  'fetchTransfers': False,
130
+ 'fetchUnderlyingAssets': False,
131
+ 'fetchVolatilityHistory': False,
102
132
  'fetchWithdrawAddresses': False,
103
133
  'fetchWithdrawal': False,
104
134
  'fetchWithdrawals': False,
105
135
  'reduceMargin': False,
136
+ 'repayCrossMargin': False,
137
+ 'repayIsolatedMargin': False,
106
138
  'setLeverage': False,
107
139
  'setMargin': False,
108
140
  'setMarginMode': False,
@@ -1971,6 +1971,7 @@ class paradex(Exchange, ImplicitAPI):
1971
1971
  'contracts': None,
1972
1972
  'contractSize': None,
1973
1973
  'price': None,
1974
+ 'side': None,
1974
1975
  'baseValue': None,
1975
1976
  'quoteValue': None,
1976
1977
  'timestamp': timestamp,
@@ -2268,7 +2269,7 @@ class paradex(Exchange, ImplicitAPI):
2268
2269
  }
2269
2270
  return self.safe_string(modes, mode, mode)
2270
2271
 
2271
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2272
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
2272
2273
  """
2273
2274
  set the level of leverage for a market
2274
2275
 
@@ -4332,7 +4332,7 @@ class phemex(Exchange, ImplicitAPI):
4332
4332
  url = self.implode_hostname(self.urls['api'][api]) + url
4333
4333
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
4334
4334
 
4335
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
4335
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
4336
4336
  """
4337
4337
  set the level of leverage for a market
4338
4338
 
@@ -4641,7 +4641,7 @@ class phemex(Exchange, ImplicitAPI):
4641
4641
  sorted = self.sort_by(result, 'timestamp')
4642
4642
  return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
4643
4643
 
4644
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
4644
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
4645
4645
  """
4646
4646
  make a withdrawal
4647
4647
 
@@ -2731,7 +2731,7 @@ class poloniex(Exchange, ImplicitAPI):
2731
2731
  'status': None,
2732
2732
  }
2733
2733
 
2734
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2734
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2735
2735
  """
2736
2736
  make a withdrawal
2737
2737
 
@@ -3126,7 +3126,7 @@ class poloniex(Exchange, ImplicitAPI):
3126
3126
  },
3127
3127
  }
3128
3128
 
3129
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3129
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
3130
3130
  """
3131
3131
  set the level of leverage for a market
3132
3132
 
@@ -43,7 +43,12 @@ class probit(Exchange, ImplicitAPI):
43
43
  'future': False,
44
44
  'option': False,
45
45
  'addMargin': False,
46
+ 'borrowCrossMargin': False,
47
+ 'borrowIsolatedMargin': False,
48
+ 'borrowMargin': False,
46
49
  'cancelOrder': True,
50
+ 'closeAllPositions': False,
51
+ 'closePosition': False,
47
52
  'createMarketBuyOrderWithCost': True,
48
53
  'createMarketOrder': True,
49
54
  'createMarketOrderWithCost': False,
@@ -53,9 +58,14 @@ class probit(Exchange, ImplicitAPI):
53
58
  'createStopLimitOrder': False,
54
59
  'createStopMarketOrder': False,
55
60
  'createStopOrder': False,
61
+ 'fetchAllGreeks': False,
56
62
  'fetchBalance': True,
63
+ 'fetchBorrowInterest': False,
64
+ 'fetchBorrowRate': False,
57
65
  'fetchBorrowRateHistories': False,
58
66
  'fetchBorrowRateHistory': False,
67
+ 'fetchBorrowRates': False,
68
+ 'fetchBorrowRatesPerSymbol': False,
59
69
  'fetchClosedOrders': True,
60
70
  'fetchCrossBorrowRate': False,
61
71
  'fetchCrossBorrowRates': False,
@@ -66,21 +76,40 @@ class probit(Exchange, ImplicitAPI):
66
76
  'fetchDeposits': True,
67
77
  'fetchDepositsWithdrawals': True,
68
78
  'fetchFundingHistory': False,
79
+ 'fetchFundingInterval': False,
80
+ 'fetchFundingIntervals': False,
69
81
  'fetchFundingRate': False,
70
82
  'fetchFundingRateHistory': False,
71
83
  'fetchFundingRates': False,
84
+ 'fetchGreeks': False,
72
85
  'fetchIndexOHLCV': False,
73
86
  'fetchIsolatedBorrowRate': False,
74
87
  'fetchIsolatedBorrowRates': False,
88
+ 'fetchIsolatedPositions': False,
75
89
  'fetchLeverage': False,
90
+ 'fetchLeverages': False,
76
91
  'fetchLeverageTiers': False,
92
+ 'fetchLiquidations': False,
93
+ 'fetchLongShortRatio': False,
94
+ 'fetchLongShortRatioHistory': False,
95
+ 'fetchMarginAdjustmentHistory': False,
77
96
  'fetchMarginMode': False,
97
+ 'fetchMarginModes': False,
98
+ 'fetchMarketLeverageTiers': False,
78
99
  'fetchMarkets': True,
79
100
  'fetchMarkOHLCV': False,
101
+ 'fetchMarkPrice': False,
102
+ 'fetchMarkPrices': False,
103
+ 'fetchMyLiquidations': False,
104
+ 'fetchMySettlementHistory': False,
80
105
  'fetchMyTrades': True,
81
106
  'fetchOHLCV': True,
107
+ 'fetchOpenInterest': False,
82
108
  'fetchOpenInterestHistory': False,
109
+ 'fetchOpenInterests': False,
83
110
  'fetchOpenOrders': True,
111
+ 'fetchOption': False,
112
+ 'fetchOptionChain': False,
84
113
  'fetchOrder': True,
85
114
  'fetchOrderBook': True,
86
115
  'fetchPosition': False,
@@ -91,6 +120,7 @@ class probit(Exchange, ImplicitAPI):
91
120
  'fetchPositionsHistory': False,
92
121
  'fetchPositionsRisk': False,
93
122
  'fetchPremiumIndexOHLCV': False,
123
+ 'fetchSettlementHistory': False,
94
124
  'fetchTicker': True,
95
125
  'fetchTickers': True,
96
126
  'fetchTime': True,
@@ -100,11 +130,16 @@ class probit(Exchange, ImplicitAPI):
100
130
  'fetchTransactions': 'emulated',
101
131
  'fetchTransfer': False,
102
132
  'fetchTransfers': False,
133
+ 'fetchUnderlyingAssets': False,
134
+ 'fetchVolatilityHistory': False,
103
135
  'fetchWithdrawal': False,
104
136
  'fetchWithdrawals': True,
105
137
  'reduceMargin': False,
138
+ 'repayCrossMargin': False,
139
+ 'repayIsolatedMargin': False,
106
140
  'sandbox': False,
107
141
  'setLeverage': False,
142
+ 'setMargin': False,
108
143
  'setMarginMode': False,
109
144
  'setPositionMode': False,
110
145
  'signIn': True,
@@ -1399,7 +1434,7 @@ class probit(Exchange, ImplicitAPI):
1399
1434
  data = self.safe_list(response, 'data', [])
1400
1435
  return self.parse_deposit_addresses(data, codes)
1401
1436
 
1402
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1437
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
1403
1438
  """
1404
1439
 
1405
1440
  https://docs-en.probit.com/reference/withdrawal
@@ -2353,7 +2353,7 @@ class tokocrypto(Exchange, ImplicitAPI):
2353
2353
  'fee': fee,
2354
2354
  }
2355
2355
 
2356
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2356
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2357
2357
  """
2358
2358
 
2359
2359
  https://www.tokocrypto.com/apidocs/#withdraw-signed
@@ -2121,7 +2121,7 @@ class upbit(Exchange, ImplicitAPI):
2121
2121
  raise AddressPending(self.id + ' is generating ' + code + ' deposit address, call fetchDepositAddress or createDepositAddress one more time later to retrieve the generated address')
2122
2122
  return self.parse_deposit_address(response)
2123
2123
 
2124
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2124
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2125
2125
  """
2126
2126
 
2127
2127
  https://docs.upbit.com/kr/reference/디지털자산-출금하기
@@ -2907,7 +2907,7 @@ class vertex(Exchange, ImplicitAPI):
2907
2907
  #
2908
2908
  return self.safe_dict(response, 'data', {})
2909
2909
 
2910
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2910
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2911
2911
  """
2912
2912
  make a withdrawal
2913
2913
 
@@ -2413,7 +2413,7 @@ class wavesexchange(Exchange, ImplicitAPI):
2413
2413
  raise ExchangeError(self.id + ' ' + body)
2414
2414
  return None
2415
2415
 
2416
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2416
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2417
2417
  """
2418
2418
  make a withdrawal
2419
2419
  :param str code: unified currency code
@@ -2146,7 +2146,7 @@ class whitebit(Exchange, ImplicitAPI):
2146
2146
  'tag': self.safe_string(depositAddress, 'memo'),
2147
2147
  }
2148
2148
 
2149
- async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2149
+ async def set_leverage(self, leverage: int, symbol: Str = None, params={}):
2150
2150
  """
2151
2151
  set the level of leverage for a market
2152
2152
 
@@ -2217,7 +2217,7 @@ class whitebit(Exchange, ImplicitAPI):
2217
2217
  'status': None,
2218
2218
  }
2219
2219
 
2220
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2220
+ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
2221
2221
  """
2222
2222
  make a withdrawal
2223
2223