ccxt 4.4.29__py2.py3-none-any.whl → 4.4.31__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 (273) 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/ace.py +36 -12
  8. ccxt/alpaca.py +113 -28
  9. ccxt/ascendex.py +65 -30
  10. ccxt/async_support/__init__.py +1 -1
  11. ccxt/async_support/ace.py +36 -12
  12. ccxt/async_support/alpaca.py +113 -28
  13. ccxt/async_support/ascendex.py +65 -30
  14. ccxt/async_support/base/exchange.py +3 -3
  15. ccxt/async_support/bigone.py +71 -27
  16. ccxt/async_support/binance.py +564 -323
  17. ccxt/async_support/bingx.py +208 -108
  18. ccxt/async_support/bit2c.py +34 -12
  19. ccxt/async_support/bitbank.py +42 -14
  20. ccxt/async_support/bitbns.py +29 -21
  21. ccxt/async_support/bitfinex.py +77 -33
  22. ccxt/async_support/bitfinex2.py +116 -44
  23. ccxt/async_support/bitflyer.py +54 -18
  24. ccxt/async_support/bitget.py +277 -145
  25. ccxt/async_support/bithumb.py +39 -14
  26. ccxt/async_support/bitmart.py +198 -132
  27. ccxt/async_support/bitmex.py +90 -30
  28. ccxt/async_support/bitopro.py +66 -22
  29. ccxt/async_support/bitrue.py +109 -57
  30. ccxt/async_support/bitso.py +55 -19
  31. ccxt/async_support/bitstamp.py +84 -36
  32. ccxt/async_support/bitteam.py +51 -17
  33. ccxt/async_support/bitvavo.py +57 -19
  34. ccxt/async_support/bl3p.py +26 -10
  35. ccxt/async_support/blockchaincom.py +63 -21
  36. ccxt/async_support/blofin.py +95 -38
  37. ccxt/async_support/btcalpha.py +48 -16
  38. ccxt/async_support/btcbox.py +27 -9
  39. ccxt/async_support/btcmarkets.py +57 -19
  40. ccxt/async_support/btcturk.py +36 -12
  41. ccxt/async_support/bybit.py +251 -95
  42. ccxt/async_support/cex.py +65 -22
  43. ccxt/async_support/coinbase.py +138 -56
  44. ccxt/async_support/coinbaseexchange.py +76 -28
  45. ccxt/async_support/coinbaseinternational.py +75 -27
  46. ccxt/async_support/coincatch.py +191 -97
  47. ccxt/async_support/coincheck.py +33 -11
  48. ccxt/async_support/coinex.py +212 -101
  49. ccxt/async_support/coinlist.py +87 -30
  50. ccxt/async_support/coinmate.py +55 -24
  51. ccxt/async_support/coinmetro.py +52 -18
  52. ccxt/async_support/coinone.py +27 -10
  53. ccxt/async_support/coinsph.py +73 -27
  54. ccxt/async_support/coinspot.py +25 -9
  55. ccxt/async_support/cryptocom.py +103 -38
  56. ccxt/async_support/currencycom.py +70 -23
  57. ccxt/async_support/delta.py +90 -30
  58. ccxt/async_support/deribit.py +138 -53
  59. ccxt/async_support/digifinex.py +114 -51
  60. ccxt/async_support/exmo.py +104 -45
  61. ccxt/async_support/gate.py +298 -155
  62. ccxt/async_support/gemini.py +57 -20
  63. ccxt/async_support/hashkey.py +151 -66
  64. ccxt/async_support/hitbtc.py +156 -73
  65. ccxt/async_support/hollaex.py +76 -25
  66. ccxt/async_support/htx.py +297 -240
  67. ccxt/async_support/huobijp.py +1 -0
  68. ccxt/async_support/hyperliquid.py +203 -42
  69. ccxt/async_support/idex.py +73 -24
  70. ccxt/async_support/independentreserve.py +12 -5
  71. ccxt/async_support/indodax.py +53 -16
  72. ccxt/async_support/kraken.py +107 -35
  73. ccxt/async_support/krakenfutures.py +88 -34
  74. ccxt/async_support/kucoin.py +211 -109
  75. ccxt/async_support/kucoinfutures.py +119 -42
  76. ccxt/async_support/kuna.py +80 -39
  77. ccxt/async_support/latoken.py +70 -33
  78. ccxt/async_support/lbank.py +90 -39
  79. ccxt/async_support/luno.py +54 -19
  80. ccxt/async_support/lykke.py +54 -19
  81. ccxt/async_support/mercado.py +1 -0
  82. ccxt/async_support/mexc.py +226 -108
  83. ccxt/async_support/ndax.py +58 -19
  84. ccxt/async_support/novadax.py +67 -22
  85. ccxt/async_support/oceanex.py +58 -19
  86. ccxt/async_support/okcoin.py +81 -38
  87. ccxt/async_support/okx.py +270 -109
  88. ccxt/async_support/onetrading.py +3 -1
  89. ccxt/async_support/oxfun.py +95 -36
  90. ccxt/async_support/p2b.py +49 -23
  91. ccxt/async_support/paradex.py +75 -27
  92. ccxt/async_support/paymium.py +31 -11
  93. ccxt/async_support/phemex.py +91 -41
  94. ccxt/async_support/poloniex.py +80 -30
  95. ccxt/async_support/poloniexfutures.py +72 -30
  96. ccxt/async_support/probit.py +64 -22
  97. ccxt/async_support/timex.py +58 -19
  98. ccxt/async_support/tokocrypto.py +63 -22
  99. ccxt/async_support/tradeogre.py +7 -2
  100. ccxt/async_support/upbit.py +72 -25
  101. ccxt/async_support/vertex.py +74 -28
  102. ccxt/async_support/wavesexchange.py +29 -8
  103. ccxt/async_support/wazirx.py +51 -17
  104. ccxt/async_support/whitebit.py +105 -41
  105. ccxt/async_support/woo.py +162 -65
  106. ccxt/async_support/woofipro.py +118 -49
  107. ccxt/async_support/xt.py +150 -73
  108. ccxt/async_support/yobit.py +49 -16
  109. ccxt/async_support/zaif.py +30 -10
  110. ccxt/async_support/zonda.py +46 -16
  111. ccxt/base/exchange.py +34 -34
  112. ccxt/base/types.py +1 -0
  113. ccxt/bigone.py +71 -27
  114. ccxt/binance.py +564 -323
  115. ccxt/bingx.py +208 -108
  116. ccxt/bit2c.py +34 -12
  117. ccxt/bitbank.py +42 -14
  118. ccxt/bitbns.py +29 -21
  119. ccxt/bitfinex.py +77 -33
  120. ccxt/bitfinex2.py +116 -44
  121. ccxt/bitflyer.py +54 -18
  122. ccxt/bitget.py +277 -145
  123. ccxt/bithumb.py +39 -14
  124. ccxt/bitmart.py +198 -132
  125. ccxt/bitmex.py +90 -30
  126. ccxt/bitopro.py +66 -22
  127. ccxt/bitrue.py +109 -57
  128. ccxt/bitso.py +55 -19
  129. ccxt/bitstamp.py +84 -36
  130. ccxt/bitteam.py +51 -17
  131. ccxt/bitvavo.py +57 -19
  132. ccxt/bl3p.py +26 -10
  133. ccxt/blockchaincom.py +63 -21
  134. ccxt/blofin.py +95 -38
  135. ccxt/btcalpha.py +48 -16
  136. ccxt/btcbox.py +27 -9
  137. ccxt/btcmarkets.py +57 -19
  138. ccxt/btcturk.py +36 -12
  139. ccxt/bybit.py +251 -95
  140. ccxt/cex.py +65 -22
  141. ccxt/coinbase.py +138 -56
  142. ccxt/coinbaseexchange.py +76 -28
  143. ccxt/coinbaseinternational.py +75 -27
  144. ccxt/coincatch.py +191 -97
  145. ccxt/coincheck.py +33 -11
  146. ccxt/coinex.py +212 -101
  147. ccxt/coinlist.py +87 -30
  148. ccxt/coinmate.py +55 -24
  149. ccxt/coinmetro.py +52 -18
  150. ccxt/coinone.py +27 -10
  151. ccxt/coinsph.py +73 -27
  152. ccxt/coinspot.py +25 -9
  153. ccxt/cryptocom.py +103 -38
  154. ccxt/currencycom.py +70 -23
  155. ccxt/delta.py +90 -30
  156. ccxt/deribit.py +138 -53
  157. ccxt/digifinex.py +114 -51
  158. ccxt/exmo.py +104 -45
  159. ccxt/gate.py +298 -155
  160. ccxt/gemini.py +57 -20
  161. ccxt/hashkey.py +151 -66
  162. ccxt/hitbtc.py +156 -73
  163. ccxt/hollaex.py +76 -25
  164. ccxt/htx.py +297 -240
  165. ccxt/huobijp.py +1 -0
  166. ccxt/hyperliquid.py +203 -42
  167. ccxt/idex.py +73 -24
  168. ccxt/independentreserve.py +12 -5
  169. ccxt/indodax.py +53 -16
  170. ccxt/kraken.py +107 -35
  171. ccxt/krakenfutures.py +88 -34
  172. ccxt/kucoin.py +211 -109
  173. ccxt/kucoinfutures.py +119 -42
  174. ccxt/kuna.py +80 -39
  175. ccxt/latoken.py +70 -33
  176. ccxt/lbank.py +90 -39
  177. ccxt/luno.py +54 -19
  178. ccxt/lykke.py +54 -19
  179. ccxt/mercado.py +1 -0
  180. ccxt/mexc.py +226 -108
  181. ccxt/ndax.py +58 -19
  182. ccxt/novadax.py +67 -22
  183. ccxt/oceanex.py +58 -19
  184. ccxt/okcoin.py +81 -38
  185. ccxt/okx.py +270 -109
  186. ccxt/onetrading.py +3 -1
  187. ccxt/oxfun.py +95 -36
  188. ccxt/p2b.py +49 -23
  189. ccxt/paradex.py +75 -27
  190. ccxt/paymium.py +31 -11
  191. ccxt/phemex.py +91 -41
  192. ccxt/poloniex.py +80 -30
  193. ccxt/poloniexfutures.py +72 -30
  194. ccxt/pro/__init__.py +1 -1
  195. ccxt/pro/alpaca.py +15 -5
  196. ccxt/pro/ascendex.py +18 -6
  197. ccxt/pro/binance.py +200 -119
  198. ccxt/pro/bingx.py +44 -24
  199. ccxt/pro/bitfinex.py +13 -5
  200. ccxt/pro/bitget.py +75 -36
  201. ccxt/pro/bithumb.py +12 -4
  202. ccxt/pro/bitmart.py +44 -20
  203. ccxt/pro/bitmex.py +42 -14
  204. ccxt/pro/bitopro.py +15 -5
  205. ccxt/pro/bitrue.py +7 -3
  206. ccxt/pro/bitvavo.py +51 -17
  207. ccxt/pro/blockchaincom.py +18 -6
  208. ccxt/pro/blofin.py +38 -13
  209. ccxt/pro/bybit.py +100 -42
  210. ccxt/pro/cex.py +48 -16
  211. ccxt/pro/coinbase.py +32 -12
  212. ccxt/pro/coinbaseexchange.py +1 -1
  213. ccxt/pro/coinbaseinternational.py +34 -14
  214. ccxt/pro/coincatch.py +54 -19
  215. ccxt/pro/coincheck.py +6 -2
  216. ccxt/pro/coinex.py +40 -20
  217. ccxt/pro/coinone.py +9 -3
  218. ccxt/pro/cryptocom.py +70 -26
  219. ccxt/pro/deribit.py +36 -12
  220. ccxt/pro/exmo.py +10 -4
  221. ccxt/pro/gate.py +64 -30
  222. ccxt/pro/gemini.py +21 -7
  223. ccxt/pro/hashkey.py +26 -8
  224. ccxt/pro/hitbtc.py +61 -37
  225. ccxt/pro/hollaex.py +15 -5
  226. ccxt/pro/htx.py +39 -21
  227. ccxt/pro/hyperliquid.py +41 -14
  228. ccxt/pro/kraken.py +49 -17
  229. ccxt/pro/krakenfutures.py +47 -24
  230. ccxt/pro/kucoin.py +60 -31
  231. ccxt/pro/kucoinfutures.py +41 -19
  232. ccxt/pro/lbank.py +27 -9
  233. ccxt/pro/luno.py +3 -1
  234. ccxt/pro/mexc.py +35 -17
  235. ccxt/pro/ndax.py +12 -4
  236. ccxt/pro/okcoin.py +18 -6
  237. ccxt/pro/okx.py +76 -28
  238. ccxt/pro/onetrading.py +21 -7
  239. ccxt/pro/oxfun.py +54 -20
  240. ccxt/pro/p2b.py +23 -11
  241. ccxt/pro/paradex.py +12 -4
  242. ccxt/pro/phemex.py +31 -19
  243. ccxt/pro/poloniex.py +50 -22
  244. ccxt/pro/poloniexfutures.py +17 -7
  245. ccxt/pro/probit.py +18 -6
  246. ccxt/pro/upbit.py +25 -9
  247. ccxt/pro/vertex.py +20 -6
  248. ccxt/pro/wazirx.py +21 -7
  249. ccxt/pro/whitebit.py +25 -9
  250. ccxt/pro/woo.py +32 -12
  251. ccxt/pro/woofipro.py +35 -13
  252. ccxt/pro/xt.py +46 -26
  253. ccxt/probit.py +64 -22
  254. ccxt/test/tests_helpers.py +2 -2
  255. ccxt/timex.py +58 -19
  256. ccxt/tokocrypto.py +63 -22
  257. ccxt/tradeogre.py +7 -2
  258. ccxt/upbit.py +72 -25
  259. ccxt/vertex.py +74 -28
  260. ccxt/wavesexchange.py +29 -8
  261. ccxt/wazirx.py +51 -17
  262. ccxt/whitebit.py +105 -41
  263. ccxt/woo.py +162 -65
  264. ccxt/woofipro.py +118 -49
  265. ccxt/xt.py +150 -73
  266. ccxt/yobit.py +49 -16
  267. ccxt/zaif.py +30 -10
  268. ccxt/zonda.py +46 -16
  269. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/METADATA +5 -5
  270. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/RECORD +273 -273
  271. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/LICENSE.txt +0 -0
  272. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/WHEEL +0 -0
  273. {ccxt-4.4.29.dist-info → ccxt-4.4.31.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.29'
25
+ __version__ = '4.4.31'
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/ace.py CHANGED
@@ -181,7 +181,9 @@ class ace(Exchange, ImplicitAPI):
181
181
  def fetch_markets(self, params={}) -> List[Market]:
182
182
  """
183
183
  retrieves data on all markets for ace
184
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---market-pair
184
+
185
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---market-pair
186
+
185
187
  :param dict [params]: extra parameters specific to the exchange API endpoint
186
188
  :returns dict[]: an array of objects representing market data
187
189
  """
@@ -308,7 +310,9 @@ class ace(Exchange, ImplicitAPI):
308
310
  def fetch_ticker(self, symbol: str, params={}) -> Ticker:
309
311
  """
310
312
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
311
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---trade-data
313
+
314
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---trade-data
315
+
312
316
  :param str symbol: unified symbol of the market to fetch the ticker for
313
317
  :param dict [params]: extra parameters specific to the exchange API endpoint
314
318
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -332,7 +336,9 @@ class ace(Exchange, ImplicitAPI):
332
336
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
333
337
  """
334
338
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
335
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---trade-data
339
+
340
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#oapi-api---trade-data
341
+
336
342
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
337
343
  :param dict [params]: extra parameters specific to the exchange API endpoint
338
344
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -361,7 +367,9 @@ class ace(Exchange, ImplicitAPI):
361
367
  def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
362
368
  """
363
369
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
364
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-books
370
+
371
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-books
372
+
365
373
  :param str symbol: unified symbol of the market to fetch the order book for
366
374
  :param int [limit]: the maximum amount of order book entries to return
367
375
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -447,7 +455,9 @@ class ace(Exchange, ImplicitAPI):
447
455
  def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
448
456
  """
449
457
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
450
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---klinecandlestick-data
458
+
459
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---klinecandlestick-data
460
+
451
461
  :param str symbol: unified symbol of the market to fetch OHLCV data for
452
462
  :param str timeframe: the length of time each candle represents
453
463
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -589,7 +599,9 @@ class ace(Exchange, ImplicitAPI):
589
599
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
590
600
  """
591
601
  create a trade order
592
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---new-order
602
+
603
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---new-order
604
+
593
605
  :param str symbol: unified symbol of the market to create an order in
594
606
  :param str type: 'market' or 'limit'
595
607
  :param str side: 'buy' or 'sell'
@@ -626,7 +638,9 @@ class ace(Exchange, ImplicitAPI):
626
638
  def cancel_order(self, id: str, symbol: Str = None, params={}):
627
639
  """
628
640
  cancels an open order
629
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---cancel-order
641
+
642
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---cancel-order
643
+
630
644
  :param str id: order id
631
645
  :param str symbol: unified symbol of the market the order was made in
632
646
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -650,7 +664,9 @@ class ace(Exchange, ImplicitAPI):
650
664
  def fetch_order(self, id: str, symbol: Str = None, params={}):
651
665
  """
652
666
  fetches information on an order made by the user
653
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-status
667
+
668
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-status
669
+
654
670
  :param str id: the order id
655
671
  :param str symbol: unified symbol of the market the order was made in
656
672
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -689,7 +705,9 @@ class ace(Exchange, ImplicitAPI):
689
705
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
690
706
  """
691
707
  fetch all unfilled currently open orders
692
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-list
708
+
709
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-list
710
+
693
711
  :param str symbol: unified market symbol of the market orders were made in
694
712
  :param int [since]: the earliest time in ms to fetch orders for
695
713
  :param int [limit]: the maximum number of order structures to retrieve
@@ -818,7 +836,9 @@ class ace(Exchange, ImplicitAPI):
818
836
  def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
819
837
  """
820
838
  fetch all the trades made from a single order
821
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-history
839
+
840
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---order-history
841
+
822
842
  :param str id: order id
823
843
  :param str symbol: unified market symbol
824
844
  :param int [since]: the earliest time in ms to fetch trades for
@@ -872,7 +892,9 @@ class ace(Exchange, ImplicitAPI):
872
892
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
873
893
  """
874
894
  fetch all trades made by the user
875
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---trade-list
895
+
896
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---trade-list
897
+
876
898
  :param str symbol: unified symbol of the market to fetch trades for
877
899
  :param int [since]: timestamp in ms of the earliest trade to fetch
878
900
  :param int [limit]: the maximum amount of trades to fetch
@@ -955,7 +977,9 @@ class ace(Exchange, ImplicitAPI):
955
977
  def fetch_balance(self, params={}) -> Balances:
956
978
  """
957
979
  query for balance and get the amount of funds available for trading or funds locked in orders
958
- :see: https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---account-balance
980
+
981
+ https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---account-balance
982
+
959
983
  :param dict [params]: extra parameters specific to the exchange API endpoint
960
984
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
961
985
  """
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
  ],
@@ -312,7 +314,9 @@ class alpaca(Exchange, ImplicitAPI):
312
314
  def fetch_markets(self, params={}) -> List[Market]:
313
315
  """
314
316
  retrieves data on all markets for alpaca
315
- :see: https://docs.alpaca.markets/reference/get-v2-assets
317
+
318
+ https://docs.alpaca.markets/reference/get-v2-assets
319
+
316
320
  :param dict [params]: extra parameters specific to the exchange api endpoint
317
321
  :returns dict[]: an array of objects representing market data
318
322
  """
@@ -436,8 +440,10 @@ class alpaca(Exchange, ImplicitAPI):
436
440
  def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
437
441
  """
438
442
  get the list of most recent trades for a particular symbol
439
- :see: https://docs.alpaca.markets/reference/cryptotrades
440
- :see: https://docs.alpaca.markets/reference/cryptolatesttrades
443
+
444
+ https://docs.alpaca.markets/reference/cryptotrades
445
+ https://docs.alpaca.markets/reference/cryptolatesttrades
446
+
441
447
  :param str symbol: unified symbol of the market to fetch trades for
442
448
  :param int [since]: timestamp in ms of the earliest trade to fetch
443
449
  :param int [limit]: the maximum amount of trades to fetch
@@ -506,7 +512,9 @@ class alpaca(Exchange, ImplicitAPI):
506
512
  def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
507
513
  """
508
514
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
509
- :see: https://docs.alpaca.markets/reference/cryptolatestorderbooks
515
+
516
+ https://docs.alpaca.markets/reference/cryptolatestorderbooks
517
+
510
518
  :param str symbol: unified symbol of the market to fetch the order book for
511
519
  :param int [limit]: the maximum amount of order book entries to return
512
520
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -567,8 +575,10 @@ class alpaca(Exchange, ImplicitAPI):
567
575
  def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
568
576
  """
569
577
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
570
- :see: https://docs.alpaca.markets/reference/cryptobars
571
- :see: https://docs.alpaca.markets/reference/cryptolatestbars
578
+
579
+ https://docs.alpaca.markets/reference/cryptobars
580
+ https://docs.alpaca.markets/reference/cryptolatestbars
581
+
572
582
  :param str symbol: unified symbol of the market to fetch OHLCV data for
573
583
  :param str timeframe: the length of time each candle represents
574
584
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -679,7 +689,9 @@ class alpaca(Exchange, ImplicitAPI):
679
689
  def fetch_ticker(self, symbol: str, params={}) -> Ticker:
680
690
  """
681
691
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
682
- :see: https://docs.alpaca.markets/reference/cryptosnapshots-1
692
+
693
+ https://docs.alpaca.markets/reference/cryptosnapshots-1
694
+
683
695
  :param str symbol: unified symbol of the market to fetch the ticker for
684
696
  :param dict [params]: extra parameters specific to the exchange API endpoint
685
697
  :param str [params.loc]: crypto location, default: us
@@ -693,7 +705,9 @@ class alpaca(Exchange, ImplicitAPI):
693
705
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
694
706
  """
695
707
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
696
- :see: https://docs.alpaca.markets/reference/cryptosnapshots-1
708
+
709
+ https://docs.alpaca.markets/reference/cryptosnapshots-1
710
+
697
711
  :param str[] symbols: unified symbols of the markets to fetch tickers for
698
712
  :param dict [params]: extra parameters specific to the exchange API endpoint
699
713
  :param str [params.loc]: crypto location, default: us
@@ -800,10 +814,21 @@ class alpaca(Exchange, ImplicitAPI):
800
814
  results.append(ticker)
801
815
  return self.filter_by_array(results, 'symbol', symbols)
802
816
 
817
+ def generate_client_order_id(self, params):
818
+ clientOrderIdprefix = self.safe_string(self.options, 'clientOrderId')
819
+ uuid = self.uuid()
820
+ parts = uuid.split('-')
821
+ random_id = ''.join(parts)
822
+ defaultClientId = self.implode_params(clientOrderIdprefix, {'id': random_id})
823
+ clientOrderId = self.safe_string(params, 'clientOrderId', defaultClientId)
824
+ return clientOrderId
825
+
803
826
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
804
827
  """
805
828
  create a trade order
806
- :see: https://docs.alpaca.markets/reference/postorder
829
+
830
+ https://docs.alpaca.markets/reference/postorder
831
+
807
832
  :param str symbol: unified symbol of the market to create an order in
808
833
  :param str type: 'market', 'limit' or 'stop_limit'
809
834
  :param str side: 'buy' or 'sell'
@@ -836,13 +861,7 @@ class alpaca(Exchange, ImplicitAPI):
836
861
  defaultTIF = self.safe_string(self.options, 'defaultTimeInForce')
837
862
  request['time_in_force'] = self.safe_string(params, 'timeInForce', defaultTIF)
838
863
  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
864
+ request['client_order_id'] = self.generate_client_order_id(params)
846
865
  params = self.omit(params, ['clientOrderId'])
847
866
  order = self.traderPrivatePostV2Orders(self.extend(request, params))
848
867
  #
@@ -886,7 +905,9 @@ class alpaca(Exchange, ImplicitAPI):
886
905
  def cancel_order(self, id: str, symbol: Str = None, params={}):
887
906
  """
888
907
  cancels an open order
889
- :see: https://docs.alpaca.markets/reference/deleteorderbyorderid
908
+
909
+ https://docs.alpaca.markets/reference/deleteorderbyorderid
910
+
890
911
  :param str id: order id
891
912
  :param str symbol: unified symbol of the market the order was made in
892
913
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -907,7 +928,9 @@ class alpaca(Exchange, ImplicitAPI):
907
928
  def cancel_all_orders(self, symbol: Str = None, params={}):
908
929
  """
909
930
  cancel all open orders in a market
910
- :see: https://docs.alpaca.markets/reference/deleteallorders
931
+
932
+ https://docs.alpaca.markets/reference/deleteallorders
933
+
911
934
  :param str symbol: alpaca cancelAllOrders cannot setting symbol, it will cancel all open orders
912
935
  :param dict [params]: extra parameters specific to the exchange API endpoint
913
936
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
@@ -926,7 +949,9 @@ class alpaca(Exchange, ImplicitAPI):
926
949
  def fetch_order(self, id: str, symbol: Str = None, params={}):
927
950
  """
928
951
  fetches information on an order made by the user
929
- :see: https://docs.alpaca.markets/reference/getorderbyorderid
952
+
953
+ https://docs.alpaca.markets/reference/getorderbyorderid
954
+
930
955
  :param str id: the order id
931
956
  :param str symbol: unified symbol of the market the order was made in
932
957
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -944,7 +969,9 @@ class alpaca(Exchange, ImplicitAPI):
944
969
  def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
945
970
  """
946
971
  fetches information on multiple orders made by the user
947
- :see: https://docs.alpaca.markets/reference/getallorders
972
+
973
+ https://docs.alpaca.markets/reference/getallorders
974
+
948
975
  :param str symbol: unified market symbol of the market orders were made in
949
976
  :param int [since]: the earliest time in ms to fetch orders for
950
977
  :param int [limit]: the maximum number of order structures to retrieve
@@ -1014,7 +1041,9 @@ class alpaca(Exchange, ImplicitAPI):
1014
1041
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1015
1042
  """
1016
1043
  fetch all unfilled currently open orders
1017
- :see: https://docs.alpaca.markets/reference/getallorders
1044
+
1045
+ https://docs.alpaca.markets/reference/getallorders
1046
+
1018
1047
  :param str symbol: unified market symbol of the market orders were made in
1019
1048
  :param int [since]: the earliest time in ms to fetch orders for
1020
1049
  :param int [limit]: the maximum number of order structures to retrieve
@@ -1030,7 +1059,9 @@ class alpaca(Exchange, ImplicitAPI):
1030
1059
  def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1031
1060
  """
1032
1061
  fetches information on multiple closed orders made by the user
1033
- :see: https://docs.alpaca.markets/reference/getallorders
1062
+
1063
+ https://docs.alpaca.markets/reference/getallorders
1064
+
1034
1065
  :param str symbol: unified market symbol of the market orders were made in
1035
1066
  :param int [since]: the earliest time in ms to fetch orders for
1036
1067
  :param int [limit]: the maximum number of order structures to retrieve
@@ -1043,6 +1074,48 @@ class alpaca(Exchange, ImplicitAPI):
1043
1074
  }
1044
1075
  return self.fetch_orders(symbol, since, limit, self.extend(request, params))
1045
1076
 
1077
+ def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
1078
+ """
1079
+ edit a trade order
1080
+
1081
+ https://docs.alpaca.markets/reference/patchorderbyorderid-1
1082
+
1083
+ :param str id: order id
1084
+ :param str [symbol]: unified symbol of the market to create an order in
1085
+ :param str [type]: 'market', 'limit' or 'stop_limit'
1086
+ :param str [side]: 'buy' or 'sell'
1087
+ :param float [amount]: how much of the currency you want to trade in units of the base currency
1088
+ :param float [price]: the price for the order, in units of the quote currency, ignored in market orders
1089
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1090
+ :param str [params.triggerPrice]: the price to trigger a stop order
1091
+ :param str [params.timeInForce]: for crypto trading either 'gtc' or 'ioc' can be used
1092
+ :param str [params.clientOrderId]: a unique identifier for the order, automatically generated if not sent
1093
+ :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1094
+ """
1095
+ self.load_markets()
1096
+ request: dict = {
1097
+ 'order_id': id,
1098
+ }
1099
+ market = None
1100
+ if symbol is not None:
1101
+ market = self.market(symbol)
1102
+ if amount is not None:
1103
+ request['qty'] = self.amount_to_precision(symbol, amount)
1104
+ triggerPrice = self.safe_string_n(params, ['triggerPrice', 'stop_price'])
1105
+ if triggerPrice is not None:
1106
+ request['stop_price'] = self.price_to_precision(symbol, triggerPrice)
1107
+ params = self.omit(params, 'triggerPrice')
1108
+ if price is not None:
1109
+ request['limit_price'] = self.price_to_precision(symbol, price)
1110
+ timeInForce = None
1111
+ timeInForce, params = self.handle_option_and_params_2(params, 'editOrder', 'timeInForce', 'defaultTimeInForce')
1112
+ if timeInForce is not None:
1113
+ request['time_in_force'] = timeInForce
1114
+ request['client_order_id'] = self.generate_client_order_id(params)
1115
+ params = self.omit(params, ['clientOrderId'])
1116
+ response = self.traderPrivatePatchV2OrdersOrderId(self.extend(request, params))
1117
+ return self.parse_order(response, market)
1118
+
1046
1119
  def parse_order(self, order: dict, market: Market = None) -> Order:
1047
1120
  #
1048
1121
  # {
@@ -1146,7 +1219,9 @@ class alpaca(Exchange, ImplicitAPI):
1146
1219
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1147
1220
  """
1148
1221
  fetch all trades made by the user
1149
- :see: https://docs.alpaca.markets/reference/getaccountactivitiesbyactivitytype-1
1222
+
1223
+ https://docs.alpaca.markets/reference/getaccountactivitiesbyactivitytype-1
1224
+
1150
1225
  :param str [symbol]: unified market symbol
1151
1226
  :param int [since]: the earliest time in ms to fetch trades for
1152
1227
  :param int [limit]: the maximum number of trade structures to retrieve
@@ -1250,7 +1325,9 @@ class alpaca(Exchange, ImplicitAPI):
1250
1325
  def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
1251
1326
  """
1252
1327
  fetch the deposit address for a currency associated with self account
1253
- :see: https://docs.alpaca.markets/reference/listcryptofundingwallets
1328
+
1329
+ https://docs.alpaca.markets/reference/listcryptofundingwallets
1330
+
1254
1331
  :param str code: unified currency code
1255
1332
  :param dict [params]: extra parameters specific to the exchange API endpoint
1256
1333
  :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
@@ -1292,7 +1369,9 @@ class alpaca(Exchange, ImplicitAPI):
1292
1369
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
1293
1370
  """
1294
1371
  make a withdrawal
1295
- :see: https://docs.alpaca.markets/reference/createcryptotransferforaccount
1372
+
1373
+ https://docs.alpaca.markets/reference/createcryptotransferforaccount
1374
+
1296
1375
  :param str code: unified currency code
1297
1376
  :param float amount: the amount to withdraw
1298
1377
  :param str address: the address to withdraw to
@@ -1367,7 +1446,9 @@ class alpaca(Exchange, ImplicitAPI):
1367
1446
  def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1368
1447
  """
1369
1448
  fetch history of deposits and withdrawals
1370
- :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1449
+
1450
+ https://docs.alpaca.markets/reference/listcryptofundingtransfers
1451
+
1371
1452
  :param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
1372
1453
  :param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
1373
1454
  :param int [limit]: max number of deposit/withdrawals to return, default is None
@@ -1379,7 +1460,9 @@ class alpaca(Exchange, ImplicitAPI):
1379
1460
  def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1380
1461
  """
1381
1462
  fetch all deposits made to an account
1382
- :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1463
+
1464
+ https://docs.alpaca.markets/reference/listcryptofundingtransfers
1465
+
1383
1466
  :param str [code]: unified currency code
1384
1467
  :param int [since]: the earliest time in ms to fetch deposits for
1385
1468
  :param int [limit]: the maximum number of deposit structures to retrieve
@@ -1391,7 +1474,9 @@ class alpaca(Exchange, ImplicitAPI):
1391
1474
  def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1392
1475
  """
1393
1476
  fetch all withdrawals made from an account
1394
- :see: https://docs.alpaca.markets/reference/listcryptofundingtransfers
1477
+
1478
+ https://docs.alpaca.markets/reference/listcryptofundingtransfers
1479
+
1395
1480
  :param str [code]: unified currency code
1396
1481
  :param int [since]: the earliest time in ms to fetch withdrawals for
1397
1482
  :param int [limit]: the maximum number of withdrawal structures to retrieve