ccxt 4.1.75__py2.py3-none-any.whl → 4.1.77__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/binance.py +2 -0
- ccxt/abstract/binancecoinm.py +2 -0
- ccxt/abstract/binanceus.py +2 -0
- ccxt/abstract/binanceusdm.py +2 -0
- ccxt/abstract/okx.py +23 -9
- ccxt/ace.py +2 -0
- ccxt/alpaca.py +2 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +2 -0
- ccxt/async_support/alpaca.py +2 -0
- ccxt/async_support/base/exchange.py +7 -1
- ccxt/async_support/binance.py +4 -0
- ccxt/async_support/binanceus.py +2 -0
- ccxt/async_support/bingx.py +76 -25
- ccxt/async_support/bit2c.py +2 -0
- ccxt/async_support/bitbank.py +2 -0
- ccxt/async_support/bithumb.py +2 -0
- ccxt/async_support/bitmex.py +5 -1
- ccxt/async_support/bitopro.py +2 -0
- ccxt/async_support/bitpanda.py +2 -0
- ccxt/async_support/bitrue.py +24 -1
- ccxt/async_support/bitso.py +2 -0
- ccxt/async_support/bitstamp.py +5 -2
- ccxt/async_support/bittrex.py +2 -0
- ccxt/async_support/bitvavo.py +2 -0
- ccxt/async_support/bl3p.py +2 -0
- ccxt/async_support/btcalpha.py +2 -0
- ccxt/async_support/btcbox.py +2 -0
- ccxt/async_support/btcmarkets.py +2 -0
- ccxt/async_support/btcturk.py +2 -0
- ccxt/async_support/bybit.py +2 -0
- ccxt/async_support/coinbase.py +33 -6
- ccxt/async_support/coincheck.py +2 -0
- ccxt/async_support/coinlist.py +2 -0
- ccxt/async_support/coinmate.py +2 -0
- ccxt/async_support/coinone.py +2 -0
- ccxt/async_support/coinsph.py +2 -0
- ccxt/async_support/coinspot.py +2 -0
- ccxt/async_support/cryptocom.py +2 -167
- ccxt/async_support/gate.py +1 -0
- ccxt/async_support/gemini.py +2 -0
- ccxt/async_support/idex.py +2 -0
- ccxt/async_support/independentreserve.py +2 -0
- ccxt/async_support/indodax.py +2 -0
- ccxt/async_support/kucoin.py +2 -0
- ccxt/async_support/kuna.py +2 -0
- ccxt/async_support/latoken.py +2 -0
- ccxt/async_support/luno.py +2 -0
- ccxt/async_support/mercado.py +2 -0
- ccxt/async_support/mexc.py +2 -0
- ccxt/async_support/ndax.py +2 -0
- ccxt/async_support/novadax.py +2 -0
- ccxt/async_support/okx.py +25 -10
- ccxt/async_support/p2b.py +2 -0
- ccxt/async_support/wavesexchange.py +2 -0
- ccxt/async_support/wazirx.py +2 -0
- ccxt/async_support/woo.py +2 -0
- ccxt/async_support/yobit.py +2 -0
- ccxt/async_support/zonda.py +2 -0
- ccxt/base/exchange.py +7 -1
- ccxt/binance.py +4 -0
- ccxt/binanceus.py +2 -0
- ccxt/bingx.py +76 -25
- ccxt/bit2c.py +2 -0
- ccxt/bitbank.py +2 -0
- ccxt/bithumb.py +2 -0
- ccxt/bitmex.py +5 -1
- ccxt/bitopro.py +2 -0
- ccxt/bitpanda.py +2 -0
- ccxt/bitrue.py +24 -1
- ccxt/bitso.py +2 -0
- ccxt/bitstamp.py +5 -2
- ccxt/bittrex.py +2 -0
- ccxt/bitvavo.py +2 -0
- ccxt/bl3p.py +2 -0
- ccxt/btcalpha.py +2 -0
- ccxt/btcbox.py +2 -0
- ccxt/btcmarkets.py +2 -0
- ccxt/btcturk.py +2 -0
- ccxt/bybit.py +2 -0
- ccxt/coinbase.py +33 -6
- ccxt/coincheck.py +2 -0
- ccxt/coinlist.py +2 -0
- ccxt/coinmate.py +2 -0
- ccxt/coinone.py +2 -0
- ccxt/coinsph.py +2 -0
- ccxt/coinspot.py +2 -0
- ccxt/cryptocom.py +2 -167
- ccxt/gate.py +1 -0
- ccxt/gemini.py +2 -0
- ccxt/idex.py +2 -0
- ccxt/independentreserve.py +2 -0
- ccxt/indodax.py +2 -0
- ccxt/kucoin.py +2 -0
- ccxt/kuna.py +2 -0
- ccxt/latoken.py +2 -0
- ccxt/luno.py +2 -0
- ccxt/mercado.py +2 -0
- ccxt/mexc.py +2 -0
- ccxt/ndax.py +2 -0
- ccxt/novadax.py +2 -0
- ccxt/okx.py +25 -10
- ccxt/p2b.py +2 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/wavesexchange.py +2 -0
- ccxt/wazirx.py +2 -0
- ccxt/woo.py +2 -0
- ccxt/yobit.py +2 -0
- ccxt/zonda.py +2 -0
- {ccxt-4.1.75.dist-info → ccxt-4.1.77.dist-info}/METADATA +4 -4
- {ccxt-4.1.75.dist-info → ccxt-4.1.77.dist-info}/RECORD +114 -114
- {ccxt-4.1.75.dist-info → ccxt-4.1.77.dist-info}/WHEEL +0 -0
- {ccxt-4.1.75.dist-info → ccxt-4.1.77.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
ccxt/abstract/binance.py
CHANGED
@@ -553,6 +553,7 @@ class ImplicitAPI:
|
|
553
553
|
public_get_uiklines = publicGetUiKlines = Entry('uiKlines', 'public', 'GET', {'cost': 0.4})
|
554
554
|
public_get_ticker_24hr = publicGetTicker24hr = Entry('ticker/24hr', 'public', 'GET', {'cost': 0.4, 'noSymbol': 16})
|
555
555
|
public_get_ticker = publicGetTicker = Entry('ticker', 'public', 'GET', {'cost': 0.4, 'noSymbol': 16})
|
556
|
+
public_get_ticker_tradingday = publicGetTickerTradingDay = Entry('ticker/tradingDay', 'public', 'GET', {'cost': 0.8})
|
556
557
|
public_get_ticker_price = publicGetTickerPrice = Entry('ticker/price', 'public', 'GET', {'cost': 0.4, 'noSymbol': 0.8})
|
557
558
|
public_get_ticker_bookticker = publicGetTickerBookTicker = Entry('ticker/bookTicker', 'public', 'GET', {'cost': 0.4, 'noSymbol': 0.8})
|
558
559
|
public_get_exchangeinfo = publicGetExchangeInfo = Entry('exchangeInfo', 'public', 'GET', {'cost': 4})
|
@@ -571,6 +572,7 @@ class ImplicitAPI:
|
|
571
572
|
private_get_ratelimit_order = privateGetRateLimitOrder = Entry('rateLimit/order', 'private', 'GET', {'cost': 8})
|
572
573
|
private_get_mypreventedmatches = privateGetMyPreventedMatches = Entry('myPreventedMatches', 'private', 'GET', {'cost': 4})
|
573
574
|
private_get_myallocations = privateGetMyAllocations = Entry('myAllocations', 'private', 'GET', {'cost': 4})
|
575
|
+
private_get_account_commission = privateGetAccountCommission = Entry('account/commission', 'private', 'GET', {'cost': 4})
|
574
576
|
private_post_order_oco = privatePostOrderOco = Entry('order/oco', 'private', 'POST', {'cost': 0.2})
|
575
577
|
private_post_sor_order = privatePostSorOrder = Entry('sor/order', 'private', 'POST', {'cost': 0.2})
|
576
578
|
private_post_sor_order_test = privatePostSorOrderTest = Entry('sor/order/test', 'private', 'POST', {'cost': 0.2})
|
ccxt/abstract/binancecoinm.py
CHANGED
@@ -553,6 +553,7 @@ class ImplicitAPI:
|
|
553
553
|
public_get_uiklines = publicGetUiKlines = Entry('uiKlines', 'public', 'GET', {'cost': 0.4})
|
554
554
|
public_get_ticker_24hr = publicGetTicker24hr = Entry('ticker/24hr', 'public', 'GET', {'cost': 0.4, 'noSymbol': 16})
|
555
555
|
public_get_ticker = publicGetTicker = Entry('ticker', 'public', 'GET', {'cost': 0.4, 'noSymbol': 16})
|
556
|
+
public_get_ticker_tradingday = publicGetTickerTradingDay = Entry('ticker/tradingDay', 'public', 'GET', {'cost': 0.8})
|
556
557
|
public_get_ticker_price = publicGetTickerPrice = Entry('ticker/price', 'public', 'GET', {'cost': 0.4, 'noSymbol': 0.8})
|
557
558
|
public_get_ticker_bookticker = publicGetTickerBookTicker = Entry('ticker/bookTicker', 'public', 'GET', {'cost': 0.4, 'noSymbol': 0.8})
|
558
559
|
public_get_exchangeinfo = publicGetExchangeInfo = Entry('exchangeInfo', 'public', 'GET', {'cost': 4})
|
@@ -571,6 +572,7 @@ class ImplicitAPI:
|
|
571
572
|
private_get_ratelimit_order = privateGetRateLimitOrder = Entry('rateLimit/order', 'private', 'GET', {'cost': 8})
|
572
573
|
private_get_mypreventedmatches = privateGetMyPreventedMatches = Entry('myPreventedMatches', 'private', 'GET', {'cost': 4})
|
573
574
|
private_get_myallocations = privateGetMyAllocations = Entry('myAllocations', 'private', 'GET', {'cost': 4})
|
575
|
+
private_get_account_commission = privateGetAccountCommission = Entry('account/commission', 'private', 'GET', {'cost': 4})
|
574
576
|
private_post_order_oco = privatePostOrderOco = Entry('order/oco', 'private', 'POST', {'cost': 0.2})
|
575
577
|
private_post_sor_order = privatePostSorOrder = Entry('sor/order', 'private', 'POST', {'cost': 0.2})
|
576
578
|
private_post_sor_order_test = privatePostSorOrderTest = Entry('sor/order/test', 'private', 'POST', {'cost': 0.2})
|
ccxt/abstract/binanceus.py
CHANGED
@@ -553,6 +553,7 @@ class ImplicitAPI:
|
|
553
553
|
public_get_uiklines = publicGetUiKlines = Entry('uiKlines', 'public', 'GET', {'cost': 0.4})
|
554
554
|
public_get_ticker_24hr = publicGetTicker24hr = Entry('ticker/24hr', 'public', 'GET', {'cost': 0.4, 'noSymbol': 16})
|
555
555
|
public_get_ticker = publicGetTicker = Entry('ticker', 'public', 'GET', {'cost': 0.4, 'noSymbol': 16})
|
556
|
+
public_get_ticker_tradingday = publicGetTickerTradingDay = Entry('ticker/tradingDay', 'public', 'GET', {'cost': 0.8})
|
556
557
|
public_get_ticker_price = publicGetTickerPrice = Entry('ticker/price', 'public', 'GET', {'cost': 0.4, 'noSymbol': 0.8})
|
557
558
|
public_get_ticker_bookticker = publicGetTickerBookTicker = Entry('ticker/bookTicker', 'public', 'GET', {'cost': 0.4, 'noSymbol': 0.8})
|
558
559
|
public_get_exchangeinfo = publicGetExchangeInfo = Entry('exchangeInfo', 'public', 'GET', {'cost': 4})
|
@@ -571,6 +572,7 @@ class ImplicitAPI:
|
|
571
572
|
private_get_ratelimit_order = privateGetRateLimitOrder = Entry('rateLimit/order', 'private', 'GET', {'cost': 8})
|
572
573
|
private_get_mypreventedmatches = privateGetMyPreventedMatches = Entry('myPreventedMatches', 'private', 'GET', {'cost': 4})
|
573
574
|
private_get_myallocations = privateGetMyAllocations = Entry('myAllocations', 'private', 'GET', {'cost': 4})
|
575
|
+
private_get_account_commission = privateGetAccountCommission = Entry('account/commission', 'private', 'GET', {'cost': 4})
|
574
576
|
private_post_order_oco = privatePostOrderOco = Entry('order/oco', 'private', 'POST', {'cost': 0.2})
|
575
577
|
private_post_sor_order = privatePostSorOrder = Entry('sor/order', 'private', 'POST', {'cost': 0.2})
|
576
578
|
private_post_sor_order_test = privatePostSorOrderTest = Entry('sor/order/test', 'private', 'POST', {'cost': 0.2})
|
ccxt/abstract/binanceusdm.py
CHANGED
@@ -553,6 +553,7 @@ class ImplicitAPI:
|
|
553
553
|
public_get_uiklines = publicGetUiKlines = Entry('uiKlines', 'public', 'GET', {'cost': 0.4})
|
554
554
|
public_get_ticker_24hr = publicGetTicker24hr = Entry('ticker/24hr', 'public', 'GET', {'cost': 0.4, 'noSymbol': 16})
|
555
555
|
public_get_ticker = publicGetTicker = Entry('ticker', 'public', 'GET', {'cost': 0.4, 'noSymbol': 16})
|
556
|
+
public_get_ticker_tradingday = publicGetTickerTradingDay = Entry('ticker/tradingDay', 'public', 'GET', {'cost': 0.8})
|
556
557
|
public_get_ticker_price = publicGetTickerPrice = Entry('ticker/price', 'public', 'GET', {'cost': 0.4, 'noSymbol': 0.8})
|
557
558
|
public_get_ticker_bookticker = publicGetTickerBookTicker = Entry('ticker/bookTicker', 'public', 'GET', {'cost': 0.4, 'noSymbol': 0.8})
|
558
559
|
public_get_exchangeinfo = publicGetExchangeInfo = Entry('exchangeInfo', 'public', 'GET', {'cost': 4})
|
@@ -571,6 +572,7 @@ class ImplicitAPI:
|
|
571
572
|
private_get_ratelimit_order = privateGetRateLimitOrder = Entry('rateLimit/order', 'private', 'GET', {'cost': 8})
|
572
573
|
private_get_mypreventedmatches = privateGetMyPreventedMatches = Entry('myPreventedMatches', 'private', 'GET', {'cost': 4})
|
573
574
|
private_get_myallocations = privateGetMyAllocations = Entry('myAllocations', 'private', 'GET', {'cost': 4})
|
575
|
+
private_get_account_commission = privateGetAccountCommission = Entry('account/commission', 'private', 'GET', {'cost': 4})
|
574
576
|
private_post_order_oco = privatePostOrderOco = Entry('order/oco', 'private', 'POST', {'cost': 0.2})
|
575
577
|
private_post_sor_order = privatePostSorOrder = Entry('sor/order', 'private', 'POST', {'cost': 0.2})
|
576
578
|
private_post_sor_order_test = privatePostSorOrderTest = Entry('sor/order/test', 'private', 'POST', {'cost': 0.2})
|
ccxt/abstract/okx.py
CHANGED
@@ -66,6 +66,12 @@ class ImplicitAPI:
|
|
66
66
|
public_get_finance_savings_lending_rate_summary = publicGetFinanceSavingsLendingRateSummary = Entry('finance/savings/lending-rate-summary', 'public', 'GET', {'cost': 1.6666666666666667})
|
67
67
|
public_get_finance_savings_lending_rate_history = publicGetFinanceSavingsLendingRateHistory = Entry('finance/savings/lending-rate-history', 'public', 'GET', {'cost': 1.6666666666666667})
|
68
68
|
public_get_finance_sfp_dcd_products = publicGetFinanceSfpDcdProducts = Entry('finance/sfp/dcd/products', 'public', 'GET', {'cost': 0.6666666666666666})
|
69
|
+
public_get_copytrading_public_lead_traders = publicGetCopytradingPublicLeadTraders = Entry('copytrading/public-lead-traders', 'public', 'GET', {'cost': 4})
|
70
|
+
public_get_copytrading_public_weekly_pnl = publicGetCopytradingPublicWeeklyPnl = Entry('copytrading/public-weekly-pnl', 'public', 'GET', {'cost': 4})
|
71
|
+
public_get_copytrading_public_stats = publicGetCopytradingPublicStats = Entry('copytrading/public-stats', 'public', 'GET', {'cost': 4})
|
72
|
+
public_get_copytrading_public_preference_currency = publicGetCopytradingPublicPreferenceCurrency = Entry('copytrading/public-preference-currency', 'public', 'GET', {'cost': 4})
|
73
|
+
public_get_copytrading_public_current_subpositions = publicGetCopytradingPublicCurrentSubpositions = Entry('copytrading/public-current-subpositions', 'public', 'GET', {'cost': 4})
|
74
|
+
public_get_copytrading_public_subpositions_history = publicGetCopytradingPublicSubpositionsHistory = Entry('copytrading/public-subpositions-history', 'public', 'GET', {'cost': 4})
|
69
75
|
private_get_rfq_counterparties = privateGetRfqCounterparties = Entry('rfq/counterparties', 'private', 'GET', {'cost': 4})
|
70
76
|
private_get_rfq_maker_instrument_settings = privateGetRfqMakerInstrumentSettings = Entry('rfq/maker-instrument-settings', 'private', 'GET', {'cost': 4})
|
71
77
|
private_get_rfq_rfqs = privateGetRfqRfqs = Entry('rfq/rfqs', 'private', 'GET', {'cost': 10})
|
@@ -161,12 +167,16 @@ class ImplicitAPI:
|
|
161
167
|
private_get_finance_staking_defi_orders_history = privateGetFinanceStakingDefiOrdersHistory = Entry('finance/staking-defi/orders-history', 'private', 'GET', {'cost': 3.3333333333333335})
|
162
168
|
private_get_finance_staking_defi_eth_balance = privateGetFinanceStakingDefiEthBalance = Entry('finance/staking-defi/eth/balance', 'private', 'GET', {'cost': 1.6666666666666667})
|
163
169
|
private_get_finance_staking_defi_eth_purchase_redeem_history = privateGetFinanceStakingDefiEthPurchaseRedeemHistory = Entry('finance/staking-defi/eth/purchase-redeem-history', 'private', 'GET', {'cost': 1.6666666666666667})
|
164
|
-
private_get_copytrading_current_subpositions = privateGetCopytradingCurrentSubpositions = Entry('copytrading/current-subpositions', 'private', 'GET', {'cost':
|
165
|
-
private_get_copytrading_subpositions_history = privateGetCopytradingSubpositionsHistory = Entry('copytrading/subpositions-history', 'private', 'GET', {'cost':
|
166
|
-
private_get_copytrading_instruments = privateGetCopytradingInstruments = Entry('copytrading/instruments', 'private', 'GET', {'cost':
|
167
|
-
private_get_copytrading_profit_sharing_details = privateGetCopytradingProfitSharingDetails = Entry('copytrading/profit-sharing-details', 'private', 'GET', {'cost':
|
168
|
-
private_get_copytrading_total_profit_sharing = privateGetCopytradingTotalProfitSharing = Entry('copytrading/total-profit-sharing', 'private', 'GET', {'cost':
|
169
|
-
private_get_copytrading_unrealized_profit_sharing_details = privateGetCopytradingUnrealizedProfitSharingDetails = Entry('copytrading/unrealized-profit-sharing-details', 'private', 'GET', {'cost':
|
170
|
+
private_get_copytrading_current_subpositions = privateGetCopytradingCurrentSubpositions = Entry('copytrading/current-subpositions', 'private', 'GET', {'cost': 1})
|
171
|
+
private_get_copytrading_subpositions_history = privateGetCopytradingSubpositionsHistory = Entry('copytrading/subpositions-history', 'private', 'GET', {'cost': 1})
|
172
|
+
private_get_copytrading_instruments = privateGetCopytradingInstruments = Entry('copytrading/instruments', 'private', 'GET', {'cost': 4})
|
173
|
+
private_get_copytrading_profit_sharing_details = privateGetCopytradingProfitSharingDetails = Entry('copytrading/profit-sharing-details', 'private', 'GET', {'cost': 4})
|
174
|
+
private_get_copytrading_total_profit_sharing = privateGetCopytradingTotalProfitSharing = Entry('copytrading/total-profit-sharing', 'private', 'GET', {'cost': 4})
|
175
|
+
private_get_copytrading_unrealized_profit_sharing_details = privateGetCopytradingUnrealizedProfitSharingDetails = Entry('copytrading/unrealized-profit-sharing-details', 'private', 'GET', {'cost': 4})
|
176
|
+
private_get_copytrading_copy_settings = privateGetCopytradingCopySettings = Entry('copytrading/copy-settings', 'private', 'GET', {'cost': 4})
|
177
|
+
private_get_copytrading_batch_leverage_info = privateGetCopytradingBatchLeverageInfo = Entry('copytrading/batch-leverage-info', 'private', 'GET', {'cost': 4})
|
178
|
+
private_get_copytrading_current_lead_traders = privateGetCopytradingCurrentLeadTraders = Entry('copytrading/current-lead-traders', 'private', 'GET', {'cost': 4})
|
179
|
+
private_get_copytrading_lead_traders_history = privateGetCopytradingLeadTradersHistory = Entry('copytrading/lead-traders-history', 'private', 'GET', {'cost': 4})
|
170
180
|
private_get_broker_nd_info = privateGetBrokerNdInfo = Entry('broker/nd/info', 'private', 'GET', {'cost': 10})
|
171
181
|
private_get_broker_nd_subaccount_info = privateGetBrokerNdSubaccountInfo = Entry('broker/nd/subaccount-info', 'private', 'GET', {'cost': 10})
|
172
182
|
private_get_broker_nd_subaccount_apikey = privateGetBrokerNdSubaccountApikey = Entry('broker/nd/subaccount/apikey', 'private', 'GET', {'cost': 10})
|
@@ -257,9 +267,13 @@ class ImplicitAPI:
|
|
257
267
|
private_post_finance_staking_defi_cancel = privatePostFinanceStakingDefiCancel = Entry('finance/staking-defi/cancel', 'private', 'POST', {'cost': 3})
|
258
268
|
private_post_finance_staking_defi_eth_purchase = privatePostFinanceStakingDefiEthPurchase = Entry('finance/staking-defi/eth/purchase', 'private', 'POST', {'cost': 5})
|
259
269
|
private_post_finance_staking_defi_eth_redeem = privatePostFinanceStakingDefiEthRedeem = Entry('finance/staking-defi/eth/redeem', 'private', 'POST', {'cost': 5})
|
260
|
-
private_post_copytrading_algo_order = privatePostCopytradingAlgoOrder = Entry('copytrading/algo-order', 'private', 'POST', {'cost':
|
261
|
-
private_post_copytrading_close_subposition = privatePostCopytradingCloseSubposition = Entry('copytrading/close-subposition', 'private', 'POST', {'cost':
|
262
|
-
private_post_copytrading_set_instruments = privatePostCopytradingSetInstruments = Entry('copytrading/set-instruments', 'private', 'POST', {'cost':
|
270
|
+
private_post_copytrading_algo_order = privatePostCopytradingAlgoOrder = Entry('copytrading/algo-order', 'private', 'POST', {'cost': 1})
|
271
|
+
private_post_copytrading_close_subposition = privatePostCopytradingCloseSubposition = Entry('copytrading/close-subposition', 'private', 'POST', {'cost': 1})
|
272
|
+
private_post_copytrading_set_instruments = privatePostCopytradingSetInstruments = Entry('copytrading/set-instruments', 'private', 'POST', {'cost': 4})
|
273
|
+
private_post_copytrading_first_copy_settings = privatePostCopytradingFirstCopySettings = Entry('copytrading/first-copy-settings', 'private', 'POST', {'cost': 4})
|
274
|
+
private_post_copytrading_amend_copy_settings = privatePostCopytradingAmendCopySettings = Entry('copytrading/amend-copy-settings', 'private', 'POST', {'cost': 4})
|
275
|
+
private_post_copytrading_stop_copy_trading = privatePostCopytradingStopCopyTrading = Entry('copytrading/stop-copy-trading', 'private', 'POST', {'cost': 4})
|
276
|
+
private_post_copytrading_batch_set_leverage = privatePostCopytradingBatchSetLeverage = Entry('copytrading/batch-set-leverage', 'private', 'POST', {'cost': 4})
|
263
277
|
private_post_broker_nd_create_subaccount = privatePostBrokerNdCreateSubaccount = Entry('broker/nd/create-subaccount', 'private', 'POST', {'cost': 0.25})
|
264
278
|
private_post_broker_nd_delete_subaccount = privatePostBrokerNdDeleteSubaccount = Entry('broker/nd/delete-subaccount', 'private', 'POST', {'cost': 1})
|
265
279
|
private_post_broker_nd_subaccount_apikey = privatePostBrokerNdSubaccountApikey = Entry('broker/nd/subaccount/apikey', 'private', 'POST', {'cost': 0.25})
|
ccxt/ace.py
CHANGED
ccxt/alpaca.py
CHANGED
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/ace.py
CHANGED
ccxt/async_support/alpaca.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.1.
|
5
|
+
__version__ = '4.1.77'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -1010,6 +1010,12 @@ class Exchange(BaseExchange):
|
|
1010
1010
|
async def fetch_funding_history(self, symbol: str = None, since: Int = None, limit: Int = None, params={}):
|
1011
1011
|
raise NotSupported(self.id + ' fetchFundingHistory() is not supported yet')
|
1012
1012
|
|
1013
|
+
async def close_position(self, symbol: str, side: OrderSide = None, marginMode: str = None, params={}):
|
1014
|
+
raise NotSupported(self.id + ' closePositions() is not supported yet')
|
1015
|
+
|
1016
|
+
async def close_all_positions(self, params={}):
|
1017
|
+
raise NotSupported(self.id + ' closeAllPositions() is not supported yet')
|
1018
|
+
|
1013
1019
|
async def fetch_deposit_address(self, code: str, params={}):
|
1014
1020
|
if self.has['fetchDepositAddresses']:
|
1015
1021
|
depositAddresses = await self.fetchDepositAddresses([code], params)
|
ccxt/async_support/binance.py
CHANGED
@@ -60,6 +60,8 @@ class binance(Exchange, ImplicitAPI):
|
|
60
60
|
'cancelAllOrders': True,
|
61
61
|
'cancelOrder': True,
|
62
62
|
'cancelOrders': True, # contract only
|
63
|
+
'closeAllPositions': False,
|
64
|
+
'closePosition': False,
|
63
65
|
'createDepositAddress': False,
|
64
66
|
'createOrder': True,
|
65
67
|
'createOrders': True,
|
@@ -896,6 +898,7 @@ class binance(Exchange, ImplicitAPI):
|
|
896
898
|
'uiKlines': 0.4,
|
897
899
|
'ticker/24hr': {'cost': 0.4, 'noSymbol': 16},
|
898
900
|
'ticker': {'cost': 0.4, 'noSymbol': 16},
|
901
|
+
'ticker/tradingDay': 0.8,
|
899
902
|
'ticker/price': {'cost': 0.4, 'noSymbol': 0.8},
|
900
903
|
'ticker/bookTicker': {'cost': 0.4, 'noSymbol': 0.8},
|
901
904
|
'exchangeInfo': 4, # Weight(IP): 20 => cost = 0.2 * 20 = 4
|
@@ -924,6 +927,7 @@ class binance(Exchange, ImplicitAPI):
|
|
924
927
|
'rateLimit/order': 8, # Weight(IP): 40 => cost = 0.2 * 40 = 8
|
925
928
|
'myPreventedMatches': 4, # Weight(IP): 20 => cost = 0.2 * 20 = 4
|
926
929
|
'myAllocations': 4,
|
930
|
+
'account/commission': 4,
|
927
931
|
},
|
928
932
|
'post': {
|
929
933
|
'order/oco': 0.2,
|
ccxt/async_support/binanceus.py
CHANGED
@@ -52,6 +52,8 @@ class binanceus(binance, ImplicitAPI):
|
|
52
52
|
'option': False,
|
53
53
|
'addMargin': False,
|
54
54
|
'borrowMargin': False,
|
55
|
+
'closeAllPositions': False,
|
56
|
+
'closePosition': False,
|
55
57
|
'createReduceOnlyOrder': False,
|
56
58
|
'fetchBorrowInterest': False,
|
57
59
|
'fetchBorrowRate': False,
|
ccxt/async_support/bingx.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bingx import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import PermissionDenied
|
@@ -45,6 +45,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
45
45
|
'cancelAllOrders': True,
|
46
46
|
'cancelOrder': True,
|
47
47
|
'cancelOrders': True,
|
48
|
+
'closeAllPosition': True,
|
49
|
+
'closePosition': False,
|
48
50
|
'createMarketBuyOrderWithCost': True,
|
49
51
|
'createMarketOrderWithCost': True,
|
50
52
|
'createMarketSellOrderWithCost': True,
|
@@ -96,10 +98,18 @@ class bingx(Exchange, ImplicitAPI):
|
|
96
98
|
'www': 'https://bingx.com/',
|
97
99
|
'doc': 'https://bingx-api.github.io/docs/',
|
98
100
|
'referral': 'https://bingx.com/invite/OHETOM',
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
101
|
+
},
|
102
|
+
'fees': {
|
103
|
+
'tierBased': True,
|
104
|
+
'spot': {
|
105
|
+
'feeSide': 'get',
|
106
|
+
'maker': self.parse_number('0.001'),
|
107
|
+
'taker': self.parse_number('0.001'),
|
108
|
+
},
|
109
|
+
'swap': {
|
110
|
+
'feeSide': 'quote',
|
111
|
+
'maker': self.parse_number('0.0002'),
|
112
|
+
'taker': self.parse_number('0.0005'),
|
103
113
|
},
|
104
114
|
},
|
105
115
|
'requiredCredentials': {
|
@@ -318,10 +328,6 @@ class bingx(Exchange, ImplicitAPI):
|
|
318
328
|
'1w': '1w',
|
319
329
|
'1M': '1M',
|
320
330
|
},
|
321
|
-
'fees': {
|
322
|
-
'trading': {
|
323
|
-
},
|
324
|
-
},
|
325
331
|
'precisionMode': DECIMAL_PLACES,
|
326
332
|
'exceptions': {
|
327
333
|
'exact': {
|
@@ -563,11 +569,12 @@ class bingx(Exchange, ImplicitAPI):
|
|
563
569
|
symbol = base + '/' + quote
|
564
570
|
if settle is not None:
|
565
571
|
symbol += ':' + settle
|
572
|
+
fees = self.safe_value(self.fees, type, {})
|
566
573
|
contractSize = self.safe_number(market, 'size')
|
567
574
|
isActive = self.safe_string(market, 'status') == '1'
|
568
575
|
isInverse = None if (spot) else False
|
569
576
|
isLinear = None if (spot) else swap
|
570
|
-
return {
|
577
|
+
return self.safe_market_structure({
|
571
578
|
'id': id,
|
572
579
|
'symbol': symbol,
|
573
580
|
'base': base,
|
@@ -586,8 +593,9 @@ class bingx(Exchange, ImplicitAPI):
|
|
586
593
|
'contract': swap,
|
587
594
|
'linear': isLinear,
|
588
595
|
'inverse': isInverse,
|
589
|
-
'taker':
|
590
|
-
'maker':
|
596
|
+
'taker': self.safe_number(fees, 'taker'),
|
597
|
+
'maker': self.safe_number(fees, 'maker'),
|
598
|
+
'feeSide': self.safe_string(fees, 'feeSide'),
|
591
599
|
'contractSize': contractSize,
|
592
600
|
'expiry': None,
|
593
601
|
'expiryDatetime': None,
|
@@ -617,7 +625,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
617
625
|
},
|
618
626
|
'created': None,
|
619
627
|
'info': market,
|
620
|
-
}
|
628
|
+
})
|
621
629
|
|
622
630
|
async def fetch_markets(self, params={}):
|
623
631
|
"""
|
@@ -1525,23 +1533,27 @@ class bingx(Exchange, ImplicitAPI):
|
|
1525
1533
|
# "avgPrice": "2.2",
|
1526
1534
|
# "leverage": 10,
|
1527
1535
|
# }
|
1536
|
+
#
|
1528
1537
|
# standard position
|
1538
|
+
#
|
1529
1539
|
# {
|
1530
|
-
# "currentPrice":"82.91",
|
1531
|
-
# "symbol":"LTC/USDT",
|
1532
|
-
# "initialMargin":"5.00000000000000000000",
|
1533
|
-
# "unrealizedProfit":"-0.26464500",
|
1534
|
-
# "leverage":"20.000000000",
|
1535
|
-
# "isolated":
|
1536
|
-
# "entryPrice":"83.13",
|
1537
|
-
# "positionSide":"LONG",
|
1538
|
-
# "positionAmt":"1.20365912",
|
1540
|
+
# "currentPrice": "82.91",
|
1541
|
+
# "symbol": "LTC/USDT",
|
1542
|
+
# "initialMargin": "5.00000000000000000000",
|
1543
|
+
# "unrealizedProfit": "-0.26464500",
|
1544
|
+
# "leverage": "20.000000000",
|
1545
|
+
# "isolated": True,
|
1546
|
+
# "entryPrice": "83.13",
|
1547
|
+
# "positionSide": "LONG",
|
1548
|
+
# "positionAmt": "1.20365912",
|
1539
1549
|
# }
|
1540
1550
|
#
|
1541
|
-
marketId = self.safe_string(position, 'symbol')
|
1551
|
+
marketId = self.safe_string(position, 'symbol', '')
|
1542
1552
|
marketId = marketId.replace('/', '-') # standard return different format
|
1543
1553
|
isolated = self.safe_value(position, 'isolated')
|
1544
|
-
marginMode =
|
1554
|
+
marginMode = None
|
1555
|
+
if isolated is not None:
|
1556
|
+
marginMode = 'isolated' if isolated else 'cross'
|
1545
1557
|
return self.safe_position({
|
1546
1558
|
'info': position,
|
1547
1559
|
'id': self.safe_string(position, 'positionId'),
|
@@ -1702,7 +1714,6 @@ class bingx(Exchange, ImplicitAPI):
|
|
1702
1714
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1703
1715
|
"""
|
1704
1716
|
create a trade order
|
1705
|
-
:see: https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Create%20an%20Order
|
1706
1717
|
:see: https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Trade%20order
|
1707
1718
|
:param str symbol: unified symbol of the market to create an order in
|
1708
1719
|
:param str type: 'market' or 'limit'
|
@@ -3217,6 +3228,46 @@ class bingx(Exchange, ImplicitAPI):
|
|
3217
3228
|
'datetime': self.iso8601(timestamp),
|
3218
3229
|
})
|
3219
3230
|
|
3231
|
+
async def close_all_positions(self, params={}) -> List[Position]:
|
3232
|
+
"""
|
3233
|
+
closes open positions for a market
|
3234
|
+
:see: https://bitgetlimited.github.io/apidoc/en/mix/#close-all-position
|
3235
|
+
:param dict [params]: extra parameters specific to the okx api endpoint
|
3236
|
+
:param str [params.recvWindow]: request valid time window value
|
3237
|
+
:returns [dict]: `A list of position structures <https://docs.ccxt.com/#/?id=position-structure>`
|
3238
|
+
"""
|
3239
|
+
await self.load_markets()
|
3240
|
+
defaultRecvWindow = self.safe_integer(self.options, 'recvWindow')
|
3241
|
+
recvWindow = self.safe_integer(self.parse_params, 'recvWindow', defaultRecvWindow)
|
3242
|
+
marketType = None
|
3243
|
+
marketType, params = self.handle_market_type_and_params('closeAllPositions', None, params)
|
3244
|
+
if marketType == 'margin':
|
3245
|
+
raise BadRequest(self.id + ' closePositions() cannot be used for ' + marketType + ' markets')
|
3246
|
+
request = {
|
3247
|
+
'recvWindow': recvWindow,
|
3248
|
+
}
|
3249
|
+
response = await self.swapV2PrivatePostTradeCloseAllPositions(self.extend(request, params))
|
3250
|
+
#
|
3251
|
+
# {
|
3252
|
+
# "code": 0,
|
3253
|
+
# "msg": "",
|
3254
|
+
# "data": {
|
3255
|
+
# "success": [
|
3256
|
+
# 1727686766700486656,
|
3257
|
+
# 1727686767048613888
|
3258
|
+
# ],
|
3259
|
+
# "failed": null
|
3260
|
+
# }
|
3261
|
+
# }
|
3262
|
+
#
|
3263
|
+
data = self.safe_value(response, 'data', {})
|
3264
|
+
success = self.safe_value(data, 'success', [])
|
3265
|
+
positions = []
|
3266
|
+
for i in range(0, len(success)):
|
3267
|
+
position = self.parse_position({'positionId': success[i]})
|
3268
|
+
positions.append(position)
|
3269
|
+
return positions
|
3270
|
+
|
3220
3271
|
def sign(self, path, section='public', method='GET', params={}, headers=None, body=None):
|
3221
3272
|
type = section[0]
|
3222
3273
|
version = section[1]
|
ccxt/async_support/bit2c.py
CHANGED
ccxt/async_support/bitbank.py
CHANGED
ccxt/async_support/bithumb.py
CHANGED
ccxt/async_support/bitmex.py
CHANGED
@@ -393,7 +393,11 @@ class bitmex(Exchange, ImplicitAPI):
|
|
393
393
|
finalAmount = Precise.string_div(amountString, precision)
|
394
394
|
return self.parse_number(finalAmount)
|
395
395
|
|
396
|
-
def convert_to_real_amount(self, code:
|
396
|
+
def convert_to_real_amount(self, code: Str, amount: Str):
|
397
|
+
if code is None:
|
398
|
+
return amount
|
399
|
+
elif amount is None:
|
400
|
+
return None
|
397
401
|
currency = self.currency(code)
|
398
402
|
precision = self.safe_string(currency, 'precision')
|
399
403
|
return Precise.string_mul(amount, precision)
|
ccxt/async_support/bitopro.py
CHANGED
ccxt/async_support/bitpanda.py
CHANGED
@@ -44,6 +44,8 @@ class bitpanda(Exchange, ImplicitAPI):
|
|
44
44
|
'cancelAllOrders': True,
|
45
45
|
'cancelOrder': True,
|
46
46
|
'cancelOrders': True,
|
47
|
+
'closeAllPositions': False,
|
48
|
+
'closePosition': False,
|
47
49
|
'createDepositAddress': True,
|
48
50
|
'createOrder': True,
|
49
51
|
'createReduceOnlyOrder': False,
|
ccxt/async_support/bitrue.py
CHANGED
@@ -53,6 +53,9 @@ class bitrue(Exchange, ImplicitAPI):
|
|
53
53
|
'option': False,
|
54
54
|
'cancelAllOrders': True,
|
55
55
|
'cancelOrder': True,
|
56
|
+
'createMarketBuyOrderWithCost': True,
|
57
|
+
'createMarketOrderWithCost': False,
|
58
|
+
'createMarketSellOrderWithCost': False,
|
56
59
|
'createOrder': True,
|
57
60
|
'createStopLimitOrder': True,
|
58
61
|
'createStopMarketOrder': True,
|
@@ -1804,6 +1807,23 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1804
1807
|
'trades': fills,
|
1805
1808
|
}, market)
|
1806
1809
|
|
1810
|
+
async def create_market_buy_order_with_cost(self, symbol: str, cost, params={}):
|
1811
|
+
"""
|
1812
|
+
create a market buy order by providing the symbol and cost
|
1813
|
+
:see: https://www.bitrue.com/api-docs#new-order-trade-hmac-sha256
|
1814
|
+
:see: https://www.bitrue.com/api_docs_includes_file/delivery.html#new-order-trade-hmac-sha256
|
1815
|
+
:param str symbol: unified symbol of the market to create an order in
|
1816
|
+
:param float cost: how much you want to trade in units of the quote currency
|
1817
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1818
|
+
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1819
|
+
"""
|
1820
|
+
await self.load_markets()
|
1821
|
+
market = self.market(symbol)
|
1822
|
+
if not market['swap']:
|
1823
|
+
raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports swap orders only')
|
1824
|
+
params['createMarketBuyOrderRequiresPrice'] = False
|
1825
|
+
return await self.create_order(symbol, 'market', 'buy', cost, None, params)
|
1826
|
+
|
1807
1827
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1808
1828
|
"""
|
1809
1829
|
create a trade order
|
@@ -1825,6 +1845,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1825
1845
|
* EXCHANGE SPECIFIC PARAMETERS
|
1826
1846
|
:param decimal [params.icebergQty]:
|
1827
1847
|
:param long [params.recvWindow]:
|
1848
|
+
:param float [params.cost]: *swap market buy only* the quote quantity that can be used alternative for the amount
|
1828
1849
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1829
1850
|
"""
|
1830
1851
|
await self.load_markets()
|
@@ -1856,7 +1877,9 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1856
1877
|
elif timeInForce == 'ioc':
|
1857
1878
|
request['type'] = 'IOC'
|
1858
1879
|
request['contractName'] = market['id']
|
1859
|
-
|
1880
|
+
createMarketBuyOrderRequiresPrice = True
|
1881
|
+
createMarketBuyOrderRequiresPrice, params = self.handle_option_and_params(params, 'createOrder', 'createMarketBuyOrderRequiresPrice', True)
|
1882
|
+
if isMarket and (side == 'buy') and createMarketBuyOrderRequiresPrice:
|
1860
1883
|
cost = self.safe_string(params, 'cost')
|
1861
1884
|
params = self.omit(params, 'cost')
|
1862
1885
|
if price is None and cost is None:
|
ccxt/async_support/bitso.py
CHANGED
@@ -39,6 +39,8 @@ class bitso(Exchange, ImplicitAPI):
|
|
39
39
|
'cancelAllOrders': True,
|
40
40
|
'cancelOrder': True,
|
41
41
|
'cancelOrders': True,
|
42
|
+
'closeAllPositions': False,
|
43
|
+
'closePosition': False,
|
42
44
|
'createDepositAddress': False,
|
43
45
|
'createOrder': True,
|
44
46
|
'createReduceOnlyOrder': False,
|
ccxt/async_support/bitstamp.py
CHANGED
@@ -46,6 +46,8 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
46
46
|
'addMargin': False,
|
47
47
|
'cancelAllOrders': True,
|
48
48
|
'cancelOrder': True,
|
49
|
+
'closeAllPositions': False,
|
50
|
+
'closePosition': False,
|
49
51
|
'createOrder': True,
|
50
52
|
'createReduceOnlyOrder': False,
|
51
53
|
'createStopLimitOrder': False,
|
@@ -1005,6 +1007,7 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1005
1007
|
async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
1006
1008
|
"""
|
1007
1009
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1010
|
+
:see: https://www.bitstamp.net/api/#tag/Market-info/operation/GetOHLCData
|
1008
1011
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
1009
1012
|
:param str timeframe: the length of time each candle represents
|
1010
1013
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -1026,13 +1029,13 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1026
1029
|
limit = 1000
|
1027
1030
|
start = self.parse_to_int(since / 1000)
|
1028
1031
|
request['start'] = start
|
1029
|
-
request['end'] = self.sum(start,
|
1032
|
+
request['end'] = self.sum(start, duration * (limit - 1))
|
1030
1033
|
request['limit'] = limit
|
1031
1034
|
else:
|
1032
1035
|
if since is not None:
|
1033
1036
|
start = self.parse_to_int(since / 1000)
|
1034
1037
|
request['start'] = start
|
1035
|
-
request['end'] = self.sum(start,
|
1038
|
+
request['end'] = self.sum(start, duration * (limit - 1))
|
1036
1039
|
request['limit'] = min(limit, 1000) # min 1, max 1000
|
1037
1040
|
response = await self.publicGetOhlcPair(self.extend(request, params))
|
1038
1041
|
#
|
ccxt/async_support/bittrex.py
CHANGED
ccxt/async_support/bitvavo.py
CHANGED
@@ -50,6 +50,8 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
50
50
|
'addMargin': False,
|
51
51
|
'cancelAllOrders': True,
|
52
52
|
'cancelOrder': True,
|
53
|
+
'closeAllPositions': False,
|
54
|
+
'closePosition': False,
|
53
55
|
'createOrder': True,
|
54
56
|
'createReduceOnlyOrder': False,
|
55
57
|
'createStopLimitOrder': True,
|
ccxt/async_support/bl3p.py
CHANGED