ccxt 4.0.100__py2.py3-none-any.whl → 4.0.102__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 -3
- ccxt/abstract/binance.py +8 -0
- ccxt/abstract/binancecoinm.py +8 -0
- ccxt/abstract/binanceus.py +8 -0
- ccxt/abstract/binanceusdm.py +8 -0
- ccxt/abstract/bingx.py +16 -1
- ccxt/async_support/__init__.py +1 -3
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +36 -1
- ccxt/async_support/bingx.py +41 -4
- ccxt/async_support/bitbank.py +11 -0
- ccxt/async_support/bitfinex.py +12 -8
- ccxt/async_support/bitflyer.py +39 -10
- ccxt/async_support/bitforex.py +0 -8
- ccxt/async_support/bitget.py +15 -5
- ccxt/async_support/bitmart.py +66 -0
- ccxt/async_support/bitstamp1.py +22 -0
- ccxt/async_support/bl3p.py +32 -0
- ccxt/async_support/bybit.py +120 -48
- ccxt/async_support/coinbasepro.py +11 -0
- ccxt/async_support/currencycom.py +1 -1
- ccxt/async_support/gemini.py +1 -0
- ccxt/async_support/huobi.py +1 -1
- ccxt/async_support/huobijp.py +1 -1
- ccxt/async_support/idex.py +1 -1
- ccxt/async_support/kucoinfutures.py +46 -51
- ccxt/async_support/lbank.py +1 -1
- ccxt/async_support/lbank2.py +1 -1
- ccxt/base/exchange.py +1 -1
- ccxt/binance.py +36 -1
- ccxt/bingx.py +41 -4
- ccxt/bitbank.py +11 -0
- ccxt/bitfinex.py +12 -8
- ccxt/bitflyer.py +39 -10
- ccxt/bitforex.py +0 -8
- ccxt/bitget.py +15 -5
- ccxt/bitmart.py +66 -0
- ccxt/bitstamp1.py +22 -0
- ccxt/bl3p.py +32 -0
- ccxt/bybit.py +120 -48
- ccxt/coinbasepro.py +11 -0
- ccxt/currencycom.py +1 -1
- ccxt/gemini.py +1 -0
- ccxt/huobi.py +1 -1
- ccxt/huobijp.py +1 -1
- ccxt/idex.py +1 -1
- ccxt/kucoinfutures.py +46 -51
- ccxt/lbank.py +1 -1
- ccxt/lbank2.py +1 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +7 -7
- ccxt/pro/bybit.py +16 -16
- ccxt/pro/coinbasepro.py +10 -10
- ccxt/pro/huobijp.py +1 -2
- ccxt/pro/krakenfutures.py +7 -7
- ccxt/pro/kucoin.py +42 -2
- ccxt/pro/kucoinfutures.py +3 -3
- ccxt/pro/phemex.py +2 -2
- ccxt/test/test_async.py +1 -1
- ccxt/test/test_sync.py +1 -1
- {ccxt-4.0.100.dist-info → ccxt-4.0.102.dist-info}/METADATA +6 -7
- {ccxt-4.0.100.dist-info → ccxt-4.0.102.dist-info}/RECORD +64 -65
- ccxt/abstract/bkex.py +0 -58
- {ccxt-4.0.100.dist-info → ccxt-4.0.102.dist-info}/WHEEL +0 -0
- {ccxt-4.0.100.dist-info → ccxt-4.0.102.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
# ----------------------------------------------------------------------------
|
24
24
|
|
25
|
-
__version__ = '4.0.
|
25
|
+
__version__ = '4.0.102'
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
@@ -105,7 +105,6 @@ from ccxt.bitstamp import bitstamp # noqa: F4
|
|
105
105
|
from ccxt.bitstamp1 import bitstamp1 # noqa: F401
|
106
106
|
from ccxt.bittrex import bittrex # noqa: F401
|
107
107
|
from ccxt.bitvavo import bitvavo # noqa: F401
|
108
|
-
from ccxt.bkex import bkex # noqa: F401
|
109
108
|
from ccxt.bl3p import bl3p # noqa: F401
|
110
109
|
from ccxt.blockchaincom import blockchaincom # noqa: F401
|
111
110
|
from ccxt.btcalpha import btcalpha # noqa: F401
|
@@ -213,7 +212,6 @@ exchanges = [
|
|
213
212
|
'bitstamp1',
|
214
213
|
'bittrex',
|
215
214
|
'bitvavo',
|
216
|
-
'bkex',
|
217
215
|
'bl3p',
|
218
216
|
'blockchaincom',
|
219
217
|
'btcalpha',
|
ccxt/abstract/binance.py
CHANGED
@@ -196,6 +196,7 @@ class ImplicitAPI:
|
|
196
196
|
sapi_get_portfolio_interest_history = sapiGetPortfolioInterestHistory = Entry('portfolio/interest-history', 'sapi', 'GET', {'cost': 0.6667})
|
197
197
|
sapi_get_portfolio_asset_index_price = sapiGetPortfolioAssetIndexPrice = Entry('portfolio/asset-index-price', 'sapi', 'GET', {'cost': 0.1})
|
198
198
|
sapi_get_portfolio_repay_futures_switch = sapiGetPortfolioRepayFuturesSwitch = Entry('portfolio/repay-futures-switch', 'sapi', 'GET', {'cost': 3})
|
199
|
+
sapi_get_portfolio_margin_asset_leverage = sapiGetPortfolioMarginAssetLeverage = Entry('portfolio/margin-asset-leverage', 'sapi', 'GET', {'cost': 5})
|
199
200
|
sapi_get_staking_productlist = sapiGetStakingProductList = Entry('staking/productList', 'sapi', 'GET', {'cost': 0.1})
|
200
201
|
sapi_get_staking_position = sapiGetStakingPosition = Entry('staking/position', 'sapi', 'GET', {'cost': 0.1})
|
201
202
|
sapi_get_staking_stakingrecord = sapiGetStakingStakingRecord = Entry('staking/stakingRecord', 'sapi', 'GET', {'cost': 0.1})
|
@@ -207,6 +208,11 @@ class ImplicitAPI:
|
|
207
208
|
sapi_get_lending_auto_invest_plan_list = sapiGetLendingAutoInvestPlanList = Entry('lending/auto-invest/plan/list', 'sapi', 'GET', {'cost': 0.1})
|
208
209
|
sapi_get_lending_auto_invest_plan_id = sapiGetLendingAutoInvestPlanId = Entry('lending/auto-invest/plan/id', 'sapi', 'GET', {'cost': 0.1})
|
209
210
|
sapi_get_lending_auto_invest_history_list = sapiGetLendingAutoInvestHistoryList = Entry('lending/auto-invest/history/list', 'sapi', 'GET', {'cost': 0.1})
|
211
|
+
sapi_get_lending_auto_invest_index_info = sapiGetLendingAutoInvestIndexInfo = Entry('lending/auto-invest/index/info', 'sapi', 'GET', {'cost': 0.1})
|
212
|
+
sapi_get_lending_auto_invest_index_user_summary = sapiGetLendingAutoInvestIndexUserSummary = Entry('lending/auto-invest/index/user-summary', 'sapi', 'GET', {'cost': 0.1})
|
213
|
+
sapi_get_lending_auto_invest_one_off_status = sapiGetLendingAutoInvestOneOffStatus = Entry('lending/auto-invest/one-off/status', 'sapi', 'GET', {'cost': 0.1})
|
214
|
+
sapi_get_lending_auto_invest_redeem_history = sapiGetLendingAutoInvestRedeemHistory = Entry('lending/auto-invest/redeem/history', 'sapi', 'GET', {'cost': 0.1})
|
215
|
+
sapi_get_lending_auto_invest_rebalance_history = sapiGetLendingAutoInvestRebalanceHistory = Entry('lending/auto-invest/rebalance/history', 'sapi', 'GET', {'cost': 0.1})
|
210
216
|
sapi_get_simple_earn_flexible_list = sapiGetSimpleEarnFlexibleList = Entry('simple-earn/flexible/list', 'sapi', 'GET', {'cost': 15})
|
211
217
|
sapi_get_simple_earn_locked_list = sapiGetSimpleEarnLockedList = Entry('simple-earn/locked/list', 'sapi', 'GET', {'cost': 15})
|
212
218
|
sapi_get_simple_earn_flexible_personalleftquota = sapiGetSimpleEarnFlexiblePersonalLeftQuota = Entry('simple-earn/flexible/personalLeftQuota', 'sapi', 'GET', {'cost': 15})
|
@@ -322,6 +328,8 @@ class ImplicitAPI:
|
|
322
328
|
sapi_post_lending_auto_invest_plan_add = sapiPostLendingAutoInvestPlanAdd = Entry('lending/auto-invest/plan/add', 'sapi', 'POST', {'cost': 0.1})
|
323
329
|
sapi_post_lending_auto_invest_plan_edit = sapiPostLendingAutoInvestPlanEdit = Entry('lending/auto-invest/plan/edit', 'sapi', 'POST', {'cost': 0.1})
|
324
330
|
sapi_post_lending_auto_invest_plan_edit_status = sapiPostLendingAutoInvestPlanEditStatus = Entry('lending/auto-invest/plan/edit-status', 'sapi', 'POST', {'cost': 0.1})
|
331
|
+
sapi_post_lending_auto_invest_one_off = sapiPostLendingAutoInvestOneOff = Entry('lending/auto-invest/one-off', 'sapi', 'POST', {'cost': 0.1})
|
332
|
+
sapi_post_lending_auto_invest_redeem = sapiPostLendingAutoInvestRedeem = Entry('lending/auto-invest/redeem', 'sapi', 'POST', {'cost': 0.1})
|
325
333
|
sapi_post_simple_earn_flexible_subscribe = sapiPostSimpleEarnFlexibleSubscribe = Entry('simple-earn/flexible/subscribe', 'sapi', 'POST', {'cost': 0.1})
|
326
334
|
sapi_post_simple_earn_locked_subscribe = sapiPostSimpleEarnLockedSubscribe = Entry('simple-earn/locked/subscribe', 'sapi', 'POST', {'cost': 0.1})
|
327
335
|
sapi_post_simple_earn_flexible_redeem = sapiPostSimpleEarnFlexibleRedeem = Entry('simple-earn/flexible/redeem', 'sapi', 'POST', {'cost': 0.1})
|
ccxt/abstract/binancecoinm.py
CHANGED
@@ -196,6 +196,7 @@ class ImplicitAPI:
|
|
196
196
|
sapi_get_portfolio_interest_history = sapiGetPortfolioInterestHistory = Entry('portfolio/interest-history', 'sapi', 'GET', {'cost': 0.6667})
|
197
197
|
sapi_get_portfolio_asset_index_price = sapiGetPortfolioAssetIndexPrice = Entry('portfolio/asset-index-price', 'sapi', 'GET', {'cost': 0.1})
|
198
198
|
sapi_get_portfolio_repay_futures_switch = sapiGetPortfolioRepayFuturesSwitch = Entry('portfolio/repay-futures-switch', 'sapi', 'GET', {'cost': 3})
|
199
|
+
sapi_get_portfolio_margin_asset_leverage = sapiGetPortfolioMarginAssetLeverage = Entry('portfolio/margin-asset-leverage', 'sapi', 'GET', {'cost': 5})
|
199
200
|
sapi_get_staking_productlist = sapiGetStakingProductList = Entry('staking/productList', 'sapi', 'GET', {'cost': 0.1})
|
200
201
|
sapi_get_staking_position = sapiGetStakingPosition = Entry('staking/position', 'sapi', 'GET', {'cost': 0.1})
|
201
202
|
sapi_get_staking_stakingrecord = sapiGetStakingStakingRecord = Entry('staking/stakingRecord', 'sapi', 'GET', {'cost': 0.1})
|
@@ -207,6 +208,11 @@ class ImplicitAPI:
|
|
207
208
|
sapi_get_lending_auto_invest_plan_list = sapiGetLendingAutoInvestPlanList = Entry('lending/auto-invest/plan/list', 'sapi', 'GET', {'cost': 0.1})
|
208
209
|
sapi_get_lending_auto_invest_plan_id = sapiGetLendingAutoInvestPlanId = Entry('lending/auto-invest/plan/id', 'sapi', 'GET', {'cost': 0.1})
|
209
210
|
sapi_get_lending_auto_invest_history_list = sapiGetLendingAutoInvestHistoryList = Entry('lending/auto-invest/history/list', 'sapi', 'GET', {'cost': 0.1})
|
211
|
+
sapi_get_lending_auto_invest_index_info = sapiGetLendingAutoInvestIndexInfo = Entry('lending/auto-invest/index/info', 'sapi', 'GET', {'cost': 0.1})
|
212
|
+
sapi_get_lending_auto_invest_index_user_summary = sapiGetLendingAutoInvestIndexUserSummary = Entry('lending/auto-invest/index/user-summary', 'sapi', 'GET', {'cost': 0.1})
|
213
|
+
sapi_get_lending_auto_invest_one_off_status = sapiGetLendingAutoInvestOneOffStatus = Entry('lending/auto-invest/one-off/status', 'sapi', 'GET', {'cost': 0.1})
|
214
|
+
sapi_get_lending_auto_invest_redeem_history = sapiGetLendingAutoInvestRedeemHistory = Entry('lending/auto-invest/redeem/history', 'sapi', 'GET', {'cost': 0.1})
|
215
|
+
sapi_get_lending_auto_invest_rebalance_history = sapiGetLendingAutoInvestRebalanceHistory = Entry('lending/auto-invest/rebalance/history', 'sapi', 'GET', {'cost': 0.1})
|
210
216
|
sapi_get_simple_earn_flexible_list = sapiGetSimpleEarnFlexibleList = Entry('simple-earn/flexible/list', 'sapi', 'GET', {'cost': 15})
|
211
217
|
sapi_get_simple_earn_locked_list = sapiGetSimpleEarnLockedList = Entry('simple-earn/locked/list', 'sapi', 'GET', {'cost': 15})
|
212
218
|
sapi_get_simple_earn_flexible_personalleftquota = sapiGetSimpleEarnFlexiblePersonalLeftQuota = Entry('simple-earn/flexible/personalLeftQuota', 'sapi', 'GET', {'cost': 15})
|
@@ -322,6 +328,8 @@ class ImplicitAPI:
|
|
322
328
|
sapi_post_lending_auto_invest_plan_add = sapiPostLendingAutoInvestPlanAdd = Entry('lending/auto-invest/plan/add', 'sapi', 'POST', {'cost': 0.1})
|
323
329
|
sapi_post_lending_auto_invest_plan_edit = sapiPostLendingAutoInvestPlanEdit = Entry('lending/auto-invest/plan/edit', 'sapi', 'POST', {'cost': 0.1})
|
324
330
|
sapi_post_lending_auto_invest_plan_edit_status = sapiPostLendingAutoInvestPlanEditStatus = Entry('lending/auto-invest/plan/edit-status', 'sapi', 'POST', {'cost': 0.1})
|
331
|
+
sapi_post_lending_auto_invest_one_off = sapiPostLendingAutoInvestOneOff = Entry('lending/auto-invest/one-off', 'sapi', 'POST', {'cost': 0.1})
|
332
|
+
sapi_post_lending_auto_invest_redeem = sapiPostLendingAutoInvestRedeem = Entry('lending/auto-invest/redeem', 'sapi', 'POST', {'cost': 0.1})
|
325
333
|
sapi_post_simple_earn_flexible_subscribe = sapiPostSimpleEarnFlexibleSubscribe = Entry('simple-earn/flexible/subscribe', 'sapi', 'POST', {'cost': 0.1})
|
326
334
|
sapi_post_simple_earn_locked_subscribe = sapiPostSimpleEarnLockedSubscribe = Entry('simple-earn/locked/subscribe', 'sapi', 'POST', {'cost': 0.1})
|
327
335
|
sapi_post_simple_earn_flexible_redeem = sapiPostSimpleEarnFlexibleRedeem = Entry('simple-earn/flexible/redeem', 'sapi', 'POST', {'cost': 0.1})
|
ccxt/abstract/binanceus.py
CHANGED
@@ -196,6 +196,7 @@ class ImplicitAPI:
|
|
196
196
|
sapi_get_portfolio_interest_history = sapiGetPortfolioInterestHistory = Entry('portfolio/interest-history', 'sapi', 'GET', {'cost': 0.6667})
|
197
197
|
sapi_get_portfolio_asset_index_price = sapiGetPortfolioAssetIndexPrice = Entry('portfolio/asset-index-price', 'sapi', 'GET', {'cost': 0.1})
|
198
198
|
sapi_get_portfolio_repay_futures_switch = sapiGetPortfolioRepayFuturesSwitch = Entry('portfolio/repay-futures-switch', 'sapi', 'GET', {'cost': 3})
|
199
|
+
sapi_get_portfolio_margin_asset_leverage = sapiGetPortfolioMarginAssetLeverage = Entry('portfolio/margin-asset-leverage', 'sapi', 'GET', {'cost': 5})
|
199
200
|
sapi_get_staking_productlist = sapiGetStakingProductList = Entry('staking/productList', 'sapi', 'GET', {'cost': 0.1})
|
200
201
|
sapi_get_staking_position = sapiGetStakingPosition = Entry('staking/position', 'sapi', 'GET', {'cost': 0.1})
|
201
202
|
sapi_get_staking_stakingrecord = sapiGetStakingStakingRecord = Entry('staking/stakingRecord', 'sapi', 'GET', {'cost': 0.1})
|
@@ -207,6 +208,11 @@ class ImplicitAPI:
|
|
207
208
|
sapi_get_lending_auto_invest_plan_list = sapiGetLendingAutoInvestPlanList = Entry('lending/auto-invest/plan/list', 'sapi', 'GET', {'cost': 0.1})
|
208
209
|
sapi_get_lending_auto_invest_plan_id = sapiGetLendingAutoInvestPlanId = Entry('lending/auto-invest/plan/id', 'sapi', 'GET', {'cost': 0.1})
|
209
210
|
sapi_get_lending_auto_invest_history_list = sapiGetLendingAutoInvestHistoryList = Entry('lending/auto-invest/history/list', 'sapi', 'GET', {'cost': 0.1})
|
211
|
+
sapi_get_lending_auto_invest_index_info = sapiGetLendingAutoInvestIndexInfo = Entry('lending/auto-invest/index/info', 'sapi', 'GET', {'cost': 0.1})
|
212
|
+
sapi_get_lending_auto_invest_index_user_summary = sapiGetLendingAutoInvestIndexUserSummary = Entry('lending/auto-invest/index/user-summary', 'sapi', 'GET', {'cost': 0.1})
|
213
|
+
sapi_get_lending_auto_invest_one_off_status = sapiGetLendingAutoInvestOneOffStatus = Entry('lending/auto-invest/one-off/status', 'sapi', 'GET', {'cost': 0.1})
|
214
|
+
sapi_get_lending_auto_invest_redeem_history = sapiGetLendingAutoInvestRedeemHistory = Entry('lending/auto-invest/redeem/history', 'sapi', 'GET', {'cost': 0.1})
|
215
|
+
sapi_get_lending_auto_invest_rebalance_history = sapiGetLendingAutoInvestRebalanceHistory = Entry('lending/auto-invest/rebalance/history', 'sapi', 'GET', {'cost': 0.1})
|
210
216
|
sapi_get_simple_earn_flexible_list = sapiGetSimpleEarnFlexibleList = Entry('simple-earn/flexible/list', 'sapi', 'GET', {'cost': 15})
|
211
217
|
sapi_get_simple_earn_locked_list = sapiGetSimpleEarnLockedList = Entry('simple-earn/locked/list', 'sapi', 'GET', {'cost': 15})
|
212
218
|
sapi_get_simple_earn_flexible_personalleftquota = sapiGetSimpleEarnFlexiblePersonalLeftQuota = Entry('simple-earn/flexible/personalLeftQuota', 'sapi', 'GET', {'cost': 15})
|
@@ -322,6 +328,8 @@ class ImplicitAPI:
|
|
322
328
|
sapi_post_lending_auto_invest_plan_add = sapiPostLendingAutoInvestPlanAdd = Entry('lending/auto-invest/plan/add', 'sapi', 'POST', {'cost': 0.1})
|
323
329
|
sapi_post_lending_auto_invest_plan_edit = sapiPostLendingAutoInvestPlanEdit = Entry('lending/auto-invest/plan/edit', 'sapi', 'POST', {'cost': 0.1})
|
324
330
|
sapi_post_lending_auto_invest_plan_edit_status = sapiPostLendingAutoInvestPlanEditStatus = Entry('lending/auto-invest/plan/edit-status', 'sapi', 'POST', {'cost': 0.1})
|
331
|
+
sapi_post_lending_auto_invest_one_off = sapiPostLendingAutoInvestOneOff = Entry('lending/auto-invest/one-off', 'sapi', 'POST', {'cost': 0.1})
|
332
|
+
sapi_post_lending_auto_invest_redeem = sapiPostLendingAutoInvestRedeem = Entry('lending/auto-invest/redeem', 'sapi', 'POST', {'cost': 0.1})
|
325
333
|
sapi_post_simple_earn_flexible_subscribe = sapiPostSimpleEarnFlexibleSubscribe = Entry('simple-earn/flexible/subscribe', 'sapi', 'POST', {'cost': 0.1})
|
326
334
|
sapi_post_simple_earn_locked_subscribe = sapiPostSimpleEarnLockedSubscribe = Entry('simple-earn/locked/subscribe', 'sapi', 'POST', {'cost': 0.1})
|
327
335
|
sapi_post_simple_earn_flexible_redeem = sapiPostSimpleEarnFlexibleRedeem = Entry('simple-earn/flexible/redeem', 'sapi', 'POST', {'cost': 0.1})
|
ccxt/abstract/binanceusdm.py
CHANGED
@@ -196,6 +196,7 @@ class ImplicitAPI:
|
|
196
196
|
sapi_get_portfolio_interest_history = sapiGetPortfolioInterestHistory = Entry('portfolio/interest-history', 'sapi', 'GET', {'cost': 0.6667})
|
197
197
|
sapi_get_portfolio_asset_index_price = sapiGetPortfolioAssetIndexPrice = Entry('portfolio/asset-index-price', 'sapi', 'GET', {'cost': 0.1})
|
198
198
|
sapi_get_portfolio_repay_futures_switch = sapiGetPortfolioRepayFuturesSwitch = Entry('portfolio/repay-futures-switch', 'sapi', 'GET', {'cost': 3})
|
199
|
+
sapi_get_portfolio_margin_asset_leverage = sapiGetPortfolioMarginAssetLeverage = Entry('portfolio/margin-asset-leverage', 'sapi', 'GET', {'cost': 5})
|
199
200
|
sapi_get_staking_productlist = sapiGetStakingProductList = Entry('staking/productList', 'sapi', 'GET', {'cost': 0.1})
|
200
201
|
sapi_get_staking_position = sapiGetStakingPosition = Entry('staking/position', 'sapi', 'GET', {'cost': 0.1})
|
201
202
|
sapi_get_staking_stakingrecord = sapiGetStakingStakingRecord = Entry('staking/stakingRecord', 'sapi', 'GET', {'cost': 0.1})
|
@@ -207,6 +208,11 @@ class ImplicitAPI:
|
|
207
208
|
sapi_get_lending_auto_invest_plan_list = sapiGetLendingAutoInvestPlanList = Entry('lending/auto-invest/plan/list', 'sapi', 'GET', {'cost': 0.1})
|
208
209
|
sapi_get_lending_auto_invest_plan_id = sapiGetLendingAutoInvestPlanId = Entry('lending/auto-invest/plan/id', 'sapi', 'GET', {'cost': 0.1})
|
209
210
|
sapi_get_lending_auto_invest_history_list = sapiGetLendingAutoInvestHistoryList = Entry('lending/auto-invest/history/list', 'sapi', 'GET', {'cost': 0.1})
|
211
|
+
sapi_get_lending_auto_invest_index_info = sapiGetLendingAutoInvestIndexInfo = Entry('lending/auto-invest/index/info', 'sapi', 'GET', {'cost': 0.1})
|
212
|
+
sapi_get_lending_auto_invest_index_user_summary = sapiGetLendingAutoInvestIndexUserSummary = Entry('lending/auto-invest/index/user-summary', 'sapi', 'GET', {'cost': 0.1})
|
213
|
+
sapi_get_lending_auto_invest_one_off_status = sapiGetLendingAutoInvestOneOffStatus = Entry('lending/auto-invest/one-off/status', 'sapi', 'GET', {'cost': 0.1})
|
214
|
+
sapi_get_lending_auto_invest_redeem_history = sapiGetLendingAutoInvestRedeemHistory = Entry('lending/auto-invest/redeem/history', 'sapi', 'GET', {'cost': 0.1})
|
215
|
+
sapi_get_lending_auto_invest_rebalance_history = sapiGetLendingAutoInvestRebalanceHistory = Entry('lending/auto-invest/rebalance/history', 'sapi', 'GET', {'cost': 0.1})
|
210
216
|
sapi_get_simple_earn_flexible_list = sapiGetSimpleEarnFlexibleList = Entry('simple-earn/flexible/list', 'sapi', 'GET', {'cost': 15})
|
211
217
|
sapi_get_simple_earn_locked_list = sapiGetSimpleEarnLockedList = Entry('simple-earn/locked/list', 'sapi', 'GET', {'cost': 15})
|
212
218
|
sapi_get_simple_earn_flexible_personalleftquota = sapiGetSimpleEarnFlexiblePersonalLeftQuota = Entry('simple-earn/flexible/personalLeftQuota', 'sapi', 'GET', {'cost': 15})
|
@@ -322,6 +328,8 @@ class ImplicitAPI:
|
|
322
328
|
sapi_post_lending_auto_invest_plan_add = sapiPostLendingAutoInvestPlanAdd = Entry('lending/auto-invest/plan/add', 'sapi', 'POST', {'cost': 0.1})
|
323
329
|
sapi_post_lending_auto_invest_plan_edit = sapiPostLendingAutoInvestPlanEdit = Entry('lending/auto-invest/plan/edit', 'sapi', 'POST', {'cost': 0.1})
|
324
330
|
sapi_post_lending_auto_invest_plan_edit_status = sapiPostLendingAutoInvestPlanEditStatus = Entry('lending/auto-invest/plan/edit-status', 'sapi', 'POST', {'cost': 0.1})
|
331
|
+
sapi_post_lending_auto_invest_one_off = sapiPostLendingAutoInvestOneOff = Entry('lending/auto-invest/one-off', 'sapi', 'POST', {'cost': 0.1})
|
332
|
+
sapi_post_lending_auto_invest_redeem = sapiPostLendingAutoInvestRedeem = Entry('lending/auto-invest/redeem', 'sapi', 'POST', {'cost': 0.1})
|
325
333
|
sapi_post_simple_earn_flexible_subscribe = sapiPostSimpleEarnFlexibleSubscribe = Entry('simple-earn/flexible/subscribe', 'sapi', 'POST', {'cost': 0.1})
|
326
334
|
sapi_post_simple_earn_locked_subscribe = sapiPostSimpleEarnLockedSubscribe = Entry('simple-earn/locked/subscribe', 'sapi', 'POST', {'cost': 0.1})
|
327
335
|
sapi_post_simple_earn_flexible_redeem = sapiPostSimpleEarnFlexibleRedeem = Entry('simple-earn/flexible/redeem', 'sapi', 'POST', {'cost': 0.1})
|
ccxt/abstract/bingx.py
CHANGED
@@ -30,6 +30,7 @@ class ImplicitAPI:
|
|
30
30
|
swap_v2_public_get_quote_klines = swapV2PublicGetQuoteKlines = Entry('quote/klines', ['swap', 'v2', 'public'], 'GET', {'cost': 1})
|
31
31
|
swap_v2_public_get_quote_openinterest = swapV2PublicGetQuoteOpenInterest = Entry('quote/openInterest', ['swap', 'v2', 'public'], 'GET', {'cost': 1})
|
32
32
|
swap_v2_public_get_quote_ticker = swapV2PublicGetQuoteTicker = Entry('quote/ticker', ['swap', 'v2', 'public'], 'GET', {'cost': 1})
|
33
|
+
swap_v2_public_get_quote_bookticker = swapV2PublicGetQuoteBookTicker = Entry('quote/bookTicker', ['swap', 'v2', 'public'], 'GET', {'cost': 1})
|
33
34
|
swap_v2_private_get_user_balance = swapV2PrivateGetUserBalance = Entry('user/balance', ['swap', 'v2', 'private'], 'GET', {'cost': 3})
|
34
35
|
swap_v2_private_get_user_positions = swapV2PrivateGetUserPositions = Entry('user/positions', ['swap', 'v2', 'private'], 'GET', {'cost': 3})
|
35
36
|
swap_v2_private_get_user_income = swapV2PrivateGetUserIncome = Entry('user/income', ['swap', 'v2', 'private'], 'GET', {'cost': 3})
|
@@ -57,15 +58,29 @@ class ImplicitAPI:
|
|
57
58
|
contract_v1_private_get_allorders = contractV1PrivateGetAllOrders = Entry('allOrders', ['contract', 'v1', 'private'], 'GET', {'cost': 3})
|
58
59
|
contract_v1_private_get_balance = contractV1PrivateGetBalance = Entry('balance', ['contract', 'v1', 'private'], 'GET', {'cost': 3})
|
59
60
|
wallets_v1_private_get_capital_config_getall = walletsV1PrivateGetCapitalConfigGetall = Entry('capital/config/getall', ['wallets', 'v1', 'private'], 'GET', {'cost': 3})
|
61
|
+
wallets_v1_private_get_capital_deposit_address = walletsV1PrivateGetCapitalDepositAddress = Entry('capital/deposit/address', ['wallets', 'v1', 'private'], 'GET', {'cost': 1})
|
62
|
+
wallets_v1_private_get_capital_innertransfer_records = walletsV1PrivateGetCapitalInnerTransferRecords = Entry('capital/innerTransfer/records', ['wallets', 'v1', 'private'], 'GET', {'cost': 1})
|
63
|
+
wallets_v1_private_get_capital_subaccount_deposit_address = walletsV1PrivateGetCapitalSubAccountDepositAddress = Entry('capital/subAccount/deposit/address', ['wallets', 'v1', 'private'], 'GET', {'cost': 1})
|
64
|
+
wallets_v1_private_get_capital_deposit_subhisrec = walletsV1PrivateGetCapitalDepositSubHisrec = Entry('capital/deposit/subHisrec', ['wallets', 'v1', 'private'], 'GET', {'cost': 1})
|
65
|
+
wallets_v1_private_get_capital_subaccount_innertransfer_records = walletsV1PrivateGetCapitalSubAccountInnerTransferRecords = Entry('capital/subAccount/innerTransfer/records', ['wallets', 'v1', 'private'], 'GET', {'cost': 1})
|
60
66
|
wallets_v1_private_post_capital_withdraw_apply = walletsV1PrivatePostCapitalWithdrawApply = Entry('capital/withdraw/apply', ['wallets', 'v1', 'private'], 'POST', {'cost': 3})
|
61
67
|
wallets_v1_private_post_capital_innertransfer_apply = walletsV1PrivatePostCapitalInnerTransferApply = Entry('capital/innerTransfer/apply', ['wallets', 'v1', 'private'], 'POST', {'cost': 3})
|
62
68
|
wallets_v1_private_post_capital_subaccountinnertransfer_apply = walletsV1PrivatePostCapitalSubAccountInnerTransferApply = Entry('capital/subAccountInnerTransfer/apply', ['wallets', 'v1', 'private'], 'POST', {'cost': 3})
|
69
|
+
wallets_v1_private_post_capital_deposit_createsubaddress = walletsV1PrivatePostCapitalDepositCreateSubAddress = Entry('capital/deposit/createSubAddress', ['wallets', 'v1', 'private'], 'POST', {'cost': 1})
|
63
70
|
subaccount_v1_private_get_list = subAccountV1PrivateGetList = Entry('list', ['subAccount', 'v1', 'private'], 'GET', {'cost': 3})
|
64
71
|
subaccount_v1_private_get_assets = subAccountV1PrivateGetAssets = Entry('assets', ['subAccount', 'v1', 'private'], 'GET', {'cost': 3})
|
72
|
+
subaccount_v1_private_get_apikey_query = subAccountV1PrivateGetApiKeyQuery = Entry('apiKey/query', ['subAccount', 'v1', 'private'], 'GET', {'cost': 1})
|
65
73
|
subaccount_v1_private_post_create = subAccountV1PrivatePostCreate = Entry('create', ['subAccount', 'v1', 'private'], 'POST', {'cost': 3})
|
66
74
|
subaccount_v1_private_post_apikey_create = subAccountV1PrivatePostApiKeyCreate = Entry('apiKey/create', ['subAccount', 'v1', 'private'], 'POST', {'cost': 3})
|
67
75
|
subaccount_v1_private_post_apikey_edit = subAccountV1PrivatePostApiKeyEdit = Entry('apiKey/edit', ['subAccount', 'v1', 'private'], 'POST', {'cost': 3})
|
68
76
|
subaccount_v1_private_post_apikey_del = subAccountV1PrivatePostApiKeyDel = Entry('apiKey/del', ['subAccount', 'v1', 'private'], 'POST', {'cost': 3})
|
69
77
|
subaccount_v1_private_post_updatestatus = subAccountV1PrivatePostUpdateStatus = Entry('updateStatus', ['subAccount', 'v1', 'private'], 'POST', {'cost': 3})
|
70
|
-
|
78
|
+
account_v1_private_get_uid = accountV1PrivateGetUid = Entry('uid', ['account', 'v1', 'private'], 'GET', {'cost': 1})
|
71
79
|
account_v1_private_post_innertransfer_authorizesubaccount = accountV1PrivatePostInnerTransferAuthorizeSubAccount = Entry('innerTransfer/authorizeSubAccount', ['account', 'v1', 'private'], 'POST', {'cost': 3})
|
80
|
+
copytrading_v1_private_get_swap_trace_currenttrack = copyTradingV1PrivateGetSwapTraceCurrentTrack = Entry('swap/trace/currentTrack', ['copyTrading', 'v1', 'private'], 'GET', {'cost': 1})
|
81
|
+
copytrading_v1_private_post_swap_trace_closetrackorder = copyTradingV1PrivatePostSwapTraceCloseTrackOrder = Entry('swap/trace/closeTrackOrder', ['copyTrading', 'v1', 'private'], 'POST', {'cost': 1})
|
82
|
+
copytrading_v1_private_post_swap_trace_settpsl = copyTradingV1PrivatePostSwapTraceSetTPSL = Entry('swap/trace/setTPSL', ['copyTrading', 'v1', 'private'], 'POST', {'cost': 1})
|
83
|
+
api_v3_private_get_asset_transfer = apiV3PrivateGetAssetTransfer = Entry('asset/transfer', ['api', 'v3', 'private'], 'GET', {'cost': 1})
|
84
|
+
api_v3_private_get_capital_deposit_hisrec = apiV3PrivateGetCapitalDepositHisrec = Entry('capital/deposit/hisrec', ['api', 'v3', 'private'], 'GET', {'cost': 1})
|
85
|
+
api_v3_private_get_capital_withdraw_history = apiV3PrivateGetCapitalWithdrawHistory = Entry('capital/withdraw/history', ['api', 'v3', 'private'], 'GET', {'cost': 1})
|
86
|
+
api_v3_private_post_post_asset_transfer = apiV3PrivatePostPostAssetTransfer = Entry('post/asset/transfer', ['api', 'v3', 'private'], 'POST', {'cost': 1})
|
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.0.
|
7
|
+
__version__ = '4.0.102'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -85,7 +85,6 @@ from ccxt.async_support.bitstamp import bitstamp
|
|
85
85
|
from ccxt.async_support.bitstamp1 import bitstamp1 # noqa: F401
|
86
86
|
from ccxt.async_support.bittrex import bittrex # noqa: F401
|
87
87
|
from ccxt.async_support.bitvavo import bitvavo # noqa: F401
|
88
|
-
from ccxt.async_support.bkex import bkex # noqa: F401
|
89
88
|
from ccxt.async_support.bl3p import bl3p # noqa: F401
|
90
89
|
from ccxt.async_support.blockchaincom import blockchaincom # noqa: F401
|
91
90
|
from ccxt.async_support.btcalpha import btcalpha # noqa: F401
|
@@ -193,7 +192,6 @@ exchanges = [
|
|
193
192
|
'bitstamp1',
|
194
193
|
'bittrex',
|
195
194
|
'bitvavo',
|
196
|
-
'bkex',
|
197
195
|
'bl3p',
|
198
196
|
'blockchaincom',
|
199
197
|
'btcalpha',
|
ccxt/async_support/binance.py
CHANGED
@@ -426,6 +426,7 @@ class binance(Exchange, ImplicitAPI):
|
|
426
426
|
'portfolio/interest-history': 0.6667,
|
427
427
|
'portfolio/asset-index-price': 0.1,
|
428
428
|
'portfolio/repay-futures-switch': 3, # Weight(IP): 30 => cost = 0.1 * 30 = 3
|
429
|
+
'portfolio/margin-asset-leverage': 5, # Weight(IP): 50 => cost = 0.1 * 50 = 5
|
429
430
|
# staking
|
430
431
|
'staking/productList': 0.1,
|
431
432
|
'staking/position': 0.1,
|
@@ -438,6 +439,11 @@ class binance(Exchange, ImplicitAPI):
|
|
438
439
|
'lending/auto-invest/plan/list': 0.1,
|
439
440
|
'lending/auto-invest/plan/id': 0.1,
|
440
441
|
'lending/auto-invest/history/list': 0.1,
|
442
|
+
'lending/auto-invest/index/info': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
443
|
+
'lending/auto-invest/index/user-summary': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
444
|
+
'lending/auto-invest/one-off/status': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
445
|
+
'lending/auto-invest/redeem/history': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
446
|
+
'lending/auto-invest/rebalance/history': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
441
447
|
# simple earn
|
442
448
|
'simple-earn/flexible/list': 15,
|
443
449
|
'simple-earn/locked/list': 15,
|
@@ -565,6 +571,8 @@ class binance(Exchange, ImplicitAPI):
|
|
565
571
|
'lending/auto-invest/plan/add': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
566
572
|
'lending/auto-invest/plan/edit': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
567
573
|
'lending/auto-invest/plan/edit-status': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
574
|
+
'lending/auto-invest/one-off': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
575
|
+
'lending/auto-invest/redeem': 0.1, # Weight(IP): 1 => cost = 0.1 * 1 = 0.1
|
568
576
|
# simple earn
|
569
577
|
'simple-earn/flexible/subscribe': 0.1,
|
570
578
|
'simple-earn/locked/subscribe': 0.1,
|
@@ -3299,6 +3307,18 @@ class binance(Exchange, ImplicitAPI):
|
|
3299
3307
|
# "M": True # Was the trade the best price match?
|
3300
3308
|
# }
|
3301
3309
|
#
|
3310
|
+
# REST: aggregate trades for swap & future(both linear and inverse)
|
3311
|
+
#
|
3312
|
+
# {
|
3313
|
+
# "a": "269772814",
|
3314
|
+
# "p": "25864.1",
|
3315
|
+
# "q": "3",
|
3316
|
+
# "f": "662149354",
|
3317
|
+
# "l": "662149355",
|
3318
|
+
# "T": "1694209776022",
|
3319
|
+
# "m": False,
|
3320
|
+
# }
|
3321
|
+
#
|
3302
3322
|
# recent public trades and old public trades
|
3303
3323
|
# https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#recent-trades-list
|
3304
3324
|
# https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#old-trade-lookup-market_data
|
@@ -3530,7 +3550,8 @@ class binance(Exchange, ImplicitAPI):
|
|
3530
3550
|
if until is not None:
|
3531
3551
|
request['endTime'] = until
|
3532
3552
|
if limit is not None:
|
3533
|
-
|
3553
|
+
isFutureOrSwap = (market['swap'] or market['future'])
|
3554
|
+
request['limit'] = min(limit, 1000) if isFutureOrSwap else limit # default = 500, maximum = 1000
|
3534
3555
|
params = self.omit(params, ['until', 'fetchTradesMethod'])
|
3535
3556
|
#
|
3536
3557
|
# Caveats:
|
@@ -3558,6 +3579,20 @@ class binance(Exchange, ImplicitAPI):
|
|
3558
3579
|
# }
|
3559
3580
|
# ]
|
3560
3581
|
#
|
3582
|
+
# inverse(swap & future)
|
3583
|
+
#
|
3584
|
+
# [
|
3585
|
+
# {
|
3586
|
+
# "a": "269772814",
|
3587
|
+
# "p": "25864.1",
|
3588
|
+
# "q": "3",
|
3589
|
+
# "f": "662149354",
|
3590
|
+
# "l": "662149355",
|
3591
|
+
# "T": "1694209776022",
|
3592
|
+
# "m": False,
|
3593
|
+
# },
|
3594
|
+
# ]
|
3595
|
+
#
|
3561
3596
|
# recent public trades and historical public trades
|
3562
3597
|
#
|
3563
3598
|
# [
|
ccxt/async_support/bingx.py
CHANGED
@@ -154,6 +154,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
154
154
|
'quote/klines': 1,
|
155
155
|
'quote/openInterest': 1,
|
156
156
|
'quote/ticker': 1,
|
157
|
+
'quote/bookTicker': 1,
|
157
158
|
},
|
158
159
|
},
|
159
160
|
'private': {
|
@@ -205,11 +206,17 @@ class bingx(Exchange, ImplicitAPI):
|
|
205
206
|
'private': {
|
206
207
|
'get': {
|
207
208
|
'capital/config/getall': 3,
|
209
|
+
'capital/deposit/address': 1,
|
210
|
+
'capital/innerTransfer/records': 1,
|
211
|
+
'capital/subAccount/deposit/address': 1,
|
212
|
+
'capital/deposit/subHisrec': 1,
|
213
|
+
'capital/subAccount/innerTransfer/records': 1,
|
208
214
|
},
|
209
215
|
'post': {
|
210
216
|
'capital/withdraw/apply': 3,
|
211
217
|
'capital/innerTransfer/apply': 3,
|
212
218
|
'capital/subAccountInnerTransfer/apply': 3,
|
219
|
+
'capital/deposit/createSubAddress': 1,
|
213
220
|
},
|
214
221
|
},
|
215
222
|
},
|
@@ -220,6 +227,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
220
227
|
'get': {
|
221
228
|
'list': 3,
|
222
229
|
'assets': 3,
|
230
|
+
'apiKey/query': 1,
|
223
231
|
},
|
224
232
|
'post': {
|
225
233
|
'create': 3,
|
@@ -234,13 +242,42 @@ class bingx(Exchange, ImplicitAPI):
|
|
234
242
|
'account': {
|
235
243
|
'v1': {
|
236
244
|
'private': {
|
245
|
+
'get': {
|
246
|
+
'uid': 1,
|
247
|
+
},
|
237
248
|
'post': {
|
238
|
-
'uid': 3,
|
239
249
|
'innerTransfer/authorizeSubAccount': 3,
|
240
250
|
},
|
241
251
|
},
|
242
252
|
},
|
243
253
|
},
|
254
|
+
'copyTrading': {
|
255
|
+
'v1': {
|
256
|
+
'private': {
|
257
|
+
'get': {
|
258
|
+
'swap/trace/currentTrack': 1,
|
259
|
+
},
|
260
|
+
'post': {
|
261
|
+
'swap/trace/closeTrackOrder': 1,
|
262
|
+
'swap/trace/setTPSL': 1,
|
263
|
+
},
|
264
|
+
},
|
265
|
+
},
|
266
|
+
},
|
267
|
+
'api': {
|
268
|
+
'v3': {
|
269
|
+
'private': {
|
270
|
+
'get': {
|
271
|
+
'asset/transfer': 1,
|
272
|
+
'capital/deposit/hisrec': 1,
|
273
|
+
'capital/withdraw/history': 1,
|
274
|
+
},
|
275
|
+
'post': {
|
276
|
+
'post/asset/transfer': 1,
|
277
|
+
},
|
278
|
+
},
|
279
|
+
},
|
280
|
+
},
|
244
281
|
},
|
245
282
|
'timeframes': {
|
246
283
|
'1m': '1m',
|
@@ -1438,9 +1475,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
1438
1475
|
:param float [price]: the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
1439
1476
|
:param dict [params]: extra parameters specific to the bingx api endpoint
|
1440
1477
|
:param bool [params.postOnly]: True to place a post only order
|
1441
|
-
:param
|
1442
|
-
:param float [params.stopLossPrice]: stop loss trigger price
|
1443
|
-
:param float [params.takeProfitPrice]: take profit trigger price
|
1478
|
+
:param float [params.triggerPrice]: *swap only* triggerPrice at which the attached take profit / stop loss order will be triggered
|
1479
|
+
:param float [params.stopLossPrice]: *swap only* stop loss trigger price
|
1480
|
+
:param float [params.takeProfitPrice]: *swap only* take profit trigger price
|
1444
1481
|
:returns dict: an `order structure <https://github.com/ccxt/ccxt/wiki/Manual#order-structure>`
|
1445
1482
|
"""
|
1446
1483
|
await self.load_markets()
|
ccxt/async_support/bitbank.py
CHANGED
@@ -318,6 +318,17 @@ class bitbank(Exchange, ImplicitAPI):
|
|
318
318
|
return self.parse_order_book(orderbook, market['symbol'], timestamp)
|
319
319
|
|
320
320
|
def parse_trade(self, trade, market=None):
|
321
|
+
#
|
322
|
+
# fetchTrades
|
323
|
+
#
|
324
|
+
# {
|
325
|
+
# "transaction_id": "1143247037",
|
326
|
+
# "side": "buy",
|
327
|
+
# "price": "3836025",
|
328
|
+
# "amount": "0.0005",
|
329
|
+
# "executed_at": "1694249441593"
|
330
|
+
# }
|
331
|
+
#
|
321
332
|
timestamp = self.safe_integer(trade, 'executed_at')
|
322
333
|
market = self.safe_market(None, market)
|
323
334
|
priceString = self.safe_string(trade, 'price')
|
ccxt/async_support/bitfinex.py
CHANGED
@@ -899,14 +899,6 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
899
899
|
# "type":"sell"
|
900
900
|
# }
|
901
901
|
#
|
902
|
-
# { "timestamp":1637258238,
|
903
|
-
# "tid":894452800,
|
904
|
-
# "price":"0.99958",
|
905
|
-
# "amount":"261.90514",
|
906
|
-
# "exchange":"bitfinex",
|
907
|
-
# "type":"buy"
|
908
|
-
# }
|
909
|
-
#
|
910
902
|
# fetchMyTrades(private) v1
|
911
903
|
#
|
912
904
|
# {
|
@@ -981,6 +973,18 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
981
973
|
if since is not None:
|
982
974
|
request['timestamp'] = self.parse_to_int(since / 1000)
|
983
975
|
response = await self.publicGetTradesSymbol(self.extend(request, params))
|
976
|
+
#
|
977
|
+
# [
|
978
|
+
# {
|
979
|
+
# "timestamp": "1694284565",
|
980
|
+
# "tid": "1415415034",
|
981
|
+
# "price": "25862.0",
|
982
|
+
# "amount": "0.00020685",
|
983
|
+
# "exchange": "bitfinex",
|
984
|
+
# "type": "buy"
|
985
|
+
# },
|
986
|
+
# ]
|
987
|
+
#
|
984
988
|
return self.parse_trades(response, market, since, limit)
|
985
989
|
|
986
990
|
async def fetch_my_trades(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
ccxt/async_support/bitflyer.py
CHANGED
@@ -395,7 +395,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
395
395
|
#
|
396
396
|
# fetchTrades(public) v1
|
397
397
|
#
|
398
|
-
#
|
398
|
+
# {
|
399
399
|
# "id":2278466664,
|
400
400
|
# "side":"SELL",
|
401
401
|
# "price":56810.7,
|
@@ -405,16 +405,18 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
405
405
|
# "sell_child_order_acceptance_id":"JRF20211119-114639-236919"
|
406
406
|
# }
|
407
407
|
#
|
408
|
-
#
|
409
|
-
# "id":2278463423,
|
410
|
-
# "side":"BUY",
|
411
|
-
# "price":56757.83,
|
412
|
-
# "size":0.6003,"exec_date":"2021-11-19T11:28:00.523",
|
413
|
-
# "buy_child_order_acceptance_id":"JRF20211119-112800-236526",
|
414
|
-
# "sell_child_order_acceptance_id":"JRF20211119-112734-062017"
|
415
|
-
# }
|
416
|
-
#
|
408
|
+
# fetchMyTrades
|
417
409
|
#
|
410
|
+
# {
|
411
|
+
# "id": 37233,
|
412
|
+
# "side": "BUY",
|
413
|
+
# "price": 33470,
|
414
|
+
# "size": 0.01,
|
415
|
+
# "exec_date": "2015-07-07T09:57:40.397",
|
416
|
+
# "child_order_id": "JOR20150707-060559-021935",
|
417
|
+
# "child_order_acceptance_id": "JRF20150707-060559-396699"
|
418
|
+
# "commission": 0,
|
419
|
+
# },
|
418
420
|
#
|
419
421
|
side = self.safe_string_lower(trade, 'side')
|
420
422
|
if side is not None:
|
@@ -465,6 +467,19 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
465
467
|
if limit is not None:
|
466
468
|
request['count'] = limit
|
467
469
|
response = await self.publicGetGetexecutions(self.extend(request, params))
|
470
|
+
#
|
471
|
+
# [
|
472
|
+
# {
|
473
|
+
# "id": 39287,
|
474
|
+
# "side": "BUY",
|
475
|
+
# "price": 31690,
|
476
|
+
# "size": 27.04,
|
477
|
+
# "exec_date": "2015-07-08T02:43:34.823",
|
478
|
+
# "buy_child_order_acceptance_id": "JRF20150707-200203-452209",
|
479
|
+
# "sell_child_order_acceptance_id": "JRF20150708-024334-060234"
|
480
|
+
# },
|
481
|
+
# ]
|
482
|
+
#
|
468
483
|
return self.parse_trades(response, market, since, limit)
|
469
484
|
|
470
485
|
async def fetch_trading_fee(self, symbol: str, params={}):
|
@@ -677,6 +692,20 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
677
692
|
if limit is not None:
|
678
693
|
request['count'] = limit
|
679
694
|
response = await self.privateGetGetexecutions(self.extend(request, params))
|
695
|
+
#
|
696
|
+
# [
|
697
|
+
# {
|
698
|
+
# "id": 37233,
|
699
|
+
# "side": "BUY",
|
700
|
+
# "price": 33470,
|
701
|
+
# "size": 0.01,
|
702
|
+
# "exec_date": "2015-07-07T09:57:40.397",
|
703
|
+
# "child_order_id": "JOR20150707-060559-021935",
|
704
|
+
# "child_order_acceptance_id": "JRF20150707-060559-396699"
|
705
|
+
# "commission": 0,
|
706
|
+
# },
|
707
|
+
# ]
|
708
|
+
#
|
680
709
|
return self.parse_trades(response, market, since, limit)
|
681
710
|
|
682
711
|
async def fetch_positions(self, symbols: Optional[List[str]] = None, params={}):
|
ccxt/async_support/bitforex.py
CHANGED
@@ -254,14 +254,6 @@ class bitforex(Exchange, ImplicitAPI):
|
|
254
254
|
# "tid":"1131019666"
|
255
255
|
# }
|
256
256
|
#
|
257
|
-
# {
|
258
|
-
# "price":57591.33,
|
259
|
-
# "amount":0.002,
|
260
|
-
# "time":1637329685322,
|
261
|
-
# "direction":1,
|
262
|
-
# "tid":"1131019639"
|
263
|
-
# }
|
264
|
-
#
|
265
257
|
# fetchMyTrades(private)
|
266
258
|
#
|
267
259
|
# {
|
ccxt/async_support/bitget.py
CHANGED
@@ -2107,7 +2107,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2107
2107
|
# "fillTime": "1692073691000"
|
2108
2108
|
# }
|
2109
2109
|
#
|
2110
|
-
# swap
|
2110
|
+
# swap(public trades)
|
2111
2111
|
#
|
2112
2112
|
# {
|
2113
2113
|
# "tradeId": "1075199767891652609",
|
@@ -2229,6 +2229,16 @@ class bitget(Exchange, ImplicitAPI):
|
|
2229
2229
|
params = self.omit(params, 'method')
|
2230
2230
|
if swapMethod == 'publicMixGetMarketFillsHistory':
|
2231
2231
|
response = await self.publicMixGetMarketFillsHistory(self.extend(request, params))
|
2232
|
+
#
|
2233
|
+
# {
|
2234
|
+
# "tradeId": "1084459062491590657",
|
2235
|
+
# "price": "25874",
|
2236
|
+
# "size": "1.624",
|
2237
|
+
# "side": "Buy",
|
2238
|
+
# "timestamp": "1694281109000",
|
2239
|
+
# "symbol": "BTCUSDT_UMCBL",
|
2240
|
+
# }
|
2241
|
+
#
|
2232
2242
|
elif swapMethod == 'publicMixGetMarketFills':
|
2233
2243
|
response = await self.publicMixGetMarketFills(self.extend(request, params))
|
2234
2244
|
#
|
@@ -2861,11 +2871,11 @@ class bitget(Exchange, ImplicitAPI):
|
|
2861
2871
|
method = 'privateMixPostPlanPlacePositionsTPSL'
|
2862
2872
|
elif isStopLossOrTakeProfit:
|
2863
2873
|
if isStopLoss:
|
2864
|
-
|
2865
|
-
request['presetStopLossPrice'] = self.price_to_precision(symbol,
|
2874
|
+
slTriggerPrice = self.safe_value_2(stopLoss, 'triggerPrice', 'stopPrice')
|
2875
|
+
request['presetStopLossPrice'] = self.price_to_precision(symbol, slTriggerPrice)
|
2866
2876
|
if isTakeProfit:
|
2867
|
-
|
2868
|
-
request['presetTakeProfitPrice'] = self.price_to_precision(symbol,
|
2877
|
+
tpTriggerPrice = self.safe_value_2(takeProfit, 'triggerPrice', 'stopPrice')
|
2878
|
+
request['presetTakeProfitPrice'] = self.price_to_precision(symbol, tpTriggerPrice)
|
2869
2879
|
if postOnly:
|
2870
2880
|
request[timeInForceKey] = 'post_only'
|
2871
2881
|
elif timeInForce == 'gtc':
|