ccxt 4.4.21__py2.py3-none-any.whl → 4.4.23__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 +3 -1
- ccxt/abstract/binance.py +64 -43
- ccxt/abstract/binancecoinm.py +64 -43
- ccxt/abstract/binanceus.py +64 -43
- ccxt/abstract/binanceusdm.py +64 -43
- ccxt/abstract/bitflyer.py +1 -0
- ccxt/abstract/bitget.py +3 -0
- ccxt/abstract/cex.py +28 -29
- ccxt/abstract/coincatch.py +94 -0
- ccxt/abstract/gate.py +5 -0
- ccxt/abstract/gateio.py +5 -0
- ccxt/abstract/kucoin.py +1 -0
- ccxt/abstract/kucoinfutures.py +1 -0
- ccxt/abstract/okx.py +1 -0
- ccxt/alpaca.py +1 -0
- ccxt/async_support/__init__.py +3 -1
- ccxt/async_support/alpaca.py +1 -0
- ccxt/async_support/base/exchange.py +7 -1
- ccxt/async_support/bigone.py +3 -0
- ccxt/async_support/binance.py +183 -63
- ccxt/async_support/bitfinex.py +4 -0
- ccxt/async_support/bitflyer.py +57 -1
- ccxt/async_support/bitget.py +73 -1
- ccxt/async_support/bitrue.py +3 -0
- ccxt/async_support/bybit.py +76 -3
- ccxt/async_support/cex.py +1247 -1322
- ccxt/async_support/coinbase.py +1 -1
- ccxt/async_support/coinbaseexchange.py +3 -0
- ccxt/async_support/coincatch.py +4955 -0
- ccxt/async_support/coinex.py +60 -1
- ccxt/async_support/cryptocom.py +1 -1
- ccxt/async_support/gate.py +97 -2
- ccxt/async_support/htx.py +1 -5
- ccxt/async_support/hyperliquid.py +10 -8
- ccxt/async_support/kucoin.py +27 -57
- ccxt/async_support/latoken.py +6 -0
- ccxt/async_support/mexc.py +1 -1
- ccxt/async_support/oceanex.py +2 -0
- ccxt/async_support/okcoin.py +1 -0
- ccxt/async_support/okx.py +67 -1
- ccxt/async_support/poloniex.py +5 -0
- ccxt/base/exchange.py +21 -1
- ccxt/base/types.py +9 -0
- ccxt/bigone.py +3 -0
- ccxt/binance.py +183 -63
- ccxt/bitfinex.py +4 -0
- ccxt/bitflyer.py +57 -1
- ccxt/bitget.py +73 -1
- ccxt/bitrue.py +3 -0
- ccxt/bybit.py +76 -3
- ccxt/cex.py +1246 -1322
- ccxt/coinbase.py +1 -1
- ccxt/coinbaseexchange.py +3 -0
- ccxt/coincatch.py +4955 -0
- ccxt/coinex.py +60 -1
- ccxt/cryptocom.py +1 -1
- ccxt/gate.py +97 -2
- ccxt/htx.py +1 -5
- ccxt/hyperliquid.py +10 -8
- ccxt/kucoin.py +27 -57
- ccxt/latoken.py +6 -0
- ccxt/mexc.py +1 -1
- ccxt/oceanex.py +2 -0
- ccxt/okcoin.py +1 -0
- ccxt/okx.py +67 -1
- ccxt/poloniex.py +5 -0
- ccxt/pro/__init__.py +3 -1
- ccxt/pro/coincatch.py +1429 -0
- ccxt/test/tests_async.py +19 -5
- ccxt/test/tests_sync.py +19 -5
- ccxt-4.4.23.dist-info/METADATA +636 -0
- {ccxt-4.4.21.dist-info → ccxt-4.4.23.dist-info}/RECORD +75 -71
- ccxt-4.4.21.dist-info/METADATA +0 -635
- {ccxt-4.4.21.dist-info → ccxt-4.4.23.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.21.dist-info → ccxt-4.4.23.dist-info}/WHEEL +0 -0
- {ccxt-4.4.21.dist-info → ccxt-4.4.23.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,94 @@
|
|
1
|
+
from ccxt.base.types import Entry
|
2
|
+
|
3
|
+
|
4
|
+
class ImplicitAPI:
|
5
|
+
public_get_api_spot_v1_public_time = publicGetApiSpotV1PublicTime = Entry('api/spot/v1/public/time', 'public', 'GET', {'cost': 1})
|
6
|
+
public_get_api_spot_v1_public_currencies = publicGetApiSpotV1PublicCurrencies = Entry('api/spot/v1/public/currencies', 'public', 'GET', {'cost': 6.666666666666667})
|
7
|
+
public_get_api_spot_v1_market_ticker = publicGetApiSpotV1MarketTicker = Entry('api/spot/v1/market/ticker', 'public', 'GET', {'cost': 1})
|
8
|
+
public_get_api_spot_v1_market_tickers = publicGetApiSpotV1MarketTickers = Entry('api/spot/v1/market/tickers', 'public', 'GET', {'cost': 1})
|
9
|
+
public_get_api_spot_v1_market_fills = publicGetApiSpotV1MarketFills = Entry('api/spot/v1/market/fills', 'public', 'GET', {'cost': 2})
|
10
|
+
public_get_api_spot_v1_market_fills_history = publicGetApiSpotV1MarketFillsHistory = Entry('api/spot/v1/market/fills-history', 'public', 'GET', {'cost': 2})
|
11
|
+
public_get_api_spot_v1_market_candles = publicGetApiSpotV1MarketCandles = Entry('api/spot/v1/market/candles', 'public', 'GET', {'cost': 1})
|
12
|
+
public_get_api_spot_v1_market_history_candles = publicGetApiSpotV1MarketHistoryCandles = Entry('api/spot/v1/market/history-candles', 'public', 'GET', {'cost': 1})
|
13
|
+
public_get_api_spot_v1_market_depth = publicGetApiSpotV1MarketDepth = Entry('api/spot/v1/market/depth', 'public', 'GET', {'cost': 1})
|
14
|
+
public_get_api_spot_v1_market_merge_depth = publicGetApiSpotV1MarketMergeDepth = Entry('api/spot/v1/market/merge-depth', 'public', 'GET', {'cost': 1})
|
15
|
+
public_get_api_mix_v1_market_contracts = publicGetApiMixV1MarketContracts = Entry('api/mix/v1/market/contracts', 'public', 'GET', {'cost': 1})
|
16
|
+
public_get_api_mix_v1_market_merge_depth = publicGetApiMixV1MarketMergeDepth = Entry('api/mix/v1/market/merge-depth', 'public', 'GET', {'cost': 1})
|
17
|
+
public_get_api_mix_v1_market_depth = publicGetApiMixV1MarketDepth = Entry('api/mix/v1/market/depth', 'public', 'GET', {'cost': 1})
|
18
|
+
public_get_api_mix_v1_market_ticker = publicGetApiMixV1MarketTicker = Entry('api/mix/v1/market/ticker', 'public', 'GET', {'cost': 1})
|
19
|
+
public_get_api_mix_v1_market_tickers = publicGetApiMixV1MarketTickers = Entry('api/mix/v1/market/tickers', 'public', 'GET', {'cost': 1})
|
20
|
+
public_get_api_mix_v1_market_fills = publicGetApiMixV1MarketFills = Entry('api/mix/v1/market/fills', 'public', 'GET', {'cost': 1})
|
21
|
+
public_get_api_mix_v1_market_fills_history = publicGetApiMixV1MarketFillsHistory = Entry('api/mix/v1/market/fills-history', 'public', 'GET', {'cost': 1})
|
22
|
+
public_get_api_mix_v1_market_candles = publicGetApiMixV1MarketCandles = Entry('api/mix/v1/market/candles', 'public', 'GET', {'cost': 1})
|
23
|
+
public_get_pi_mix_v1_market_index = publicGetPiMixV1MarketIndex = Entry('pi/mix/v1/market/index', 'public', 'GET', {'cost': 1})
|
24
|
+
public_get_api_mix_v1_market_funding_time = publicGetApiMixV1MarketFundingTime = Entry('api/mix/v1/market/funding-time', 'public', 'GET', {'cost': 1})
|
25
|
+
public_get_api_mix_v1_market_history_fundrate = publicGetApiMixV1MarketHistoryFundRate = Entry('api/mix/v1/market/history-fundRate', 'public', 'GET', {'cost': 1})
|
26
|
+
public_get_api_mix_v1_market_current_fundrate = publicGetApiMixV1MarketCurrentFundRate = Entry('api/mix/v1/market/current-fundRate', 'public', 'GET', {'cost': 1})
|
27
|
+
public_get_api_mix_v1_market_open_interest = publicGetApiMixV1MarketOpenInterest = Entry('api/mix/v1/market/open-interest', 'public', 'GET', {'cost': 1})
|
28
|
+
public_get_api_mix_v1_market_mark_price = publicGetApiMixV1MarketMarkPrice = Entry('api/mix/v1/market/mark-price', 'public', 'GET', {'cost': 1})
|
29
|
+
public_get_api_mix_v1_market_symbol_leverage = publicGetApiMixV1MarketSymbolLeverage = Entry('api/mix/v1/market/symbol-leverage', 'public', 'GET', {'cost': 1})
|
30
|
+
public_get_api_mix_v1_market_querypositionlever = publicGetApiMixV1MarketQueryPositionLever = Entry('api/mix/v1/market/queryPositionLever', 'public', 'GET', {'cost': 1})
|
31
|
+
private_get_api_spot_v1_wallet_deposit_address = privateGetApiSpotV1WalletDepositAddress = Entry('api/spot/v1/wallet/deposit-address', 'private', 'GET', {'cost': 4})
|
32
|
+
private_get_pi_spot_v1_wallet_withdrawal_list = privateGetPiSpotV1WalletWithdrawalList = Entry('pi/spot/v1/wallet/withdrawal-list', 'private', 'GET', {'cost': 1})
|
33
|
+
private_get_api_spot_v1_wallet_withdrawal_list_v2 = privateGetApiSpotV1WalletWithdrawalListV2 = Entry('api/spot/v1/wallet/withdrawal-list-v2', 'private', 'GET', {'cost': 1})
|
34
|
+
private_get_api_spot_v1_wallet_deposit_list = privateGetApiSpotV1WalletDepositList = Entry('api/spot/v1/wallet/deposit-list', 'private', 'GET', {'cost': 1})
|
35
|
+
private_get_api_spot_v1_account_getinfo = privateGetApiSpotV1AccountGetInfo = Entry('api/spot/v1/account/getInfo', 'private', 'GET', {'cost': 1})
|
36
|
+
private_get_api_spot_v1_account_assets = privateGetApiSpotV1AccountAssets = Entry('api/spot/v1/account/assets', 'private', 'GET', {'cost': 2})
|
37
|
+
private_get_api_spot_v1_account_transferrecords = privateGetApiSpotV1AccountTransferRecords = Entry('api/spot/v1/account/transferRecords', 'private', 'GET', {'cost': 1})
|
38
|
+
private_get_api_mix_v1_account_account = privateGetApiMixV1AccountAccount = Entry('api/mix/v1/account/account', 'private', 'GET', {'cost': 2})
|
39
|
+
private_get_api_mix_v1_account_accounts = privateGetApiMixV1AccountAccounts = Entry('api/mix/v1/account/accounts', 'private', 'GET', {'cost': 2})
|
40
|
+
private_get_api_mix_v1_position_singleposition_v2 = privateGetApiMixV1PositionSinglePositionV2 = Entry('api/mix/v1/position/singlePosition-v2', 'private', 'GET', {'cost': 2})
|
41
|
+
private_get_api_mix_v1_position_allposition_v2 = privateGetApiMixV1PositionAllPositionV2 = Entry('api/mix/v1/position/allPosition-v2', 'private', 'GET', {'cost': 4})
|
42
|
+
private_get_api_mix_v1_account_accountbill = privateGetApiMixV1AccountAccountBill = Entry('api/mix/v1/account/accountBill', 'private', 'GET', {'cost': 2})
|
43
|
+
private_get_api_mix_v1_account_accountbusinessbill = privateGetApiMixV1AccountAccountBusinessBill = Entry('api/mix/v1/account/accountBusinessBill', 'private', 'GET', {'cost': 4})
|
44
|
+
private_get_api_mix_v1_order_current = privateGetApiMixV1OrderCurrent = Entry('api/mix/v1/order/current', 'private', 'GET', {'cost': 1})
|
45
|
+
private_get_api_mix_v1_order_margincoincurrent = privateGetApiMixV1OrderMarginCoinCurrent = Entry('api/mix/v1/order/marginCoinCurrent', 'private', 'GET', {'cost': 1})
|
46
|
+
private_get_api_mix_v1_order_history = privateGetApiMixV1OrderHistory = Entry('api/mix/v1/order/history', 'private', 'GET', {'cost': 2})
|
47
|
+
private_get_api_mix_v1_order_historyproducttype = privateGetApiMixV1OrderHistoryProductType = Entry('api/mix/v1/order/historyProductType', 'private', 'GET', {'cost': 4})
|
48
|
+
private_get_api_mix_v1_order_detail = privateGetApiMixV1OrderDetail = Entry('api/mix/v1/order/detail', 'private', 'GET', {'cost': 2})
|
49
|
+
private_get_api_mix_v1_order_fills = privateGetApiMixV1OrderFills = Entry('api/mix/v1/order/fills', 'private', 'GET', {'cost': 2})
|
50
|
+
private_get_api_mix_v1_order_allfills = privateGetApiMixV1OrderAllFills = Entry('api/mix/v1/order/allFills', 'private', 'GET', {'cost': 2})
|
51
|
+
private_get_api_mix_v1_plan_currentplan = privateGetApiMixV1PlanCurrentPlan = Entry('api/mix/v1/plan/currentPlan', 'private', 'GET', {'cost': 1})
|
52
|
+
private_get_api_mix_v1_plan_historyplan = privateGetApiMixV1PlanHistoryPlan = Entry('api/mix/v1/plan/historyPlan', 'private', 'GET', {'cost': 2})
|
53
|
+
private_post_api_spot_v1_wallet_transfer_v2 = privatePostApiSpotV1WalletTransferV2 = Entry('api/spot/v1/wallet/transfer-v2', 'private', 'POST', {'cost': 4})
|
54
|
+
private_post_api_spot_v1_wallet_withdrawal_v2 = privatePostApiSpotV1WalletWithdrawalV2 = Entry('api/spot/v1/wallet/withdrawal-v2', 'private', 'POST', {'cost': 4})
|
55
|
+
private_post_api_spot_v1_wallet_withdrawal_inner_v2 = privatePostApiSpotV1WalletWithdrawalInnerV2 = Entry('api/spot/v1/wallet/withdrawal-inner-v2', 'private', 'POST', {'cost': 1})
|
56
|
+
private_post_api_spot_v1_account_bills = privatePostApiSpotV1AccountBills = Entry('api/spot/v1/account/bills', 'private', 'POST', {'cost': 2})
|
57
|
+
private_post_api_spot_v1_trade_orders = privatePostApiSpotV1TradeOrders = Entry('api/spot/v1/trade/orders', 'private', 'POST', {'cost': 2})
|
58
|
+
private_post_api_spot_v1_trade_batch_orders = privatePostApiSpotV1TradeBatchOrders = Entry('api/spot/v1/trade/batch-orders', 'private', 'POST', {'cost': 4, 'step': 10})
|
59
|
+
private_post_api_spot_v1_trade_cancel_order = privatePostApiSpotV1TradeCancelOrder = Entry('api/spot/v1/trade/cancel-order', 'private', 'POST', {'cost': 1})
|
60
|
+
private_post_api_spot_v1_trade_cancel_order_v2 = privatePostApiSpotV1TradeCancelOrderV2 = Entry('api/spot/v1/trade/cancel-order-v2', 'private', 'POST', {'cost': 2})
|
61
|
+
private_post_api_spot_v1_trade_cancel_symbol_order = privatePostApiSpotV1TradeCancelSymbolOrder = Entry('api/spot/v1/trade/cancel-symbol-order', 'private', 'POST', {'cost': 2})
|
62
|
+
private_post_api_spot_v1_trade_cancel_batch_orders = privatePostApiSpotV1TradeCancelBatchOrders = Entry('api/spot/v1/trade/cancel-batch-orders', 'private', 'POST', {'cost': 1})
|
63
|
+
private_post_api_spot_v1_trade_cancel_batch_orders_v2 = privatePostApiSpotV1TradeCancelBatchOrdersV2 = Entry('api/spot/v1/trade/cancel-batch-orders-v2', 'private', 'POST', {'cost': 1})
|
64
|
+
private_post_api_spot_v1_trade_orderinfo = privatePostApiSpotV1TradeOrderInfo = Entry('api/spot/v1/trade/orderInfo', 'private', 'POST', {'cost': 1})
|
65
|
+
private_post_api_spot_v1_trade_open_orders = privatePostApiSpotV1TradeOpenOrders = Entry('api/spot/v1/trade/open-orders', 'private', 'POST', {'cost': 1})
|
66
|
+
private_post_api_spot_v1_trade_history = privatePostApiSpotV1TradeHistory = Entry('api/spot/v1/trade/history', 'private', 'POST', {'cost': 1})
|
67
|
+
private_post_api_spot_v1_trade_fills = privatePostApiSpotV1TradeFills = Entry('api/spot/v1/trade/fills', 'private', 'POST', {'cost': 1})
|
68
|
+
private_post_api_spot_v1_plan_placeplan = privatePostApiSpotV1PlanPlacePlan = Entry('api/spot/v1/plan/placePlan', 'private', 'POST', {'cost': 1})
|
69
|
+
private_post_api_spot_v1_plan_modifyplan = privatePostApiSpotV1PlanModifyPlan = Entry('api/spot/v1/plan/modifyPlan', 'private', 'POST', {'cost': 1})
|
70
|
+
private_post_api_spot_v1_plan_cancelplan = privatePostApiSpotV1PlanCancelPlan = Entry('api/spot/v1/plan/cancelPlan', 'private', 'POST', {'cost': 1})
|
71
|
+
private_post_api_spot_v1_plan_currentplan = privatePostApiSpotV1PlanCurrentPlan = Entry('api/spot/v1/plan/currentPlan', 'private', 'POST', {'cost': 1})
|
72
|
+
private_post_api_spot_v1_plan_historyplan = privatePostApiSpotV1PlanHistoryPlan = Entry('api/spot/v1/plan/historyPlan', 'private', 'POST', {'cost': 1})
|
73
|
+
private_post_api_spot_v1_plan_batchcancelplan = privatePostApiSpotV1PlanBatchCancelPlan = Entry('api/spot/v1/plan/batchCancelPlan', 'private', 'POST', {'cost': 2})
|
74
|
+
private_post_api_mix_v1_account_open_count = privatePostApiMixV1AccountOpenCount = Entry('api/mix/v1/account/open-count', 'private', 'POST', {'cost': 1})
|
75
|
+
private_post_api_mix_v1_account_setleverage = privatePostApiMixV1AccountSetLeverage = Entry('api/mix/v1/account/setLeverage', 'private', 'POST', {'cost': 4})
|
76
|
+
private_post_api_mix_v1_account_setmargin = privatePostApiMixV1AccountSetMargin = Entry('api/mix/v1/account/setMargin', 'private', 'POST', {'cost': 4})
|
77
|
+
private_post_api_mix_v1_account_setmarginmode = privatePostApiMixV1AccountSetMarginMode = Entry('api/mix/v1/account/setMarginMode', 'private', 'POST', {'cost': 4})
|
78
|
+
private_post_api_mix_v1_account_setpositionmode = privatePostApiMixV1AccountSetPositionMode = Entry('api/mix/v1/account/setPositionMode', 'private', 'POST', {'cost': 4})
|
79
|
+
private_post_api_mix_v1_order_placeorder = privatePostApiMixV1OrderPlaceOrder = Entry('api/mix/v1/order/placeOrder', 'private', 'POST', {'cost': 2})
|
80
|
+
private_post_api_mix_v1_order_batch_orders = privatePostApiMixV1OrderBatchOrders = Entry('api/mix/v1/order/batch-orders', 'private', 'POST', {'cost': 4, 'step': 10})
|
81
|
+
private_post_api_mix_v1_order_cancel_order = privatePostApiMixV1OrderCancelOrder = Entry('api/mix/v1/order/cancel-order', 'private', 'POST', {'cost': 2})
|
82
|
+
private_post_api_mix_v1_order_cancel_batch_orders = privatePostApiMixV1OrderCancelBatchOrders = Entry('api/mix/v1/order/cancel-batch-orders', 'private', 'POST', {'cost': 2})
|
83
|
+
private_post_api_mix_v1_order_cancel_symbol_orders = privatePostApiMixV1OrderCancelSymbolOrders = Entry('api/mix/v1/order/cancel-symbol-orders', 'private', 'POST', {'cost': 2})
|
84
|
+
private_post_api_mix_v1_order_cancel_all_orders = privatePostApiMixV1OrderCancelAllOrders = Entry('api/mix/v1/order/cancel-all-orders', 'private', 'POST', {'cost': 2})
|
85
|
+
private_post_api_mix_v1_plan_placeplan = privatePostApiMixV1PlanPlacePlan = Entry('api/mix/v1/plan/placePlan', 'private', 'POST', {'cost': 2})
|
86
|
+
private_post_api_mix_v1_plan_modifyplan = privatePostApiMixV1PlanModifyPlan = Entry('api/mix/v1/plan/modifyPlan', 'private', 'POST', {'cost': 2})
|
87
|
+
private_post_api_mix_v1_plan_modifyplanpreset = privatePostApiMixV1PlanModifyPlanPreset = Entry('api/mix/v1/plan/modifyPlanPreset', 'private', 'POST', {'cost': 2})
|
88
|
+
private_post_api_mix_v1_plan_placetpsl = privatePostApiMixV1PlanPlaceTPSL = Entry('api/mix/v1/plan/placeTPSL', 'private', 'POST', {'cost': 2})
|
89
|
+
private_post_api_mix_v1_plan_placetrailstop = privatePostApiMixV1PlanPlaceTrailStop = Entry('api/mix/v1/plan/placeTrailStop', 'private', 'POST', {'cost': 2})
|
90
|
+
private_post_api_mix_v1_plan_placepositionstpsl = privatePostApiMixV1PlanPlacePositionsTPSL = Entry('api/mix/v1/plan/placePositionsTPSL', 'private', 'POST', {'cost': 2})
|
91
|
+
private_post_api_mix_v1_plan_modifytpslplan = privatePostApiMixV1PlanModifyTPSLPlan = Entry('api/mix/v1/plan/modifyTPSLPlan', 'private', 'POST', {'cost': 2})
|
92
|
+
private_post_api_mix_v1_plan_cancelplan = privatePostApiMixV1PlanCancelPlan = Entry('api/mix/v1/plan/cancelPlan', 'private', 'POST', {'cost': 2})
|
93
|
+
private_post_api_mix_v1_plan_cancelsymbolplan = privatePostApiMixV1PlanCancelSymbolPlan = Entry('api/mix/v1/plan/cancelSymbolPlan', 'private', 'POST', {'cost': 2})
|
94
|
+
private_post_api_mix_v1_plan_cancelallplan = privatePostApiMixV1PlanCancelAllPlan = Entry('api/mix/v1/plan/cancelAllPlan', 'private', 'POST', {'cost': 2})
|
ccxt/abstract/gate.py
CHANGED
@@ -92,8 +92,13 @@ class ImplicitAPI:
|
|
92
92
|
private_unified_get_interest_records = privateUnifiedGetInterestRecords = Entry('interest_records', ['private', 'unified'], 'GET', {'cost': 1.3333333333333333})
|
93
93
|
private_unified_get_estimate_rate = privateUnifiedGetEstimateRate = Entry('estimate_rate', ['private', 'unified'], 'GET', {'cost': 1.3333333333333333})
|
94
94
|
private_unified_get_currency_discount_tiers = privateUnifiedGetCurrencyDiscountTiers = Entry('currency_discount_tiers', ['private', 'unified'], 'GET', {'cost': 1.3333333333333333})
|
95
|
+
private_unified_get_risk_units = privateUnifiedGetRiskUnits = Entry('risk_units', ['private', 'unified'], 'GET', {'cost': 1.3333333333333333})
|
96
|
+
private_unified_get_unified_mode = privateUnifiedGetUnifiedMode = Entry('unified_mode', ['private', 'unified'], 'GET', {'cost': 1.3333333333333333})
|
97
|
+
private_unified_get_loan_margin_tiers = privateUnifiedGetLoanMarginTiers = Entry('loan_margin_tiers', ['private', 'unified'], 'GET', {'cost': 1.3333333333333333})
|
95
98
|
private_unified_post_account_mode = privateUnifiedPostAccountMode = Entry('account_mode', ['private', 'unified'], 'POST', {'cost': 1.3333333333333333})
|
96
99
|
private_unified_post_loans = privateUnifiedPostLoans = Entry('loans', ['private', 'unified'], 'POST', {'cost': 13.333333333333334})
|
100
|
+
private_unified_post_portfolio_calculator = privateUnifiedPostPortfolioCalculator = Entry('portfolio_calculator', ['private', 'unified'], 'POST', {'cost': 1.3333333333333333})
|
101
|
+
private_unified_put_unified_mode = privateUnifiedPutUnifiedMode = Entry('unified_mode', ['private', 'unified'], 'PUT', {'cost': 1.3333333333333333})
|
97
102
|
private_spot_get_fee = privateSpotGetFee = Entry('fee', ['private', 'spot'], 'GET', {'cost': 1})
|
98
103
|
private_spot_get_batch_fee = privateSpotGetBatchFee = Entry('batch_fee', ['private', 'spot'], 'GET', {'cost': 1})
|
99
104
|
private_spot_get_accounts = privateSpotGetAccounts = Entry('accounts', ['private', 'spot'], 'GET', {'cost': 1})
|
ccxt/abstract/gateio.py
CHANGED
@@ -92,8 +92,13 @@ class ImplicitAPI:
|
|
92
92
|
private_unified_get_interest_records = privateUnifiedGetInterestRecords = Entry('interest_records', ['private', 'unified'], 'GET', {'cost': 1.3333333333333333})
|
93
93
|
private_unified_get_estimate_rate = privateUnifiedGetEstimateRate = Entry('estimate_rate', ['private', 'unified'], 'GET', {'cost': 1.3333333333333333})
|
94
94
|
private_unified_get_currency_discount_tiers = privateUnifiedGetCurrencyDiscountTiers = Entry('currency_discount_tiers', ['private', 'unified'], 'GET', {'cost': 1.3333333333333333})
|
95
|
+
private_unified_get_risk_units = privateUnifiedGetRiskUnits = Entry('risk_units', ['private', 'unified'], 'GET', {'cost': 1.3333333333333333})
|
96
|
+
private_unified_get_unified_mode = privateUnifiedGetUnifiedMode = Entry('unified_mode', ['private', 'unified'], 'GET', {'cost': 1.3333333333333333})
|
97
|
+
private_unified_get_loan_margin_tiers = privateUnifiedGetLoanMarginTiers = Entry('loan_margin_tiers', ['private', 'unified'], 'GET', {'cost': 1.3333333333333333})
|
95
98
|
private_unified_post_account_mode = privateUnifiedPostAccountMode = Entry('account_mode', ['private', 'unified'], 'POST', {'cost': 1.3333333333333333})
|
96
99
|
private_unified_post_loans = privateUnifiedPostLoans = Entry('loans', ['private', 'unified'], 'POST', {'cost': 13.333333333333334})
|
100
|
+
private_unified_post_portfolio_calculator = privateUnifiedPostPortfolioCalculator = Entry('portfolio_calculator', ['private', 'unified'], 'POST', {'cost': 1.3333333333333333})
|
101
|
+
private_unified_put_unified_mode = privateUnifiedPutUnifiedMode = Entry('unified_mode', ['private', 'unified'], 'PUT', {'cost': 1.3333333333333333})
|
97
102
|
private_spot_get_fee = privateSpotGetFee = Entry('fee', ['private', 'spot'], 'GET', {'cost': 1})
|
98
103
|
private_spot_get_batch_fee = privateSpotGetBatchFee = Entry('batch_fee', ['private', 'spot'], 'GET', {'cost': 1})
|
99
104
|
private_spot_get_accounts = privateSpotGetAccounts = Entry('accounts', ['private', 'spot'], 'GET', {'cost': 1})
|
ccxt/abstract/kucoin.py
CHANGED
@@ -124,6 +124,7 @@ class ImplicitAPI:
|
|
124
124
|
private_post_lend_purchase_update = privatePostLendPurchaseUpdate = Entry('lend/purchase/update', 'private', 'POST', {'cost': 10})
|
125
125
|
private_post_bullet_private = privatePostBulletPrivate = Entry('bullet-private', 'private', 'POST', {'cost': 10})
|
126
126
|
private_post_position_update_user_leverage = privatePostPositionUpdateUserLeverage = Entry('position/update-user-leverage', 'private', 'POST', {'cost': 5})
|
127
|
+
private_post_deposit_address_create = privatePostDepositAddressCreate = Entry('deposit-address/create', 'private', 'POST', {'cost': 20})
|
127
128
|
private_delete_sub_api_key = privateDeleteSubApiKey = Entry('sub/api-key', 'private', 'DELETE', {'cost': 45})
|
128
129
|
private_delete_withdrawals_withdrawalid = privateDeleteWithdrawalsWithdrawalId = Entry('withdrawals/{withdrawalId}', 'private', 'DELETE', {'cost': 30})
|
129
130
|
private_delete_hf_orders_orderid = privateDeleteHfOrdersOrderId = Entry('hf/orders/{orderId}', 'private', 'DELETE', {'cost': 1})
|
ccxt/abstract/kucoinfutures.py
CHANGED
@@ -124,6 +124,7 @@ class ImplicitAPI:
|
|
124
124
|
private_post_lend_purchase_update = privatePostLendPurchaseUpdate = Entry('lend/purchase/update', 'private', 'POST', {'cost': 10})
|
125
125
|
private_post_bullet_private = privatePostBulletPrivate = Entry('bullet-private', 'private', 'POST', {'cost': 10})
|
126
126
|
private_post_position_update_user_leverage = privatePostPositionUpdateUserLeverage = Entry('position/update-user-leverage', 'private', 'POST', {'cost': 5})
|
127
|
+
private_post_deposit_address_create = privatePostDepositAddressCreate = Entry('deposit-address/create', 'private', 'POST', {'cost': 20})
|
127
128
|
private_delete_sub_api_key = privateDeleteSubApiKey = Entry('sub/api-key', 'private', 'DELETE', {'cost': 45})
|
128
129
|
private_delete_withdrawals_withdrawalid = privateDeleteWithdrawalsWithdrawalId = Entry('withdrawals/{withdrawalId}', 'private', 'DELETE', {'cost': 30})
|
129
130
|
private_delete_hf_orders_orderid = privateDeleteHfOrdersOrderId = Entry('hf/orders/{orderId}', 'private', 'DELETE', {'cost': 1})
|
ccxt/abstract/okx.py
CHANGED
@@ -48,6 +48,7 @@ class ImplicitAPI:
|
|
48
48
|
public_get_rubik_stat_taker_volume = publicGetRubikStatTakerVolume = Entry('rubik/stat/taker-volume', 'public', 'GET', {'cost': 4})
|
49
49
|
public_get_rubik_stat_margin_loan_ratio = publicGetRubikStatMarginLoanRatio = Entry('rubik/stat/margin/loan-ratio', 'public', 'GET', {'cost': 4})
|
50
50
|
public_get_rubik_stat_contracts_long_short_account_ratio = publicGetRubikStatContractsLongShortAccountRatio = Entry('rubik/stat/contracts/long-short-account-ratio', 'public', 'GET', {'cost': 4})
|
51
|
+
public_get_rubik_stat_contracts_long_short_account_ratio_contract = publicGetRubikStatContractsLongShortAccountRatioContract = Entry('rubik/stat/contracts/long-short-account-ratio-contract', 'public', 'GET', {'cost': 4})
|
51
52
|
public_get_rubik_stat_contracts_open_interest_volume = publicGetRubikStatContractsOpenInterestVolume = Entry('rubik/stat/contracts/open-interest-volume', 'public', 'GET', {'cost': 4})
|
52
53
|
public_get_rubik_stat_option_open_interest_volume = publicGetRubikStatOptionOpenInterestVolume = Entry('rubik/stat/option/open-interest-volume', 'public', 'GET', {'cost': 4})
|
53
54
|
public_get_rubik_stat_option_open_interest_volume_ratio = publicGetRubikStatOptionOpenInterestVolumeRatio = Entry('rubik/stat/option/open-interest-volume-ratio', 'public', 'GET', {'cost': 4})
|
ccxt/alpaca.py
CHANGED
@@ -69,6 +69,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
69
69
|
'fetchDepositsWithdrawals': False,
|
70
70
|
'fetchFundingHistory': False,
|
71
71
|
'fetchFundingRate': False,
|
72
|
+
'fetchFundingRateHistory': False,
|
72
73
|
'fetchFundingRates': False,
|
73
74
|
'fetchL1OrderBook': True,
|
74
75
|
'fetchL2OrderBook': False,
|
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.23'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -104,6 +104,7 @@ from ccxt.async_support.coinbase import coinbase
|
|
104
104
|
from ccxt.async_support.coinbaseadvanced import coinbaseadvanced # noqa: F401
|
105
105
|
from ccxt.async_support.coinbaseexchange import coinbaseexchange # noqa: F401
|
106
106
|
from ccxt.async_support.coinbaseinternational import coinbaseinternational # noqa: F401
|
107
|
+
from ccxt.async_support.coincatch import coincatch # noqa: F401
|
107
108
|
from ccxt.async_support.coincheck import coincheck # noqa: F401
|
108
109
|
from ccxt.async_support.coinex import coinex # noqa: F401
|
109
110
|
from ccxt.async_support.coinlist import coinlist # noqa: F401
|
@@ -214,6 +215,7 @@ exchanges = [
|
|
214
215
|
'coinbaseadvanced',
|
215
216
|
'coinbaseexchange',
|
216
217
|
'coinbaseinternational',
|
218
|
+
'coincatch',
|
217
219
|
'coincheck',
|
218
220
|
'coinex',
|
219
221
|
'coinlist',
|
ccxt/async_support/alpaca.py
CHANGED
@@ -69,6 +69,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
69
69
|
'fetchDepositsWithdrawals': False,
|
70
70
|
'fetchFundingHistory': False,
|
71
71
|
'fetchFundingRate': False,
|
72
|
+
'fetchFundingRateHistory': False,
|
72
73
|
'fetchFundingRates': False,
|
73
74
|
'fetchL1OrderBook': True,
|
74
75
|
'fetchL2OrderBook': False,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.4.
|
5
|
+
__version__ = '4.4.23'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -707,6 +707,12 @@ class Exchange(BaseExchange):
|
|
707
707
|
async def set_margin(self, symbol: str, amount: float, params={}):
|
708
708
|
raise NotSupported(self.id + ' setMargin() is not supported yet')
|
709
709
|
|
710
|
+
async def fetch_long_short_ratio(self, symbol: str, timeframe: Str = None, params={}):
|
711
|
+
raise NotSupported(self.id + ' fetchLongShortRatio() is not supported yet')
|
712
|
+
|
713
|
+
async def fetch_long_short_ratio_history(self, symbol: Str = None, timeframe: Str = None, since: Int = None, limit: Int = None, params={}):
|
714
|
+
raise NotSupported(self.id + ' fetchLongShortRatioHistory() is not supported yet')
|
715
|
+
|
710
716
|
async def fetch_margin_adjustment_history(self, symbol: Str = None, type: Str = None, since: Num = None, limit: Num = None, params={}):
|
711
717
|
"""
|
712
718
|
fetches the history of margin added or reduced from contract isolated positions
|
ccxt/async_support/bigone.py
CHANGED
@@ -55,7 +55,10 @@ class bigone(Exchange, ImplicitAPI):
|
|
55
55
|
'fetchDepositAddresses': False,
|
56
56
|
'fetchDepositAddressesByNetwork': False,
|
57
57
|
'fetchDeposits': True,
|
58
|
+
'fetchFundingHistory': False,
|
58
59
|
'fetchFundingRate': False,
|
60
|
+
'fetchFundingRateHistory': False,
|
61
|
+
'fetchFundingRates': False,
|
59
62
|
'fetchMarkets': True,
|
60
63
|
'fetchMyTrades': True,
|
61
64
|
'fetchOHLCV': True,
|
ccxt/async_support/binance.py
CHANGED
@@ -8,7 +8,7 @@ from ccxt.abstract.binance import ImplicitAPI
|
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
10
|
import json
|
11
|
-
from ccxt.base.types import Balances, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, Greeks, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
11
|
+
from ccxt.base.types import LongShortRatio, Balances, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, Greeks, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, MarginMode, MarginModes, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
12
12
|
from typing import List
|
13
13
|
from ccxt.base.errors import ExchangeError
|
14
14
|
from ccxt.base.errors import AuthenticationError
|
@@ -129,6 +129,8 @@ class binance(Exchange, ImplicitAPI):
|
|
129
129
|
'fetchLeverages': True,
|
130
130
|
'fetchLeverageTiers': True,
|
131
131
|
'fetchLiquidations': False,
|
132
|
+
'fetchLongShortRatio': False,
|
133
|
+
'fetchLongShortRatioHistory': True,
|
132
134
|
'fetchMarginAdjustmentHistory': True,
|
133
135
|
'fetchMarginMode': 'emulated',
|
134
136
|
'fetchMarginModes': True,
|
@@ -493,6 +495,7 @@ class binance(Exchange, ImplicitAPI):
|
|
493
495
|
'portfolio/asset-index-price': 0.1,
|
494
496
|
'portfolio/repay-futures-switch': 3, # Weight(IP): 30 => cost = 0.1 * 30 = 3
|
495
497
|
'portfolio/margin-asset-leverage': 5, # Weight(IP): 50 => cost = 0.1 * 50 = 5
|
498
|
+
'portfolio/balance': 2,
|
496
499
|
# staking
|
497
500
|
'staking/productList': 0.1,
|
498
501
|
'staking/position': 0.1,
|
@@ -695,6 +698,7 @@ class binance(Exchange, ImplicitAPI):
|
|
695
698
|
'loan/flexible/ltv/adjustment/history': 40, # Weight(IP): 400 => cost = 0.1 * 400 = 40
|
696
699
|
'loan/flexible/loanable/data': 40, # Weight(IP): 400 => cost = 0.1 * 400 = 40
|
697
700
|
'loan/flexible/collateral/data': 40, # Weight(IP): 400 => cost = 0.1 * 400 = 40
|
701
|
+
'portfolio/account': 2,
|
698
702
|
},
|
699
703
|
'post': {
|
700
704
|
'eth-staking/eth/stake': 15, # Weight(IP): 150 => cost = 0.1 * 150 = 15
|
@@ -772,6 +776,10 @@ class binance(Exchange, ImplicitAPI):
|
|
772
776
|
'commissionRate': 20,
|
773
777
|
'income/asyn': 5,
|
774
778
|
'income/asyn/id': 5,
|
779
|
+
'trade/asyn': 0.5,
|
780
|
+
'trade/asyn/id': 0.5,
|
781
|
+
'order/asyn': 0.5,
|
782
|
+
'order/asyn/id': 0.5,
|
775
783
|
'pmExchangeInfo': 0.5, # Weight(IP): 5 => cost = 0.1 * 5 = 0.5
|
776
784
|
'pmAccountInfo': 0.5, # Weight(IP): 5 => cost = 0.1 * 5 = 0.5
|
777
785
|
},
|
@@ -1050,99 +1058,118 @@ class binance(Exchange, ImplicitAPI):
|
|
1050
1058
|
},
|
1051
1059
|
},
|
1052
1060
|
'papi': {
|
1061
|
+
# IP(papi) request rate limit of 6000 per minute
|
1062
|
+
# 1 IP(papi) => cost = 0.2 =>(1000 / (50 * 0.2)) * 60 = 6000
|
1063
|
+
# Order(papi) request rate limit of 1200 per minute
|
1064
|
+
# 1 Order(papi) => cost = 1 =>(1000 / (50 * 1)) * 60 = 1200
|
1053
1065
|
'get': {
|
1054
|
-
'ping':
|
1055
|
-
'um/order': 1,
|
1056
|
-
'um/openOrder': 1,
|
1066
|
+
'ping': 0.2,
|
1067
|
+
'um/order': 1,
|
1068
|
+
'um/openOrder': 1,
|
1057
1069
|
'um/openOrders': {'cost': 1, 'noSymbol': 40},
|
1058
|
-
'um/allOrders': 5,
|
1059
|
-
'cm/order': 1,
|
1060
|
-
'cm/openOrder': 1,
|
1070
|
+
'um/allOrders': 5,
|
1071
|
+
'cm/order': 1,
|
1072
|
+
'cm/openOrder': 1,
|
1061
1073
|
'cm/openOrders': {'cost': 1, 'noSymbol': 40},
|
1062
|
-
'cm/allOrders': 20,
|
1074
|
+
'cm/allOrders': 20,
|
1063
1075
|
'um/conditional/openOrder': 1,
|
1064
1076
|
'um/conditional/openOrders': {'cost': 1, 'noSymbol': 40},
|
1065
1077
|
'um/conditional/orderHistory': 1,
|
1066
|
-
'um/conditional/allOrders': 40,
|
1078
|
+
'um/conditional/allOrders': {'cost': 1, 'noSymbol': 40},
|
1067
1079
|
'cm/conditional/openOrder': 1,
|
1068
1080
|
'cm/conditional/openOrders': {'cost': 1, 'noSymbol': 40},
|
1069
1081
|
'cm/conditional/orderHistory': 1,
|
1070
1082
|
'cm/conditional/allOrders': 40,
|
1071
|
-
'margin/order':
|
1083
|
+
'margin/order': 10,
|
1072
1084
|
'margin/openOrders': 5,
|
1073
1085
|
'margin/allOrders': 100,
|
1074
1086
|
'margin/orderList': 5,
|
1075
1087
|
'margin/allOrderList': 100,
|
1076
1088
|
'margin/openOrderList': 5,
|
1077
1089
|
'margin/myTrades': 5,
|
1078
|
-
'balance':
|
1079
|
-
'account':
|
1080
|
-
'margin/maxBorrowable':
|
1081
|
-
'margin/maxWithdraw':
|
1082
|
-
'um/positionRisk':
|
1083
|
-
'cm/positionRisk':
|
1084
|
-
'um/positionSide/dual':
|
1085
|
-
'cm/positionSide/dual':
|
1086
|
-
'um/userTrades': 5,
|
1087
|
-
'cm/userTrades': 20,
|
1088
|
-
'um/leverageBracket':
|
1089
|
-
'cm/leverageBracket':
|
1090
|
-
'margin/forceOrders': 1,
|
1091
|
-
'um/forceOrders': 20,
|
1092
|
-
'cm/forceOrders': 20,
|
1093
|
-
'um/apiTradingStatus':
|
1094
|
-
'um/commissionRate':
|
1095
|
-
'cm/commissionRate':
|
1096
|
-
'margin/marginLoan':
|
1097
|
-
'margin/repayLoan':
|
1098
|
-
'margin/marginInterestHistory':
|
1099
|
-
'portfolio/interest-history':
|
1100
|
-
'um/income':
|
1101
|
-
'cm/income':
|
1102
|
-
'um/account':
|
1103
|
-
'cm/account':
|
1104
|
-
'repay-futures-switch':
|
1090
|
+
'balance': 4,
|
1091
|
+
'account': 4,
|
1092
|
+
'margin/maxBorrowable': 1,
|
1093
|
+
'margin/maxWithdraw': 1,
|
1094
|
+
'um/positionRisk': 1,
|
1095
|
+
'cm/positionRisk': 0.2,
|
1096
|
+
'um/positionSide/dual': 6,
|
1097
|
+
'cm/positionSide/dual': 6,
|
1098
|
+
'um/userTrades': 5,
|
1099
|
+
'cm/userTrades': 20,
|
1100
|
+
'um/leverageBracket': 0.2,
|
1101
|
+
'cm/leverageBracket': 0.2,
|
1102
|
+
'margin/forceOrders': 1,
|
1103
|
+
'um/forceOrders': {'cost': 20, 'noSymbol': 50},
|
1104
|
+
'cm/forceOrders': {'cost': 20, 'noSymbol': 50},
|
1105
|
+
'um/apiTradingStatus': {'cost': 0.2, 'noSymbol': 2},
|
1106
|
+
'um/commissionRate': 4,
|
1107
|
+
'cm/commissionRate': 4,
|
1108
|
+
'margin/marginLoan': 2,
|
1109
|
+
'margin/repayLoan': 2,
|
1110
|
+
'margin/marginInterestHistory': 0.2,
|
1111
|
+
'portfolio/interest-history': 10,
|
1112
|
+
'um/income': 6,
|
1113
|
+
'cm/income': 6,
|
1114
|
+
'um/account': 1,
|
1115
|
+
'cm/account': 1,
|
1116
|
+
'repay-futures-switch': 6,
|
1105
1117
|
'um/adlQuantile': 5,
|
1106
1118
|
'cm/adlQuantile': 5,
|
1119
|
+
'um/trade/asyn': 300,
|
1120
|
+
'um/trade/asyn/id': 2,
|
1121
|
+
'um/order/asyn/': 300,
|
1122
|
+
'um/order/asyn/id': 2,
|
1123
|
+
'um/income/asyn': 300,
|
1124
|
+
'um/income/asyn/id': 2,
|
1125
|
+
'um/orderAmendment': 1,
|
1126
|
+
'cm/orderAmendment': 1,
|
1127
|
+
'um/feeBurn': 30,
|
1128
|
+
'um/accountConfig': 1,
|
1129
|
+
'um/symbolConfig': 1,
|
1130
|
+
'cm/accountConfig': 1,
|
1131
|
+
'cm/symbolConfig': 1,
|
1107
1132
|
},
|
1108
1133
|
'post': {
|
1109
|
-
'um/order': 1,
|
1134
|
+
'um/order': 1,
|
1110
1135
|
'um/conditional/order': 1,
|
1111
|
-
'cm/order': 1,
|
1136
|
+
'cm/order': 1,
|
1112
1137
|
'cm/conditional/order': 1,
|
1113
|
-
'margin/order':
|
1114
|
-
'marginLoan':
|
1115
|
-
'repayLoan':
|
1116
|
-
'margin/order/oco':
|
1117
|
-
'um/leverage':
|
1118
|
-
'cm/leverage':
|
1119
|
-
'um/positionSide/dual':
|
1120
|
-
'cm/positionSide/dual':
|
1121
|
-
'auto-collection':
|
1122
|
-
'bnb-transfer':
|
1123
|
-
'repay-futures-switch': 150,
|
1124
|
-
'repay-futures-negative-balance': 150,
|
1125
|
-
'listenKey':
|
1126
|
-
'asset-collection':
|
1127
|
-
'margin/repay-debt':
|
1138
|
+
'margin/order': 1,
|
1139
|
+
'marginLoan': 100,
|
1140
|
+
'repayLoan': 100,
|
1141
|
+
'margin/order/oco': 1,
|
1142
|
+
'um/leverage': 0.2,
|
1143
|
+
'cm/leverage': 0.2,
|
1144
|
+
'um/positionSide/dual': 0.2,
|
1145
|
+
'cm/positionSide/dual': 0.2,
|
1146
|
+
'auto-collection': 150,
|
1147
|
+
'bnb-transfer': 150,
|
1148
|
+
'repay-futures-switch': 150,
|
1149
|
+
'repay-futures-negative-balance': 150,
|
1150
|
+
'listenKey': 0.2,
|
1151
|
+
'asset-collection': 6,
|
1152
|
+
'margin/repay-debt': 3000,
|
1128
1153
|
'um/feeBurn': 1,
|
1129
1154
|
},
|
1130
1155
|
'put': {
|
1131
|
-
'listenKey':
|
1156
|
+
'listenKey': 0.2,
|
1157
|
+
'um/order': 1,
|
1158
|
+
'cm/order': 1,
|
1132
1159
|
},
|
1133
1160
|
'delete': {
|
1134
|
-
'um/order': 1,
|
1161
|
+
'um/order': 1,
|
1135
1162
|
'um/conditional/order': 1,
|
1136
|
-
'um/allOpenOrders': 1,
|
1163
|
+
'um/allOpenOrders': 1,
|
1137
1164
|
'um/conditional/allOpenOrders': 1,
|
1138
|
-
'cm/order': 1,
|
1165
|
+
'cm/order': 1,
|
1139
1166
|
'cm/conditional/order': 1,
|
1140
|
-
'cm/allOpenOrders': 1,
|
1167
|
+
'cm/allOpenOrders': 1,
|
1141
1168
|
'cm/conditional/allOpenOrders': 1,
|
1142
|
-
'margin/order':
|
1143
|
-
'margin/allOpenOrders': 5,
|
1144
|
-
'margin/orderList': 2,
|
1145
|
-
'listenKey':
|
1169
|
+
'margin/order': 2,
|
1170
|
+
'margin/allOpenOrders': 5,
|
1171
|
+
'margin/orderList': 2,
|
1172
|
+
'listenKey': 0.2,
|
1146
1173
|
},
|
1147
1174
|
},
|
1148
1175
|
},
|
@@ -12701,3 +12728,96 @@ class binance(Exchange, ImplicitAPI):
|
|
12701
12728
|
#
|
12702
12729
|
result = self.parse_funding_rates(response, market)
|
12703
12730
|
return self.filter_by_array(result, 'symbol', symbols)
|
12731
|
+
|
12732
|
+
async def fetch_long_short_ratio_history(self, symbol: Str = None, timeframe: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LongShortRatio]:
|
12733
|
+
"""
|
12734
|
+
fetches the long short ratio history for a unified market symbol
|
12735
|
+
:see: https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio
|
12736
|
+
:see: https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Long-Short-Ratio
|
12737
|
+
:param str symbol: unified symbol of the market to fetch the long short ratio for
|
12738
|
+
:param str [timeframe]: the period for the ratio, default is 24 hours
|
12739
|
+
:param int [since]: the earliest time in ms to fetch ratios for
|
12740
|
+
:param int [limit]: the maximum number of long short ratio structures to retrieve
|
12741
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
12742
|
+
:param int [params.until]: timestamp in ms of the latest ratio to fetch
|
12743
|
+
:returns dict[]: an array of `long short ratio structures <https://docs.ccxt.com/#/?id=long-short-ratio-structure>`
|
12744
|
+
"""
|
12745
|
+
await self.load_markets()
|
12746
|
+
market = self.market(symbol)
|
12747
|
+
if timeframe is None:
|
12748
|
+
timeframe = '1d'
|
12749
|
+
request: dict = {
|
12750
|
+
'period': timeframe,
|
12751
|
+
}
|
12752
|
+
request, params = self.handle_until_option('endTime', request, params)
|
12753
|
+
if since is not None:
|
12754
|
+
request['startTime'] = since
|
12755
|
+
if limit is not None:
|
12756
|
+
request['limit'] = limit
|
12757
|
+
subType = None
|
12758
|
+
subType, params = self.handle_sub_type_and_params('fetchLongShortRatioHistory', market, params)
|
12759
|
+
response = None
|
12760
|
+
if subType == 'linear':
|
12761
|
+
request['symbol'] = market['id']
|
12762
|
+
response = await self.fapiDataGetGlobalLongShortAccountRatio(self.extend(request, params))
|
12763
|
+
#
|
12764
|
+
# [
|
12765
|
+
# {
|
12766
|
+
# "symbol": "BTCUSDT",
|
12767
|
+
# "longAccount": "0.4558",
|
12768
|
+
# "longShortRatio": "0.8376",
|
12769
|
+
# "shortAccount": "0.5442",
|
12770
|
+
# "timestamp": 1726790400000
|
12771
|
+
# },
|
12772
|
+
# ]
|
12773
|
+
#
|
12774
|
+
elif subType == 'inverse':
|
12775
|
+
request['pair'] = market['info']['pair']
|
12776
|
+
response = await self.dapiDataGetGlobalLongShortAccountRatio(self.extend(request, params))
|
12777
|
+
#
|
12778
|
+
# [
|
12779
|
+
# {
|
12780
|
+
# "longAccount": "0.7262",
|
12781
|
+
# "longShortRatio": "2.6523",
|
12782
|
+
# "shortAccount": "0.2738",
|
12783
|
+
# "pair": "BTCUSD",
|
12784
|
+
# "timestamp": 1726790400000
|
12785
|
+
# },
|
12786
|
+
# ]
|
12787
|
+
#
|
12788
|
+
else:
|
12789
|
+
raise BadRequest(self.id + ' fetchLongShortRatioHistory() supports linear and inverse subTypes only')
|
12790
|
+
return self.parse_long_short_ratio_history(response, market)
|
12791
|
+
|
12792
|
+
def parse_long_short_ratio(self, info: dict, market: Market = None) -> LongShortRatio:
|
12793
|
+
#
|
12794
|
+
# linear
|
12795
|
+
#
|
12796
|
+
# {
|
12797
|
+
# "symbol": "BTCUSDT",
|
12798
|
+
# "longAccount": "0.4558",
|
12799
|
+
# "longShortRatio": "0.8376",
|
12800
|
+
# "shortAccount": "0.5442",
|
12801
|
+
# "timestamp": 1726790400000
|
12802
|
+
# }
|
12803
|
+
#
|
12804
|
+
# inverse
|
12805
|
+
#
|
12806
|
+
# {
|
12807
|
+
# "longAccount": "0.7262",
|
12808
|
+
# "longShortRatio": "2.6523",
|
12809
|
+
# "shortAccount": "0.2738",
|
12810
|
+
# "pair": "BTCUSD",
|
12811
|
+
# "timestamp": 1726790400000
|
12812
|
+
# }
|
12813
|
+
#
|
12814
|
+
marketId = self.safe_string(info, 'symbol')
|
12815
|
+
timestamp = self.safe_integer_omit_zero(info, 'timestamp')
|
12816
|
+
return {
|
12817
|
+
'info': info,
|
12818
|
+
'symbol': self.safe_symbol(marketId, market, None, 'contract'),
|
12819
|
+
'timestamp': timestamp,
|
12820
|
+
'datetime': self.iso8601(timestamp),
|
12821
|
+
'timeframe': None,
|
12822
|
+
'longShortRatio': self.safe_number(info, 'longShortRatio'),
|
12823
|
+
}
|
ccxt/async_support/bitfinex.py
CHANGED
@@ -61,6 +61,10 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
61
61
|
'fetchDepositsWithdrawals': True,
|
62
62
|
'fetchDepositWithdrawFee': 'emulated',
|
63
63
|
'fetchDepositWithdrawFees': True,
|
64
|
+
'fetchFundingHistory': False,
|
65
|
+
'fetchFundingRate': False, # Endpoint 'lendbook/{currency}' is related to interest rates on spot margin lending
|
66
|
+
'fetchFundingRateHistory': False,
|
67
|
+
'fetchFundingRates': False,
|
64
68
|
'fetchIndexOHLCV': False,
|
65
69
|
'fetchLeverageTiers': False,
|
66
70
|
'fetchMarginMode': False,
|