ccxt 4.4.28__py2.py3-none-any.whl → 4.4.30__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.
Files changed (162) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/alpaca.py +1 -0
  3. ccxt/abstract/binance.py +9 -0
  4. ccxt/abstract/binancecoinm.py +9 -0
  5. ccxt/abstract/binanceus.py +9 -0
  6. ccxt/abstract/binanceusdm.py +9 -0
  7. ccxt/abstract/bybit.py +0 -13
  8. ccxt/alpaca.py +53 -8
  9. ccxt/async_support/__init__.py +1 -1
  10. ccxt/async_support/alpaca.py +53 -8
  11. ccxt/async_support/base/exchange.py +4 -1
  12. ccxt/async_support/bigone.py +1 -1
  13. ccxt/async_support/binance.py +10 -1
  14. ccxt/async_support/bingx.py +1 -1
  15. ccxt/async_support/bitbank.py +1 -1
  16. ccxt/async_support/bitbns.py +12 -12
  17. ccxt/async_support/bitfinex.py +10 -10
  18. ccxt/async_support/bitfinex2.py +1 -1
  19. ccxt/async_support/bitflyer.py +1 -1
  20. ccxt/async_support/bitget.py +96 -8
  21. ccxt/async_support/bithumb.py +1 -1
  22. ccxt/async_support/bitmart.py +54 -54
  23. ccxt/async_support/bitmex.py +1 -1
  24. ccxt/async_support/bitopro.py +22 -22
  25. ccxt/async_support/bitrue.py +29 -29
  26. ccxt/async_support/bitso.py +1 -1
  27. ccxt/async_support/bitstamp.py +1 -1
  28. ccxt/async_support/bitvavo.py +4 -1
  29. ccxt/async_support/blockchaincom.py +1 -1
  30. ccxt/async_support/btcmarkets.py +1 -1
  31. ccxt/async_support/bybit.py +50 -585
  32. ccxt/async_support/coinbase.py +1 -1
  33. ccxt/async_support/coinbaseexchange.py +1 -1
  34. ccxt/async_support/coinbaseinternational.py +1 -1
  35. ccxt/async_support/coincatch.py +25 -5
  36. ccxt/async_support/coinex.py +1 -1
  37. ccxt/async_support/coinlist.py +1 -1
  38. ccxt/async_support/coinmate.py +1 -1
  39. ccxt/async_support/coinsph.py +1 -1
  40. ccxt/async_support/cryptocom.py +1 -1
  41. ccxt/async_support/deribit.py +8 -4
  42. ccxt/async_support/digifinex.py +1 -1
  43. ccxt/async_support/exmo.py +1 -1
  44. ccxt/async_support/gate.py +1 -1
  45. ccxt/async_support/gemini.py +1 -1
  46. ccxt/async_support/hashkey.py +1 -1
  47. ccxt/async_support/hitbtc.py +1 -1
  48. ccxt/async_support/hollaex.py +1 -1
  49. ccxt/async_support/htx.py +1 -1
  50. ccxt/async_support/huobijp.py +1 -1
  51. ccxt/async_support/hyperliquid.py +110 -5
  52. ccxt/async_support/idex.py +1 -1
  53. ccxt/async_support/independentreserve.py +1 -1
  54. ccxt/async_support/indodax.py +1 -1
  55. ccxt/async_support/kraken.py +1 -1
  56. ccxt/async_support/kucoin.py +1 -1
  57. ccxt/async_support/kuna.py +1 -1
  58. ccxt/async_support/lbank.py +6 -1
  59. ccxt/async_support/lykke.py +1 -1
  60. ccxt/async_support/mercado.py +1 -1
  61. ccxt/async_support/mexc.py +1 -1
  62. ccxt/async_support/ndax.py +1 -1
  63. ccxt/async_support/novadax.py +1 -1
  64. ccxt/async_support/okcoin.py +1 -1
  65. ccxt/async_support/okx.py +1 -1
  66. ccxt/async_support/onetrading.py +1 -1
  67. ccxt/async_support/oxfun.py +1 -1
  68. ccxt/async_support/phemex.py +1 -1
  69. ccxt/async_support/poloniex.py +1 -1
  70. ccxt/async_support/probit.py +1 -1
  71. ccxt/async_support/tokocrypto.py +1 -1
  72. ccxt/async_support/upbit.py +1 -1
  73. ccxt/async_support/vertex.py +52 -8
  74. ccxt/async_support/wavesexchange.py +1 -1
  75. ccxt/async_support/whitebit.py +1 -1
  76. ccxt/async_support/woo.py +1 -1
  77. ccxt/async_support/woofipro.py +1 -1
  78. ccxt/async_support/xt.py +1 -1
  79. ccxt/async_support/yobit.py +2 -2
  80. ccxt/async_support/zaif.py +1 -1
  81. ccxt/async_support/zonda.py +1 -1
  82. ccxt/base/exchange.py +4 -1
  83. ccxt/bigone.py +1 -1
  84. ccxt/binance.py +10 -1
  85. ccxt/bingx.py +1 -1
  86. ccxt/bitbank.py +1 -1
  87. ccxt/bitbns.py +12 -12
  88. ccxt/bitfinex.py +10 -10
  89. ccxt/bitfinex2.py +1 -1
  90. ccxt/bitflyer.py +1 -1
  91. ccxt/bitget.py +96 -8
  92. ccxt/bithumb.py +1 -1
  93. ccxt/bitmart.py +54 -54
  94. ccxt/bitmex.py +1 -1
  95. ccxt/bitopro.py +22 -22
  96. ccxt/bitrue.py +29 -29
  97. ccxt/bitso.py +1 -1
  98. ccxt/bitstamp.py +1 -1
  99. ccxt/bitvavo.py +4 -1
  100. ccxt/blockchaincom.py +1 -1
  101. ccxt/btcmarkets.py +1 -1
  102. ccxt/bybit.py +50 -585
  103. ccxt/coinbase.py +1 -1
  104. ccxt/coinbaseexchange.py +1 -1
  105. ccxt/coinbaseinternational.py +1 -1
  106. ccxt/coincatch.py +25 -5
  107. ccxt/coinex.py +1 -1
  108. ccxt/coinlist.py +1 -1
  109. ccxt/coinmate.py +1 -1
  110. ccxt/coinsph.py +1 -1
  111. ccxt/cryptocom.py +1 -1
  112. ccxt/deribit.py +8 -4
  113. ccxt/digifinex.py +1 -1
  114. ccxt/exmo.py +1 -1
  115. ccxt/gate.py +1 -1
  116. ccxt/gemini.py +1 -1
  117. ccxt/hashkey.py +1 -1
  118. ccxt/hitbtc.py +1 -1
  119. ccxt/hollaex.py +1 -1
  120. ccxt/htx.py +1 -1
  121. ccxt/huobijp.py +1 -1
  122. ccxt/hyperliquid.py +110 -5
  123. ccxt/idex.py +1 -1
  124. ccxt/independentreserve.py +1 -1
  125. ccxt/indodax.py +1 -1
  126. ccxt/kraken.py +1 -1
  127. ccxt/kucoin.py +1 -1
  128. ccxt/kuna.py +1 -1
  129. ccxt/lbank.py +6 -1
  130. ccxt/lykke.py +1 -1
  131. ccxt/mercado.py +1 -1
  132. ccxt/mexc.py +1 -1
  133. ccxt/ndax.py +1 -1
  134. ccxt/novadax.py +1 -1
  135. ccxt/okcoin.py +1 -1
  136. ccxt/okx.py +1 -1
  137. ccxt/onetrading.py +1 -1
  138. ccxt/oxfun.py +1 -1
  139. ccxt/phemex.py +1 -1
  140. ccxt/poloniex.py +1 -1
  141. ccxt/pro/__init__.py +1 -1
  142. ccxt/pro/bitvavo.py +2 -1
  143. ccxt/pro/blofin.py +2 -1
  144. ccxt/pro/mexc.py +187 -30
  145. ccxt/probit.py +1 -1
  146. ccxt/test/tests_helpers.py +2 -2
  147. ccxt/tokocrypto.py +1 -1
  148. ccxt/upbit.py +1 -1
  149. ccxt/vertex.py +52 -8
  150. ccxt/wavesexchange.py +1 -1
  151. ccxt/whitebit.py +1 -1
  152. ccxt/woo.py +1 -1
  153. ccxt/woofipro.py +1 -1
  154. ccxt/xt.py +1 -1
  155. ccxt/yobit.py +2 -2
  156. ccxt/zaif.py +1 -1
  157. ccxt/zonda.py +1 -1
  158. {ccxt-4.4.28.dist-info → ccxt-4.4.30.dist-info}/METADATA +4 -4
  159. {ccxt-4.4.28.dist-info → ccxt-4.4.30.dist-info}/RECORD +162 -162
  160. {ccxt-4.4.28.dist-info → ccxt-4.4.30.dist-info}/LICENSE.txt +0 -0
  161. {ccxt-4.4.28.dist-info → ccxt-4.4.30.dist-info}/WHEEL +0 -0
  162. {ccxt-4.4.28.dist-info → ccxt-4.4.30.dist-info}/top_level.txt +0 -0
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.4.28'
25
+ __version__ = '4.4.30'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
ccxt/abstract/alpaca.py CHANGED
@@ -27,6 +27,7 @@ class ImplicitAPI:
27
27
  trader_private_post_v2_watchlists_watchlist_id = traderPrivatePostV2WatchlistsWatchlistId = Entry('v2/watchlists/{watchlist_id}', ['trader', 'private'], 'POST', {})
28
28
  trader_private_post_v2_watchlists_by_name = traderPrivatePostV2WatchlistsByName = Entry('v2/watchlists:by_name', ['trader', 'private'], 'POST', {})
29
29
  trader_private_post_v2_wallets_transfers = traderPrivatePostV2WalletsTransfers = Entry('v2/wallets/transfers', ['trader', 'private'], 'POST', {})
30
+ trader_private_put_v2_orders_order_id = traderPrivatePutV2OrdersOrderId = Entry('v2/orders/{order_id}', ['trader', 'private'], 'PUT', {})
30
31
  trader_private_put_v2_watchlists_watchlist_id = traderPrivatePutV2WatchlistsWatchlistId = Entry('v2/watchlists/{watchlist_id}', ['trader', 'private'], 'PUT', {})
31
32
  trader_private_put_v2_watchlists_by_name = traderPrivatePutV2WatchlistsByName = Entry('v2/watchlists:by_name', ['trader', 'private'], 'PUT', {})
32
33
  trader_private_patch_v2_orders_order_id = traderPrivatePatchV2OrdersOrderId = Entry('v2/orders/{order_id}', ['trader', 'private'], 'PATCH', {})
ccxt/abstract/binance.py CHANGED
@@ -144,6 +144,12 @@ class ImplicitAPI:
144
144
  sapi_get_eth_staking_wbeth_history_wraphistory = sapiGetEthStakingWbethHistoryWrapHistory = Entry('eth-staking/wbeth/history/wrapHistory', 'sapi', 'GET', {'cost': 15})
145
145
  sapi_get_eth_staking_wbeth_history_unwraphistory = sapiGetEthStakingWbethHistoryUnwrapHistory = Entry('eth-staking/wbeth/history/unwrapHistory', 'sapi', 'GET', {'cost': 15})
146
146
  sapi_get_eth_staking_eth_history_wbethrewardshistory = sapiGetEthStakingEthHistoryWbethRewardsHistory = Entry('eth-staking/eth/history/wbethRewardsHistory', 'sapi', 'GET', {'cost': 15})
147
+ sapi_get_sol_staking_sol_history_stakinghistory = sapiGetSolStakingSolHistoryStakingHistory = Entry('sol-staking/sol/history/stakingHistory', 'sapi', 'GET', {'cost': 15})
148
+ sapi_get_sol_staking_sol_history_redemptionhistory = sapiGetSolStakingSolHistoryRedemptionHistory = Entry('sol-staking/sol/history/redemptionHistory', 'sapi', 'GET', {'cost': 15})
149
+ sapi_get_sol_staking_sol_history_bnsolrewardshistory = sapiGetSolStakingSolHistoryBnsolRewardsHistory = Entry('sol-staking/sol/history/bnsolRewardsHistory', 'sapi', 'GET', {'cost': 15})
150
+ sapi_get_sol_staking_sol_history_ratehistory = sapiGetSolStakingSolHistoryRateHistory = Entry('sol-staking/sol/history/rateHistory', 'sapi', 'GET', {'cost': 15})
151
+ sapi_get_sol_staking_account = sapiGetSolStakingAccount = Entry('sol-staking/account', 'sapi', 'GET', {'cost': 15})
152
+ sapi_get_sol_staking_sol_quota = sapiGetSolStakingSolQuota = Entry('sol-staking/sol/quota', 'sapi', 'GET', {'cost': 15})
147
153
  sapi_get_mining_pub_algolist = sapiGetMiningPubAlgoList = Entry('mining/pub/algoList', 'sapi', 'GET', {'cost': 0.1})
148
154
  sapi_get_mining_pub_coinlist = sapiGetMiningPubCoinList = Entry('mining/pub/coinList', 'sapi', 'GET', {'cost': 0.1})
149
155
  sapi_get_mining_worker_detail = sapiGetMiningWorkerDetail = Entry('mining/worker/detail', 'sapi', 'GET', {'cost': 0.5})
@@ -331,6 +337,8 @@ class ImplicitAPI:
331
337
  sapi_post_eth_staking_eth_stake = sapiPostEthStakingEthStake = Entry('eth-staking/eth/stake', 'sapi', 'POST', {'cost': 15})
332
338
  sapi_post_eth_staking_eth_redeem = sapiPostEthStakingEthRedeem = Entry('eth-staking/eth/redeem', 'sapi', 'POST', {'cost': 15})
333
339
  sapi_post_eth_staking_wbeth_wrap = sapiPostEthStakingWbethWrap = Entry('eth-staking/wbeth/wrap', 'sapi', 'POST', {'cost': 15})
340
+ sapi_post_sol_staking_sol_stake = sapiPostSolStakingSolStake = Entry('sol-staking/sol/stake', 'sapi', 'POST', {'cost': 15})
341
+ sapi_post_sol_staking_sol_redeem = sapiPostSolStakingSolRedeem = Entry('sol-staking/sol/redeem', 'sapi', 'POST', {'cost': 15})
334
342
  sapi_post_mining_hash_transfer_config = sapiPostMiningHashTransferConfig = Entry('mining/hash-transfer/config', 'sapi', 'POST', {'cost': 0.5})
335
343
  sapi_post_mining_hash_transfer_config_cancel = sapiPostMiningHashTransferConfigCancel = Entry('mining/hash-transfer/config/cancel', 'sapi', 'POST', {'cost': 0.5})
336
344
  sapi_post_portfolio_repay = sapiPostPortfolioRepay = Entry('portfolio/repay', 'sapi', 'POST', {'cost': 20.001})
@@ -363,6 +371,7 @@ class ImplicitAPI:
363
371
  sapi_post_simple_earn_locked_redeem = sapiPostSimpleEarnLockedRedeem = Entry('simple-earn/locked/redeem', 'sapi', 'POST', {'cost': 0.1})
364
372
  sapi_post_simple_earn_flexible_setautosubscribe = sapiPostSimpleEarnFlexibleSetAutoSubscribe = Entry('simple-earn/flexible/setAutoSubscribe', 'sapi', 'POST', {'cost': 15})
365
373
  sapi_post_simple_earn_locked_setautosubscribe = sapiPostSimpleEarnLockedSetAutoSubscribe = Entry('simple-earn/locked/setAutoSubscribe', 'sapi', 'POST', {'cost': 15})
374
+ sapi_post_simple_earn_locked_setredeemoption = sapiPostSimpleEarnLockedSetRedeemOption = Entry('simple-earn/locked/setRedeemOption', 'sapi', 'POST', {'cost': 5})
366
375
  sapi_post_dci_product_subscribe = sapiPostDciProductSubscribe = Entry('dci/product/subscribe', 'sapi', 'POST', {'cost': 0.1})
367
376
  sapi_post_dci_product_auto_compound_edit = sapiPostDciProductAutoCompoundEdit = Entry('dci/product/auto_compound/edit', 'sapi', 'POST', {'cost': 0.1})
368
377
  sapi_put_userdatastream = sapiPutUserDataStream = Entry('userDataStream', 'sapi', 'PUT', {'cost': 0.1})
@@ -144,6 +144,12 @@ class ImplicitAPI:
144
144
  sapi_get_eth_staking_wbeth_history_wraphistory = sapiGetEthStakingWbethHistoryWrapHistory = Entry('eth-staking/wbeth/history/wrapHistory', 'sapi', 'GET', {'cost': 15})
145
145
  sapi_get_eth_staking_wbeth_history_unwraphistory = sapiGetEthStakingWbethHistoryUnwrapHistory = Entry('eth-staking/wbeth/history/unwrapHistory', 'sapi', 'GET', {'cost': 15})
146
146
  sapi_get_eth_staking_eth_history_wbethrewardshistory = sapiGetEthStakingEthHistoryWbethRewardsHistory = Entry('eth-staking/eth/history/wbethRewardsHistory', 'sapi', 'GET', {'cost': 15})
147
+ sapi_get_sol_staking_sol_history_stakinghistory = sapiGetSolStakingSolHistoryStakingHistory = Entry('sol-staking/sol/history/stakingHistory', 'sapi', 'GET', {'cost': 15})
148
+ sapi_get_sol_staking_sol_history_redemptionhistory = sapiGetSolStakingSolHistoryRedemptionHistory = Entry('sol-staking/sol/history/redemptionHistory', 'sapi', 'GET', {'cost': 15})
149
+ sapi_get_sol_staking_sol_history_bnsolrewardshistory = sapiGetSolStakingSolHistoryBnsolRewardsHistory = Entry('sol-staking/sol/history/bnsolRewardsHistory', 'sapi', 'GET', {'cost': 15})
150
+ sapi_get_sol_staking_sol_history_ratehistory = sapiGetSolStakingSolHistoryRateHistory = Entry('sol-staking/sol/history/rateHistory', 'sapi', 'GET', {'cost': 15})
151
+ sapi_get_sol_staking_account = sapiGetSolStakingAccount = Entry('sol-staking/account', 'sapi', 'GET', {'cost': 15})
152
+ sapi_get_sol_staking_sol_quota = sapiGetSolStakingSolQuota = Entry('sol-staking/sol/quota', 'sapi', 'GET', {'cost': 15})
147
153
  sapi_get_mining_pub_algolist = sapiGetMiningPubAlgoList = Entry('mining/pub/algoList', 'sapi', 'GET', {'cost': 0.1})
148
154
  sapi_get_mining_pub_coinlist = sapiGetMiningPubCoinList = Entry('mining/pub/coinList', 'sapi', 'GET', {'cost': 0.1})
149
155
  sapi_get_mining_worker_detail = sapiGetMiningWorkerDetail = Entry('mining/worker/detail', 'sapi', 'GET', {'cost': 0.5})
@@ -331,6 +337,8 @@ class ImplicitAPI:
331
337
  sapi_post_eth_staking_eth_stake = sapiPostEthStakingEthStake = Entry('eth-staking/eth/stake', 'sapi', 'POST', {'cost': 15})
332
338
  sapi_post_eth_staking_eth_redeem = sapiPostEthStakingEthRedeem = Entry('eth-staking/eth/redeem', 'sapi', 'POST', {'cost': 15})
333
339
  sapi_post_eth_staking_wbeth_wrap = sapiPostEthStakingWbethWrap = Entry('eth-staking/wbeth/wrap', 'sapi', 'POST', {'cost': 15})
340
+ sapi_post_sol_staking_sol_stake = sapiPostSolStakingSolStake = Entry('sol-staking/sol/stake', 'sapi', 'POST', {'cost': 15})
341
+ sapi_post_sol_staking_sol_redeem = sapiPostSolStakingSolRedeem = Entry('sol-staking/sol/redeem', 'sapi', 'POST', {'cost': 15})
334
342
  sapi_post_mining_hash_transfer_config = sapiPostMiningHashTransferConfig = Entry('mining/hash-transfer/config', 'sapi', 'POST', {'cost': 0.5})
335
343
  sapi_post_mining_hash_transfer_config_cancel = sapiPostMiningHashTransferConfigCancel = Entry('mining/hash-transfer/config/cancel', 'sapi', 'POST', {'cost': 0.5})
336
344
  sapi_post_portfolio_repay = sapiPostPortfolioRepay = Entry('portfolio/repay', 'sapi', 'POST', {'cost': 20.001})
@@ -363,6 +371,7 @@ class ImplicitAPI:
363
371
  sapi_post_simple_earn_locked_redeem = sapiPostSimpleEarnLockedRedeem = Entry('simple-earn/locked/redeem', 'sapi', 'POST', {'cost': 0.1})
364
372
  sapi_post_simple_earn_flexible_setautosubscribe = sapiPostSimpleEarnFlexibleSetAutoSubscribe = Entry('simple-earn/flexible/setAutoSubscribe', 'sapi', 'POST', {'cost': 15})
365
373
  sapi_post_simple_earn_locked_setautosubscribe = sapiPostSimpleEarnLockedSetAutoSubscribe = Entry('simple-earn/locked/setAutoSubscribe', 'sapi', 'POST', {'cost': 15})
374
+ sapi_post_simple_earn_locked_setredeemoption = sapiPostSimpleEarnLockedSetRedeemOption = Entry('simple-earn/locked/setRedeemOption', 'sapi', 'POST', {'cost': 5})
366
375
  sapi_post_dci_product_subscribe = sapiPostDciProductSubscribe = Entry('dci/product/subscribe', 'sapi', 'POST', {'cost': 0.1})
367
376
  sapi_post_dci_product_auto_compound_edit = sapiPostDciProductAutoCompoundEdit = Entry('dci/product/auto_compound/edit', 'sapi', 'POST', {'cost': 0.1})
368
377
  sapi_put_userdatastream = sapiPutUserDataStream = Entry('userDataStream', 'sapi', 'PUT', {'cost': 0.1})
@@ -144,6 +144,12 @@ class ImplicitAPI:
144
144
  sapi_get_eth_staking_wbeth_history_wraphistory = sapiGetEthStakingWbethHistoryWrapHistory = Entry('eth-staking/wbeth/history/wrapHistory', 'sapi', 'GET', {'cost': 15})
145
145
  sapi_get_eth_staking_wbeth_history_unwraphistory = sapiGetEthStakingWbethHistoryUnwrapHistory = Entry('eth-staking/wbeth/history/unwrapHistory', 'sapi', 'GET', {'cost': 15})
146
146
  sapi_get_eth_staking_eth_history_wbethrewardshistory = sapiGetEthStakingEthHistoryWbethRewardsHistory = Entry('eth-staking/eth/history/wbethRewardsHistory', 'sapi', 'GET', {'cost': 15})
147
+ sapi_get_sol_staking_sol_history_stakinghistory = sapiGetSolStakingSolHistoryStakingHistory = Entry('sol-staking/sol/history/stakingHistory', 'sapi', 'GET', {'cost': 15})
148
+ sapi_get_sol_staking_sol_history_redemptionhistory = sapiGetSolStakingSolHistoryRedemptionHistory = Entry('sol-staking/sol/history/redemptionHistory', 'sapi', 'GET', {'cost': 15})
149
+ sapi_get_sol_staking_sol_history_bnsolrewardshistory = sapiGetSolStakingSolHistoryBnsolRewardsHistory = Entry('sol-staking/sol/history/bnsolRewardsHistory', 'sapi', 'GET', {'cost': 15})
150
+ sapi_get_sol_staking_sol_history_ratehistory = sapiGetSolStakingSolHistoryRateHistory = Entry('sol-staking/sol/history/rateHistory', 'sapi', 'GET', {'cost': 15})
151
+ sapi_get_sol_staking_account = sapiGetSolStakingAccount = Entry('sol-staking/account', 'sapi', 'GET', {'cost': 15})
152
+ sapi_get_sol_staking_sol_quota = sapiGetSolStakingSolQuota = Entry('sol-staking/sol/quota', 'sapi', 'GET', {'cost': 15})
147
153
  sapi_get_mining_pub_algolist = sapiGetMiningPubAlgoList = Entry('mining/pub/algoList', 'sapi', 'GET', {'cost': 0.1})
148
154
  sapi_get_mining_pub_coinlist = sapiGetMiningPubCoinList = Entry('mining/pub/coinList', 'sapi', 'GET', {'cost': 0.1})
149
155
  sapi_get_mining_worker_detail = sapiGetMiningWorkerDetail = Entry('mining/worker/detail', 'sapi', 'GET', {'cost': 0.5})
@@ -362,6 +368,8 @@ class ImplicitAPI:
362
368
  sapi_post_eth_staking_eth_stake = sapiPostEthStakingEthStake = Entry('eth-staking/eth/stake', 'sapi', 'POST', {'cost': 15})
363
369
  sapi_post_eth_staking_eth_redeem = sapiPostEthStakingEthRedeem = Entry('eth-staking/eth/redeem', 'sapi', 'POST', {'cost': 15})
364
370
  sapi_post_eth_staking_wbeth_wrap = sapiPostEthStakingWbethWrap = Entry('eth-staking/wbeth/wrap', 'sapi', 'POST', {'cost': 15})
371
+ sapi_post_sol_staking_sol_stake = sapiPostSolStakingSolStake = Entry('sol-staking/sol/stake', 'sapi', 'POST', {'cost': 15})
372
+ sapi_post_sol_staking_sol_redeem = sapiPostSolStakingSolRedeem = Entry('sol-staking/sol/redeem', 'sapi', 'POST', {'cost': 15})
365
373
  sapi_post_mining_hash_transfer_config = sapiPostMiningHashTransferConfig = Entry('mining/hash-transfer/config', 'sapi', 'POST', {'cost': 0.5})
366
374
  sapi_post_mining_hash_transfer_config_cancel = sapiPostMiningHashTransferConfigCancel = Entry('mining/hash-transfer/config/cancel', 'sapi', 'POST', {'cost': 0.5})
367
375
  sapi_post_portfolio_repay = sapiPostPortfolioRepay = Entry('portfolio/repay', 'sapi', 'POST', {'cost': 20.001})
@@ -394,6 +402,7 @@ class ImplicitAPI:
394
402
  sapi_post_simple_earn_locked_redeem = sapiPostSimpleEarnLockedRedeem = Entry('simple-earn/locked/redeem', 'sapi', 'POST', {'cost': 0.1})
395
403
  sapi_post_simple_earn_flexible_setautosubscribe = sapiPostSimpleEarnFlexibleSetAutoSubscribe = Entry('simple-earn/flexible/setAutoSubscribe', 'sapi', 'POST', {'cost': 15})
396
404
  sapi_post_simple_earn_locked_setautosubscribe = sapiPostSimpleEarnLockedSetAutoSubscribe = Entry('simple-earn/locked/setAutoSubscribe', 'sapi', 'POST', {'cost': 15})
405
+ sapi_post_simple_earn_locked_setredeemoption = sapiPostSimpleEarnLockedSetRedeemOption = Entry('simple-earn/locked/setRedeemOption', 'sapi', 'POST', {'cost': 5})
397
406
  sapi_post_dci_product_subscribe = sapiPostDciProductSubscribe = Entry('dci/product/subscribe', 'sapi', 'POST', {'cost': 0.1})
398
407
  sapi_post_dci_product_auto_compound_edit = sapiPostDciProductAutoCompoundEdit = Entry('dci/product/auto_compound/edit', 'sapi', 'POST', {'cost': 0.1})
399
408
  sapi_post_otc_quotes = sapiPostOtcQuotes = Entry('otc/quotes', 'sapi', 'POST', {'cost': 1})
@@ -144,6 +144,12 @@ class ImplicitAPI:
144
144
  sapi_get_eth_staking_wbeth_history_wraphistory = sapiGetEthStakingWbethHistoryWrapHistory = Entry('eth-staking/wbeth/history/wrapHistory', 'sapi', 'GET', {'cost': 15})
145
145
  sapi_get_eth_staking_wbeth_history_unwraphistory = sapiGetEthStakingWbethHistoryUnwrapHistory = Entry('eth-staking/wbeth/history/unwrapHistory', 'sapi', 'GET', {'cost': 15})
146
146
  sapi_get_eth_staking_eth_history_wbethrewardshistory = sapiGetEthStakingEthHistoryWbethRewardsHistory = Entry('eth-staking/eth/history/wbethRewardsHistory', 'sapi', 'GET', {'cost': 15})
147
+ sapi_get_sol_staking_sol_history_stakinghistory = sapiGetSolStakingSolHistoryStakingHistory = Entry('sol-staking/sol/history/stakingHistory', 'sapi', 'GET', {'cost': 15})
148
+ sapi_get_sol_staking_sol_history_redemptionhistory = sapiGetSolStakingSolHistoryRedemptionHistory = Entry('sol-staking/sol/history/redemptionHistory', 'sapi', 'GET', {'cost': 15})
149
+ sapi_get_sol_staking_sol_history_bnsolrewardshistory = sapiGetSolStakingSolHistoryBnsolRewardsHistory = Entry('sol-staking/sol/history/bnsolRewardsHistory', 'sapi', 'GET', {'cost': 15})
150
+ sapi_get_sol_staking_sol_history_ratehistory = sapiGetSolStakingSolHistoryRateHistory = Entry('sol-staking/sol/history/rateHistory', 'sapi', 'GET', {'cost': 15})
151
+ sapi_get_sol_staking_account = sapiGetSolStakingAccount = Entry('sol-staking/account', 'sapi', 'GET', {'cost': 15})
152
+ sapi_get_sol_staking_sol_quota = sapiGetSolStakingSolQuota = Entry('sol-staking/sol/quota', 'sapi', 'GET', {'cost': 15})
147
153
  sapi_get_mining_pub_algolist = sapiGetMiningPubAlgoList = Entry('mining/pub/algoList', 'sapi', 'GET', {'cost': 0.1})
148
154
  sapi_get_mining_pub_coinlist = sapiGetMiningPubCoinList = Entry('mining/pub/coinList', 'sapi', 'GET', {'cost': 0.1})
149
155
  sapi_get_mining_worker_detail = sapiGetMiningWorkerDetail = Entry('mining/worker/detail', 'sapi', 'GET', {'cost': 0.5})
@@ -331,6 +337,8 @@ class ImplicitAPI:
331
337
  sapi_post_eth_staking_eth_stake = sapiPostEthStakingEthStake = Entry('eth-staking/eth/stake', 'sapi', 'POST', {'cost': 15})
332
338
  sapi_post_eth_staking_eth_redeem = sapiPostEthStakingEthRedeem = Entry('eth-staking/eth/redeem', 'sapi', 'POST', {'cost': 15})
333
339
  sapi_post_eth_staking_wbeth_wrap = sapiPostEthStakingWbethWrap = Entry('eth-staking/wbeth/wrap', 'sapi', 'POST', {'cost': 15})
340
+ sapi_post_sol_staking_sol_stake = sapiPostSolStakingSolStake = Entry('sol-staking/sol/stake', 'sapi', 'POST', {'cost': 15})
341
+ sapi_post_sol_staking_sol_redeem = sapiPostSolStakingSolRedeem = Entry('sol-staking/sol/redeem', 'sapi', 'POST', {'cost': 15})
334
342
  sapi_post_mining_hash_transfer_config = sapiPostMiningHashTransferConfig = Entry('mining/hash-transfer/config', 'sapi', 'POST', {'cost': 0.5})
335
343
  sapi_post_mining_hash_transfer_config_cancel = sapiPostMiningHashTransferConfigCancel = Entry('mining/hash-transfer/config/cancel', 'sapi', 'POST', {'cost': 0.5})
336
344
  sapi_post_portfolio_repay = sapiPostPortfolioRepay = Entry('portfolio/repay', 'sapi', 'POST', {'cost': 20.001})
@@ -363,6 +371,7 @@ class ImplicitAPI:
363
371
  sapi_post_simple_earn_locked_redeem = sapiPostSimpleEarnLockedRedeem = Entry('simple-earn/locked/redeem', 'sapi', 'POST', {'cost': 0.1})
364
372
  sapi_post_simple_earn_flexible_setautosubscribe = sapiPostSimpleEarnFlexibleSetAutoSubscribe = Entry('simple-earn/flexible/setAutoSubscribe', 'sapi', 'POST', {'cost': 15})
365
373
  sapi_post_simple_earn_locked_setautosubscribe = sapiPostSimpleEarnLockedSetAutoSubscribe = Entry('simple-earn/locked/setAutoSubscribe', 'sapi', 'POST', {'cost': 15})
374
+ sapi_post_simple_earn_locked_setredeemoption = sapiPostSimpleEarnLockedSetRedeemOption = Entry('simple-earn/locked/setRedeemOption', 'sapi', 'POST', {'cost': 5})
366
375
  sapi_post_dci_product_subscribe = sapiPostDciProductSubscribe = Entry('dci/product/subscribe', 'sapi', 'POST', {'cost': 0.1})
367
376
  sapi_post_dci_product_auto_compound_edit = sapiPostDciProductAutoCompoundEdit = Entry('dci/product/auto_compound/edit', 'sapi', 'POST', {'cost': 0.1})
368
377
  sapi_put_userdatastream = sapiPutUserDataStream = Entry('userDataStream', 'sapi', 'PUT', {'cost': 0.1})
ccxt/abstract/bybit.py CHANGED
@@ -181,19 +181,6 @@ class ImplicitAPI:
181
181
  private_get_v5_broker_earnings_info = privateGetV5BrokerEarningsInfo = Entry('v5/broker/earnings-info', 'private', 'GET', {'cost': 5})
182
182
  private_get_v5_broker_account_info = privateGetV5BrokerAccountInfo = Entry('v5/broker/account-info', 'private', 'GET', {'cost': 5})
183
183
  private_get_v5_broker_asset_query_sub_member_deposit_record = privateGetV5BrokerAssetQuerySubMemberDepositRecord = Entry('v5/broker/asset/query-sub-member-deposit-record', 'private', 'GET', {'cost': 10})
184
- private_post_option_usdc_openapi_private_v1_place_order = privatePostOptionUsdcOpenapiPrivateV1PlaceOrder = Entry('option/usdc/openapi/private/v1/place-order', 'private', 'POST', {'cost': 2.5})
185
- private_post_option_usdc_openapi_private_v1_replace_order = privatePostOptionUsdcOpenapiPrivateV1ReplaceOrder = Entry('option/usdc/openapi/private/v1/replace-order', 'private', 'POST', {'cost': 2.5})
186
- private_post_option_usdc_openapi_private_v1_cancel_order = privatePostOptionUsdcOpenapiPrivateV1CancelOrder = Entry('option/usdc/openapi/private/v1/cancel-order', 'private', 'POST', {'cost': 2.5})
187
- private_post_option_usdc_openapi_private_v1_cancel_all = privatePostOptionUsdcOpenapiPrivateV1CancelAll = Entry('option/usdc/openapi/private/v1/cancel-all', 'private', 'POST', {'cost': 2.5})
188
- private_post_option_usdc_openapi_private_v1_query_active_orders = privatePostOptionUsdcOpenapiPrivateV1QueryActiveOrders = Entry('option/usdc/openapi/private/v1/query-active-orders', 'private', 'POST', {'cost': 2.5})
189
- private_post_option_usdc_openapi_private_v1_query_order_history = privatePostOptionUsdcOpenapiPrivateV1QueryOrderHistory = Entry('option/usdc/openapi/private/v1/query-order-history', 'private', 'POST', {'cost': 2.5})
190
- private_post_option_usdc_openapi_private_v1_execution_list = privatePostOptionUsdcOpenapiPrivateV1ExecutionList = Entry('option/usdc/openapi/private/v1/execution-list', 'private', 'POST', {'cost': 2.5})
191
- private_post_option_usdc_openapi_private_v1_query_position = privatePostOptionUsdcOpenapiPrivateV1QueryPosition = Entry('option/usdc/openapi/private/v1/query-position', 'private', 'POST', {'cost': 2.5})
192
- private_post_perpetual_usdc_openapi_private_v1_place_order = privatePostPerpetualUsdcOpenapiPrivateV1PlaceOrder = Entry('perpetual/usdc/openapi/private/v1/place-order', 'private', 'POST', {'cost': 2.5})
193
- private_post_perpetual_usdc_openapi_private_v1_replace_order = privatePostPerpetualUsdcOpenapiPrivateV1ReplaceOrder = Entry('perpetual/usdc/openapi/private/v1/replace-order', 'private', 'POST', {'cost': 2.5})
194
- private_post_perpetual_usdc_openapi_private_v1_cancel_order = privatePostPerpetualUsdcOpenapiPrivateV1CancelOrder = Entry('perpetual/usdc/openapi/private/v1/cancel-order', 'private', 'POST', {'cost': 2.5})
195
- private_post_perpetual_usdc_openapi_private_v1_cancel_all = privatePostPerpetualUsdcOpenapiPrivateV1CancelAll = Entry('perpetual/usdc/openapi/private/v1/cancel-all', 'private', 'POST', {'cost': 2.5})
196
- private_post_perpetual_usdc_openapi_private_v1_position_leverage_save = privatePostPerpetualUsdcOpenapiPrivateV1PositionLeverageSave = Entry('perpetual/usdc/openapi/private/v1/position/leverage/save', 'private', 'POST', {'cost': 2.5})
197
184
  private_post_spot_v3_private_order = privatePostSpotV3PrivateOrder = Entry('spot/v3/private/order', 'private', 'POST', {'cost': 2.5})
198
185
  private_post_spot_v3_private_cancel_order = privatePostSpotV3PrivateCancelOrder = Entry('spot/v3/private/cancel-order', 'private', 'POST', {'cost': 2.5})
199
186
  private_post_spot_v3_private_cancel_orders = privatePostSpotV3PrivateCancelOrders = Entry('spot/v3/private/cancel-orders', 'private', 'POST', {'cost': 2.5})
ccxt/alpaca.py CHANGED
@@ -61,6 +61,7 @@ class alpaca(Exchange, ImplicitAPI):
61
61
  'closeAllPositions': False,
62
62
  'closePosition': False,
63
63
  'createOrder': True,
64
+ 'editOrder': True,
64
65
  'fetchBalance': False,
65
66
  'fetchBidsAsks': False,
66
67
  'fetchClosedOrders': True,
@@ -142,6 +143,7 @@ class alpaca(Exchange, ImplicitAPI):
142
143
  'v2/wallets/transfers',
143
144
  ],
144
145
  'put': [
146
+ 'v2/orders/{order_id}',
145
147
  'v2/watchlists/{watchlist_id}',
146
148
  'v2/watchlists:by_name',
147
149
  ],
@@ -800,6 +802,15 @@ class alpaca(Exchange, ImplicitAPI):
800
802
  results.append(ticker)
801
803
  return self.filter_by_array(results, 'symbol', symbols)
802
804
 
805
+ def generate_client_order_id(self, params):
806
+ clientOrderIdprefix = self.safe_string(self.options, 'clientOrderId')
807
+ uuid = self.uuid()
808
+ parts = uuid.split('-')
809
+ random_id = ''.join(parts)
810
+ defaultClientId = self.implode_params(clientOrderIdprefix, {'id': random_id})
811
+ clientOrderId = self.safe_string(params, 'clientOrderId', defaultClientId)
812
+ return clientOrderId
813
+
803
814
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
804
815
  """
805
816
  create a trade order
@@ -836,13 +847,7 @@ class alpaca(Exchange, ImplicitAPI):
836
847
  defaultTIF = self.safe_string(self.options, 'defaultTimeInForce')
837
848
  request['time_in_force'] = self.safe_string(params, 'timeInForce', defaultTIF)
838
849
  params = self.omit(params, ['timeInForce', 'triggerPrice'])
839
- clientOrderIdprefix = self.safe_string(self.options, 'clientOrderId')
840
- uuid = self.uuid()
841
- parts = uuid.split('-')
842
- random_id = ''.join(parts)
843
- defaultClientId = self.implode_params(clientOrderIdprefix, {'id': random_id})
844
- clientOrderId = self.safe_string(params, 'clientOrderId', defaultClientId)
845
- request['client_order_id'] = clientOrderId
850
+ request['client_order_id'] = self.generate_client_order_id(params)
846
851
  params = self.omit(params, ['clientOrderId'])
847
852
  order = self.traderPrivatePostV2Orders(self.extend(request, params))
848
853
  #
@@ -1043,6 +1048,46 @@ class alpaca(Exchange, ImplicitAPI):
1043
1048
  }
1044
1049
  return self.fetch_orders(symbol, since, limit, self.extend(request, params))
1045
1050
 
1051
+ def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
1052
+ """
1053
+ edit a trade order
1054
+ :see: https://docs.alpaca.markets/reference/patchorderbyorderid-1
1055
+ :param str id: order id
1056
+ :param str [symbol]: unified symbol of the market to create an order in
1057
+ :param str [type]: 'market', 'limit' or 'stop_limit'
1058
+ :param str [side]: 'buy' or 'sell'
1059
+ :param float [amount]: how much of the currency you want to trade in units of the base currency
1060
+ :param float [price]: the price for the order, in units of the quote currency, ignored in market orders
1061
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1062
+ :param str [params.triggerPrice]: the price to trigger a stop order
1063
+ :param str [params.timeInForce]: for crypto trading either 'gtc' or 'ioc' can be used
1064
+ :param str [params.clientOrderId]: a unique identifier for the order, automatically generated if not sent
1065
+ :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1066
+ """
1067
+ self.load_markets()
1068
+ request: dict = {
1069
+ 'order_id': id,
1070
+ }
1071
+ market = None
1072
+ if symbol is not None:
1073
+ market = self.market(symbol)
1074
+ if amount is not None:
1075
+ request['qty'] = self.amount_to_precision(symbol, amount)
1076
+ triggerPrice = self.safe_string_n(params, ['triggerPrice', 'stop_price'])
1077
+ if triggerPrice is not None:
1078
+ request['stop_price'] = self.price_to_precision(symbol, triggerPrice)
1079
+ params = self.omit(params, 'triggerPrice')
1080
+ if price is not None:
1081
+ request['limit_price'] = self.price_to_precision(symbol, price)
1082
+ timeInForce = None
1083
+ timeInForce, params = self.handle_option_and_params_2(params, 'editOrder', 'timeInForce', 'defaultTimeInForce')
1084
+ if timeInForce is not None:
1085
+ request['time_in_force'] = timeInForce
1086
+ request['client_order_id'] = self.generate_client_order_id(params)
1087
+ params = self.omit(params, ['clientOrderId'])
1088
+ response = self.traderPrivatePatchV2OrdersOrderId(self.extend(request, params))
1089
+ return self.parse_order(response, market)
1090
+
1046
1091
  def parse_order(self, order: dict, market: Market = None) -> Order:
1047
1092
  #
1048
1093
  # {
@@ -1289,7 +1334,7 @@ class alpaca(Exchange, ImplicitAPI):
1289
1334
  'tag': None,
1290
1335
  }
1291
1336
 
1292
- def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1337
+ def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1293
1338
  """
1294
1339
  make a withdrawal
1295
1340
  :see: https://docs.alpaca.markets/reference/createcryptotransferforaccount
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.28'
7
+ __version__ = '4.4.30'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -61,6 +61,7 @@ class alpaca(Exchange, ImplicitAPI):
61
61
  'closeAllPositions': False,
62
62
  'closePosition': False,
63
63
  'createOrder': True,
64
+ 'editOrder': True,
64
65
  'fetchBalance': False,
65
66
  'fetchBidsAsks': False,
66
67
  'fetchClosedOrders': True,
@@ -142,6 +143,7 @@ class alpaca(Exchange, ImplicitAPI):
142
143
  'v2/wallets/transfers',
143
144
  ],
144
145
  'put': [
146
+ 'v2/orders/{order_id}',
145
147
  'v2/watchlists/{watchlist_id}',
146
148
  'v2/watchlists:by_name',
147
149
  ],
@@ -800,6 +802,15 @@ class alpaca(Exchange, ImplicitAPI):
800
802
  results.append(ticker)
801
803
  return self.filter_by_array(results, 'symbol', symbols)
802
804
 
805
+ def generate_client_order_id(self, params):
806
+ clientOrderIdprefix = self.safe_string(self.options, 'clientOrderId')
807
+ uuid = self.uuid()
808
+ parts = uuid.split('-')
809
+ random_id = ''.join(parts)
810
+ defaultClientId = self.implode_params(clientOrderIdprefix, {'id': random_id})
811
+ clientOrderId = self.safe_string(params, 'clientOrderId', defaultClientId)
812
+ return clientOrderId
813
+
803
814
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
804
815
  """
805
816
  create a trade order
@@ -836,13 +847,7 @@ class alpaca(Exchange, ImplicitAPI):
836
847
  defaultTIF = self.safe_string(self.options, 'defaultTimeInForce')
837
848
  request['time_in_force'] = self.safe_string(params, 'timeInForce', defaultTIF)
838
849
  params = self.omit(params, ['timeInForce', 'triggerPrice'])
839
- clientOrderIdprefix = self.safe_string(self.options, 'clientOrderId')
840
- uuid = self.uuid()
841
- parts = uuid.split('-')
842
- random_id = ''.join(parts)
843
- defaultClientId = self.implode_params(clientOrderIdprefix, {'id': random_id})
844
- clientOrderId = self.safe_string(params, 'clientOrderId', defaultClientId)
845
- request['client_order_id'] = clientOrderId
850
+ request['client_order_id'] = self.generate_client_order_id(params)
846
851
  params = self.omit(params, ['clientOrderId'])
847
852
  order = await self.traderPrivatePostV2Orders(self.extend(request, params))
848
853
  #
@@ -1043,6 +1048,46 @@ class alpaca(Exchange, ImplicitAPI):
1043
1048
  }
1044
1049
  return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
1045
1050
 
1051
+ async def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
1052
+ """
1053
+ edit a trade order
1054
+ :see: https://docs.alpaca.markets/reference/patchorderbyorderid-1
1055
+ :param str id: order id
1056
+ :param str [symbol]: unified symbol of the market to create an order in
1057
+ :param str [type]: 'market', 'limit' or 'stop_limit'
1058
+ :param str [side]: 'buy' or 'sell'
1059
+ :param float [amount]: how much of the currency you want to trade in units of the base currency
1060
+ :param float [price]: the price for the order, in units of the quote currency, ignored in market orders
1061
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1062
+ :param str [params.triggerPrice]: the price to trigger a stop order
1063
+ :param str [params.timeInForce]: for crypto trading either 'gtc' or 'ioc' can be used
1064
+ :param str [params.clientOrderId]: a unique identifier for the order, automatically generated if not sent
1065
+ :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1066
+ """
1067
+ await self.load_markets()
1068
+ request: dict = {
1069
+ 'order_id': id,
1070
+ }
1071
+ market = None
1072
+ if symbol is not None:
1073
+ market = self.market(symbol)
1074
+ if amount is not None:
1075
+ request['qty'] = self.amount_to_precision(symbol, amount)
1076
+ triggerPrice = self.safe_string_n(params, ['triggerPrice', 'stop_price'])
1077
+ if triggerPrice is not None:
1078
+ request['stop_price'] = self.price_to_precision(symbol, triggerPrice)
1079
+ params = self.omit(params, 'triggerPrice')
1080
+ if price is not None:
1081
+ request['limit_price'] = self.price_to_precision(symbol, price)
1082
+ timeInForce = None
1083
+ timeInForce, params = self.handle_option_and_params_2(params, 'editOrder', 'timeInForce', 'defaultTimeInForce')
1084
+ if timeInForce is not None:
1085
+ request['time_in_force'] = timeInForce
1086
+ request['client_order_id'] = self.generate_client_order_id(params)
1087
+ params = self.omit(params, ['clientOrderId'])
1088
+ response = await self.traderPrivatePatchV2OrdersOrderId(self.extend(request, params))
1089
+ return self.parse_order(response, market)
1090
+
1046
1091
  def parse_order(self, order: dict, market: Market = None) -> Order:
1047
1092
  #
1048
1093
  # {
@@ -1289,7 +1334,7 @@ class alpaca(Exchange, ImplicitAPI):
1289
1334
  'tag': None,
1290
1335
  }
1291
1336
 
1292
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
1337
+ async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1293
1338
  """
1294
1339
  make a withdrawal
1295
1340
  :see: https://docs.alpaca.markets/reference/createcryptotransferforaccount
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.28'
5
+ __version__ = '4.4.30'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -631,6 +631,9 @@ class Exchange(BaseExchange):
631
631
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}):
632
632
  raise NotSupported(self.id + ' fetchOrderBook() is not supported yet')
633
633
 
634
+ async def fetch_order_book_ws(self, symbol: str, limit: Int = None, params={}):
635
+ raise NotSupported(self.id + ' fetchOrderBookWs() is not supported yet')
636
+
634
637
  async def fetch_margin_mode(self, symbol: str, params={}):
635
638
  if self.has['fetchMarginModes']:
636
639
  marginModes = await self.fetch_margin_modes([symbol], params)
@@ -2019,7 +2019,7 @@ class bigone(Exchange, ImplicitAPI):
2019
2019
  }
2020
2020
  return self.safe_string(statuses, status, 'failed')
2021
2021
 
2022
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
2022
+ async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
2023
2023
  """
2024
2024
  make a withdrawal
2025
2025
  :see: https://open.big.one/docs/spot_withdrawal.html#create-withdrawal-of-user
@@ -417,6 +417,12 @@ class binance(Exchange, ImplicitAPI):
417
417
  'eth-staking/wbeth/history/wrapHistory': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
418
418
  'eth-staking/wbeth/history/unwrapHistory': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
419
419
  'eth-staking/eth/history/wbethRewardsHistory': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
420
+ 'sol-staking/sol/history/stakingHistory': 15,
421
+ 'sol-staking/sol/history/redemptionHistory': 15,
422
+ 'sol-staking/sol/history/bnsolRewardsHistory': 15,
423
+ 'sol-staking/sol/history/rateHistory': 15,
424
+ 'sol-staking/account': 15,
425
+ 'sol-staking/sol/quota': 15,
420
426
  # mining endpoints
421
427
  'mining/pub/algoList': 0.1,
422
428
  'mining/pub/coinList': 0.1,
@@ -628,6 +634,8 @@ class binance(Exchange, ImplicitAPI):
628
634
  'eth-staking/eth/stake': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
629
635
  'eth-staking/eth/redeem': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
630
636
  'eth-staking/wbeth/wrap': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
637
+ 'sol-staking/sol/stake': 15,
638
+ 'sol-staking/sol/redeem': 15,
631
639
  # mining endpoints
632
640
  'mining/hash-transfer/config': 0.5, # Weight(IP): 5 => cost = 0.1 * 5 = 0.5
633
641
  'mining/hash-transfer/config/cancel': 0.5, # Weight(IP): 5 => cost = 0.1 * 5 = 0.5
@@ -662,6 +670,7 @@ class binance(Exchange, ImplicitAPI):
662
670
  'simple-earn/locked/redeem': 0.1,
663
671
  'simple-earn/flexible/setAutoSubscribe': 15,
664
672
  'simple-earn/locked/setAutoSubscribe': 15,
673
+ 'simple-earn/locked/setRedeemOption': 5,
665
674
  # convert
666
675
  'dci/product/subscribe': 0.1,
667
676
  'dci/product/auto_compound/edit': 0.1,
@@ -8481,7 +8490,7 @@ class binance(Exchange, ImplicitAPI):
8481
8490
  }
8482
8491
  return result
8483
8492
 
8484
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
8493
+ async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
8485
8494
  """
8486
8495
  make a withdrawal
8487
8496
  :see: https://developers.binance.com/docs/wallet/capital/withdraw
@@ -4978,7 +4978,7 @@ class bingx(Exchange, ImplicitAPI):
4978
4978
  coins = self.safe_list(response, 'data')
4979
4979
  return self.parse_deposit_withdraw_fees(coins, codes, 'coin')
4980
4980
 
4981
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
4981
+ async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
4982
4982
  """
4983
4983
  make a withdrawal
4984
4984
  :see: https://bingx-api.github.io/docs/#/en-us/spot/wallet-api.html#Withdraw
@@ -814,7 +814,7 @@ class bitbank(Exchange, ImplicitAPI):
814
814
  'tag': None,
815
815
  }
816
816
 
817
- async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
817
+ async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
818
818
  """
819
819
  make a withdrawal
820
820
  :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#new-withdrawal-request
@@ -226,11 +226,11 @@ class bitbns(Exchange, ImplicitAPI):
226
226
  quoteId = self.safe_string(market, 'quote')
227
227
  base = self.safe_currency_code(baseId)
228
228
  quote = self.safe_currency_code(quoteId)
229
- marketPrecision = self.safe_value(market, 'precision', {})
230
- marketLimits = self.safe_value(market, 'limits', {})
231
- amountLimits = self.safe_value(marketLimits, 'amount', {})
232
- priceLimits = self.safe_value(marketLimits, 'price', {})
233
- costLimits = self.safe_value(marketLimits, 'cost', {})
229
+ marketPrecision = self.safe_dict(market, 'precision', {})
230
+ marketLimits = self.safe_dict(market, 'limits', {})
231
+ amountLimits = self.safe_dict(marketLimits, 'amount', {})
232
+ priceLimits = self.safe_dict(marketLimits, 'price', {})
233
+ costLimits = self.safe_dict(marketLimits, 'cost', {})
234
234
  usdt = (quoteId == 'USDT')
235
235
  # INR markets don't need a _INR prefix
236
236
  uppercaseId = (baseId + '_' + quoteId) if usdt else baseId
@@ -430,7 +430,7 @@ class bitbns(Exchange, ImplicitAPI):
430
430
  'timestamp': timestamp,
431
431
  'datetime': self.iso8601(timestamp),
432
432
  }
433
- data = self.safe_value(response, 'data', {})
433
+ data = self.safe_dict(response, 'data', {})
434
434
  keys = list(data.keys())
435
435
  for i in range(0, len(keys)):
436
436
  key = keys[i]
@@ -637,7 +637,7 @@ class bitbns(Exchange, ImplicitAPI):
637
637
  raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
638
638
  await self.load_markets()
639
639
  market = self.market(symbol)
640
- isTrigger = self.safe_value_2(params, 'trigger', 'stop')
640
+ isTrigger = self.safe_bool_2(params, 'trigger', 'stop')
641
641
  params = self.omit(params, ['trigger', 'stop'])
642
642
  request: dict = {
643
643
  'entry_id': id,
@@ -668,7 +668,7 @@ class bitbns(Exchange, ImplicitAPI):
668
668
  'symbol': market['id'],
669
669
  'entry_id': id,
670
670
  }
671
- trigger = self.safe_value_2(params, 'trigger', 'stop')
671
+ trigger = self.safe_bool_2(params, 'trigger', 'stop')
672
672
  if trigger:
673
673
  raise BadRequest(self.id + ' fetchOrder cannot fetch stop orders')
674
674
  response = await self.v1PostOrderStatusSymbol(self.extend(request, params))
@@ -697,7 +697,7 @@ class bitbns(Exchange, ImplicitAPI):
697
697
  # "code":200
698
698
  # }
699
699
  #
700
- data = self.safe_value(response, 'data', [])
700
+ data = self.safe_list(response, 'data', [])
701
701
  first = self.safe_dict(data, 0)
702
702
  return self.parse_order(first, market)
703
703
 
@@ -717,7 +717,7 @@ class bitbns(Exchange, ImplicitAPI):
717
717
  raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires a symbol argument')
718
718
  await self.load_markets()
719
719
  market = self.market(symbol)
720
- isTrigger = self.safe_value_2(params, 'trigger', 'stop')
720
+ isTrigger = self.safe_bool_2(params, 'trigger', 'stop')
721
721
  params = self.omit(params, ['trigger', 'stop'])
722
722
  quoteSide = 'usdtListOpen' if (market['quoteId'] == 'USDT') else 'listOpen'
723
723
  request: dict = {
@@ -1000,7 +1000,7 @@ class bitbns(Exchange, ImplicitAPI):
1000
1000
  '6': 'ok', # Completed
1001
1001
  },
1002
1002
  }
1003
- statuses = self.safe_value(statusesByType, type, {})
1003
+ statuses = self.safe_dict(statusesByType, type, {})
1004
1004
  return self.safe_string(statuses, status, status)
1005
1005
 
1006
1006
  def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
@@ -1090,7 +1090,7 @@ class bitbns(Exchange, ImplicitAPI):
1090
1090
  # "error":null
1091
1091
  # }
1092
1092
  #
1093
- data = self.safe_value(response, 'data', {})
1093
+ data = self.safe_dict(response, 'data', {})
1094
1094
  address = self.safe_string(data, 'token')
1095
1095
  tag = self.safe_string(data, 'tag')
1096
1096
  self.check_address(address)