ccxt 4.2.30__py2.py3-none-any.whl → 4.2.34__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (244) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/coinbase.py +10 -0
  3. ccxt/abstract/okx.py +12 -1
  4. ccxt/ace.py +4 -3
  5. ccxt/alpaca.py +1 -1
  6. ccxt/ascendex.py +6 -6
  7. ccxt/async_support/__init__.py +1 -1
  8. ccxt/async_support/ace.py +4 -3
  9. ccxt/async_support/alpaca.py +1 -1
  10. ccxt/async_support/ascendex.py +6 -6
  11. ccxt/async_support/base/exchange.py +62 -39
  12. ccxt/async_support/bigone.py +25 -5
  13. ccxt/async_support/binance.py +17 -16
  14. ccxt/async_support/bingx.py +10 -9
  15. ccxt/async_support/bit2c.py +13 -1
  16. ccxt/async_support/bitbank.py +2 -2
  17. ccxt/async_support/bitbns.py +1 -1
  18. ccxt/async_support/bitfinex.py +5 -5
  19. ccxt/async_support/bitfinex2.py +386 -40
  20. ccxt/async_support/bitflyer.py +5 -5
  21. ccxt/async_support/bitforex.py +4 -1
  22. ccxt/async_support/bitget.py +11 -11
  23. ccxt/async_support/bithumb.py +2 -2
  24. ccxt/async_support/bitmart.py +9 -9
  25. ccxt/async_support/bitmex.py +3 -3
  26. ccxt/async_support/bitopro.py +2 -2
  27. ccxt/async_support/bitrue.py +8 -8
  28. ccxt/async_support/bitso.py +4 -4
  29. ccxt/async_support/bitstamp.py +2 -2
  30. ccxt/async_support/bitteam.py +1 -1
  31. ccxt/async_support/bitvavo.py +3 -3
  32. ccxt/async_support/bl3p.py +1 -1
  33. ccxt/async_support/blockchaincom.py +3 -3
  34. ccxt/async_support/btcalpha.py +1 -1
  35. ccxt/async_support/btcbox.py +1 -1
  36. ccxt/async_support/btcmarkets.py +2 -2
  37. ccxt/async_support/btcturk.py +1 -1
  38. ccxt/async_support/bybit.py +9 -9
  39. ccxt/async_support/cex.py +1 -1
  40. ccxt/async_support/coinbase.py +16 -6
  41. ccxt/async_support/coinbasepro.py +2 -2
  42. ccxt/async_support/coincheck.py +1 -1
  43. ccxt/async_support/coinex.py +9 -9
  44. ccxt/async_support/coinlist.py +4 -4
  45. ccxt/async_support/coinmate.py +2 -2
  46. ccxt/async_support/coinmetro.py +2 -2
  47. ccxt/async_support/coinone.py +1 -1
  48. ccxt/async_support/coinsph.py +2 -2
  49. ccxt/async_support/coinspot.py +1 -1
  50. ccxt/async_support/cryptocom.py +14 -14
  51. ccxt/async_support/currencycom.py +1 -1
  52. ccxt/async_support/delta.py +2 -2
  53. ccxt/async_support/deribit.py +5 -4
  54. ccxt/async_support/digifinex.py +6 -6
  55. ccxt/async_support/exmo.py +2 -2
  56. ccxt/async_support/gate.py +41 -37
  57. ccxt/async_support/gemini.py +2 -2
  58. ccxt/async_support/hitbtc.py +5 -5
  59. ccxt/async_support/hollaex.py +2 -2
  60. ccxt/async_support/htx.py +11 -11
  61. ccxt/async_support/huobijp.py +4 -4
  62. ccxt/async_support/idex.py +2 -2
  63. ccxt/async_support/independentreserve.py +2 -2
  64. ccxt/async_support/indodax.py +2 -2
  65. ccxt/async_support/kraken.py +45 -5
  66. ccxt/async_support/krakenfutures.py +8 -5
  67. ccxt/async_support/kucoin.py +8 -8
  68. ccxt/async_support/kucoinfutures.py +4 -4
  69. ccxt/async_support/kuna.py +2 -2
  70. ccxt/async_support/latoken.py +3 -3
  71. ccxt/async_support/lbank.py +5 -4
  72. ccxt/async_support/luno.py +1 -1
  73. ccxt/async_support/lykke.py +2 -2
  74. ccxt/async_support/mercado.py +2 -2
  75. ccxt/async_support/mexc.py +7 -6
  76. ccxt/async_support/ndax.py +2 -2
  77. ccxt/async_support/novadax.py +4 -4
  78. ccxt/async_support/oceanex.py +1 -1
  79. ccxt/async_support/okcoin.py +5 -5
  80. ccxt/async_support/okx.py +26 -12
  81. ccxt/async_support/onetrading.py +2 -2
  82. ccxt/async_support/p2b.py +1 -1
  83. ccxt/async_support/paymium.py +3 -3
  84. ccxt/async_support/phemex.py +13 -13
  85. ccxt/async_support/poloniex.py +4 -4
  86. ccxt/async_support/poloniexfutures.py +4 -1
  87. ccxt/async_support/probit.py +5 -5
  88. ccxt/async_support/timex.py +2 -2
  89. ccxt/async_support/tokocrypto.py +4 -4
  90. ccxt/async_support/upbit.py +2 -2
  91. ccxt/async_support/wavesexchange.py +4 -3
  92. ccxt/async_support/wazirx.py +1 -1
  93. ccxt/async_support/whitebit.py +6 -6
  94. ccxt/async_support/woo.py +6 -6
  95. ccxt/async_support/yobit.py +41 -2
  96. ccxt/async_support/zaif.py +2 -2
  97. ccxt/async_support/zonda.py +4 -4
  98. ccxt/base/exchange.py +77 -44
  99. ccxt/base/types.py +10 -0
  100. ccxt/bigone.py +25 -5
  101. ccxt/binance.py +17 -16
  102. ccxt/bingx.py +10 -9
  103. ccxt/bit2c.py +13 -1
  104. ccxt/bitbank.py +2 -2
  105. ccxt/bitbns.py +1 -1
  106. ccxt/bitfinex.py +5 -5
  107. ccxt/bitfinex2.py +386 -40
  108. ccxt/bitflyer.py +5 -5
  109. ccxt/bitforex.py +4 -1
  110. ccxt/bitget.py +11 -11
  111. ccxt/bithumb.py +2 -2
  112. ccxt/bitmart.py +9 -9
  113. ccxt/bitmex.py +3 -3
  114. ccxt/bitopro.py +2 -2
  115. ccxt/bitrue.py +8 -8
  116. ccxt/bitso.py +4 -4
  117. ccxt/bitstamp.py +2 -2
  118. ccxt/bitteam.py +1 -1
  119. ccxt/bitvavo.py +3 -3
  120. ccxt/bl3p.py +1 -1
  121. ccxt/blockchaincom.py +3 -3
  122. ccxt/btcalpha.py +1 -1
  123. ccxt/btcbox.py +1 -1
  124. ccxt/btcmarkets.py +2 -2
  125. ccxt/btcturk.py +1 -1
  126. ccxt/bybit.py +9 -9
  127. ccxt/cex.py +1 -1
  128. ccxt/coinbase.py +16 -6
  129. ccxt/coinbasepro.py +2 -2
  130. ccxt/coincheck.py +1 -1
  131. ccxt/coinex.py +9 -9
  132. ccxt/coinlist.py +4 -4
  133. ccxt/coinmate.py +2 -2
  134. ccxt/coinmetro.py +2 -2
  135. ccxt/coinone.py +1 -1
  136. ccxt/coinsph.py +2 -2
  137. ccxt/coinspot.py +1 -1
  138. ccxt/cryptocom.py +14 -14
  139. ccxt/currencycom.py +1 -1
  140. ccxt/delta.py +2 -2
  141. ccxt/deribit.py +5 -4
  142. ccxt/digifinex.py +6 -6
  143. ccxt/exmo.py +2 -2
  144. ccxt/gate.py +41 -37
  145. ccxt/gemini.py +2 -2
  146. ccxt/hitbtc.py +5 -5
  147. ccxt/hollaex.py +2 -2
  148. ccxt/htx.py +11 -11
  149. ccxt/huobijp.py +4 -4
  150. ccxt/idex.py +2 -2
  151. ccxt/independentreserve.py +2 -2
  152. ccxt/indodax.py +2 -2
  153. ccxt/kraken.py +45 -5
  154. ccxt/krakenfutures.py +8 -5
  155. ccxt/kucoin.py +8 -8
  156. ccxt/kucoinfutures.py +4 -4
  157. ccxt/kuna.py +2 -2
  158. ccxt/latoken.py +3 -3
  159. ccxt/lbank.py +5 -4
  160. ccxt/luno.py +1 -1
  161. ccxt/lykke.py +2 -2
  162. ccxt/mercado.py +2 -2
  163. ccxt/mexc.py +7 -6
  164. ccxt/ndax.py +2 -2
  165. ccxt/novadax.py +4 -4
  166. ccxt/oceanex.py +1 -1
  167. ccxt/okcoin.py +5 -5
  168. ccxt/okx.py +26 -12
  169. ccxt/onetrading.py +2 -2
  170. ccxt/p2b.py +1 -1
  171. ccxt/paymium.py +3 -3
  172. ccxt/phemex.py +13 -13
  173. ccxt/poloniex.py +4 -4
  174. ccxt/poloniexfutures.py +4 -1
  175. ccxt/pro/__init__.py +1 -1
  176. ccxt/pro/alpaca.py +8 -4
  177. ccxt/pro/ascendex.py +1 -2
  178. ccxt/pro/binance.py +14 -10
  179. ccxt/pro/bingx.py +1 -1
  180. ccxt/pro/bitfinex.py +21 -22
  181. ccxt/pro/bitfinex2.py +13 -15
  182. ccxt/pro/bitget.py +3 -1
  183. ccxt/pro/bitmart.py +3 -7
  184. ccxt/pro/bitmex.py +4 -6
  185. ccxt/pro/bitopro.py +2 -4
  186. ccxt/pro/bitrue.py +1 -1
  187. ccxt/pro/bitstamp.py +2 -3
  188. ccxt/pro/bitvavo.py +10 -5
  189. ccxt/pro/blockchaincom.py +22 -22
  190. ccxt/pro/bybit.py +5 -5
  191. ccxt/pro/cex.py +7 -7
  192. ccxt/pro/coinbase.py +3 -2
  193. ccxt/pro/coinbasepro.py +1 -1
  194. ccxt/pro/coinex.py +15 -13
  195. ccxt/pro/currencycom.py +5 -6
  196. ccxt/pro/deribit.py +4 -4
  197. ccxt/pro/exmo.py +15 -13
  198. ccxt/pro/gate.py +1 -1
  199. ccxt/pro/gemini.py +4 -2
  200. ccxt/pro/hitbtc.py +10 -9
  201. ccxt/pro/hollaex.py +2 -2
  202. ccxt/pro/htx.py +6 -6
  203. ccxt/pro/huobijp.py +3 -4
  204. ccxt/pro/idex.py +1 -1
  205. ccxt/pro/independentreserve.py +14 -13
  206. ccxt/pro/kraken.py +10 -14
  207. ccxt/pro/krakenfutures.py +10 -6
  208. ccxt/pro/kucoin.py +10 -10
  209. ccxt/pro/kucoinfutures.py +11 -10
  210. ccxt/pro/lbank.py +10 -10
  211. ccxt/pro/luno.py +12 -14
  212. ccxt/pro/mexc.py +3 -2
  213. ccxt/pro/ndax.py +7 -11
  214. ccxt/pro/okcoin.py +7 -10
  215. ccxt/pro/okx.py +6 -9
  216. ccxt/pro/onetrading.py +16 -15
  217. ccxt/pro/p2b.py +5 -3
  218. ccxt/pro/phemex.py +16 -11
  219. ccxt/pro/poloniex.py +6 -4
  220. ccxt/pro/poloniexfutures.py +13 -9
  221. ccxt/pro/probit.py +15 -12
  222. ccxt/pro/upbit.py +8 -8
  223. ccxt/pro/wazirx.py +6 -3
  224. ccxt/pro/woo.py +9 -7
  225. ccxt/probit.py +5 -5
  226. ccxt/test/base/test_order_book.py +7 -7
  227. ccxt/test/base/test_shared_methods.py +1 -1
  228. ccxt/test/test_async.py +86 -36
  229. ccxt/test/test_sync.py +86 -36
  230. ccxt/timex.py +2 -2
  231. ccxt/tokocrypto.py +4 -4
  232. ccxt/upbit.py +2 -2
  233. ccxt/wavesexchange.py +4 -3
  234. ccxt/wazirx.py +1 -1
  235. ccxt/whitebit.py +6 -6
  236. ccxt/woo.py +6 -6
  237. ccxt/yobit.py +41 -2
  238. ccxt/zaif.py +2 -2
  239. ccxt/zonda.py +4 -4
  240. {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/METADATA +10 -10
  241. ccxt-4.2.34.dist-info/RECORD +438 -0
  242. ccxt-4.2.30.dist-info/RECORD +0 -438
  243. {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/WHEEL +0 -0
  244. {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/top_level.txt +0 -0
@@ -514,7 +514,7 @@ class bitflyer(Exchange, ImplicitAPI):
514
514
  'taker': fee,
515
515
  }
516
516
 
517
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
517
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
518
518
  """
519
519
  create a trade order
520
520
  :see: https://lightning.bitflyer.com/docs?lang=en#send-a-new-order
@@ -615,7 +615,7 @@ class bitflyer(Exchange, ImplicitAPI):
615
615
  'trades': None,
616
616
  }, market)
617
617
 
618
- async def fetch_orders(self, symbol: Str = None, since: Int = None, limit=100, params={}) -> List[Order]:
618
+ async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = 100, params={}) -> List[Order]:
619
619
  """
620
620
  fetches information on multiple orders made by the user
621
621
  :see: https://lightning.bitflyer.com/docs?lang=en#list-orders
@@ -639,7 +639,7 @@ class bitflyer(Exchange, ImplicitAPI):
639
639
  orders = self.filter_by(orders, 'symbol', symbol)
640
640
  return orders
641
641
 
642
- async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit=100, params={}) -> List[Order]:
642
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = 100, params={}) -> List[Order]:
643
643
  """
644
644
  fetch all unfilled currently open orders
645
645
  :see: https://lightning.bitflyer.com/docs?lang=en#list-orders
@@ -654,7 +654,7 @@ class bitflyer(Exchange, ImplicitAPI):
654
654
  }
655
655
  return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
656
656
 
657
- async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit=100, params={}) -> List[Order]:
657
+ async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = 100, params={}) -> List[Order]:
658
658
  """
659
659
  fetches information on multiple closed orders made by the user
660
660
  :see: https://lightning.bitflyer.com/docs?lang=en#list-orders
@@ -756,7 +756,7 @@ class bitflyer(Exchange, ImplicitAPI):
756
756
  # todo unify parsePosition/parsePositions
757
757
  return response
758
758
 
759
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
759
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
760
760
  """
761
761
  make a withdrawal
762
762
  :see: https://lightning.bitflyer.com/docs?lang=en#withdrawing-funds
@@ -51,6 +51,9 @@ class bitforex(Exchange, ImplicitAPI):
51
51
  'fetchClosedOrders': True,
52
52
  'fetchCrossBorrowRate': False,
53
53
  'fetchCrossBorrowRates': False,
54
+ 'fetchDepositAddress': False,
55
+ 'fetchDepositAddresses': False,
56
+ 'fetchDepositAddressesByNetwork': False,
54
57
  'fetchFundingHistory': False,
55
58
  'fetchFundingRate': False,
56
59
  'fetchFundingRateHistory': False,
@@ -745,7 +748,7 @@ class bitforex(Exchange, ImplicitAPI):
745
748
  response = await self.privatePostApiV1TradeOrderInfos(self.extend(request, params))
746
749
  return self.parse_orders(response['data'], market, since, limit)
747
750
 
748
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
751
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
749
752
  """
750
753
  create a trade order
751
754
  :see: https://apidoc.bitforex.com/#new-order-trade
@@ -8,7 +8,7 @@ from ccxt.abstract.bitget import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
10
  import json
11
- from ccxt.base.types import Balances, Currency, Int, Liquidation, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, FundingHistory, Str, Strings, Ticker, Tickers, Trade, Transaction
11
+ from ccxt.base.types import Balances, Currency, Int, Liquidation, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Position, FundingHistory, Str, Strings, Ticker, Tickers, Trade, Transaction
12
12
  from typing import List
13
13
  from ccxt.base.errors import ExchangeError
14
14
  from ccxt.base.errors import PermissionDenied
@@ -2129,7 +2129,7 @@ class bitget(Exchange, ImplicitAPI):
2129
2129
  rawTransactions = self.safe_value(response, 'data', [])
2130
2130
  return self.parse_transactions(rawTransactions, currency, since, limit)
2131
2131
 
2132
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
2132
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2133
2133
  """
2134
2134
  make a withdrawal
2135
2135
  :see: https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
@@ -3851,7 +3851,7 @@ class bitget(Exchange, ImplicitAPI):
3851
3851
  params['createMarketBuyOrderRequiresPrice'] = False
3852
3852
  return await self.create_order(symbol, 'market', 'buy', cost, None, params)
3853
3853
 
3854
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
3854
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
3855
3855
  """
3856
3856
  create a trade order
3857
3857
  :see: https://www.bitget.com/api-doc/spot/trade/Place-Order
@@ -3934,7 +3934,7 @@ class bitget(Exchange, ImplicitAPI):
3934
3934
  data = self.safe_value(response, 'data', {})
3935
3935
  return self.parse_order(data, market)
3936
3936
 
3937
- def create_order_request(self, symbol, type, side, amount, price=None, params={}):
3937
+ def create_order_request(self, symbol, type, side, amount: float, price: float = None, params={}):
3938
3938
  sandboxMode = self.safe_value(self.options, 'sandboxMode', False)
3939
3939
  market = None
3940
3940
  if sandboxMode:
@@ -3963,7 +3963,7 @@ class bitget(Exchange, ImplicitAPI):
3963
3963
  isTakeProfit = takeProfit is not None
3964
3964
  isStopLossOrTakeProfitTrigger = isStopLossTriggerOrder or isTakeProfitTriggerOrder
3965
3965
  isStopLossOrTakeProfit = isStopLoss or isTakeProfit
3966
- trailingTriggerPrice = self.safe_string(params, 'trailingTriggerPrice', price)
3966
+ trailingTriggerPrice = self.safe_string(params, 'trailingTriggerPrice', self.number_to_string(price))
3967
3967
  trailingPercent = self.safe_string_2(params, 'trailingPercent', 'callbackRatio')
3968
3968
  isTrailingPercentOrder = trailingPercent is not None
3969
3969
  if self.sum(isTriggerOrder, isStopLossTriggerOrder, isTakeProfitTriggerOrder, isTrailingPercentOrder) > 1:
@@ -6458,11 +6458,11 @@ class bitget(Exchange, ImplicitAPI):
6458
6458
  #
6459
6459
  return response
6460
6460
 
6461
- async def set_leverage(self, leverage, symbol: Str = None, params={}):
6461
+ async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
6462
6462
  """
6463
6463
  set the level of leverage for a market
6464
6464
  :see: https://www.bitget.com/api-doc/contract/account/Change-Leverage
6465
- :param float leverage: the rate of leverage
6465
+ :param int leverage: the rate of leverage
6466
6466
  :param str symbol: unified market symbol
6467
6467
  :param dict [params]: extra parameters specific to the exchange API endpoint
6468
6468
  :param str [params.holdSide]: *isolated only* position direction, 'long' or 'short'
@@ -6483,7 +6483,7 @@ class bitget(Exchange, ImplicitAPI):
6483
6483
  request = {
6484
6484
  'symbol': market['id'],
6485
6485
  'marginCoin': market['settleId'],
6486
- 'leverage': leverage,
6486
+ 'leverage': self.number_to_string(leverage),
6487
6487
  'productType': productType,
6488
6488
  # 'holdSide': 'long',
6489
6489
  }
@@ -6716,7 +6716,7 @@ class bitget(Exchange, ImplicitAPI):
6716
6716
  data = self.safe_value(response, 'data', [])
6717
6717
  return self.parse_transfers(data, currency, since, limit)
6718
6718
 
6719
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
6719
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
6720
6720
  """
6721
6721
  transfer currency internally between wallets on the same account
6722
6722
  :see: https://www.bitget.com/api-doc/spot/account/Wallet-Transfer
@@ -6906,7 +6906,7 @@ class bitget(Exchange, ImplicitAPI):
6906
6906
  data = self.safe_value(response, 'data', [])
6907
6907
  return self.parse_deposit_withdraw_fees(data, codes, 'coin')
6908
6908
 
6909
- async def borrow_cross_margin(self, code: str, amount, params={}):
6909
+ async def borrow_cross_margin(self, code: str, amount: float, params={}):
6910
6910
  """
6911
6911
  create a loan to borrow margin
6912
6912
  :see: https://www.bitget.com/api-doc/margin/cross/account/Cross-Borrow
@@ -6937,7 +6937,7 @@ class bitget(Exchange, ImplicitAPI):
6937
6937
  data = self.safe_value(response, 'data', {})
6938
6938
  return self.parse_margin_loan(data, currency)
6939
6939
 
6940
- async def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
6940
+ async def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
6941
6941
  """
6942
6942
  create a loan to borrow margin
6943
6943
  :see: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Borrow
@@ -650,7 +650,7 @@ class bithumb(Exchange, ImplicitAPI):
650
650
  data = self.safe_value(response, 'data', [])
651
651
  return self.parse_trades(data, market, since, limit)
652
652
 
653
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
653
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
654
654
  """
655
655
  create a trade order
656
656
  :param str symbol: unified symbol of the market to create an order in
@@ -909,7 +909,7 @@ class bithumb(Exchange, ImplicitAPI):
909
909
  }
910
910
  return await self.cancel_order(order['id'], order['symbol'], self.extend(request, params))
911
911
 
912
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
912
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
913
913
  """
914
914
  make a withdrawal
915
915
  :param str code: unified currency code
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.bitmart import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -2197,7 +2197,7 @@ class bitmart(Exchange, ImplicitAPI):
2197
2197
  params['createMarketBuyOrderRequiresPrice'] = False
2198
2198
  return await self.create_order(symbol, 'market', 'buy', cost, None, params)
2199
2199
 
2200
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2200
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2201
2201
  """
2202
2202
  create a trade order
2203
2203
  :see: https://developer-pro.bitmart.com/en/spot/#new-order-v2-signed
@@ -2265,7 +2265,7 @@ class bitmart(Exchange, ImplicitAPI):
2265
2265
  order['price'] = price
2266
2266
  return order
2267
2267
 
2268
- def create_swap_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2268
+ def create_swap_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2269
2269
  """
2270
2270
  * @ignore
2271
2271
  create a trade order
@@ -2314,7 +2314,7 @@ class bitmart(Exchange, ImplicitAPI):
2314
2314
  request['mode'] = 4
2315
2315
  triggerPrice = self.safe_string_n(params, ['triggerPrice', 'stopPrice', 'trigger_price'])
2316
2316
  isTriggerOrder = triggerPrice is not None
2317
- trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activation_price', price)
2317
+ trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activation_price', self.number_to_string(price))
2318
2318
  trailingPercent = self.safe_string_2(params, 'trailingPercent', 'callback_rate')
2319
2319
  isTrailingPercentOrder = trailingPercent is not None
2320
2320
  if isLimitOrder:
@@ -2359,7 +2359,7 @@ class bitmart(Exchange, ImplicitAPI):
2359
2359
  request['leverage'] = self.number_to_string(leverage)
2360
2360
  return self.extend(request, params)
2361
2361
 
2362
- def create_spot_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2362
+ def create_spot_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2363
2363
  """
2364
2364
  * @ignore
2365
2365
  create a spot order request
@@ -2918,7 +2918,7 @@ class bitmart(Exchange, ImplicitAPI):
2918
2918
  # TODO: parse
2919
2919
  return networkId
2920
2920
 
2921
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
2921
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2922
2922
  """
2923
2923
  make a withdrawal
2924
2924
  :param str code: unified currency code
@@ -3239,7 +3239,7 @@ class bitmart(Exchange, ImplicitAPI):
3239
3239
  'symbol': symbol,
3240
3240
  })
3241
3241
 
3242
- async def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
3242
+ async def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
3243
3243
  """
3244
3244
  create a loan to borrow margin
3245
3245
  :see: https://developer-pro.bitmart.com/en/spot/#margin-borrow-isolated
@@ -3441,7 +3441,7 @@ class bitmart(Exchange, ImplicitAPI):
3441
3441
  result.append(self.parse_isolated_borrow_rate(symbol))
3442
3442
  return result
3443
3443
 
3444
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
3444
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
3445
3445
  """
3446
3446
  transfer currency internally between wallets on the same account, currently only supports transfer between spot and margin
3447
3447
  :see: https://developer-pro.bitmart.com/en/spot/#margin-asset-transfer-signed
@@ -3756,7 +3756,7 @@ class bitmart(Exchange, ImplicitAPI):
3756
3756
  'info': interest,
3757
3757
  }, market)
3758
3758
 
3759
- async def set_leverage(self, leverage, symbol: Str = None, params={}):
3759
+ async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3760
3760
  """
3761
3761
  set the level of leverage for a market
3762
3762
  :see: https://developer-pro.bitmart.com/en/futures/#submit-leverage-signed
@@ -1743,7 +1743,7 @@ class bitmex(Exchange, ImplicitAPI):
1743
1743
  #
1744
1744
  return self.parse_trades(response, market, since, limit)
1745
1745
 
1746
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1746
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1747
1747
  """
1748
1748
  create a trade order
1749
1749
  :see: https://www.bitmex.com/api/explorer/#not /Order/Order_new
@@ -2217,7 +2217,7 @@ class bitmex(Exchange, ImplicitAPI):
2217
2217
  'takeProfitPrice': None,
2218
2218
  })
2219
2219
 
2220
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
2220
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2221
2221
  """
2222
2222
  make a withdrawal
2223
2223
  :param str code: unified currency code
@@ -2383,7 +2383,7 @@ class bitmex(Exchange, ImplicitAPI):
2383
2383
  'datetime': datetime,
2384
2384
  }
2385
2385
 
2386
- async def set_leverage(self, leverage, symbol: Str = None, params={}):
2386
+ async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2387
2387
  """
2388
2388
  set the level of leverage for a market
2389
2389
  :param float leverage: the rate of leverage
@@ -949,7 +949,7 @@ class bitopro(Exchange, ImplicitAPI):
949
949
  'info': order,
950
950
  }, market)
951
951
 
952
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
952
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
953
953
  """
954
954
  create a trade order
955
955
  :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/create_an_order.md
@@ -1477,7 +1477,7 @@ class bitopro(Exchange, ImplicitAPI):
1477
1477
  #
1478
1478
  return self.parse_transaction(result, currency)
1479
1479
 
1480
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1480
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1481
1481
  """
1482
1482
  make a withdrawal
1483
1483
  :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/create_an_withdraw_invoice.md
@@ -8,7 +8,7 @@ from ccxt.abstract.bitrue import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
10
  import json
11
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
11
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
12
12
  from typing import List
13
13
  from ccxt.base.errors import ExchangeError
14
14
  from ccxt.base.errors import PermissionDenied
@@ -1818,7 +1818,7 @@ class bitrue(Exchange, ImplicitAPI):
1818
1818
  params['createMarketBuyOrderRequiresPrice'] = False
1819
1819
  return await self.create_order(symbol, 'market', 'buy', cost, None, params)
1820
1820
 
1821
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1821
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1822
1822
  """
1823
1823
  create a trade order
1824
1824
  :see: https://github.com/Bitrue-exchange/Spot-official-api-docs#recent-trades-list
@@ -1882,9 +1882,9 @@ class bitrue(Exchange, ImplicitAPI):
1882
1882
  amountString = self.number_to_string(amount)
1883
1883
  priceString = self.number_to_string(price)
1884
1884
  quoteAmount = Precise.string_mul(amountString, priceString)
1885
- amount = cost if (cost is not None) else quoteAmount
1886
- request['amount'] = self.cost_to_precision(symbol, amount)
1887
- request['volume'] = self.cost_to_precision(symbol, amount)
1885
+ requestAmount = cost if (cost is not None) else quoteAmount
1886
+ request['amount'] = self.cost_to_precision(symbol, requestAmount)
1887
+ request['volume'] = self.cost_to_precision(symbol, requestAmount)
1888
1888
  else:
1889
1889
  request['amount'] = self.parse_to_numeric(amount)
1890
1890
  request['volume'] = self.parse_to_numeric(amount)
@@ -2587,7 +2587,7 @@ class bitrue(Exchange, ImplicitAPI):
2587
2587
  'fee': fee,
2588
2588
  }
2589
2589
 
2590
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
2590
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2591
2591
  """
2592
2592
  make a withdrawal
2593
2593
  :see: https://github.com/Bitrue-exchange/Spot-official-api-docs#withdraw-commit--withdraw_data
@@ -2779,7 +2779,7 @@ class bitrue(Exchange, ImplicitAPI):
2779
2779
  data = self.safe_value(response, 'data', {})
2780
2780
  return self.parse_transfers(data, currency, since, limit)
2781
2781
 
2782
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
2782
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
2783
2783
  """
2784
2784
  transfer currency internally between wallets on the same account
2785
2785
  :see: https://www.bitrue.com/api-docs#new-future-account-transfer-user_data-hmac-sha256
@@ -2812,7 +2812,7 @@ class bitrue(Exchange, ImplicitAPI):
2812
2812
  data = self.safe_value(response, 'data', {})
2813
2813
  return self.parse_transfer(data, currency)
2814
2814
 
2815
- async def set_leverage(self, leverage, symbol: str = None, params={}):
2815
+ async def set_leverage(self, leverage: Int, symbol: str = None, params={}):
2816
2816
  """
2817
2817
  set the level of leverage for a market
2818
2818
  :see: https://www.bitrue.com/api-docs#change-initial-leverage-trade-hmac-sha256
@@ -877,7 +877,7 @@ class bitso(Exchange, ImplicitAPI):
877
877
  }
878
878
  return result
879
879
 
880
- async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit=25, params={}):
880
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = 25, params={}):
881
881
  """
882
882
  fetch all trades made by the user
883
883
  :param str symbol: unified market symbol
@@ -910,7 +910,7 @@ class bitso(Exchange, ImplicitAPI):
910
910
  response = await self.privateGetUserTrades(self.extend(request, params))
911
911
  return self.parse_trades(response['payload'], market, since, limit)
912
912
 
913
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
913
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
914
914
  """
915
915
  create a trade order
916
916
  :param str symbol: unified symbol of the market to create an order in
@@ -1061,7 +1061,7 @@ class bitso(Exchange, ImplicitAPI):
1061
1061
  'trades': None,
1062
1062
  }, market)
1063
1063
 
1064
- async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit=25, params={}) -> List[Order]:
1064
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = 25, params={}) -> List[Order]:
1065
1065
  """
1066
1066
  fetch all unfilled currently open orders
1067
1067
  :param str symbol: unified market symbol
@@ -1457,7 +1457,7 @@ class bitso(Exchange, ImplicitAPI):
1457
1457
  result[code]['info'][code] = withdrawFee
1458
1458
  return result
1459
1459
 
1460
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1460
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1461
1461
  """
1462
1462
  make a withdrawal
1463
1463
  :param str code: unified currency code
@@ -1275,7 +1275,7 @@ class bitstamp(Exchange, ImplicitAPI):
1275
1275
  result[code]['info'][id] = dictValue
1276
1276
  return result
1277
1277
 
1278
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1278
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1279
1279
  """
1280
1280
  create a trade order
1281
1281
  :see: https://www.bitstamp.net/api/#tag/Orders/operation/OpenInstantBuyOrder
@@ -1915,7 +1915,7 @@ class bitstamp(Exchange, ImplicitAPI):
1915
1915
  'info': response,
1916
1916
  }
1917
1917
 
1918
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1918
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1919
1919
  """
1920
1920
  make a withdrawal
1921
1921
  :param str code: unified currency code
@@ -952,7 +952,7 @@ class bitteam(Exchange, ImplicitAPI):
952
952
  }
953
953
  return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
954
954
 
955
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
955
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
956
956
  """
957
957
  create a trade order
958
958
  :see: https://bit.team/trade/api/documentation#/PRIVATE/postTradeApiCcxtOrdercreate
@@ -1025,7 +1025,7 @@ class bitvavo(Exchange, ImplicitAPI):
1025
1025
  'info': response,
1026
1026
  }
1027
1027
 
1028
- def create_order_request(self, symbol: Str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1028
+ def create_order_request(self, symbol: Str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1029
1029
  market = self.market(symbol)
1030
1030
  request = {
1031
1031
  'market': market['id'],
@@ -1078,7 +1078,7 @@ class bitvavo(Exchange, ImplicitAPI):
1078
1078
  request['postOnly'] = True
1079
1079
  return self.extend(request, params)
1080
1080
 
1081
- async def create_order(self, symbol: Str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1081
+ async def create_order(self, symbol: Str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1082
1082
  """
1083
1083
  create a trade order
1084
1084
  :see: https://docs.bitvavo.com/#tag/Orders/paths/~1order/post
@@ -1625,7 +1625,7 @@ class bitvavo(Exchange, ImplicitAPI):
1625
1625
  request['paymentId'] = tag
1626
1626
  return self.extend(request, params)
1627
1627
 
1628
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1628
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1629
1629
  """
1630
1630
  make a withdrawal
1631
1631
  :param str code: unified currency code
@@ -355,7 +355,7 @@ class bl3p(Exchange, ImplicitAPI):
355
355
  }
356
356
  return result
357
357
 
358
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
358
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
359
359
  """
360
360
  create a trade order
361
361
  :see: https://github.com/BitonicNL/bl3p-api/blob/master/examples/nodejs/example.md#21---create-an-order
@@ -514,12 +514,12 @@ class blockchaincom(Exchange, ImplicitAPI):
514
514
  'remaining': remaining,
515
515
  'cost': None,
516
516
  'trades': [],
517
- 'fees': {},
517
+ 'fees': [],
518
518
  'info': order,
519
519
  })
520
520
  return result
521
521
 
522
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
522
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
523
523
  """
524
524
  create a trade order
525
525
  :param str symbol: unified symbol of the market to create an order in
@@ -859,7 +859,7 @@ class blockchaincom(Exchange, ImplicitAPI):
859
859
  'fee': fee,
860
860
  }
861
861
 
862
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
862
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
863
863
  """
864
864
  make a withdrawal
865
865
  :param str code: unified currency code
@@ -694,7 +694,7 @@ class btcalpha(Exchange, ImplicitAPI):
694
694
  'average': None,
695
695
  }, market)
696
696
 
697
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
697
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
698
698
  """
699
699
  :see: https://btc-alpha.github.io/api-docs/#create-order
700
700
  create a trade order
@@ -282,7 +282,7 @@ class btcbox(Exchange, ImplicitAPI):
282
282
  #
283
283
  return self.parse_trades(response, market, since, limit)
284
284
 
285
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
285
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
286
286
  """
287
287
  create a trade order
288
288
  :param str symbol: unified symbol of the market to create an order in
@@ -735,7 +735,7 @@ class btcmarkets(Exchange, ImplicitAPI):
735
735
  #
736
736
  return self.parse_trades(response, market, since, limit)
737
737
 
738
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
738
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
739
739
  """
740
740
  create a trade order
741
741
  :param str symbol: unified symbol of the market to create an order in
@@ -1062,7 +1062,7 @@ class btcmarkets(Exchange, ImplicitAPI):
1062
1062
  #
1063
1063
  return self.parse_trades(response, market, since, limit)
1064
1064
 
1065
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1065
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1066
1066
  """
1067
1067
  make a withdrawal
1068
1068
  :param str code: unified currency code
@@ -628,7 +628,7 @@ class btcturk(Exchange, ImplicitAPI):
628
628
  sorted = self.sort_by(results, 0)
629
629
  return self.filter_by_since_limit(sorted, since, limit, 0)
630
630
 
631
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
631
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
632
632
  """
633
633
  create a trade order
634
634
  :param str symbol: unified symbol of the market to create an order in
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.bybit import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
- from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
+ from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import PermissionDenied
@@ -3333,7 +3333,7 @@ class bybit(Exchange, ImplicitAPI):
3333
3333
  raise NotSupported(self.id + ' createMarketSellOrderWithCost() supports spot orders only')
3334
3334
  return await self.create_order(symbol, 'market', 'sell', cost, 1, params)
3335
3335
 
3336
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
3336
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
3337
3337
  """
3338
3338
  create a trade order
3339
3339
  :see: https://bybit-exchange.github.io/docs/v5/order/create-order
@@ -3393,7 +3393,7 @@ class bybit(Exchange, ImplicitAPI):
3393
3393
  order = self.safe_value(response, 'result', {})
3394
3394
  return self.parse_order(order, market)
3395
3395
 
3396
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}, isUTA=True):
3396
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}, isUTA=True):
3397
3397
  market = self.market(symbol)
3398
3398
  symbol = market['symbol']
3399
3399
  lowerCaseType = type.lower()
@@ -3490,7 +3490,7 @@ class bybit(Exchange, ImplicitAPI):
3490
3490
  takeProfitTriggerPrice = self.safe_value(params, 'takeProfitPrice')
3491
3491
  stopLoss = self.safe_value(params, 'stopLoss')
3492
3492
  takeProfit = self.safe_value(params, 'takeProfit')
3493
- trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activePrice', price)
3493
+ trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activePrice', self.number_to_string(price))
3494
3494
  trailingAmount = self.safe_string_2(params, 'trailingAmount', 'trailingStop')
3495
3495
  isTrailingAmountOrder = trailingAmount is not None
3496
3496
  isStopLossTriggerOrder = stopLossTriggerPrice is not None
@@ -3627,7 +3627,7 @@ class bybit(Exchange, ImplicitAPI):
3627
3627
  #
3628
3628
  return self.parse_orders(data)
3629
3629
 
3630
- async def create_usdc_order(self, symbol, type, side, amount, price=None, params={}):
3630
+ async def create_usdc_order(self, symbol, type, side, amount: float, price: float = None, params={}):
3631
3631
  await self.load_markets()
3632
3632
  market = self.market(symbol)
3633
3633
  if type == 'market':
@@ -5204,7 +5204,7 @@ class bybit(Exchange, ImplicitAPI):
5204
5204
  }
5205
5205
  return self.safe_string(types, type, type)
5206
5206
 
5207
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
5207
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
5208
5208
  """
5209
5209
  make a withdrawal
5210
5210
  :see: https://bybit-exchange.github.io/docs/v5/asset/withdraw
@@ -5770,7 +5770,7 @@ class bybit(Exchange, ImplicitAPI):
5770
5770
  response = await self.privatePostV5PositionSwitchIsolated(self.extend(request, params))
5771
5771
  return response
5772
5772
 
5773
- async def set_leverage(self, leverage, symbol: Str = None, params={}):
5773
+ async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
5774
5774
  """
5775
5775
  set the level of leverage for a market
5776
5776
  :see: https://bybit-exchange.github.io/docs/v5/position/leverage
@@ -6133,7 +6133,7 @@ class bybit(Exchange, ImplicitAPI):
6133
6133
  'info': info,
6134
6134
  }
6135
6135
 
6136
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
6136
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
6137
6137
  """
6138
6138
  transfer currency internally between wallets on the same account
6139
6139
  :see: https://bybit-exchange.github.io/docs/v5/asset/create-inter-transfer
@@ -6237,7 +6237,7 @@ class bybit(Exchange, ImplicitAPI):
6237
6237
  data = self.add_pagination_cursor_to_result(response)
6238
6238
  return self.parse_transfers(data, currency, since, limit)
6239
6239
 
6240
- async def borrow_cross_margin(self, code: str, amount, params={}):
6240
+ async def borrow_cross_margin(self, code: str, amount: float, params={}):
6241
6241
  """
6242
6242
  create a loan to borrow margin
6243
6243
  :see: https://bybit-exchange.github.io/docs/v5/spot-margin-normal/borrow
ccxt/async_support/cex.py CHANGED
@@ -720,7 +720,7 @@ class cex(Exchange, ImplicitAPI):
720
720
  }
721
721
  return result
722
722
 
723
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
723
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
724
724
  """
725
725
  :see: https://docs.cex.io/#place-order
726
726
  create a trade order