ccxt 4.4.29__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.
- ccxt/__init__.py +1 -1
- ccxt/abstract/alpaca.py +1 -0
- ccxt/abstract/binance.py +9 -0
- ccxt/abstract/binancecoinm.py +9 -0
- ccxt/abstract/binanceus.py +9 -0
- ccxt/abstract/binanceusdm.py +9 -0
- ccxt/alpaca.py +52 -7
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/alpaca.py +52 -7
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +9 -0
- ccxt/async_support/bitbns.py +12 -12
- ccxt/async_support/bitfinex.py +9 -9
- ccxt/async_support/bitmart.py +53 -53
- ccxt/async_support/deribit.py +7 -3
- ccxt/async_support/hyperliquid.py +110 -5
- ccxt/async_support/lbank.py +1 -1
- ccxt/base/exchange.py +1 -1
- ccxt/binance.py +9 -0
- ccxt/bitbns.py +12 -12
- ccxt/bitfinex.py +9 -9
- ccxt/bitmart.py +53 -53
- ccxt/deribit.py +7 -3
- ccxt/hyperliquid.py +110 -5
- ccxt/lbank.py +1 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/blofin.py +2 -1
- ccxt/test/tests_helpers.py +2 -2
- {ccxt-4.4.29.dist-info → ccxt-4.4.30.dist-info}/METADATA +4 -4
- {ccxt-4.4.29.dist-info → ccxt-4.4.30.dist-info}/RECORD +33 -33
- {ccxt-4.4.29.dist-info → ccxt-4.4.30.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.29.dist-info → ccxt-4.4.30.dist-info}/WHEEL +0 -0
- {ccxt-4.4.29.dist-info → ccxt-4.4.30.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
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})
|
ccxt/abstract/binancecoinm.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})
|
ccxt/abstract/binanceus.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})
|
@@ -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})
|
ccxt/abstract/binanceusdm.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})
|
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
|
-
|
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
|
# {
|
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/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
|
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
|
-
|
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
|
# {
|
ccxt/async_support/binance.py
CHANGED
@@ -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,
|
ccxt/async_support/bitbns.py
CHANGED
@@ -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.
|
230
|
-
marketLimits = self.
|
231
|
-
amountLimits = self.
|
232
|
-
priceLimits = self.
|
233
|
-
costLimits = self.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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)
|
ccxt/async_support/bitfinex.py
CHANGED
@@ -435,7 +435,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
435
435
|
# }
|
436
436
|
# }
|
437
437
|
#
|
438
|
-
fees = self.
|
438
|
+
fees = self.safe_dict(response, 'withdraw', {})
|
439
439
|
ids = list(fees.keys())
|
440
440
|
for i in range(0, len(ids)):
|
441
441
|
id = ids[i]
|
@@ -536,7 +536,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
536
536
|
# }
|
537
537
|
#
|
538
538
|
result: dict = {}
|
539
|
-
fiat = self.
|
539
|
+
fiat = self.safe_dict(self.options, 'fiat', {})
|
540
540
|
makerFee = self.safe_number(response, 'maker_fee')
|
541
541
|
takerFee = self.safe_number(response, 'taker_fee')
|
542
542
|
makerFee2Fiat = self.safe_number(response, 'maker_fee_2fiat')
|
@@ -625,7 +625,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
625
625
|
'settleId': None,
|
626
626
|
'type': type,
|
627
627
|
'spot': (type == 'spot'),
|
628
|
-
'margin': self.
|
628
|
+
'margin': self.safe_bool(market, 'margin'),
|
629
629
|
'swap': (type == 'swap'),
|
630
630
|
'future': False,
|
631
631
|
'option': False,
|
@@ -692,7 +692,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
692
692
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
693
693
|
"""
|
694
694
|
await self.load_markets()
|
695
|
-
accountsByType = self.
|
695
|
+
accountsByType = self.safe_dict(self.options, 'accountsByType', {})
|
696
696
|
requestedType = self.safe_string(params, 'type', 'exchange')
|
697
697
|
accountType = self.safe_string(accountsByType, requestedType, requestedType)
|
698
698
|
if accountType is None:
|
@@ -750,7 +750,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
750
750
|
# transferring between derivatives wallet and regular wallet is not documented in their API
|
751
751
|
# however we support it in CCXT(from just looking at web inspector)
|
752
752
|
await self.load_markets()
|
753
|
-
accountsByType = self.
|
753
|
+
accountsByType = self.safe_dict(self.options, 'accountsByType', {})
|
754
754
|
fromId = self.safe_string(accountsByType, fromAccount, fromAccount)
|
755
755
|
toId = self.safe_string(accountsByType, toAccount, toAccount)
|
756
756
|
currency = self.currency(code)
|
@@ -1191,8 +1191,8 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1191
1191
|
# }
|
1192
1192
|
#
|
1193
1193
|
side = self.safe_string(order, 'side')
|
1194
|
-
open = self.
|
1195
|
-
canceled = self.
|
1194
|
+
open = self.safe_bool(order, 'is_live')
|
1195
|
+
canceled = self.safe_bool(order, 'is_cancelled')
|
1196
1196
|
status = None
|
1197
1197
|
if open:
|
1198
1198
|
status = 'open'
|
@@ -1564,7 +1564,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1564
1564
|
# }
|
1565
1565
|
# ]
|
1566
1566
|
#
|
1567
|
-
response = self.
|
1567
|
+
response = self.safe_dict(responses, 0, {})
|
1568
1568
|
id = self.safe_integer(response, 'withdrawal_id')
|
1569
1569
|
message = self.safe_string(response, 'message')
|
1570
1570
|
errorMessage = self.find_broadly_matched_key(self.exceptions['broad'], message)
|
@@ -1647,7 +1647,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1647
1647
|
else:
|
1648
1648
|
# json response with error, i.e:
|
1649
1649
|
# [{"status":"error","message":"Momentary balance check. Please wait few seconds and try the transfer again."}]
|
1650
|
-
responseObject = self.
|
1650
|
+
responseObject = self.safe_dict(response, 0, {})
|
1651
1651
|
status = self.safe_string(responseObject, 'status', '')
|
1652
1652
|
if status == 'error':
|
1653
1653
|
throwError = True
|