ccxt 4.2.31__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 (242) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ace.py +4 -3
  3. ccxt/alpaca.py +1 -1
  4. ccxt/ascendex.py +6 -6
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/ace.py +4 -3
  7. ccxt/async_support/alpaca.py +1 -1
  8. ccxt/async_support/ascendex.py +6 -6
  9. ccxt/async_support/base/exchange.py +62 -39
  10. ccxt/async_support/bigone.py +25 -5
  11. ccxt/async_support/binance.py +16 -15
  12. ccxt/async_support/bingx.py +10 -9
  13. ccxt/async_support/bit2c.py +13 -1
  14. ccxt/async_support/bitbank.py +2 -2
  15. ccxt/async_support/bitbns.py +1 -1
  16. ccxt/async_support/bitfinex.py +5 -5
  17. ccxt/async_support/bitfinex2.py +6 -6
  18. ccxt/async_support/bitflyer.py +5 -5
  19. ccxt/async_support/bitforex.py +1 -1
  20. ccxt/async_support/bitget.py +11 -11
  21. ccxt/async_support/bithumb.py +2 -2
  22. ccxt/async_support/bitmart.py +9 -9
  23. ccxt/async_support/bitmex.py +3 -3
  24. ccxt/async_support/bitopro.py +2 -2
  25. ccxt/async_support/bitrue.py +8 -8
  26. ccxt/async_support/bitso.py +4 -4
  27. ccxt/async_support/bitstamp.py +2 -2
  28. ccxt/async_support/bitteam.py +1 -1
  29. ccxt/async_support/bitvavo.py +3 -3
  30. ccxt/async_support/bl3p.py +1 -1
  31. ccxt/async_support/blockchaincom.py +3 -3
  32. ccxt/async_support/btcalpha.py +1 -1
  33. ccxt/async_support/btcbox.py +1 -1
  34. ccxt/async_support/btcmarkets.py +2 -2
  35. ccxt/async_support/btcturk.py +1 -1
  36. ccxt/async_support/bybit.py +9 -9
  37. ccxt/async_support/cex.py +1 -1
  38. ccxt/async_support/coinbase.py +6 -6
  39. ccxt/async_support/coinbasepro.py +2 -2
  40. ccxt/async_support/coincheck.py +1 -1
  41. ccxt/async_support/coinex.py +9 -9
  42. ccxt/async_support/coinlist.py +4 -4
  43. ccxt/async_support/coinmate.py +2 -2
  44. ccxt/async_support/coinmetro.py +2 -2
  45. ccxt/async_support/coinone.py +1 -1
  46. ccxt/async_support/coinsph.py +2 -2
  47. ccxt/async_support/coinspot.py +1 -1
  48. ccxt/async_support/cryptocom.py +14 -14
  49. ccxt/async_support/currencycom.py +1 -1
  50. ccxt/async_support/delta.py +2 -2
  51. ccxt/async_support/deribit.py +4 -4
  52. ccxt/async_support/digifinex.py +6 -6
  53. ccxt/async_support/exmo.py +2 -2
  54. ccxt/async_support/gate.py +41 -37
  55. ccxt/async_support/gemini.py +2 -2
  56. ccxt/async_support/hitbtc.py +5 -5
  57. ccxt/async_support/hollaex.py +2 -2
  58. ccxt/async_support/htx.py +10 -10
  59. ccxt/async_support/huobijp.py +4 -4
  60. ccxt/async_support/idex.py +2 -2
  61. ccxt/async_support/independentreserve.py +2 -2
  62. ccxt/async_support/indodax.py +2 -2
  63. ccxt/async_support/kraken.py +42 -4
  64. ccxt/async_support/krakenfutures.py +5 -5
  65. ccxt/async_support/kucoin.py +8 -8
  66. ccxt/async_support/kucoinfutures.py +4 -4
  67. ccxt/async_support/kuna.py +2 -2
  68. ccxt/async_support/latoken.py +3 -3
  69. ccxt/async_support/lbank.py +2 -2
  70. ccxt/async_support/luno.py +1 -1
  71. ccxt/async_support/lykke.py +2 -2
  72. ccxt/async_support/mercado.py +2 -2
  73. ccxt/async_support/mexc.py +7 -6
  74. ccxt/async_support/ndax.py +2 -2
  75. ccxt/async_support/novadax.py +4 -4
  76. ccxt/async_support/oceanex.py +1 -1
  77. ccxt/async_support/okcoin.py +5 -5
  78. ccxt/async_support/okx.py +11 -10
  79. ccxt/async_support/onetrading.py +2 -2
  80. ccxt/async_support/p2b.py +1 -1
  81. ccxt/async_support/paymium.py +3 -3
  82. ccxt/async_support/phemex.py +13 -13
  83. ccxt/async_support/poloniex.py +4 -4
  84. ccxt/async_support/poloniexfutures.py +1 -1
  85. ccxt/async_support/probit.py +5 -5
  86. ccxt/async_support/timex.py +1 -1
  87. ccxt/async_support/tokocrypto.py +4 -4
  88. ccxt/async_support/upbit.py +2 -2
  89. ccxt/async_support/wavesexchange.py +4 -3
  90. ccxt/async_support/wazirx.py +1 -1
  91. ccxt/async_support/whitebit.py +5 -5
  92. ccxt/async_support/woo.py +6 -6
  93. ccxt/async_support/yobit.py +41 -2
  94. ccxt/async_support/zaif.py +2 -2
  95. ccxt/async_support/zonda.py +4 -4
  96. ccxt/base/exchange.py +67 -40
  97. ccxt/base/types.py +10 -0
  98. ccxt/bigone.py +25 -5
  99. ccxt/binance.py +16 -15
  100. ccxt/bingx.py +10 -9
  101. ccxt/bit2c.py +13 -1
  102. ccxt/bitbank.py +2 -2
  103. ccxt/bitbns.py +1 -1
  104. ccxt/bitfinex.py +5 -5
  105. ccxt/bitfinex2.py +6 -6
  106. ccxt/bitflyer.py +5 -5
  107. ccxt/bitforex.py +1 -1
  108. ccxt/bitget.py +11 -11
  109. ccxt/bithumb.py +2 -2
  110. ccxt/bitmart.py +9 -9
  111. ccxt/bitmex.py +3 -3
  112. ccxt/bitopro.py +2 -2
  113. ccxt/bitrue.py +8 -8
  114. ccxt/bitso.py +4 -4
  115. ccxt/bitstamp.py +2 -2
  116. ccxt/bitteam.py +1 -1
  117. ccxt/bitvavo.py +3 -3
  118. ccxt/bl3p.py +1 -1
  119. ccxt/blockchaincom.py +3 -3
  120. ccxt/btcalpha.py +1 -1
  121. ccxt/btcbox.py +1 -1
  122. ccxt/btcmarkets.py +2 -2
  123. ccxt/btcturk.py +1 -1
  124. ccxt/bybit.py +9 -9
  125. ccxt/cex.py +1 -1
  126. ccxt/coinbase.py +6 -6
  127. ccxt/coinbasepro.py +2 -2
  128. ccxt/coincheck.py +1 -1
  129. ccxt/coinex.py +9 -9
  130. ccxt/coinlist.py +4 -4
  131. ccxt/coinmate.py +2 -2
  132. ccxt/coinmetro.py +2 -2
  133. ccxt/coinone.py +1 -1
  134. ccxt/coinsph.py +2 -2
  135. ccxt/coinspot.py +1 -1
  136. ccxt/cryptocom.py +14 -14
  137. ccxt/currencycom.py +1 -1
  138. ccxt/delta.py +2 -2
  139. ccxt/deribit.py +4 -4
  140. ccxt/digifinex.py +6 -6
  141. ccxt/exmo.py +2 -2
  142. ccxt/gate.py +41 -37
  143. ccxt/gemini.py +2 -2
  144. ccxt/hitbtc.py +5 -5
  145. ccxt/hollaex.py +2 -2
  146. ccxt/htx.py +10 -10
  147. ccxt/huobijp.py +4 -4
  148. ccxt/idex.py +2 -2
  149. ccxt/independentreserve.py +2 -2
  150. ccxt/indodax.py +2 -2
  151. ccxt/kraken.py +42 -4
  152. ccxt/krakenfutures.py +5 -5
  153. ccxt/kucoin.py +8 -8
  154. ccxt/kucoinfutures.py +4 -4
  155. ccxt/kuna.py +2 -2
  156. ccxt/latoken.py +3 -3
  157. ccxt/lbank.py +2 -2
  158. ccxt/luno.py +1 -1
  159. ccxt/lykke.py +2 -2
  160. ccxt/mercado.py +2 -2
  161. ccxt/mexc.py +7 -6
  162. ccxt/ndax.py +2 -2
  163. ccxt/novadax.py +4 -4
  164. ccxt/oceanex.py +1 -1
  165. ccxt/okcoin.py +5 -5
  166. ccxt/okx.py +11 -10
  167. ccxt/onetrading.py +2 -2
  168. ccxt/p2b.py +1 -1
  169. ccxt/paymium.py +3 -3
  170. ccxt/phemex.py +13 -13
  171. ccxt/poloniex.py +4 -4
  172. ccxt/poloniexfutures.py +1 -1
  173. ccxt/pro/__init__.py +1 -1
  174. ccxt/pro/alpaca.py +8 -4
  175. ccxt/pro/ascendex.py +1 -2
  176. ccxt/pro/binance.py +14 -10
  177. ccxt/pro/bingx.py +1 -1
  178. ccxt/pro/bitfinex.py +21 -22
  179. ccxt/pro/bitfinex2.py +13 -15
  180. ccxt/pro/bitget.py +3 -1
  181. ccxt/pro/bitmart.py +3 -7
  182. ccxt/pro/bitmex.py +4 -6
  183. ccxt/pro/bitopro.py +2 -4
  184. ccxt/pro/bitrue.py +1 -1
  185. ccxt/pro/bitstamp.py +2 -3
  186. ccxt/pro/bitvavo.py +10 -5
  187. ccxt/pro/blockchaincom.py +22 -22
  188. ccxt/pro/bybit.py +5 -5
  189. ccxt/pro/cex.py +7 -7
  190. ccxt/pro/coinbase.py +3 -2
  191. ccxt/pro/coinbasepro.py +1 -1
  192. ccxt/pro/coinex.py +15 -13
  193. ccxt/pro/currencycom.py +5 -6
  194. ccxt/pro/deribit.py +4 -4
  195. ccxt/pro/exmo.py +15 -13
  196. ccxt/pro/gate.py +1 -1
  197. ccxt/pro/gemini.py +4 -2
  198. ccxt/pro/hitbtc.py +10 -9
  199. ccxt/pro/hollaex.py +2 -2
  200. ccxt/pro/htx.py +6 -6
  201. ccxt/pro/huobijp.py +3 -4
  202. ccxt/pro/idex.py +1 -1
  203. ccxt/pro/independentreserve.py +14 -13
  204. ccxt/pro/kraken.py +10 -14
  205. ccxt/pro/krakenfutures.py +10 -6
  206. ccxt/pro/kucoin.py +10 -10
  207. ccxt/pro/kucoinfutures.py +11 -10
  208. ccxt/pro/lbank.py +10 -10
  209. ccxt/pro/luno.py +12 -14
  210. ccxt/pro/mexc.py +3 -2
  211. ccxt/pro/ndax.py +7 -11
  212. ccxt/pro/okcoin.py +7 -10
  213. ccxt/pro/okx.py +6 -9
  214. ccxt/pro/onetrading.py +16 -15
  215. ccxt/pro/p2b.py +5 -3
  216. ccxt/pro/phemex.py +16 -11
  217. ccxt/pro/poloniex.py +6 -4
  218. ccxt/pro/poloniexfutures.py +13 -9
  219. ccxt/pro/probit.py +15 -12
  220. ccxt/pro/upbit.py +8 -8
  221. ccxt/pro/wazirx.py +6 -3
  222. ccxt/pro/woo.py +9 -7
  223. ccxt/probit.py +5 -5
  224. ccxt/test/base/test_order_book.py +7 -7
  225. ccxt/test/base/test_shared_methods.py +1 -1
  226. ccxt/test/test_async.py +86 -36
  227. ccxt/test/test_sync.py +86 -36
  228. ccxt/timex.py +1 -1
  229. ccxt/tokocrypto.py +4 -4
  230. ccxt/upbit.py +2 -2
  231. ccxt/wavesexchange.py +4 -3
  232. ccxt/wazirx.py +1 -1
  233. ccxt/whitebit.py +5 -5
  234. ccxt/woo.py +6 -6
  235. ccxt/yobit.py +41 -2
  236. ccxt/zaif.py +2 -2
  237. ccxt/zonda.py +4 -4
  238. {ccxt-4.2.31.dist-info → ccxt-4.2.34.dist-info}/METADATA +9 -8
  239. ccxt-4.2.34.dist-info/RECORD +438 -0
  240. ccxt-4.2.31.dist-info/RECORD +0 -438
  241. {ccxt-4.2.31.dist-info → ccxt-4.2.34.dist-info}/WHEEL +0 -0
  242. {ccxt-4.2.31.dist-info → ccxt-4.2.34.dist-info}/top_level.txt +0 -0
ccxt/bitflyer.py CHANGED
@@ -514,7 +514,7 @@ class bitflyer(Exchange, ImplicitAPI):
514
514
  'taker': fee,
515
515
  }
516
516
 
517
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
517
+ 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
- def fetch_orders(self, symbol: Str = None, since: Int = None, limit=100, params={}) -> List[Order]:
618
+ 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
- def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit=100, params={}) -> List[Order]:
642
+ 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 self.fetch_orders(symbol, since, limit, self.extend(request, params))
656
656
 
657
- def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit=100, params={}) -> List[Order]:
657
+ 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
- def withdraw(self, code: str, amount, address, tag=None, params={}):
759
+ 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
ccxt/bitforex.py CHANGED
@@ -748,7 +748,7 @@ class bitforex(Exchange, ImplicitAPI):
748
748
  response = self.privatePostApiV1TradeOrderInfos(self.extend(request, params))
749
749
  return self.parse_orders(response['data'], market, since, limit)
750
750
 
751
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
751
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
752
752
  """
753
753
  create a trade order
754
754
  :see: https://apidoc.bitforex.com/#new-order-trade
ccxt/bitget.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitget import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Currency, Int, Liquidation, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, FundingHistory, Str, Strings, Ticker, Tickers, Trade, Transaction
10
+ from ccxt.base.types import Balances, Currency, Int, Liquidation, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Position, FundingHistory, 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
@@ -2128,7 +2128,7 @@ class bitget(Exchange, ImplicitAPI):
2128
2128
  rawTransactions = self.safe_value(response, 'data', [])
2129
2129
  return self.parse_transactions(rawTransactions, currency, since, limit)
2130
2130
 
2131
- def withdraw(self, code: str, amount, address, tag=None, params={}):
2131
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2132
2132
  """
2133
2133
  make a withdrawal
2134
2134
  :see: https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
@@ -3850,7 +3850,7 @@ class bitget(Exchange, ImplicitAPI):
3850
3850
  params['createMarketBuyOrderRequiresPrice'] = False
3851
3851
  return self.create_order(symbol, 'market', 'buy', cost, None, params)
3852
3852
 
3853
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
3853
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
3854
3854
  """
3855
3855
  create a trade order
3856
3856
  :see: https://www.bitget.com/api-doc/spot/trade/Place-Order
@@ -3933,7 +3933,7 @@ class bitget(Exchange, ImplicitAPI):
3933
3933
  data = self.safe_value(response, 'data', {})
3934
3934
  return self.parse_order(data, market)
3935
3935
 
3936
- def create_order_request(self, symbol, type, side, amount, price=None, params={}):
3936
+ def create_order_request(self, symbol, type, side, amount: float, price: float = None, params={}):
3937
3937
  sandboxMode = self.safe_value(self.options, 'sandboxMode', False)
3938
3938
  market = None
3939
3939
  if sandboxMode:
@@ -3962,7 +3962,7 @@ class bitget(Exchange, ImplicitAPI):
3962
3962
  isTakeProfit = takeProfit is not None
3963
3963
  isStopLossOrTakeProfitTrigger = isStopLossTriggerOrder or isTakeProfitTriggerOrder
3964
3964
  isStopLossOrTakeProfit = isStopLoss or isTakeProfit
3965
- trailingTriggerPrice = self.safe_string(params, 'trailingTriggerPrice', price)
3965
+ trailingTriggerPrice = self.safe_string(params, 'trailingTriggerPrice', self.number_to_string(price))
3966
3966
  trailingPercent = self.safe_string_2(params, 'trailingPercent', 'callbackRatio')
3967
3967
  isTrailingPercentOrder = trailingPercent is not None
3968
3968
  if self.sum(isTriggerOrder, isStopLossTriggerOrder, isTakeProfitTriggerOrder, isTrailingPercentOrder) > 1:
@@ -6457,11 +6457,11 @@ class bitget(Exchange, ImplicitAPI):
6457
6457
  #
6458
6458
  return response
6459
6459
 
6460
- def set_leverage(self, leverage, symbol: Str = None, params={}):
6460
+ def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
6461
6461
  """
6462
6462
  set the level of leverage for a market
6463
6463
  :see: https://www.bitget.com/api-doc/contract/account/Change-Leverage
6464
- :param float leverage: the rate of leverage
6464
+ :param int leverage: the rate of leverage
6465
6465
  :param str symbol: unified market symbol
6466
6466
  :param dict [params]: extra parameters specific to the exchange API endpoint
6467
6467
  :param str [params.holdSide]: *isolated only* position direction, 'long' or 'short'
@@ -6482,7 +6482,7 @@ class bitget(Exchange, ImplicitAPI):
6482
6482
  request = {
6483
6483
  'symbol': market['id'],
6484
6484
  'marginCoin': market['settleId'],
6485
- 'leverage': leverage,
6485
+ 'leverage': self.number_to_string(leverage),
6486
6486
  'productType': productType,
6487
6487
  # 'holdSide': 'long',
6488
6488
  }
@@ -6715,7 +6715,7 @@ class bitget(Exchange, ImplicitAPI):
6715
6715
  data = self.safe_value(response, 'data', [])
6716
6716
  return self.parse_transfers(data, currency, since, limit)
6717
6717
 
6718
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
6718
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
6719
6719
  """
6720
6720
  transfer currency internally between wallets on the same account
6721
6721
  :see: https://www.bitget.com/api-doc/spot/account/Wallet-Transfer
@@ -6905,7 +6905,7 @@ class bitget(Exchange, ImplicitAPI):
6905
6905
  data = self.safe_value(response, 'data', [])
6906
6906
  return self.parse_deposit_withdraw_fees(data, codes, 'coin')
6907
6907
 
6908
- def borrow_cross_margin(self, code: str, amount, params={}):
6908
+ def borrow_cross_margin(self, code: str, amount: float, params={}):
6909
6909
  """
6910
6910
  create a loan to borrow margin
6911
6911
  :see: https://www.bitget.com/api-doc/margin/cross/account/Cross-Borrow
@@ -6936,7 +6936,7 @@ class bitget(Exchange, ImplicitAPI):
6936
6936
  data = self.safe_value(response, 'data', {})
6937
6937
  return self.parse_margin_loan(data, currency)
6938
6938
 
6939
- def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
6939
+ def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
6940
6940
  """
6941
6941
  create a loan to borrow margin
6942
6942
  :see: https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Borrow
ccxt/bithumb.py CHANGED
@@ -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
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
653
+ 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 self.cancel_order(order['id'], order['symbol'], self.extend(request, params))
911
911
 
912
- def withdraw(self, code: str, amount, address, tag=None, params={}):
912
+ 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
ccxt/bitmart.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.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 self.create_order(symbol, 'market', 'buy', cost, None, params)
2199
2199
 
2200
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2200
+ 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
- def withdraw(self, code: str, amount, address, tag=None, params={}):
2921
+ 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
- def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
3242
+ 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
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
3444
+ 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
- def set_leverage(self, leverage, symbol: Str = None, params={}):
3759
+ 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
ccxt/bitmex.py CHANGED
@@ -1743,7 +1743,7 @@ class bitmex(Exchange, ImplicitAPI):
1743
1743
  #
1744
1744
  return self.parse_trades(response, market, since, limit)
1745
1745
 
1746
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1746
+ 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
- def withdraw(self, code: str, amount, address, tag=None, params={}):
2220
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2221
2221
  """
2222
2222
  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
- def set_leverage(self, leverage, symbol: Str = None, params={}):
2386
+ 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
ccxt/bitopro.py CHANGED
@@ -949,7 +949,7 @@ class bitopro(Exchange, ImplicitAPI):
949
949
  'info': order,
950
950
  }, market)
951
951
 
952
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
952
+ 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
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1480
+ 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
ccxt/bitrue.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitrue import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, 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
@@ -1817,7 +1817,7 @@ class bitrue(Exchange, ImplicitAPI):
1817
1817
  params['createMarketBuyOrderRequiresPrice'] = False
1818
1818
  return self.create_order(symbol, 'market', 'buy', cost, None, params)
1819
1819
 
1820
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1820
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1821
1821
  """
1822
1822
  create a trade order
1823
1823
  :see: https://github.com/Bitrue-exchange/Spot-official-api-docs#recent-trades-list
@@ -1881,9 +1881,9 @@ class bitrue(Exchange, ImplicitAPI):
1881
1881
  amountString = self.number_to_string(amount)
1882
1882
  priceString = self.number_to_string(price)
1883
1883
  quoteAmount = Precise.string_mul(amountString, priceString)
1884
- amount = cost if (cost is not None) else quoteAmount
1885
- request['amount'] = self.cost_to_precision(symbol, amount)
1886
- request['volume'] = self.cost_to_precision(symbol, amount)
1884
+ requestAmount = cost if (cost is not None) else quoteAmount
1885
+ request['amount'] = self.cost_to_precision(symbol, requestAmount)
1886
+ request['volume'] = self.cost_to_precision(symbol, requestAmount)
1887
1887
  else:
1888
1888
  request['amount'] = self.parse_to_numeric(amount)
1889
1889
  request['volume'] = self.parse_to_numeric(amount)
@@ -2586,7 +2586,7 @@ class bitrue(Exchange, ImplicitAPI):
2586
2586
  'fee': fee,
2587
2587
  }
2588
2588
 
2589
- def withdraw(self, code: str, amount, address, tag=None, params={}):
2589
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2590
2590
  """
2591
2591
  make a withdrawal
2592
2592
  :see: https://github.com/Bitrue-exchange/Spot-official-api-docs#withdraw-commit--withdraw_data
@@ -2778,7 +2778,7 @@ class bitrue(Exchange, ImplicitAPI):
2778
2778
  data = self.safe_value(response, 'data', {})
2779
2779
  return self.parse_transfers(data, currency, since, limit)
2780
2780
 
2781
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
2781
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
2782
2782
  """
2783
2783
  transfer currency internally between wallets on the same account
2784
2784
  :see: https://www.bitrue.com/api-docs#new-future-account-transfer-user_data-hmac-sha256
@@ -2811,7 +2811,7 @@ class bitrue(Exchange, ImplicitAPI):
2811
2811
  data = self.safe_value(response, 'data', {})
2812
2812
  return self.parse_transfer(data, currency)
2813
2813
 
2814
- def set_leverage(self, leverage, symbol: str = None, params={}):
2814
+ def set_leverage(self, leverage: Int, symbol: str = None, params={}):
2815
2815
  """
2816
2816
  set the level of leverage for a market
2817
2817
  :see: https://www.bitrue.com/api-docs#change-initial-leverage-trade-hmac-sha256
ccxt/bitso.py CHANGED
@@ -877,7 +877,7 @@ class bitso(Exchange, ImplicitAPI):
877
877
  }
878
878
  return result
879
879
 
880
- def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit=25, params={}):
880
+ 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 = self.privateGetUserTrades(self.extend(request, params))
911
911
  return self.parse_trades(response['payload'], market, since, limit)
912
912
 
913
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
913
+ 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
- def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit=25, params={}) -> List[Order]:
1064
+ 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
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1460
+ 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
ccxt/bitstamp.py CHANGED
@@ -1275,7 +1275,7 @@ class bitstamp(Exchange, ImplicitAPI):
1275
1275
  result[code]['info'][id] = dictValue
1276
1276
  return result
1277
1277
 
1278
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1278
+ 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
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1918
+ 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
ccxt/bitteam.py CHANGED
@@ -952,7 +952,7 @@ class bitteam(Exchange, ImplicitAPI):
952
952
  }
953
953
  return self.fetch_orders(symbol, since, limit, self.extend(request, params))
954
954
 
955
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
955
+ 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
ccxt/bitvavo.py CHANGED
@@ -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
- def create_order(self, symbol: Str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1081
+ 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
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1628
+ 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
ccxt/bl3p.py CHANGED
@@ -355,7 +355,7 @@ class bl3p(Exchange, ImplicitAPI):
355
355
  }
356
356
  return result
357
357
 
358
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
358
+ 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
ccxt/blockchaincom.py CHANGED
@@ -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
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
522
+ 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
- def withdraw(self, code: str, amount, address, tag=None, params={}):
862
+ 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
ccxt/btcalpha.py CHANGED
@@ -694,7 +694,7 @@ class btcalpha(Exchange, ImplicitAPI):
694
694
  'average': None,
695
695
  }, market)
696
696
 
697
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
697
+ 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
ccxt/btcbox.py CHANGED
@@ -282,7 +282,7 @@ class btcbox(Exchange, ImplicitAPI):
282
282
  #
283
283
  return self.parse_trades(response, market, since, limit)
284
284
 
285
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
285
+ 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
ccxt/btcmarkets.py CHANGED
@@ -735,7 +735,7 @@ class btcmarkets(Exchange, ImplicitAPI):
735
735
  #
736
736
  return self.parse_trades(response, market, since, limit)
737
737
 
738
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
738
+ 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
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1065
+ 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
ccxt/btcturk.py CHANGED
@@ -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
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
631
+ 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
ccxt/bybit.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bybit import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, 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
@@ -3332,7 +3332,7 @@ class bybit(Exchange, ImplicitAPI):
3332
3332
  raise NotSupported(self.id + ' createMarketSellOrderWithCost() supports spot orders only')
3333
3333
  return self.create_order(symbol, 'market', 'sell', cost, 1, params)
3334
3334
 
3335
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
3335
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
3336
3336
  """
3337
3337
  create a trade order
3338
3338
  :see: https://bybit-exchange.github.io/docs/v5/order/create-order
@@ -3392,7 +3392,7 @@ class bybit(Exchange, ImplicitAPI):
3392
3392
  order = self.safe_value(response, 'result', {})
3393
3393
  return self.parse_order(order, market)
3394
3394
 
3395
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}, isUTA=True):
3395
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}, isUTA=True):
3396
3396
  market = self.market(symbol)
3397
3397
  symbol = market['symbol']
3398
3398
  lowerCaseType = type.lower()
@@ -3489,7 +3489,7 @@ class bybit(Exchange, ImplicitAPI):
3489
3489
  takeProfitTriggerPrice = self.safe_value(params, 'takeProfitPrice')
3490
3490
  stopLoss = self.safe_value(params, 'stopLoss')
3491
3491
  takeProfit = self.safe_value(params, 'takeProfit')
3492
- trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activePrice', price)
3492
+ trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activePrice', self.number_to_string(price))
3493
3493
  trailingAmount = self.safe_string_2(params, 'trailingAmount', 'trailingStop')
3494
3494
  isTrailingAmountOrder = trailingAmount is not None
3495
3495
  isStopLossTriggerOrder = stopLossTriggerPrice is not None
@@ -3626,7 +3626,7 @@ class bybit(Exchange, ImplicitAPI):
3626
3626
  #
3627
3627
  return self.parse_orders(data)
3628
3628
 
3629
- def create_usdc_order(self, symbol, type, side, amount, price=None, params={}):
3629
+ def create_usdc_order(self, symbol, type, side, amount: float, price: float = None, params={}):
3630
3630
  self.load_markets()
3631
3631
  market = self.market(symbol)
3632
3632
  if type == 'market':
@@ -5203,7 +5203,7 @@ class bybit(Exchange, ImplicitAPI):
5203
5203
  }
5204
5204
  return self.safe_string(types, type, type)
5205
5205
 
5206
- def withdraw(self, code: str, amount, address, tag=None, params={}):
5206
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
5207
5207
  """
5208
5208
  make a withdrawal
5209
5209
  :see: https://bybit-exchange.github.io/docs/v5/asset/withdraw
@@ -5769,7 +5769,7 @@ class bybit(Exchange, ImplicitAPI):
5769
5769
  response = self.privatePostV5PositionSwitchIsolated(self.extend(request, params))
5770
5770
  return response
5771
5771
 
5772
- def set_leverage(self, leverage, symbol: Str = None, params={}):
5772
+ def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
5773
5773
  """
5774
5774
  set the level of leverage for a market
5775
5775
  :see: https://bybit-exchange.github.io/docs/v5/position/leverage
@@ -6132,7 +6132,7 @@ class bybit(Exchange, ImplicitAPI):
6132
6132
  'info': info,
6133
6133
  }
6134
6134
 
6135
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
6135
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
6136
6136
  """
6137
6137
  transfer currency internally between wallets on the same account
6138
6138
  :see: https://bybit-exchange.github.io/docs/v5/asset/create-inter-transfer
@@ -6236,7 +6236,7 @@ class bybit(Exchange, ImplicitAPI):
6236
6236
  data = self.add_pagination_cursor_to_result(response)
6237
6237
  return self.parse_transfers(data, currency, since, limit)
6238
6238
 
6239
- def borrow_cross_margin(self, code: str, amount, params={}):
6239
+ def borrow_cross_margin(self, code: str, amount: float, params={}):
6240
6240
  """
6241
6241
  create a loan to borrow margin
6242
6242
  :see: https://bybit-exchange.github.io/docs/v5/spot-margin-normal/borrow
ccxt/cex.py CHANGED
@@ -720,7 +720,7 @@ class cex(Exchange, ImplicitAPI):
720
720
  }
721
721
  return result
722
722
 
723
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
723
+ 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