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/kucoinfutures.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.kucoin import kucoin
7
7
  from ccxt.abstract.kucoinfutures import ImplicitAPI
8
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Trade, Transaction
8
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Trade, Transaction
9
9
  from typing import List
10
10
  from ccxt.base.errors import PermissionDenied
11
11
  from ccxt.base.errors import AccountSuspended
@@ -1060,7 +1060,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
1060
1060
  'takeProfitPrice': None,
1061
1061
  })
1062
1062
 
1063
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1063
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1064
1064
  """
1065
1065
  Create an order on the exchange
1066
1066
  :see: https://docs.kucoin.com/futures/#place-an-order
@@ -1154,7 +1154,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
1154
1154
  data = self.safe_value(response, 'data', [])
1155
1155
  return self.parse_orders(data)
1156
1156
 
1157
- def create_contract_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1157
+ def create_contract_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1158
1158
  market = self.market(symbol)
1159
1159
  # required param, cannot be used twice
1160
1160
  clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId', self.uuid())
@@ -1842,7 +1842,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
1842
1842
  #
1843
1843
  return self.parse_balance(response)
1844
1844
 
1845
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
1845
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
1846
1846
  """
1847
1847
  transfer currency internally between wallets on the same account
1848
1848
  :param str code: unified currency code
ccxt/kuna.py CHANGED
@@ -913,7 +913,7 @@ class kuna(Exchange, ImplicitAPI):
913
913
  data = self.safe_value(response, 'data', [])
914
914
  return self.parse_balance(data)
915
915
 
916
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
916
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
917
917
  """
918
918
  create a trade order
919
919
  :see: https://docs.kuna.io/docs/create-a-new-order-private
@@ -1337,7 +1337,7 @@ class kuna(Exchange, ImplicitAPI):
1337
1337
  data = self.safe_value(response, 'data')
1338
1338
  return self.parse_trades(data, market, since, limit)
1339
1339
 
1340
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1340
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1341
1341
  """
1342
1342
  make a withdrawal
1343
1343
  :see: https://docs.kuna.io/docs/create-a-withdraw
ccxt/latoken.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.latoken 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
@@ -1192,7 +1192,7 @@ class latoken(Exchange, ImplicitAPI):
1192
1192
  #
1193
1193
  return self.parse_order(response)
1194
1194
 
1195
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1195
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1196
1196
  """
1197
1197
  create a trade order
1198
1198
  :see: https://api.latoken.com/doc/v2/#tag/Order/operation/placeOrder
@@ -1493,7 +1493,7 @@ class latoken(Exchange, ImplicitAPI):
1493
1493
  transfers = self.safe_value(response, 'content', [])
1494
1494
  return self.parse_transfers(transfers, currency, since, limit)
1495
1495
 
1496
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
1496
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
1497
1497
  """
1498
1498
  transfer currency internally between wallets on the same account
1499
1499
  :param str code: unified currency code
ccxt/lbank.py CHANGED
@@ -1244,7 +1244,7 @@ class lbank(Exchange, ImplicitAPI):
1244
1244
  params['createMarketBuyOrderRequiresPrice'] = False
1245
1245
  return self.create_order(symbol, 'market', 'buy', cost, None, params)
1246
1246
 
1247
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1247
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1248
1248
  """
1249
1249
  create a trade order
1250
1250
  :see: https://www.lbank.com/en-US/docs/index.html#place-order
@@ -1904,7 +1904,7 @@ class lbank(Exchange, ImplicitAPI):
1904
1904
  'info': response,
1905
1905
  }
1906
1906
 
1907
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1907
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}) -> Transaction:
1908
1908
  """
1909
1909
  make a withdrawal
1910
1910
  :see: https://www.lbank.com/en-US/docs/index.html#withdrawal
ccxt/luno.py CHANGED
@@ -826,7 +826,7 @@ class luno(Exchange, ImplicitAPI):
826
826
  'taker': self.safe_number(response, 'taker_fee'),
827
827
  }
828
828
 
829
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
829
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
830
830
  """
831
831
  create a trade order
832
832
  :param str symbol: unified symbol of the market to create an order in
ccxt/lykke.py CHANGED
@@ -755,7 +755,7 @@ class lykke(Exchange, ImplicitAPI):
755
755
  'trades': None,
756
756
  }, market)
757
757
 
758
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
758
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
759
759
  """
760
760
  create a trade order
761
761
  :param str symbol: unified symbol of the market to create an order in
@@ -1174,7 +1174,7 @@ class lykke(Exchange, ImplicitAPI):
1174
1174
  currency = self.currency(code)
1175
1175
  return self.parse_transactions(payload, currency, since, limit)
1176
1176
 
1177
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1177
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1178
1178
  """
1179
1179
  make a withdrawal
1180
1180
  :param str code: unified currency code
ccxt/mercado.py CHANGED
@@ -412,7 +412,7 @@ class mercado(Exchange, ImplicitAPI):
412
412
  response = self.privatePostGetAccountInfo(params)
413
413
  return self.parse_balance(response)
414
414
 
415
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
415
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
416
416
  """
417
417
  create a trade order
418
418
  :param str symbol: unified symbol of the market to create an order in
@@ -591,7 +591,7 @@ class mercado(Exchange, ImplicitAPI):
591
591
  order = self.safe_value(responseData, 'order')
592
592
  return self.parse_order(order, market)
593
593
 
594
- def withdraw(self, code: str, amount, address, tag=None, params={}):
594
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
595
595
  """
596
596
  make a withdrawal
597
597
  :param str code: unified currency code
ccxt/mexc.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.mexc import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, IndexType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, IndexType, 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
@@ -1339,7 +1339,8 @@ class mexc(Exchange, ImplicitAPI):
1339
1339
  orderbook['nonce'] = self.safe_integer(data, 'version')
1340
1340
  return orderbook
1341
1341
 
1342
- def parse_bid_ask(self, bidask, priceKey: IndexType = 0, amountKey: IndexType = 1, countKey: IndexType = 2):
1342
+ def parse_bid_ask(self, bidask, priceKey: IndexType = 0, amountKey: IndexType = 1, countOrIdKey: IndexType = 2):
1343
+ countKey = 2
1343
1344
  price = self.safe_number(bidask, priceKey)
1344
1345
  amount = self.safe_number(bidask, amountKey)
1345
1346
  count = self.safe_number(bidask, countKey)
@@ -2017,7 +2018,7 @@ class mexc(Exchange, ImplicitAPI):
2017
2018
  params['createMarketBuyOrderRequiresPrice'] = False
2018
2019
  return self.create_order(symbol, 'market', 'buy', cost, None, params)
2019
2020
 
2020
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2021
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2021
2022
  """
2022
2023
  create a trade order
2023
2024
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
@@ -3698,7 +3699,7 @@ class mexc(Exchange, ImplicitAPI):
3698
3699
  """
3699
3700
  return self.modify_margin_helper(symbol, amount, 'ADD', params)
3700
3701
 
3701
- def set_leverage(self, leverage, symbol: Str = None, params={}):
3702
+ def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
3702
3703
  """
3703
3704
  set the level of leverage for a market
3704
3705
  :param float leverage: the rate of leverage
@@ -4582,7 +4583,7 @@ class mexc(Exchange, ImplicitAPI):
4582
4583
  #
4583
4584
  return self.parse_transfers(resultList, currency, since, limit)
4584
4585
 
4585
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
4586
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
4586
4587
  """
4587
4588
  transfer currency internally between wallets on the same account
4588
4589
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
@@ -4707,7 +4708,7 @@ class mexc(Exchange, ImplicitAPI):
4707
4708
  }
4708
4709
  return self.safe_string(statuses, status, status)
4709
4710
 
4710
- def withdraw(self, code: str, amount, address, tag=None, params={}):
4711
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
4711
4712
  """
4712
4713
  make a withdrawal
4713
4714
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw
ccxt/ndax.py CHANGED
@@ -1274,7 +1274,7 @@ class ndax(Exchange, ImplicitAPI):
1274
1274
  'trades': None,
1275
1275
  }, market)
1276
1276
 
1277
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1277
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1278
1278
  """
1279
1279
  create a trade order
1280
1280
  :param str symbol: unified symbol of the market to create an order in
@@ -2173,7 +2173,7 @@ class ndax(Exchange, ImplicitAPI):
2173
2173
  'network': None,
2174
2174
  }
2175
2175
 
2176
- def withdraw(self, code: str, amount, address, tag=None, params={}):
2176
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2177
2177
  """
2178
2178
  make a withdrawal
2179
2179
  :param str code: unified currency code
ccxt/novadax.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.novadax 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
@@ -715,7 +715,7 @@ class novadax(Exchange, ImplicitAPI):
715
715
  #
716
716
  return self.parse_balance(response)
717
717
 
718
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
718
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
719
719
  """
720
720
  create a trade order
721
721
  :see: https://doc.novadax.com/en-US/#order-introduction
@@ -1083,7 +1083,7 @@ class novadax(Exchange, ImplicitAPI):
1083
1083
  'trades': None,
1084
1084
  }, market)
1085
1085
 
1086
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
1086
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
1087
1087
  """
1088
1088
  transfer currency internally between wallets on the same account
1089
1089
  :see: https://doc.novadax.com/en-US/#get-sub-account-transfer
@@ -1154,7 +1154,7 @@ class novadax(Exchange, ImplicitAPI):
1154
1154
  }
1155
1155
  return self.safe_string(statuses, status, 'failed')
1156
1156
 
1157
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1157
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1158
1158
  """
1159
1159
  make a withdrawal
1160
1160
  :see: https://doc.novadax.com/en-US/#send-cryptocurrencies
ccxt/oceanex.py CHANGED
@@ -594,7 +594,7 @@ class oceanex(Exchange, ImplicitAPI):
594
594
  response = self.privateGetMembersMe(params)
595
595
  return self.parse_balance(response)
596
596
 
597
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
597
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
598
598
  """
599
599
  create a trade order
600
600
  :see: https://api.oceanex.pro/doc/v1/#new-order-post
ccxt/okcoin.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.okcoin 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
@@ -1261,7 +1261,7 @@ class okcoin(Exchange, ImplicitAPI):
1261
1261
  params['tgtCcy'] = 'quote_ccy'
1262
1262
  return self.create_order(symbol, 'market', 'buy', cost, None, params)
1263
1263
 
1264
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1264
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1265
1265
  """
1266
1266
  :see: https://www.okcoin.com/docs-v5/en/#rest-api-trade-place-order
1267
1267
  :see: https://www.okcoin.com/docs-v5/en/#rest-api-trade-place-algo-order
@@ -1316,7 +1316,7 @@ class okcoin(Exchange, ImplicitAPI):
1316
1316
  order['side'] = side
1317
1317
  return order
1318
1318
 
1319
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1319
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1320
1320
  market = self.market(symbol)
1321
1321
  request = {
1322
1322
  'instId': market['id'],
@@ -2143,7 +2143,7 @@ class okcoin(Exchange, ImplicitAPI):
2143
2143
  parsed = self.parse_deposit_addresses(filtered, [currency['code']], False)
2144
2144
  return self.index_by(parsed, 'network')
2145
2145
 
2146
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
2146
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
2147
2147
  """
2148
2148
  :see: https://www.okcoin.com/docs-v5/en/#rest-api-funding-funds-transfer
2149
2149
  transfer currency internally between wallets on the same account
@@ -2282,7 +2282,7 @@ class okcoin(Exchange, ImplicitAPI):
2282
2282
  }
2283
2283
  return self.safe_string(statuses, status, status)
2284
2284
 
2285
- def withdraw(self, code: str, amount, address, tag=None, params={}):
2285
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
2286
2286
  """
2287
2287
  :see: https://www.okcoin.com/docs-v5/en/#rest-api-funding-withdrawal
2288
2288
  make a withdrawal
ccxt/okx.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.okx 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
@@ -1515,8 +1515,8 @@ class okx(Exchange, ImplicitAPI):
1515
1515
  # "msg": ""
1516
1516
  # }
1517
1517
  #
1518
- data = self.safe_value(response, 'data', [])
1519
- return self.parse_markets(data)
1518
+ dataResponse = self.safe_value(response, 'data', [])
1519
+ return self.parse_markets(dataResponse)
1520
1520
 
1521
1521
  def safe_network(self, networkId):
1522
1522
  networksById = {
@@ -2479,7 +2479,7 @@ class okx(Exchange, ImplicitAPI):
2479
2479
  params['tgtCcy'] = 'quote_ccy'
2480
2480
  return self.create_order(symbol, 'market', 'sell', cost, None, params)
2481
2481
 
2482
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2482
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2483
2483
  market = self.market(symbol)
2484
2484
  request = {
2485
2485
  'instId': market['id'],
@@ -2683,7 +2683,7 @@ class okx(Exchange, ImplicitAPI):
2683
2683
  params = self.omit(params, ['clOrdId', 'clientOrderId'])
2684
2684
  return self.extend(request, params)
2685
2685
 
2686
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2686
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2687
2687
  """
2688
2688
  create a trade order
2689
2689
  :see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
@@ -2964,7 +2964,7 @@ class okx(Exchange, ImplicitAPI):
2964
2964
  :param string[]|str ids: order ids
2965
2965
  :returns str[]: list of order ids
2966
2966
  """
2967
- if isinstance(ids, str):
2967
+ if (ids is not None) and isinstance(ids, str):
2968
2968
  return ids.split(',')
2969
2969
  else:
2970
2970
  return ids
@@ -4376,7 +4376,7 @@ class okx(Exchange, ImplicitAPI):
4376
4376
  raise InvalidAddress(self.id + ' fetchDepositAddress() cannot find ' + network + ' deposit address for ' + code)
4377
4377
  return result
4378
4378
 
4379
- def withdraw(self, code: str, amount, address, tag=None, params={}):
4379
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
4380
4380
  """
4381
4381
  make a withdrawal
4382
4382
  :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
@@ -5117,7 +5117,7 @@ class okx(Exchange, ImplicitAPI):
5117
5117
  'takeProfitPrice': None,
5118
5118
  })
5119
5119
 
5120
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
5120
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
5121
5121
  """
5122
5122
  transfer currency internally between wallets on the same account
5123
5123
  :see: https://www.okx.com/docs-v5/en/#rest-api-funding-funds-transfer
@@ -5622,7 +5622,7 @@ class okx(Exchange, ImplicitAPI):
5622
5622
  sorted = self.sort_by(result, 'timestamp')
5623
5623
  return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
5624
5624
 
5625
- def set_leverage(self, leverage, symbol: Str = None, params={}):
5625
+ def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
5626
5626
  """
5627
5627
  set the level of leverage for a market
5628
5628
  :see: https://www.okx.com/docs-v5/en/#rest-api-account-set-leverage
@@ -6177,7 +6177,7 @@ class okx(Exchange, ImplicitAPI):
6177
6177
  'info': info,
6178
6178
  }
6179
6179
 
6180
- def borrow_cross_margin(self, code: str, amount, params={}):
6180
+ def borrow_cross_margin(self, code: str, amount: float, params={}):
6181
6181
  """
6182
6182
  create a loan to borrow margin(need to be VIP 5 and above)
6183
6183
  :see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-vip-loans-borrow-and-repay
@@ -6730,6 +6730,7 @@ class okx(Exchange, ImplicitAPI):
6730
6730
  entryMarketId = self.safe_string(entry, 'instId')
6731
6731
  if entryMarketId == marketId:
6732
6732
  return self.parse_greeks(entry, market)
6733
+ return None
6733
6734
 
6734
6735
  def parse_greeks(self, greeks, market: Market = None):
6735
6736
  #
ccxt/onetrading.py CHANGED
@@ -1179,7 +1179,7 @@ class onetrading(Exchange, ImplicitAPI):
1179
1179
  withdrawalHistory = self.safe_value(response, 'withdrawal_history', [])
1180
1180
  return self.parse_transactions(withdrawalHistory, currency, since, limit, {'type': 'withdrawal'})
1181
1181
 
1182
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1182
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1183
1183
  """
1184
1184
  make a withdrawal
1185
1185
  :param str code: unified currency code
@@ -1443,7 +1443,7 @@ class onetrading(Exchange, ImplicitAPI):
1443
1443
  }
1444
1444
  return self.safe_string(timeInForces, timeInForce, timeInForce)
1445
1445
 
1446
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1446
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1447
1447
  """
1448
1448
  create a trade order
1449
1449
  :see: https://docs.onetrading.com/#create-order
ccxt/p2b.py CHANGED
@@ -760,7 +760,7 @@ class p2b(Exchange, ImplicitAPI):
760
760
  result[code] = account
761
761
  return self.safe_balance(result)
762
762
 
763
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
763
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
764
764
  """
765
765
  create a trade order
766
766
  :see: https://github.com/P2B-team/p2b-api-docs/blob/master/api-doc.md#create-order
ccxt/paymium.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.paymium import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
9
+ from ccxt.base.types import Balances, Currency, Int, Market, TransferEntry, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.decimal_to_precision import TICK_SIZE
@@ -366,7 +366,7 @@ class paymium(Exchange, ImplicitAPI):
366
366
  'network': None,
367
367
  }
368
368
 
369
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
369
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
370
370
  """
371
371
  create a trade order
372
372
  :see: https://paymium.github.io/api-documentation/#tag/Order/paths/~1user~1orders/post
@@ -409,7 +409,7 @@ class paymium(Exchange, ImplicitAPI):
409
409
  }
410
410
  return self.privateDeleteUserOrdersUuidCancel(self.extend(request, params))
411
411
 
412
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
412
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
413
413
  """
414
414
  transfer currency internally between wallets on the same account
415
415
  :see: https://paymium.github.io/api-documentation/#tag/Transfer/paths/~1user~1email_transfers/post
ccxt/phemex.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.phemex import ImplicitAPI
8
8
  import hashlib
9
9
  import numbers
10
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Num, Str, Strings, Ticker, Tickers, Trade, Transaction
10
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Num, 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
@@ -1123,7 +1123,7 @@ class phemex(Exchange, ImplicitAPI):
1123
1123
  return orderbook
1124
1124
 
1125
1125
  def to_en(self, n, scale):
1126
- stringN = str(n)
1126
+ stringN = self.number_to_string(n)
1127
1127
  precise = Precise(stringN)
1128
1128
  precise.decimals = precise.decimals - scale
1129
1129
  precise.reduce()
@@ -2341,7 +2341,7 @@ class phemex(Exchange, ImplicitAPI):
2341
2341
  return self.parse_swap_order(order, market)
2342
2342
  return self.parse_spot_order(order, market)
2343
2343
 
2344
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
2344
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
2345
2345
  """
2346
2346
  create a trade order
2347
2347
  :see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#place-order
@@ -2427,10 +2427,10 @@ class phemex(Exchange, ImplicitAPI):
2427
2427
  elif cost is None:
2428
2428
  raise ArgumentsRequired(self.id + ' createOrder() ' + qtyType + ' requires a price argument or a cost parameter')
2429
2429
  cost = amount if (cost is None) else cost
2430
- costString = str(cost)
2430
+ costString = self.number_to_string(cost)
2431
2431
  request['quoteQtyEv'] = self.to_ev(costString, market)
2432
2432
  else:
2433
- amountString = str(amount)
2433
+ amountString = self.number_to_string(amount)
2434
2434
  request['baseQtyEv'] = self.to_ev(amountString, market)
2435
2435
  elif market['swap']:
2436
2436
  posSide = self.safe_string_lower(params, 'posSide')
@@ -2443,7 +2443,7 @@ class phemex(Exchange, ImplicitAPI):
2443
2443
  if market['settle'] == 'USDT':
2444
2444
  request['orderQtyRq'] = amount
2445
2445
  else:
2446
- request['orderQty'] = int(amount)
2446
+ request['orderQty'] = self.parse_to_int(amount)
2447
2447
  if stopPrice is not None:
2448
2448
  triggerType = self.safe_string(params, 'triggerType', 'ByMarkPrice')
2449
2449
  request['triggerType'] = triggerType
@@ -4013,7 +4013,7 @@ class phemex(Exchange, ImplicitAPI):
4013
4013
  url = self.implode_hostname(self.urls['api'][api]) + url
4014
4014
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
4015
4015
 
4016
- def set_leverage(self, leverage, symbol: Str = None, params={}):
4016
+ def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
4017
4017
  """
4018
4018
  set the level of leverage for a market
4019
4019
  :see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#set-leverage
@@ -4044,17 +4044,17 @@ class phemex(Exchange, ImplicitAPI):
4044
4044
  if not isHedged and longLeverageRr is None and shortLeverageRr is None:
4045
4045
  request['leverageRr'] = leverage
4046
4046
  else:
4047
- long = longLeverageRr if (longLeverageRr is not None) else leverage
4048
- short = shortLeverageRr if (shortLeverageRr is not None) else leverage
4049
- request['longLeverageRr'] = long
4050
- request['shortLeverageRr'] = short
4047
+ longVar = longLeverageRr if (longLeverageRr is not None) else leverage
4048
+ shortVar = shortLeverageRr if (shortLeverageRr is not None) else leverage
4049
+ request['longLeverageRr'] = longVar
4050
+ request['shortLeverageRr'] = shortVar
4051
4051
  response = self.privatePutGPositionsLeverage(self.extend(request, params))
4052
4052
  else:
4053
4053
  request['leverage'] = leverage
4054
4054
  response = self.privatePutPositionsLeverage(self.extend(request, params))
4055
4055
  return response
4056
4056
 
4057
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
4057
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
4058
4058
  """
4059
4059
  transfer currency internally between wallets on the same account
4060
4060
  :param str code: unified currency code
@@ -4311,7 +4311,7 @@ class phemex(Exchange, ImplicitAPI):
4311
4311
  sorted = self.sort_by(result, 'timestamp')
4312
4312
  return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
4313
4313
 
4314
- def withdraw(self, code: str, amount, address, tag=None, params={}):
4314
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
4315
4315
  """
4316
4316
  make a withdrawal
4317
4317
  :see: https://phemex-docs.github.io/#create-withdraw-request
ccxt/poloniex.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.poloniex 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
@@ -1212,7 +1212,7 @@ class poloniex(Exchange, ImplicitAPI):
1212
1212
  extension = {'status': 'open'}
1213
1213
  return self.parse_orders(response, market, since, limit, extension)
1214
1214
 
1215
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1215
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1216
1216
  """
1217
1217
  create a trade order
1218
1218
  :see: https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
@@ -1736,7 +1736,7 @@ class poloniex(Exchange, ImplicitAPI):
1736
1736
  'info': response,
1737
1737
  }
1738
1738
 
1739
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
1739
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
1740
1740
  """
1741
1741
  transfer currency internally between wallets on the same account
1742
1742
  :see: https://docs.poloniex.com/#authenticated-endpoints-accounts-accounts-transfer
@@ -1785,7 +1785,7 @@ class poloniex(Exchange, ImplicitAPI):
1785
1785
  'status': None,
1786
1786
  }
1787
1787
 
1788
- def withdraw(self, code: str, amount, address, tag=None, params={}):
1788
+ def withdraw(self, code: str, amount: float, address, tag=None, params={}):
1789
1789
  """
1790
1790
  make a withdrawal
1791
1791
  :see: https://docs.poloniex.com/#authenticated-endpoints-wallets-withdraw-currency
ccxt/poloniexfutures.py CHANGED
@@ -780,7 +780,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
780
780
  #
781
781
  return self.parse_balance(response)
782
782
 
783
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
783
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
784
784
  """
785
785
  Create an order on the exchange
786
786
  :see: https://futures-docs.poloniex.com/#place-an-order
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.2.31'
7
+ __version__ = '4.2.34'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
ccxt/pro/alpaca.py CHANGED
@@ -591,11 +591,14 @@ class alpaca(ccxt.async_support.alpaca):
591
591
  T = self.safe_string(data, 'T')
592
592
  msg = self.safe_value(data, 'msg', {})
593
593
  if T == 'subscription':
594
- return self.handle_subscription(client, data)
594
+ self.handle_subscription(client, data)
595
+ return
595
596
  if T == 'success' and msg == 'connected':
596
- return self.handle_connected(client, data)
597
+ self.handle_connected(client, data)
598
+ return
597
599
  if T == 'success' and msg == 'authenticated':
598
- return self.handle_authenticate(client, data)
600
+ self.handle_authenticate(client, data)
601
+ return
599
602
  methods = {
600
603
  'error': self.handle_error_message,
601
604
  'b': self.handle_ohlcv,
@@ -620,7 +623,8 @@ class alpaca(ccxt.async_support.alpaca):
620
623
 
621
624
  def handle_message(self, client: Client, message):
622
625
  if isinstance(message, list):
623
- return self.handle_crypto_message(client, message)
626
+ self.handle_crypto_message(client, message)
627
+ return
624
628
  self.handle_trading_message(client, message)
625
629
 
626
630
  def handle_authenticate(self, client: Client, message):