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
@@ -706,7 +706,7 @@ class coinbase(Exchange, ImplicitAPI):
706
706
  }
707
707
  return self.safe_string(statuses, status, status)
708
708
 
709
- def parse_transaction(self, transaction, currency: Currency = None):
709
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
710
710
  #
711
711
  # fiat deposit
712
712
  #
@@ -1577,7 +1577,7 @@ class coinbase(Exchange, ImplicitAPI):
1577
1577
  'info': ticker,
1578
1578
  }, market)
1579
1579
 
1580
- def parse_balance(self, response, params={}):
1580
+ def parse_custom_balance(self, response, params={}):
1581
1581
  balances = self.safe_value_2(response, 'data', 'accounts', [])
1582
1582
  accounts = self.safe_value(params, 'type', self.options['accounts'])
1583
1583
  v3Accounts = self.safe_value(params, 'type', self.options['v3Accounts'])
@@ -1715,7 +1715,7 @@ class coinbase(Exchange, ImplicitAPI):
1715
1715
  # "size": 9
1716
1716
  # }
1717
1717
  #
1718
- return self.parse_balance(response, params)
1718
+ return self.parse_custom_balance(response, params)
1719
1719
 
1720
1720
  async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1721
1721
  """
@@ -2114,7 +2114,7 @@ class coinbase(Exchange, ImplicitAPI):
2114
2114
  params['createMarketBuyOrderRequiresPrice'] = False
2115
2115
  return await self.create_order(symbol, 'market', 'buy', cost, None, params)
2116
2116
 
2117
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2117
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2118
2118
  """
2119
2119
  create a trade order
2120
2120
  :see: https://docs.cloud.coinbase.com/advanced-trade-api/reference/retailbrokerageapi_postorder
@@ -2603,7 +2603,7 @@ class coinbase(Exchange, ImplicitAPI):
2603
2603
  order = self.safe_value(response, 'order', {})
2604
2604
  return self.parse_order(order, market)
2605
2605
 
2606
- async def fetch_orders(self, symbol: Str = None, since: Int = None, limit=100, params={}) -> List[Order]:
2606
+ async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = 100, params={}) -> List[Order]:
2607
2607
  """
2608
2608
  fetches information on multiple orders made by the user
2609
2609
  :see: https://docs.cloud.coinbase.com/advanced-trade-api/reference/retailbrokerageapi_gethistoricalorders
@@ -3065,7 +3065,7 @@ class coinbase(Exchange, ImplicitAPI):
3065
3065
  tickers = self.safe_value(response, 'pricebooks', [])
3066
3066
  return self.parse_tickers(tickers, symbols)
3067
3067
 
3068
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
3068
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
3069
3069
  """
3070
3070
  make a withdrawal
3071
3071
  :see: https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#send-money
@@ -1143,7 +1143,7 @@ class coinbasepro(Exchange, ImplicitAPI):
1143
1143
  }
1144
1144
  return await self.fetch_open_orders(symbol, since, limit, self.extend(request, params))
1145
1145
 
1146
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1146
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1147
1147
  """
1148
1148
  :see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postorders
1149
1149
  create a trade order
@@ -1273,7 +1273,7 @@ class coinbasepro(Exchange, ImplicitAPI):
1273
1273
  async def fetch_payment_methods(self, params={}):
1274
1274
  return await self.privateGetPaymentMethods(params)
1275
1275
 
1276
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1276
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1277
1277
  """
1278
1278
  make a withdrawal
1279
1279
  :see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawpaymentmethod
@@ -540,7 +540,7 @@ class coincheck(Exchange, ImplicitAPI):
540
540
  }
541
541
  return result
542
542
 
543
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
543
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
544
544
  """
545
545
  create a trade order
546
546
  :param str symbol: unified symbol of the market to create an order in
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.coinex import ImplicitAPI
8
8
  import asyncio
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, 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
@@ -943,7 +943,7 @@ class coinex(Exchange, ImplicitAPI):
943
943
  #
944
944
  return self.safe_integer(response, 'data')
945
945
 
946
- async def fetch_order_book(self, symbol: str, limit=20, params={}):
946
+ async def fetch_order_book(self, symbol: str, limit: Int = 20, params={}):
947
947
  """
948
948
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
949
949
  :see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot001_market004_market_depth
@@ -1900,7 +1900,7 @@ class coinex(Exchange, ImplicitAPI):
1900
1900
  params['createMarketBuyOrderRequiresPrice'] = False
1901
1901
  return await self.create_order(symbol, 'market', 'buy', cost, None, params)
1902
1902
 
1903
- def create_order_request(self, symbol, type, side, amount, price=None, params={}):
1903
+ def create_order_request(self, symbol, type, side, amount: float, price: float = None, params={}):
1904
1904
  market = self.market(symbol)
1905
1905
  swap = market['swap']
1906
1906
  clientOrderId = self.safe_string_2(params, 'client_id', 'clientOrderId')
@@ -2016,7 +2016,7 @@ class coinex(Exchange, ImplicitAPI):
2016
2016
  params = self.omit(params, ['reduceOnly', 'positionId', 'timeInForce', 'postOnly', 'stopPrice', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice'])
2017
2017
  return self.extend(request, params)
2018
2018
 
2019
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2019
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2020
2020
  """
2021
2021
  create a trade order
2022
2022
  :see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade001_limit_order
@@ -3602,7 +3602,7 @@ class coinex(Exchange, ImplicitAPI):
3602
3602
  }
3603
3603
  return await self.perpetualPrivatePostMarketAdjustLeverage(self.extend(request, params))
3604
3604
 
3605
- async def set_leverage(self, leverage, symbol: Str = None, params={}):
3605
+ async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3606
3606
  """
3607
3607
  :see: https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http014_adjust_leverage
3608
3608
  set the level of leverage for a market
@@ -4059,7 +4059,7 @@ class coinex(Exchange, ImplicitAPI):
4059
4059
  result.append(self.parse_funding_rate(ticker, marketInner))
4060
4060
  return self.filter_by_array(result, 'symbol', symbols)
4061
4061
 
4062
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
4062
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
4063
4063
  """
4064
4064
  make a withdrawal
4065
4065
  :see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account015_submit_withdraw
@@ -4082,7 +4082,7 @@ class coinex(Exchange, ImplicitAPI):
4082
4082
  request = {
4083
4083
  'coin_type': currency['id'],
4084
4084
  'coin_address': address, # must be authorized, inter-user transfer by a registered mobile phone number or an email address is supported
4085
- 'actual_amount': float(amount), # the actual amount without fees, https://www.coinex.com/fees
4085
+ 'actual_amount': float(self.number_to_string(amount)), # the actual amount without fees, https://www.coinex.com/fees
4086
4086
  'transfer_method': 'onchain', # onchain, local
4087
4087
  }
4088
4088
  if networkCode is not None:
@@ -4299,7 +4299,7 @@ class coinex(Exchange, ImplicitAPI):
4299
4299
  'internal': internal,
4300
4300
  }
4301
4301
 
4302
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
4302
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
4303
4303
  """
4304
4304
  transfer currency internally between wallets on the same account
4305
4305
  :see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account014_balance_contract_transfer
@@ -4810,7 +4810,7 @@ class coinex(Exchange, ImplicitAPI):
4810
4810
  'info': info,
4811
4811
  }
4812
4812
 
4813
- async def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
4813
+ async def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
4814
4814
  """
4815
4815
  create a loan to borrow margin
4816
4816
  :see: https://github.com/coinexcom/coinex_exchange_api/wiki/086margin_loan
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.coinlist import ImplicitAPI
8
8
  import hashlib
9
9
  import math
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
@@ -1393,7 +1393,7 @@ class coinlist(Exchange, ImplicitAPI):
1393
1393
  response = await self.privateDeleteV1OrdersBulk(params)
1394
1394
  return response
1395
1395
 
1396
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1396
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1397
1397
  """
1398
1398
  create a trade order
1399
1399
  :see: https://trade-docs.coinlist.co/?javascript--nodejs#create-new-order
@@ -1631,7 +1631,7 @@ class coinlist(Exchange, ImplicitAPI):
1631
1631
  }
1632
1632
  return self.safe_string(statuses, status, status)
1633
1633
 
1634
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
1634
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
1635
1635
  """
1636
1636
  transfer currency internally between wallets on the same account
1637
1637
  :see: https://trade-docs.coinlist.co/?javascript--nodejs#transfer-funds-between-entities
@@ -1863,7 +1863,7 @@ class coinlist(Exchange, ImplicitAPI):
1863
1863
  # coinlist returns both internal transfers and blockchain transactions
1864
1864
  return self.parse_transactions(response, currency, since, limit)
1865
1865
 
1866
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1866
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1867
1867
  """
1868
1868
  request a withdrawal from CoinList wallet.(Disabled by default. Contact CoinList to apply for an exception.)
1869
1869
  :see: https://trade-docs.coinlist.co/?javascript--nodejs#request-withdrawal-from-wallet
@@ -492,7 +492,7 @@ class coinmate(Exchange, ImplicitAPI):
492
492
  },
493
493
  }
494
494
 
495
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
495
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
496
496
  """
497
497
  make a withdrawal
498
498
  :param str code: unified currency code
@@ -827,7 +827,7 @@ class coinmate(Exchange, ImplicitAPI):
827
827
  'fee': None,
828
828
  }, market)
829
829
 
830
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
830
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
831
831
  """
832
832
  create a trade order
833
833
  :param str symbol: unified symbol of the market to create an order in
@@ -1139,7 +1139,7 @@ class coinmetro(Exchange, ImplicitAPI):
1139
1139
  }
1140
1140
  return self.safe_string(types, type, type)
1141
1141
 
1142
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1142
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1143
1143
  """
1144
1144
  create a trade order
1145
1145
  :see: https://documenter.getpostman.com/view/3653795/SVfWN6KS#a4895a1d-3f50-40ae-8231-6962ef06c771
@@ -1721,7 +1721,7 @@ class coinmetro(Exchange, ImplicitAPI):
1721
1721
  ]
1722
1722
  return self.safe_value(timeInForceTypes, timeInForce, timeInForce)
1723
1723
 
1724
- async def borrow_cross_margin(self, code: str, amount, params={}):
1724
+ async def borrow_cross_margin(self, code: str, amount: float, params={}):
1725
1725
  """
1726
1726
  create a loan to borrow margin
1727
1727
  :see: https://documenter.getpostman.com/view/3653795/SVfWN6KS#5b90b3b9-e5db-4d07-ac9d-d680a06fd110
@@ -717,7 +717,7 @@ class coinone(Exchange, ImplicitAPI):
717
717
  data = self.safe_value(response, 'transactions', [])
718
718
  return self.parse_trades(data, market, since, limit)
719
719
 
720
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
720
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
721
721
  """
722
722
  create a trade order
723
723
  :see: https://doc.coinone.co.kr/#tag/Order-V2/operation/v2_order_limit_buy
@@ -1039,7 +1039,7 @@ class coinsph(Exchange, ImplicitAPI):
1039
1039
  result[code] = account
1040
1040
  return self.safe_balance(result)
1041
1041
 
1042
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1042
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1043
1043
  """
1044
1044
  create a trade order
1045
1045
  :see: https://coins-docs.github.io/rest-api/#new-order--trade
@@ -1466,7 +1466,7 @@ class coinsph(Exchange, ImplicitAPI):
1466
1466
  'taker': self.safe_number(fee, 'takerCommission'),
1467
1467
  }
1468
1468
 
1469
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1469
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1470
1470
  """
1471
1471
  make a withdrawal to coins_ph account
1472
1472
  :see: https://coins-docs.github.io/rest-api/#withdrawuser_data
@@ -459,7 +459,7 @@ class coinspot(Exchange, ImplicitAPI):
459
459
  'fee': fee,
460
460
  }, market)
461
461
 
462
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
462
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
463
463
  """
464
464
  create a trade order
465
465
  :see: https://www.coinspot.com.au/api#placebuyorder
@@ -988,7 +988,7 @@ class cryptocom(Exchange, ImplicitAPI):
988
988
  order = self.safe_value(response, 'result', {})
989
989
  return self.parse_order(order, market)
990
990
 
991
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
991
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
992
992
  market = self.market(symbol)
993
993
  uppercaseType = type.upper()
994
994
  request = {
@@ -1030,26 +1030,26 @@ class cryptocom(Exchange, ImplicitAPI):
1030
1030
  isTakeProfitTrigger = (takeProfitPrice is not None)
1031
1031
  if isTrigger:
1032
1032
  request['ref_price'] = self.price_to_precision(symbol, triggerPrice)
1033
- price = str(price)
1033
+ priceString = self.number_to_string(price)
1034
1034
  if (uppercaseType == 'LIMIT') or (uppercaseType == 'STOP_LIMIT') or (uppercaseType == 'TAKE_PROFIT_LIMIT'):
1035
1035
  if side == 'buy':
1036
- if Precise.string_lt(price, triggerPrice):
1036
+ if Precise.string_lt(priceString, triggerPrice):
1037
1037
  request['type'] = 'TAKE_PROFIT_LIMIT'
1038
1038
  else:
1039
1039
  request['type'] = 'STOP_LIMIT'
1040
1040
  else:
1041
- if Precise.string_lt(price, triggerPrice):
1041
+ if Precise.string_lt(priceString, triggerPrice):
1042
1042
  request['type'] = 'STOP_LIMIT'
1043
1043
  else:
1044
1044
  request['type'] = 'TAKE_PROFIT_LIMIT'
1045
1045
  else:
1046
1046
  if side == 'buy':
1047
- if Precise.string_lt(price, triggerPrice):
1047
+ if Precise.string_lt(priceString, triggerPrice):
1048
1048
  request['type'] = 'TAKE_PROFIT'
1049
1049
  else:
1050
1050
  request['type'] = 'STOP_LOSS'
1051
1051
  else:
1052
- if Precise.string_lt(price, triggerPrice):
1052
+ if Precise.string_lt(priceString, triggerPrice):
1053
1053
  request['type'] = 'STOP_LOSS'
1054
1054
  else:
1055
1055
  request['type'] = 'TAKE_PROFIT'
@@ -1070,7 +1070,7 @@ class cryptocom(Exchange, ImplicitAPI):
1070
1070
  params = self.omit(params, ['postOnly', 'clientOrderId', 'timeInForce', 'stopPrice', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice'])
1071
1071
  return self.extend(request, params)
1072
1072
 
1073
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1073
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1074
1074
  """
1075
1075
  create a trade order
1076
1076
  :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order
@@ -1179,7 +1179,7 @@ class cryptocom(Exchange, ImplicitAPI):
1179
1179
  return self.parse_orders(ocoOrders)
1180
1180
  return self.parse_orders(result)
1181
1181
 
1182
- def create_advanced_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1182
+ def create_advanced_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1183
1183
  # differs slightly from createOrderRequest
1184
1184
  # since the advanced order endpoint requires a different set of parameters
1185
1185
  # namely here we don't support ref_price or spot_margin
@@ -1215,26 +1215,26 @@ class cryptocom(Exchange, ImplicitAPI):
1215
1215
  isStopLossTrigger = (stopLossPrice is not None)
1216
1216
  isTakeProfitTrigger = (takeProfitPrice is not None)
1217
1217
  if isTrigger:
1218
- price = str(price)
1218
+ priceString = self.number_to_string(price)
1219
1219
  if (uppercaseType == 'LIMIT') or (uppercaseType == 'STOP_LIMIT') or (uppercaseType == 'TAKE_PROFIT_LIMIT'):
1220
1220
  if side == 'buy':
1221
- if Precise.string_lt(price, triggerPrice):
1221
+ if Precise.string_lt(priceString, triggerPrice):
1222
1222
  request['type'] = 'TAKE_PROFIT_LIMIT'
1223
1223
  else:
1224
1224
  request['type'] = 'STOP_LIMIT'
1225
1225
  else:
1226
- if Precise.string_lt(price, triggerPrice):
1226
+ if Precise.string_lt(priceString, triggerPrice):
1227
1227
  request['type'] = 'STOP_LIMIT'
1228
1228
  else:
1229
1229
  request['type'] = 'TAKE_PROFIT_LIMIT'
1230
1230
  else:
1231
1231
  if side == 'buy':
1232
- if Precise.string_lt(price, triggerPrice):
1232
+ if Precise.string_lt(priceString, triggerPrice):
1233
1233
  request['type'] = 'TAKE_PROFIT'
1234
1234
  else:
1235
1235
  request['type'] = 'STOP_LOSS'
1236
1236
  else:
1237
- if Precise.string_lt(price, triggerPrice):
1237
+ if Precise.string_lt(priceString, triggerPrice):
1238
1238
  request['type'] = 'STOP_LOSS'
1239
1239
  else:
1240
1240
  request['type'] = 'TAKE_PROFIT'
@@ -1486,7 +1486,7 @@ class cryptocom(Exchange, ImplicitAPI):
1486
1486
  address = addressString
1487
1487
  return [address, tag]
1488
1488
 
1489
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1489
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1490
1490
  """
1491
1491
  make a withdrawal
1492
1492
  :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-withdrawal
@@ -1219,7 +1219,7 @@ class currencycom(Exchange, ImplicitAPI):
1219
1219
  }
1220
1220
  return self.safe_string(statuses, status, status)
1221
1221
 
1222
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1222
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1223
1223
  """
1224
1224
  create a trade order
1225
1225
  :param str symbol: unified symbol of the market to create an order in
@@ -1733,7 +1733,7 @@ class delta(Exchange, ImplicitAPI):
1733
1733
  'trades': None,
1734
1734
  }, market)
1735
1735
 
1736
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1736
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1737
1737
  """
1738
1738
  create a trade order
1739
1739
  :see: https://docs.delta.exchange/#place-order
@@ -2725,7 +2725,7 @@ class delta(Exchange, ImplicitAPI):
2725
2725
  #
2726
2726
  return await self.privateGetProductsProductIdOrdersLeverage(self.extend(request, params))
2727
2727
 
2728
- async def set_leverage(self, leverage, symbol: Str = None, params={}):
2728
+ async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2729
2729
  """
2730
2730
  set the level of leverage for a market
2731
2731
  :see: https://docs.delta.exchange/#change-order-leverage
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.deribit import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Greeks, 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
@@ -1808,7 +1808,7 @@ class deribit(Exchange, ImplicitAPI):
1808
1808
  result = self.safe_value(response, 'result')
1809
1809
  return self.parse_order(result, market)
1810
1810
 
1811
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1811
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1812
1812
  """
1813
1813
  create a trade order
1814
1814
  :see: https://docs.deribit.com/#private-buy
@@ -2663,7 +2663,7 @@ class deribit(Exchange, ImplicitAPI):
2663
2663
  transfers = self.safe_value(result, 'data', [])
2664
2664
  return self.parse_transfers(transfers, currency, since, limit, params)
2665
2665
 
2666
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
2666
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
2667
2667
  """
2668
2668
  transfer currency internally between wallets on the same account
2669
2669
  :param str code: unified currency code
@@ -2750,7 +2750,7 @@ class deribit(Exchange, ImplicitAPI):
2750
2750
  }
2751
2751
  return self.safe_string(statuses, status, status)
2752
2752
 
2753
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
2753
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2754
2754
  """
2755
2755
  make a withdrawal
2756
2756
  :param str code: unified currency code
@@ -8,7 +8,7 @@ from ccxt.abstract.digifinex 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, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
11
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, 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
@@ -1499,7 +1499,7 @@ class digifinex(Exchange, ImplicitAPI):
1499
1499
  candles = self.safe_value(response, 'data', [])
1500
1500
  return self.parse_ohlcvs(candles, market, timeframe, since, limit)
1501
1501
 
1502
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1502
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1503
1503
  """
1504
1504
  create a trade order
1505
1505
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-new-order
@@ -1636,7 +1636,7 @@ class digifinex(Exchange, ImplicitAPI):
1636
1636
  result.append(individualOrder)
1637
1637
  return self.parse_orders(result, market)
1638
1638
 
1639
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1639
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1640
1640
  """
1641
1641
  * @ignore
1642
1642
  helper function to build request
@@ -2723,7 +2723,7 @@ class digifinex(Exchange, ImplicitAPI):
2723
2723
  'status': self.parse_transfer_status(self.safe_string(transfer, 'code')),
2724
2724
  }
2725
2725
 
2726
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
2726
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
2727
2727
  """
2728
2728
  transfer currency internally between wallets on the same account
2729
2729
  :param str code: unified currency code
@@ -2752,7 +2752,7 @@ class digifinex(Exchange, ImplicitAPI):
2752
2752
  #
2753
2753
  return self.parse_transfer(response, currency)
2754
2754
 
2755
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
2755
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2756
2756
  """
2757
2757
  make a withdrawal
2758
2758
  :param str code: unified currency code
@@ -3385,7 +3385,7 @@ class digifinex(Exchange, ImplicitAPI):
3385
3385
  'takeProfitPrice': None,
3386
3386
  })
3387
3387
 
3388
- async def set_leverage(self, leverage, symbol: Str = None, params={}):
3388
+ async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3389
3389
  """
3390
3390
  set the level of leverage for a market
3391
3391
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#setleverage
@@ -1298,7 +1298,7 @@ class exmo(Exchange, ImplicitAPI):
1298
1298
  result = self.array_concat(result, trades)
1299
1299
  return self.filter_by_since_limit(result, since, limit)
1300
1300
 
1301
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1301
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1302
1302
  """
1303
1303
  create a trade order
1304
1304
  :see: https://documenter.getpostman.com/view/10287440/SzYXWKPi#80daa469-ec59-4d0a-b229-6a311d8dd1cd
@@ -1963,7 +1963,7 @@ class exmo(Exchange, ImplicitAPI):
1963
1963
  return self.markets[symbols[0]]
1964
1964
  return None
1965
1965
 
1966
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
1966
+ async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1967
1967
  """
1968
1968
  make a withdrawal
1969
1969
  :param str code: unified currency code