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

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

Potentially problematic release.


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

Files changed (244) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/coinbase.py +10 -0
  3. ccxt/abstract/okx.py +12 -1
  4. ccxt/ace.py +4 -3
  5. ccxt/alpaca.py +1 -1
  6. ccxt/ascendex.py +6 -6
  7. ccxt/async_support/__init__.py +1 -1
  8. ccxt/async_support/ace.py +4 -3
  9. ccxt/async_support/alpaca.py +1 -1
  10. ccxt/async_support/ascendex.py +6 -6
  11. ccxt/async_support/base/exchange.py +62 -39
  12. ccxt/async_support/bigone.py +25 -5
  13. ccxt/async_support/binance.py +17 -16
  14. ccxt/async_support/bingx.py +10 -9
  15. ccxt/async_support/bit2c.py +13 -1
  16. ccxt/async_support/bitbank.py +2 -2
  17. ccxt/async_support/bitbns.py +1 -1
  18. ccxt/async_support/bitfinex.py +5 -5
  19. ccxt/async_support/bitfinex2.py +386 -40
  20. ccxt/async_support/bitflyer.py +5 -5
  21. ccxt/async_support/bitforex.py +4 -1
  22. ccxt/async_support/bitget.py +11 -11
  23. ccxt/async_support/bithumb.py +2 -2
  24. ccxt/async_support/bitmart.py +9 -9
  25. ccxt/async_support/bitmex.py +3 -3
  26. ccxt/async_support/bitopro.py +2 -2
  27. ccxt/async_support/bitrue.py +8 -8
  28. ccxt/async_support/bitso.py +4 -4
  29. ccxt/async_support/bitstamp.py +2 -2
  30. ccxt/async_support/bitteam.py +1 -1
  31. ccxt/async_support/bitvavo.py +3 -3
  32. ccxt/async_support/bl3p.py +1 -1
  33. ccxt/async_support/blockchaincom.py +3 -3
  34. ccxt/async_support/btcalpha.py +1 -1
  35. ccxt/async_support/btcbox.py +1 -1
  36. ccxt/async_support/btcmarkets.py +2 -2
  37. ccxt/async_support/btcturk.py +1 -1
  38. ccxt/async_support/bybit.py +9 -9
  39. ccxt/async_support/cex.py +1 -1
  40. ccxt/async_support/coinbase.py +16 -6
  41. ccxt/async_support/coinbasepro.py +2 -2
  42. ccxt/async_support/coincheck.py +1 -1
  43. ccxt/async_support/coinex.py +9 -9
  44. ccxt/async_support/coinlist.py +4 -4
  45. ccxt/async_support/coinmate.py +2 -2
  46. ccxt/async_support/coinmetro.py +2 -2
  47. ccxt/async_support/coinone.py +1 -1
  48. ccxt/async_support/coinsph.py +2 -2
  49. ccxt/async_support/coinspot.py +1 -1
  50. ccxt/async_support/cryptocom.py +14 -14
  51. ccxt/async_support/currencycom.py +1 -1
  52. ccxt/async_support/delta.py +2 -2
  53. ccxt/async_support/deribit.py +5 -4
  54. ccxt/async_support/digifinex.py +6 -6
  55. ccxt/async_support/exmo.py +2 -2
  56. ccxt/async_support/gate.py +41 -37
  57. ccxt/async_support/gemini.py +2 -2
  58. ccxt/async_support/hitbtc.py +5 -5
  59. ccxt/async_support/hollaex.py +2 -2
  60. ccxt/async_support/htx.py +11 -11
  61. ccxt/async_support/huobijp.py +4 -4
  62. ccxt/async_support/idex.py +2 -2
  63. ccxt/async_support/independentreserve.py +2 -2
  64. ccxt/async_support/indodax.py +2 -2
  65. ccxt/async_support/kraken.py +45 -5
  66. ccxt/async_support/krakenfutures.py +8 -5
  67. ccxt/async_support/kucoin.py +8 -8
  68. ccxt/async_support/kucoinfutures.py +4 -4
  69. ccxt/async_support/kuna.py +2 -2
  70. ccxt/async_support/latoken.py +3 -3
  71. ccxt/async_support/lbank.py +5 -4
  72. ccxt/async_support/luno.py +1 -1
  73. ccxt/async_support/lykke.py +2 -2
  74. ccxt/async_support/mercado.py +2 -2
  75. ccxt/async_support/mexc.py +7 -6
  76. ccxt/async_support/ndax.py +2 -2
  77. ccxt/async_support/novadax.py +4 -4
  78. ccxt/async_support/oceanex.py +1 -1
  79. ccxt/async_support/okcoin.py +5 -5
  80. ccxt/async_support/okx.py +26 -12
  81. ccxt/async_support/onetrading.py +2 -2
  82. ccxt/async_support/p2b.py +1 -1
  83. ccxt/async_support/paymium.py +3 -3
  84. ccxt/async_support/phemex.py +13 -13
  85. ccxt/async_support/poloniex.py +4 -4
  86. ccxt/async_support/poloniexfutures.py +4 -1
  87. ccxt/async_support/probit.py +5 -5
  88. ccxt/async_support/timex.py +2 -2
  89. ccxt/async_support/tokocrypto.py +4 -4
  90. ccxt/async_support/upbit.py +2 -2
  91. ccxt/async_support/wavesexchange.py +4 -3
  92. ccxt/async_support/wazirx.py +1 -1
  93. ccxt/async_support/whitebit.py +6 -6
  94. ccxt/async_support/woo.py +6 -6
  95. ccxt/async_support/yobit.py +41 -2
  96. ccxt/async_support/zaif.py +2 -2
  97. ccxt/async_support/zonda.py +4 -4
  98. ccxt/base/exchange.py +77 -44
  99. ccxt/base/types.py +10 -0
  100. ccxt/bigone.py +25 -5
  101. ccxt/binance.py +17 -16
  102. ccxt/bingx.py +10 -9
  103. ccxt/bit2c.py +13 -1
  104. ccxt/bitbank.py +2 -2
  105. ccxt/bitbns.py +1 -1
  106. ccxt/bitfinex.py +5 -5
  107. ccxt/bitfinex2.py +386 -40
  108. ccxt/bitflyer.py +5 -5
  109. ccxt/bitforex.py +4 -1
  110. ccxt/bitget.py +11 -11
  111. ccxt/bithumb.py +2 -2
  112. ccxt/bitmart.py +9 -9
  113. ccxt/bitmex.py +3 -3
  114. ccxt/bitopro.py +2 -2
  115. ccxt/bitrue.py +8 -8
  116. ccxt/bitso.py +4 -4
  117. ccxt/bitstamp.py +2 -2
  118. ccxt/bitteam.py +1 -1
  119. ccxt/bitvavo.py +3 -3
  120. ccxt/bl3p.py +1 -1
  121. ccxt/blockchaincom.py +3 -3
  122. ccxt/btcalpha.py +1 -1
  123. ccxt/btcbox.py +1 -1
  124. ccxt/btcmarkets.py +2 -2
  125. ccxt/btcturk.py +1 -1
  126. ccxt/bybit.py +9 -9
  127. ccxt/cex.py +1 -1
  128. ccxt/coinbase.py +16 -6
  129. ccxt/coinbasepro.py +2 -2
  130. ccxt/coincheck.py +1 -1
  131. ccxt/coinex.py +9 -9
  132. ccxt/coinlist.py +4 -4
  133. ccxt/coinmate.py +2 -2
  134. ccxt/coinmetro.py +2 -2
  135. ccxt/coinone.py +1 -1
  136. ccxt/coinsph.py +2 -2
  137. ccxt/coinspot.py +1 -1
  138. ccxt/cryptocom.py +14 -14
  139. ccxt/currencycom.py +1 -1
  140. ccxt/delta.py +2 -2
  141. ccxt/deribit.py +5 -4
  142. ccxt/digifinex.py +6 -6
  143. ccxt/exmo.py +2 -2
  144. ccxt/gate.py +41 -37
  145. ccxt/gemini.py +2 -2
  146. ccxt/hitbtc.py +5 -5
  147. ccxt/hollaex.py +2 -2
  148. ccxt/htx.py +11 -11
  149. ccxt/huobijp.py +4 -4
  150. ccxt/idex.py +2 -2
  151. ccxt/independentreserve.py +2 -2
  152. ccxt/indodax.py +2 -2
  153. ccxt/kraken.py +45 -5
  154. ccxt/krakenfutures.py +8 -5
  155. ccxt/kucoin.py +8 -8
  156. ccxt/kucoinfutures.py +4 -4
  157. ccxt/kuna.py +2 -2
  158. ccxt/latoken.py +3 -3
  159. ccxt/lbank.py +5 -4
  160. ccxt/luno.py +1 -1
  161. ccxt/lykke.py +2 -2
  162. ccxt/mercado.py +2 -2
  163. ccxt/mexc.py +7 -6
  164. ccxt/ndax.py +2 -2
  165. ccxt/novadax.py +4 -4
  166. ccxt/oceanex.py +1 -1
  167. ccxt/okcoin.py +5 -5
  168. ccxt/okx.py +26 -12
  169. ccxt/onetrading.py +2 -2
  170. ccxt/p2b.py +1 -1
  171. ccxt/paymium.py +3 -3
  172. ccxt/phemex.py +13 -13
  173. ccxt/poloniex.py +4 -4
  174. ccxt/poloniexfutures.py +4 -1
  175. ccxt/pro/__init__.py +1 -1
  176. ccxt/pro/alpaca.py +8 -4
  177. ccxt/pro/ascendex.py +1 -2
  178. ccxt/pro/binance.py +14 -10
  179. ccxt/pro/bingx.py +1 -1
  180. ccxt/pro/bitfinex.py +21 -22
  181. ccxt/pro/bitfinex2.py +13 -15
  182. ccxt/pro/bitget.py +3 -1
  183. ccxt/pro/bitmart.py +3 -7
  184. ccxt/pro/bitmex.py +4 -6
  185. ccxt/pro/bitopro.py +2 -4
  186. ccxt/pro/bitrue.py +1 -1
  187. ccxt/pro/bitstamp.py +2 -3
  188. ccxt/pro/bitvavo.py +10 -5
  189. ccxt/pro/blockchaincom.py +22 -22
  190. ccxt/pro/bybit.py +5 -5
  191. ccxt/pro/cex.py +7 -7
  192. ccxt/pro/coinbase.py +3 -2
  193. ccxt/pro/coinbasepro.py +1 -1
  194. ccxt/pro/coinex.py +15 -13
  195. ccxt/pro/currencycom.py +5 -6
  196. ccxt/pro/deribit.py +4 -4
  197. ccxt/pro/exmo.py +15 -13
  198. ccxt/pro/gate.py +1 -1
  199. ccxt/pro/gemini.py +4 -2
  200. ccxt/pro/hitbtc.py +10 -9
  201. ccxt/pro/hollaex.py +2 -2
  202. ccxt/pro/htx.py +6 -6
  203. ccxt/pro/huobijp.py +3 -4
  204. ccxt/pro/idex.py +1 -1
  205. ccxt/pro/independentreserve.py +14 -13
  206. ccxt/pro/kraken.py +10 -14
  207. ccxt/pro/krakenfutures.py +10 -6
  208. ccxt/pro/kucoin.py +10 -10
  209. ccxt/pro/kucoinfutures.py +11 -10
  210. ccxt/pro/lbank.py +10 -10
  211. ccxt/pro/luno.py +12 -14
  212. ccxt/pro/mexc.py +3 -2
  213. ccxt/pro/ndax.py +7 -11
  214. ccxt/pro/okcoin.py +7 -10
  215. ccxt/pro/okx.py +6 -9
  216. ccxt/pro/onetrading.py +16 -15
  217. ccxt/pro/p2b.py +5 -3
  218. ccxt/pro/phemex.py +16 -11
  219. ccxt/pro/poloniex.py +6 -4
  220. ccxt/pro/poloniexfutures.py +13 -9
  221. ccxt/pro/probit.py +15 -12
  222. ccxt/pro/upbit.py +8 -8
  223. ccxt/pro/wazirx.py +6 -3
  224. ccxt/pro/woo.py +9 -7
  225. ccxt/probit.py +5 -5
  226. ccxt/test/base/test_order_book.py +7 -7
  227. ccxt/test/base/test_shared_methods.py +1 -1
  228. ccxt/test/test_async.py +86 -36
  229. ccxt/test/test_sync.py +86 -36
  230. ccxt/timex.py +2 -2
  231. ccxt/tokocrypto.py +4 -4
  232. ccxt/upbit.py +2 -2
  233. ccxt/wavesexchange.py +4 -3
  234. ccxt/wazirx.py +1 -1
  235. ccxt/whitebit.py +6 -6
  236. ccxt/woo.py +6 -6
  237. ccxt/yobit.py +41 -2
  238. ccxt/zaif.py +2 -2
  239. ccxt/zonda.py +4 -4
  240. {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/METADATA +10 -10
  241. ccxt-4.2.34.dist-info/RECORD +438 -0
  242. ccxt-4.2.30.dist-info/RECORD +0 -438
  243. {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/WHEEL +0 -0
  244. {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/top_level.txt +0 -0
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.2.30'
25
+ __version__ = '4.2.34'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
ccxt/abstract/coinbase.py CHANGED
@@ -62,6 +62,13 @@ class ImplicitAPI:
62
62
  v3_private_get_brokerage_best_bid_ask = v3PrivateGetBrokerageBestBidAsk = Entry('brokerage/best_bid_ask', ['v3', 'private'], 'GET', {})
63
63
  v3_private_get_brokerage_convert_trade_trade_id = v3PrivateGetBrokerageConvertTradeTradeId = Entry('brokerage/convert/trade/{trade_id}', ['v3', 'private'], 'GET', {})
64
64
  v3_private_get_brokerage_time = v3PrivateGetBrokerageTime = Entry('brokerage/time', ['v3', 'private'], 'GET', {})
65
+ v3_private_get_brokerage_cfm_balance_summary = v3PrivateGetBrokerageCfmBalanceSummary = Entry('brokerage/cfm/balance_summary', ['v3', 'private'], 'GET', {})
66
+ v3_private_get_brokerage_cfm_positions = v3PrivateGetBrokerageCfmPositions = Entry('brokerage/cfm/positions', ['v3', 'private'], 'GET', {})
67
+ v3_private_get_brokerage_cfm_positions_product_id = v3PrivateGetBrokerageCfmPositionsProductId = Entry('brokerage/cfm/positions/{product_id}', ['v3', 'private'], 'GET', {})
68
+ v3_private_get_brokerage_cfm_sweeps = v3PrivateGetBrokerageCfmSweeps = Entry('brokerage/cfm/sweeps', ['v3', 'private'], 'GET', {})
69
+ v3_private_get_brokerage_intx_portfolio_portfolio_uuid = v3PrivateGetBrokerageIntxPortfolioPortfolioUuid = Entry('brokerage/intx/portfolio/{portfolio_uuid}', ['v3', 'private'], 'GET', {})
70
+ v3_private_get_brokerage_intx_positions_portfolio_uuid = v3PrivateGetBrokerageIntxPositionsPortfolioUuid = Entry('brokerage/intx/positions/{portfolio_uuid}', ['v3', 'private'], 'GET', {})
71
+ v3_private_get_brokerage_intx_positions_portfolio_uuid_symbol = v3PrivateGetBrokerageIntxPositionsPortfolioUuidSymbol = Entry('brokerage/intx/positions/{portfolio_uuid}/{symbol}', ['v3', 'private'], 'GET', {})
65
72
  v3_private_post_brokerage_orders = v3PrivatePostBrokerageOrders = Entry('brokerage/orders', ['v3', 'private'], 'POST', {})
66
73
  v3_private_post_brokerage_orders_batch_cancel = v3PrivatePostBrokerageOrdersBatchCancel = Entry('brokerage/orders/batch_cancel', ['v3', 'private'], 'POST', {})
67
74
  v3_private_post_brokerage_orders_edit = v3PrivatePostBrokerageOrdersEdit = Entry('brokerage/orders/edit', ['v3', 'private'], 'POST', {})
@@ -70,5 +77,8 @@ class ImplicitAPI:
70
77
  v3_private_post_brokerage_portfolios_move_funds = v3PrivatePostBrokeragePortfoliosMoveFunds = Entry('brokerage/portfolios/move_funds', ['v3', 'private'], 'POST', {})
71
78
  v3_private_post_brokerage_convert_quote = v3PrivatePostBrokerageConvertQuote = Entry('brokerage/convert/quote', ['v3', 'private'], 'POST', {})
72
79
  v3_private_post_brokerage_convert_trade_trade_id = v3PrivatePostBrokerageConvertTradeTradeId = Entry('brokerage/convert/trade/{trade_id}', ['v3', 'private'], 'POST', {})
80
+ v3_private_post_brokerage_cfm_sweeps_schedule = v3PrivatePostBrokerageCfmSweepsSchedule = Entry('brokerage/cfm/sweeps/schedule', ['v3', 'private'], 'POST', {})
81
+ v3_private_post_brokerage_intx_allocate = v3PrivatePostBrokerageIntxAllocate = Entry('brokerage/intx/allocate', ['v3', 'private'], 'POST', {})
73
82
  v3_private_put_brokerage_portfolios_portfolio_uuid = v3PrivatePutBrokeragePortfoliosPortfolioUuid = Entry('brokerage/portfolios/{portfolio_uuid}', ['v3', 'private'], 'PUT', {})
74
83
  v3_private_delete_brokerage_portfolios_portfolio_uuid = v3PrivateDeleteBrokeragePortfoliosPortfolioUuid = Entry('brokerage/portfolios/{portfolio_uuid}', ['v3', 'private'], 'DELETE', {})
84
+ v3_private_delete_brokerage_cfm_sweeps = v3PrivateDeleteBrokerageCfmSweeps = Entry('brokerage/cfm/sweeps', ['v3', 'private'], 'DELETE', {})
ccxt/abstract/okx.py CHANGED
@@ -155,9 +155,11 @@ class ImplicitAPI:
155
155
  private_get_tradingbot_grid_sub_orders = privateGetTradingBotGridSubOrders = Entry('tradingBot/grid/sub-orders', 'private', 'GET', {'cost': 1})
156
156
  private_get_tradingbot_grid_positions = privateGetTradingBotGridPositions = Entry('tradingBot/grid/positions', 'private', 'GET', {'cost': 1})
157
157
  private_get_tradingbot_grid_ai_param = privateGetTradingBotGridAiParam = Entry('tradingBot/grid/ai-param', 'private', 'GET', {'cost': 1})
158
- private_get_tradingbot_public_rsi_back_testing = privateGetTradingBotPublicRsiBackTesting = Entry('tradingBot/public/rsi-back-testing', 'private', 'GET', {'cost': 1})
158
+ private_get_tradingbot_signal_signals = privateGetTradingBotSignalSignals = Entry('tradingBot/signal/signals', 'private', 'GET', {'cost': 1})
159
159
  private_get_tradingbot_signal_orders_algo_details = privateGetTradingBotSignalOrdersAlgoDetails = Entry('tradingBot/signal/orders-algo-details', 'private', 'GET', {'cost': 1})
160
+ private_get_tradingbot_signal_orders_algo_history = privateGetTradingBotSignalOrdersAlgoHistory = Entry('tradingBot/signal/orders-algo-history', 'private', 'GET', {'cost': 1})
160
161
  private_get_tradingbot_signal_positions = privateGetTradingBotSignalPositions = Entry('tradingBot/signal/positions', 'private', 'GET', {'cost': 1})
162
+ private_get_tradingbot_signal_positions_history = privateGetTradingBotSignalPositionsHistory = Entry('tradingBot/signal/positions-history', 'private', 'GET', {'cost': 1})
161
163
  private_get_tradingbot_signal_sub_orders = privateGetTradingBotSignalSubOrders = Entry('tradingBot/signal/sub-orders', 'private', 'GET', {'cost': 1})
162
164
  private_get_tradingbot_signal_event_history = privateGetTradingBotSignalEventHistory = Entry('tradingBot/signal/event-history', 'private', 'GET', {'cost': 1})
163
165
  private_get_tradingbot_recurring_orders_algo_pending = privateGetTradingBotRecurringOrdersAlgoPending = Entry('tradingBot/recurring/orders-algo-pending', 'private', 'GET', {'cost': 1})
@@ -263,6 +265,15 @@ class ImplicitAPI:
263
265
  private_post_tradingbot_grid_compute_margin_balance = privatePostTradingBotGridComputeMarginBalance = Entry('tradingBot/grid/compute-margin-balance', 'private', 'POST', {'cost': 1})
264
266
  private_post_tradingbot_grid_margin_balance = privatePostTradingBotGridMarginBalance = Entry('tradingBot/grid/margin-balance', 'private', 'POST', {'cost': 1})
265
267
  private_post_tradingbot_grid_min_investment = privatePostTradingBotGridMinInvestment = Entry('tradingBot/grid/min-investment', 'private', 'POST', {'cost': 1})
268
+ private_post_tradingbot_signal_create_signal = privatePostTradingBotSignalCreateSignal = Entry('tradingBot/signal/create-signal', 'private', 'POST', {'cost': 1})
269
+ private_post_tradingbot_signal_order_algo = privatePostTradingBotSignalOrderAlgo = Entry('tradingBot/signal/order-algo', 'private', 'POST', {'cost': 1})
270
+ private_post_tradingbot_signal_stop_order_algo = privatePostTradingBotSignalStopOrderAlgo = Entry('tradingBot/signal/stop-order-algo', 'private', 'POST', {'cost': 1})
271
+ private_post_tradingbot_signal_margin_balance = privatePostTradingBotSignalMarginBalance = Entry('tradingBot/signal/margin-balance', 'private', 'POST', {'cost': 1})
272
+ private_post_tradingbot_signal_amendtpsl = privatePostTradingBotSignalAmendTPSL = Entry('tradingBot/signal/amendTPSL', 'private', 'POST', {'cost': 1})
273
+ private_post_tradingbot_signal_set_instruments = privatePostTradingBotSignalSetInstruments = Entry('tradingBot/signal/set-instruments', 'private', 'POST', {'cost': 1})
274
+ private_post_tradingbot_signal_close_position = privatePostTradingBotSignalClosePosition = Entry('tradingBot/signal/close-position', 'private', 'POST', {'cost': 1})
275
+ private_post_tradingbot_signal_sub_order = privatePostTradingBotSignalSubOrder = Entry('tradingBot/signal/sub-order', 'private', 'POST', {'cost': 1})
276
+ private_post_tradingbot_signal_cancel_sub_order = privatePostTradingBotSignalCancelSubOrder = Entry('tradingBot/signal/cancel-sub-order', 'private', 'POST', {'cost': 1})
266
277
  private_post_tradingbot_recurring_order_algo = privatePostTradingBotRecurringOrderAlgo = Entry('tradingBot/recurring/order-algo', 'private', 'POST', {'cost': 1})
267
278
  private_post_tradingbot_recurring_amend_order_algo = privatePostTradingBotRecurringAmendOrderAlgo = Entry('tradingBot/recurring/amend-order-algo', 'private', 'POST', {'cost': 1})
268
279
  private_post_tradingbot_recurring_stop_order_algo = privatePostTradingBotRecurringStopOrderAlgo = Entry('tradingBot/recurring/stop-order-algo', 'private', 'POST', {'cost': 1})
ccxt/ace.py CHANGED
@@ -568,7 +568,7 @@ class ace(Exchange, ImplicitAPI):
568
568
  'info': order,
569
569
  }, market)
570
570
 
571
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
571
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
572
572
  """
573
573
  create a trade order
574
574
  :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---new-order
@@ -1001,6 +1001,7 @@ class ace(Exchange, ImplicitAPI):
1001
1001
  feedback = self.id + ' ' + body
1002
1002
  status = self.safe_number(response, 'status', 200)
1003
1003
  if status > 200:
1004
- self.throw_exactly_matched_exception(self.exceptions['exact'], status, feedback)
1005
- self.throw_broadly_matched_exception(self.exceptions['broad'], status, feedback)
1004
+ statusStr = str(status)
1005
+ self.throw_exactly_matched_exception(self.exceptions['exact'], statusStr, feedback)
1006
+ self.throw_broadly_matched_exception(self.exceptions['broad'], statusStr, feedback)
1006
1007
  return None
ccxt/alpaca.py CHANGED
@@ -659,7 +659,7 @@ class alpaca(Exchange, ImplicitAPI):
659
659
  self.safe_number(ohlcv, 'v'), # volume
660
660
  ]
661
661
 
662
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
662
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
663
663
  """
664
664
  create a trade order
665
665
  :see: https://docs.alpaca.markets/reference/postorder
ccxt/ascendex.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.ascendex import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Num, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Num, 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
@@ -1426,7 +1426,7 @@ class ascendex(Exchange, ImplicitAPI):
1426
1426
  }
1427
1427
  return result
1428
1428
 
1429
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1429
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1430
1430
  """
1431
1431
  * @ignore
1432
1432
  helper function to build request
@@ -1498,7 +1498,7 @@ class ascendex(Exchange, ImplicitAPI):
1498
1498
  params = self.omit(params, ['reduceOnly', 'triggerPrice'])
1499
1499
  return self.extend(request, params)
1500
1500
 
1501
- def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1501
+ def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1502
1502
  """
1503
1503
  create a trade order on the exchange
1504
1504
  :see: https://ascendex.github.io/ascendex-pro-api/#place-order
@@ -2754,7 +2754,7 @@ class ascendex(Exchange, ImplicitAPI):
2754
2754
  """
2755
2755
  return self.modify_margin_helper(symbol, amount, 'add', params)
2756
2756
 
2757
- def set_leverage(self, leverage, symbol: Str = None, params={}):
2757
+ def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2758
2758
  """
2759
2759
  set the level of leverage for a market
2760
2760
  :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#change-contract-leverage
@@ -2959,10 +2959,10 @@ class ascendex(Exchange, ImplicitAPI):
2959
2959
  data = self.safe_value(response, 'data')
2960
2960
  return self.parse_deposit_withdraw_fees(data, codes, 'assetCode')
2961
2961
 
2962
- def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
2962
+ def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
2963
2963
  """
2964
2964
  transfer currency internally between wallets on the same account
2965
- :param str code: unified currency code
2965
+ :param str code: unified currency codeåå
2966
2966
  :param float amount: amount to transfer
2967
2967
  :param str fromAccount: account to transfer from
2968
2968
  :param str toAccount: account to transfer to
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.2.30'
7
+ __version__ = '4.2.34'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/async_support/ace.py CHANGED
@@ -568,7 +568,7 @@ class ace(Exchange, ImplicitAPI):
568
568
  'info': order,
569
569
  }, market)
570
570
 
571
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
571
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
572
572
  """
573
573
  create a trade order
574
574
  :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---new-order
@@ -1001,6 +1001,7 @@ class ace(Exchange, ImplicitAPI):
1001
1001
  feedback = self.id + ' ' + body
1002
1002
  status = self.safe_number(response, 'status', 200)
1003
1003
  if status > 200:
1004
- self.throw_exactly_matched_exception(self.exceptions['exact'], status, feedback)
1005
- self.throw_broadly_matched_exception(self.exceptions['broad'], status, feedback)
1004
+ statusStr = str(status)
1005
+ self.throw_exactly_matched_exception(self.exceptions['exact'], statusStr, feedback)
1006
+ self.throw_broadly_matched_exception(self.exceptions['broad'], statusStr, feedback)
1006
1007
  return None
@@ -659,7 +659,7 @@ class alpaca(Exchange, ImplicitAPI):
659
659
  self.safe_number(ohlcv, 'v'), # volume
660
660
  ]
661
661
 
662
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
662
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
663
663
  """
664
664
  create a trade order
665
665
  :see: https://docs.alpaca.markets/reference/postorder
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.ascendex import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Num, Str, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Num, 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
@@ -1426,7 +1426,7 @@ class ascendex(Exchange, ImplicitAPI):
1426
1426
  }
1427
1427
  return result
1428
1428
 
1429
- def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1429
+ def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1430
1430
  """
1431
1431
  * @ignore
1432
1432
  helper function to build request
@@ -1498,7 +1498,7 @@ class ascendex(Exchange, ImplicitAPI):
1498
1498
  params = self.omit(params, ['reduceOnly', 'triggerPrice'])
1499
1499
  return self.extend(request, params)
1500
1500
 
1501
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
1501
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1502
1502
  """
1503
1503
  create a trade order on the exchange
1504
1504
  :see: https://ascendex.github.io/ascendex-pro-api/#place-order
@@ -2754,7 +2754,7 @@ class ascendex(Exchange, ImplicitAPI):
2754
2754
  """
2755
2755
  return await self.modify_margin_helper(symbol, amount, 'add', params)
2756
2756
 
2757
- async def set_leverage(self, leverage, symbol: Str = None, params={}):
2757
+ async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
2758
2758
  """
2759
2759
  set the level of leverage for a market
2760
2760
  :see: https://ascendex.github.io/ascendex-futures-pro-api-v2/#change-contract-leverage
@@ -2959,10 +2959,10 @@ class ascendex(Exchange, ImplicitAPI):
2959
2959
  data = self.safe_value(response, 'data')
2960
2960
  return self.parse_deposit_withdraw_fees(data, codes, 'assetCode')
2961
2961
 
2962
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
2962
+ async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
2963
2963
  """
2964
2964
  transfer currency internally between wallets on the same account
2965
- :param str code: unified currency code
2965
+ :param str code: unified currency codeåå
2966
2966
  :param float amount: amount to transfer
2967
2967
  :param str fromAccount: account to transfer from
2968
2968
  :param str toAccount: account to transfer to
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.2.30'
5
+ __version__ = '4.2.34'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -639,18 +639,30 @@ class Exchange(BaseExchange):
639
639
  async def fetch_funding_rates(self, symbols: List[str] = None, params={}):
640
640
  raise NotSupported(self.id + ' fetchFundingRates() is not supported yet')
641
641
 
642
- async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
642
+ async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}):
643
643
  raise NotSupported(self.id + ' transfer() is not supported yet')
644
644
 
645
- async def withdraw(self, code: str, amount, address, tag=None, params={}):
645
+ async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
646
646
  raise NotSupported(self.id + ' withdraw() is not supported yet')
647
647
 
648
648
  async def create_deposit_address(self, code: str, params={}):
649
649
  raise NotSupported(self.id + ' createDepositAddress() is not supported yet')
650
650
 
651
- async def set_leverage(self, leverage, symbol: str = None, params={}):
651
+ async def set_leverage(self, leverage: Int, symbol: str = None, params={}):
652
652
  raise NotSupported(self.id + ' setLeverage() is not supported yet')
653
653
 
654
+ async def fetch_open_interest_history(self, symbol: str, timeframe='1h', since: Int = None, limit: Int = None, params={}):
655
+ raise NotSupported(self.id + ' fetchOpenInterestHistory() is not supported yet')
656
+
657
+ async def fetch_open_interest(self, symbol: str, params={}):
658
+ raise NotSupported(self.id + ' fetchOpenInterest() is not supported yet')
659
+
660
+ async def sign_in(self, params={}):
661
+ raise NotSupported(self.id + ' signIn() is not supported yet')
662
+
663
+ async def fetch_payment_methods(self, params={}):
664
+ raise NotSupported(self.id + ' fetchPaymentMethods() is not supported yet')
665
+
654
666
  async def fetch_borrow_rate(self, code: str, amount, params={}):
655
667
  raise NotSupported(self.id + ' fetchBorrowRate is deprecated, please use fetchCrossBorrowRate or fetchIsolatedBorrowRate instead')
656
668
 
@@ -660,10 +672,10 @@ class Exchange(BaseExchange):
660
672
  async def repay_isolated_margin(self, symbol: str, code: str, amount, params={}):
661
673
  raise NotSupported(self.id + ' repayIsolatedMargin is not support yet')
662
674
 
663
- async def borrow_cross_margin(self, code: str, amount, params={}):
675
+ async def borrow_cross_margin(self, code: str, amount: float, params={}):
664
676
  raise NotSupported(self.id + ' borrowCrossMargin is not support yet')
665
677
 
666
- async def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
678
+ async def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
667
679
  raise NotSupported(self.id + ' borrowIsolatedMargin is not support yet')
668
680
 
669
681
  async def borrow_margin(self, code: str, amount, symbol: Str = None, params={}):
@@ -770,16 +782,16 @@ class Exchange(BaseExchange):
770
782
  self.accountsById = self.index_by(self.accounts, 'id')
771
783
  return self.accounts
772
784
 
773
- async def edit_limit_buy_order(self, id, symbol, amount, price=None, params={}):
785
+ async def edit_limit_buy_order(self, id, symbol, amount: float, price: float = None, params={}):
774
786
  return await self.edit_limit_order(id, symbol, 'buy', amount, price, params)
775
787
 
776
- async def edit_limit_sell_order(self, id, symbol, amount, price=None, params={}):
788
+ async def edit_limit_sell_order(self, id, symbol, amount: float, price: float = None, params={}):
777
789
  return await self.edit_limit_order(id, symbol, 'sell', amount, price, params)
778
790
 
779
- async def edit_limit_order(self, id, symbol, side, amount, price=None, params={}):
791
+ async def edit_limit_order(self, id, symbol, side, amount: float, price: float = None, params={}):
780
792
  return await self.edit_order(id, symbol, 'limit', side, amount, price, params)
781
793
 
782
- async def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
794
+ async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float = None, price: float = None, params={}):
783
795
  await self.cancelOrder(id, symbol)
784
796
  return await self.create_order(symbol, type, side, amount, price, params)
785
797
 
@@ -820,6 +832,15 @@ class Exchange(BaseExchange):
820
832
  async def fetch_bids_asks(self, symbols: List[str] = None, params={}):
821
833
  raise NotSupported(self.id + ' fetchBidsAsks() is not supported yet')
822
834
 
835
+ async def fetch_borrow_interest(self, code: str = None, symbol: str = None, since: Int = None, limit: Int = None, params={}):
836
+ raise NotSupported(self.id + ' fetchBorrowInterest() is not supported yet')
837
+
838
+ async def fetch_ledger(self, code: str = None, since: Int = None, limit: Int = None, params={}):
839
+ raise NotSupported(self.id + ' fetchLedger() is not supported yet')
840
+
841
+ async def fetch_ledger_entry(self, id: str, code: str = None, params={}):
842
+ raise NotSupported(self.id + ' fetchLedgerEntry() is not supported yet')
843
+
823
844
  async def fetch_balance(self, params={}):
824
845
  raise NotSupported(self.id + ' fetchBalance() is not supported yet')
825
846
 
@@ -935,7 +956,7 @@ class Exchange(BaseExchange):
935
956
  async def fetch_unified_order(self, order, params={}):
936
957
  return await self.fetch_order(self.safe_value(order, 'id'), self.safe_value(order, 'symbol'), params)
937
958
 
938
- async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
959
+ async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
939
960
  raise NotSupported(self.id + ' createOrder() is not supported yet')
940
961
 
941
962
  async def create_trailing_amount_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, trailingAmount=None, trailingTriggerPrice=None, params={}):
@@ -982,7 +1003,7 @@ class Exchange(BaseExchange):
982
1003
  return await self.create_order(symbol, type, side, amount, price, params)
983
1004
  raise NotSupported(self.id + ' createTrailingPercentOrder() is not supported yet')
984
1005
 
985
- async def create_market_order_with_cost(self, symbol: str, side: OrderSide, cost, params={}):
1006
+ async def create_market_order_with_cost(self, symbol: str, side: OrderSide, cost: float, params={}):
986
1007
  """
987
1008
  create a market order by providing the symbol, side and cost
988
1009
  :param str symbol: unified symbol of the market to create an order in
@@ -995,7 +1016,7 @@ class Exchange(BaseExchange):
995
1016
  return await self.create_order(symbol, 'market', side, cost, 1, params)
996
1017
  raise NotSupported(self.id + ' createMarketOrderWithCost() is not supported yet')
997
1018
 
998
- async def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
1019
+ async def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
999
1020
  """
1000
1021
  create a market buy order by providing the symbol and cost
1001
1022
  :param str symbol: unified symbol of the market to create an order in
@@ -1007,7 +1028,7 @@ class Exchange(BaseExchange):
1007
1028
  return await self.create_order(symbol, 'market', 'buy', cost, 1, params)
1008
1029
  raise NotSupported(self.id + ' createMarketBuyOrderWithCost() is not supported yet')
1009
1030
 
1010
- async def create_market_sell_order_with_cost(self, symbol: str, cost, params={}):
1031
+ async def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
1011
1032
  """
1012
1033
  create a market sell order by providing the symbol and cost
1013
1034
  :param str symbol: unified symbol of the market to create an order in
@@ -1038,7 +1059,7 @@ class Exchange(BaseExchange):
1038
1059
  return await self.create_order(symbol, type, side, amount, price, params)
1039
1060
  raise NotSupported(self.id + ' createTriggerOrder() is not supported yet')
1040
1061
 
1041
- async def create_stop_loss_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, stopLossPrice=None, params={}):
1062
+ async def create_stop_loss_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, stopLossPrice: float = None, params={}):
1042
1063
  """
1043
1064
  create a trigger stop loss order(type 2)
1044
1065
  :param str symbol: unified symbol of the market to create an order in
@@ -1057,7 +1078,7 @@ class Exchange(BaseExchange):
1057
1078
  return await self.create_order(symbol, type, side, amount, price, params)
1058
1079
  raise NotSupported(self.id + ' createStopLossOrder() is not supported yet')
1059
1080
 
1060
- async def create_take_profit_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, takeProfitPrice=None, params={}):
1081
+ async def create_take_profit_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, takeProfitPrice: float = None, params={}):
1061
1082
  """
1062
1083
  create a trigger take profit order(type 2)
1063
1084
  :param str symbol: unified symbol of the market to create an order in
@@ -1076,7 +1097,7 @@ class Exchange(BaseExchange):
1076
1097
  return await self.create_order(symbol, type, side, amount, price, params)
1077
1098
  raise NotSupported(self.id + ' createTakeProfitOrder() is not supported yet')
1078
1099
 
1079
- async def create_order_with_take_profit_and_stop_loss(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, takeProfit=None, stopLoss=None, params={}):
1100
+ async def create_order_with_take_profit_and_stop_loss(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, takeProfit: float = None, stopLoss: float = None, params={}):
1080
1101
  """
1081
1102
  create an order with a stop loss or take profit attached(type 3)
1082
1103
  :param str symbol: unified symbol of the market to create an order in
@@ -1230,21 +1251,18 @@ class Exchange(BaseExchange):
1230
1251
  """
1231
1252
  raise NotSupported(self.id + ' fetchDepositsWithdrawals() is not supported yet')
1232
1253
 
1233
- async def fetch_deposits(self, code: str = None, since: Int = None, limit: Int = None, params={}):
1254
+ async def fetch_deposits(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
1234
1255
  raise NotSupported(self.id + ' fetchDeposits() is not supported yet')
1235
1256
 
1257
+ async def fetch_withdrawals(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
1258
+ raise NotSupported(self.id + ' fetchWithdrawals() is not supported yet')
1259
+
1236
1260
  async def fetch_deposits_ws(self, code: str = None, since: Int = None, limit: Int = None, params={}):
1237
1261
  raise NotSupported(self.id + ' fetchDepositsWs() is not supported yet')
1238
1262
 
1239
- async def fetch_withdrawals(self, code: str = None, since: Int = None, limit: Int = None, params={}):
1240
- raise NotSupported(self.id + ' fetchWithdrawals() is not supported yet')
1241
-
1242
1263
  async def fetch_withdrawals_ws(self, code: str = None, since: Int = None, limit: Int = None, params={}):
1243
1264
  raise NotSupported(self.id + ' fetchWithdrawalsWs() is not supported yet')
1244
1265
 
1245
- async def fetch_open_interest(self, symbol: str, params={}):
1246
- raise NotSupported(self.id + ' fetchOpenInterest() is not supported yet')
1247
-
1248
1266
  async def fetch_funding_rate_history(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
1249
1267
  raise NotSupported(self.id + ' fetchFundingRateHistory() is not supported yet')
1250
1268
 
@@ -1271,22 +1289,22 @@ class Exchange(BaseExchange):
1271
1289
  else:
1272
1290
  raise NotSupported(self.id + ' fetchDepositAddress() is not supported yet')
1273
1291
 
1274
- async def create_limit_order(self, symbol: str, side: OrderSide, amount, price, params={}):
1292
+ async def create_limit_order(self, symbol: str, side: OrderSide, amount: float, price: float, params={}):
1275
1293
  return await self.create_order(symbol, 'limit', side, amount, price, params)
1276
1294
 
1277
- async def create_market_order(self, symbol: str, side: OrderSide, amount, price=None, params={}):
1295
+ async def create_market_order(self, symbol: str, side: OrderSide, amount: float, price: float = None, params={}):
1278
1296
  return await self.create_order(symbol, 'market', side, amount, price, params)
1279
1297
 
1280
- async def create_limit_buy_order(self, symbol: str, amount, price, params={}):
1298
+ async def create_limit_buy_order(self, symbol: str, amount: float, price: float, params={}):
1281
1299
  return await self.create_order(symbol, 'limit', 'buy', amount, price, params)
1282
1300
 
1283
- async def create_limit_sell_order(self, symbol: str, amount, price, params={}):
1301
+ async def create_limit_sell_order(self, symbol: str, amount: float, price: float, params={}):
1284
1302
  return await self.create_order(symbol, 'limit', 'sell', amount, price, params)
1285
1303
 
1286
- async def create_market_buy_order(self, symbol: str, amount, params={}):
1304
+ async def create_market_buy_order(self, symbol: str, amount: float, params={}):
1287
1305
  return await self.create_order(symbol, 'market', 'buy', amount, None, params)
1288
1306
 
1289
- async def create_market_sell_order(self, symbol: str, amount, params={}):
1307
+ async def create_market_sell_order(self, symbol: str, amount: float, params={}):
1290
1308
  return await self.create_order(symbol, 'market', 'sell', amount, None, params)
1291
1309
 
1292
1310
  async def load_time_difference(self, params={}):
@@ -1305,19 +1323,19 @@ class Exchange(BaseExchange):
1305
1323
  else:
1306
1324
  raise NotSupported(self.id + ' fetchMarketLeverageTiers() is not supported yet')
1307
1325
 
1308
- async def create_post_only_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price, params={}):
1326
+ async def create_post_only_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1309
1327
  if not self.has['createPostOnlyOrder']:
1310
1328
  raise NotSupported(self.id + 'createPostOnlyOrder() is not supported yet')
1311
1329
  query = self.extend(params, {'postOnly': True})
1312
1330
  return await self.create_order(symbol, type, side, amount, price, query)
1313
1331
 
1314
- async def create_reduce_only_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price, params={}):
1332
+ async def create_reduce_only_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
1315
1333
  if not self.has['createReduceOnlyOrder']:
1316
1334
  raise NotSupported(self.id + 'createReduceOnlyOrder() is not supported yet')
1317
1335
  query = self.extend(params, {'reduceOnly': True})
1318
1336
  return await self.create_order(symbol, type, side, amount, price, query)
1319
1337
 
1320
- async def create_stop_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, stopPrice=None, params={}):
1338
+ async def create_stop_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, stopPrice: float = None, params={}):
1321
1339
  if not self.has['createStopOrder']:
1322
1340
  raise NotSupported(self.id + ' createStopOrder() is not supported yet')
1323
1341
  if stopPrice is None:
@@ -1325,13 +1343,13 @@ class Exchange(BaseExchange):
1325
1343
  query = self.extend(params, {'stopPrice': stopPrice})
1326
1344
  return await self.create_order(symbol, type, side, amount, price, query)
1327
1345
 
1328
- async def create_stop_limit_order(self, symbol: str, side: OrderSide, amount, price, stopPrice, params={}):
1346
+ async def create_stop_limit_order(self, symbol: str, side: OrderSide, amount: float, price: float, stopPrice: float, params={}):
1329
1347
  if not self.has['createStopLimitOrder']:
1330
1348
  raise NotSupported(self.id + ' createStopLimitOrder() is not supported yet')
1331
1349
  query = self.extend(params, {'stopPrice': stopPrice})
1332
1350
  return await self.create_order(symbol, 'limit', side, amount, price, query)
1333
1351
 
1334
- async def create_stop_market_order(self, symbol: str, side: OrderSide, amount, stopPrice, params={}):
1352
+ async def create_stop_market_order(self, symbol: str, side: OrderSide, amount: float, stopPrice: float, params={}):
1335
1353
  if not self.has['createStopMarketOrder']:
1336
1354
  raise NotSupported(self.id + ' createStopMarketOrder() is not supported yet')
1337
1355
  query = self.extend(params, {'stopPrice': stopPrice})
@@ -1464,7 +1482,8 @@ class Exchange(BaseExchange):
1464
1482
  response = await getattr(self, method)(symbol, None, maxEntriesPerRequest, params)
1465
1483
  responseLength = len(response)
1466
1484
  if self.verbose:
1467
- self.log('Dynamic pagination call', calls, 'method', method, 'response length', responseLength, 'timestamp', paginationTimestamp)
1485
+ backwardMessage = 'Dynamic pagination call ' + calls + ' method ' + method + ' response length ' + responseLength + ' timestamp ' + paginationTimestamp
1486
+ self.log(backwardMessage)
1468
1487
  if responseLength == 0:
1469
1488
  break
1470
1489
  errors = 0
@@ -1478,7 +1497,8 @@ class Exchange(BaseExchange):
1478
1497
  response = await getattr(self, method)(symbol, paginationTimestamp, maxEntriesPerRequest, params)
1479
1498
  responseLength = len(response)
1480
1499
  if self.verbose:
1481
- self.log('Dynamic pagination call', calls, 'method', method, 'response length', responseLength, 'timestamp', paginationTimestamp)
1500
+ forwardMessage = 'Dynamic pagination call ' + calls + ' method ' + method + ' response length ' + responseLength + ' timestamp ' + paginationTimestamp
1501
+ self.log(forwardMessage)
1482
1502
  if responseLength == 0:
1483
1503
  break
1484
1504
  errors = 0
@@ -1510,6 +1530,7 @@ class Exchange(BaseExchange):
1510
1530
  errors += 1
1511
1531
  if errors > maxRetries:
1512
1532
  raise e
1533
+ return None
1513
1534
 
1514
1535
  async def fetch_paginated_call_deterministic(self, method: str, symbol: str = None, since: Int = None, limit: Int = None, timeframe: str = None, params={}, maxEntriesPerRequest=None):
1515
1536
  maxCalls = None
@@ -1564,7 +1585,8 @@ class Exchange(BaseExchange):
1564
1585
  errors = 0
1565
1586
  responseLength = len(response)
1566
1587
  if self.verbose:
1567
- self.log('Cursor pagination call', i + 1, 'method', method, 'response length', responseLength, 'cursor', cursorValue)
1588
+ cursorMessage = 'Cursor pagination call ' + i + 1 + ' method ' + method + ' response length ' + responseLength + ' cursor ' + cursorValue
1589
+ self.log(cursorMessage)
1568
1590
  if responseLength == 0:
1569
1591
  break
1570
1592
  result = self.array_concat(result, response)
@@ -1600,7 +1622,8 @@ class Exchange(BaseExchange):
1600
1622
  errors = 0
1601
1623
  responseLength = len(response)
1602
1624
  if self.verbose:
1603
- self.log('Incremental pagination call', i + 1, 'method', method, 'response length', responseLength)
1625
+ incrementalMessage = 'Incremental pagination call ' + i + 1 + ' method ' + method + ' response length ' + responseLength
1626
+ self.log(incrementalMessage)
1604
1627
  if responseLength == 0:
1605
1628
  break
1606
1629
  result = self.array_concat(result, response)