ccxt 4.4.65__py2.py3-none-any.whl → 4.4.67__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 +5 -1
- ccxt/abstract/cryptomus.py +20 -0
- ccxt/abstract/derive.py +117 -0
- ccxt/abstract/tradeogre.py +1 -0
- ccxt/abstract/whitebit.py +16 -0
- ccxt/async_support/__init__.py +5 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +5 -3
- ccxt/async_support/bitget.py +22 -12
- ccxt/async_support/bitrue.py +5 -2
- ccxt/async_support/cryptomus.py +1041 -0
- ccxt/async_support/derive.py +2530 -0
- ccxt/async_support/gate.py +5 -1
- ccxt/async_support/htx.py +19 -5
- ccxt/async_support/tradeogre.py +131 -13
- ccxt/async_support/whitebit.py +276 -2
- ccxt/base/errors.py +0 -6
- ccxt/base/exchange.py +8 -1
- ccxt/binance.py +5 -3
- ccxt/bitget.py +22 -12
- ccxt/bitrue.py +5 -2
- ccxt/cryptomus.py +1041 -0
- ccxt/derive.py +2529 -0
- ccxt/gate.py +5 -1
- ccxt/htx.py +19 -5
- ccxt/pro/__init__.py +3 -1
- ccxt/pro/derive.py +704 -0
- ccxt/pro/gate.py +1 -0
- ccxt/test/tests_async.py +36 -3
- ccxt/test/tests_sync.py +36 -3
- ccxt/tradeogre.py +131 -13
- ccxt/whitebit.py +276 -2
- {ccxt-4.4.65.dist-info → ccxt-4.4.67.dist-info}/METADATA +14 -9
- {ccxt-4.4.65.dist-info → ccxt-4.4.67.dist-info}/RECORD +37 -30
- {ccxt-4.4.65.dist-info → ccxt-4.4.67.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.65.dist-info → ccxt-4.4.67.dist-info}/WHEEL +0 -0
- {ccxt-4.4.65.dist-info → ccxt-4.4.67.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
# ----------------------------------------------------------------------------
|
24
24
|
|
25
|
-
__version__ = '4.4.
|
25
|
+
__version__ = '4.4.67'
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
@@ -134,9 +134,11 @@ from ccxt.coinone import coinone # noqa: F4
|
|
134
134
|
from ccxt.coinsph import coinsph # noqa: F401
|
135
135
|
from ccxt.coinspot import coinspot # noqa: F401
|
136
136
|
from ccxt.cryptocom import cryptocom # noqa: F401
|
137
|
+
from ccxt.cryptomus import cryptomus # noqa: F401
|
137
138
|
from ccxt.defx import defx # noqa: F401
|
138
139
|
from ccxt.delta import delta # noqa: F401
|
139
140
|
from ccxt.deribit import deribit # noqa: F401
|
141
|
+
from ccxt.derive import derive # noqa: F401
|
140
142
|
from ccxt.digifinex import digifinex # noqa: F401
|
141
143
|
from ccxt.ellipx import ellipx # noqa: F401
|
142
144
|
from ccxt.exmo import exmo # noqa: F401
|
@@ -245,9 +247,11 @@ exchanges = [
|
|
245
247
|
'coinsph',
|
246
248
|
'coinspot',
|
247
249
|
'cryptocom',
|
250
|
+
'cryptomus',
|
248
251
|
'defx',
|
249
252
|
'delta',
|
250
253
|
'deribit',
|
254
|
+
'derive',
|
251
255
|
'digifinex',
|
252
256
|
'ellipx',
|
253
257
|
'exmo',
|
@@ -0,0 +1,20 @@
|
|
1
|
+
from ccxt.base.types import Entry
|
2
|
+
|
3
|
+
|
4
|
+
class ImplicitAPI:
|
5
|
+
public_get_v2_user_api_exchange_markets = publicGetV2UserApiExchangeMarkets = Entry('v2/user-api/exchange/markets', 'public', 'GET', {'cost': 1})
|
6
|
+
public_get_v2_user_api_exchange_market_price = publicGetV2UserApiExchangeMarketPrice = Entry('v2/user-api/exchange/market/price', 'public', 'GET', {'cost': 1})
|
7
|
+
public_get_v1_exchange_market_assets = publicGetV1ExchangeMarketAssets = Entry('v1/exchange/market/assets', 'public', 'GET', {'cost': 1})
|
8
|
+
public_get_v1_exchange_market_order_book_currencypair = publicGetV1ExchangeMarketOrderBookCurrencyPair = Entry('v1/exchange/market/order-book/{currencyPair}', 'public', 'GET', {'cost': 1})
|
9
|
+
public_get_v1_exchange_market_tickers = publicGetV1ExchangeMarketTickers = Entry('v1/exchange/market/tickers', 'public', 'GET', {'cost': 1})
|
10
|
+
public_get_v1_exchange_market_trades_currencypair = publicGetV1ExchangeMarketTradesCurrencyPair = Entry('v1/exchange/market/trades/{currencyPair}', 'public', 'GET', {'cost': 1})
|
11
|
+
private_get_v2_user_api_exchange_orders = privateGetV2UserApiExchangeOrders = Entry('v2/user-api/exchange/orders', 'private', 'GET', {'cost': 1})
|
12
|
+
private_get_v2_user_api_exchange_orders_history = privateGetV2UserApiExchangeOrdersHistory = Entry('v2/user-api/exchange/orders/history', 'private', 'GET', {'cost': 1})
|
13
|
+
private_get_v2_user_api_exchange_account_balance = privateGetV2UserApiExchangeAccountBalance = Entry('v2/user-api/exchange/account/balance', 'private', 'GET', {'cost': 1})
|
14
|
+
private_get_v2_user_api_exchange_account_tariffs = privateGetV2UserApiExchangeAccountTariffs = Entry('v2/user-api/exchange/account/tariffs', 'private', 'GET', {'cost': 1})
|
15
|
+
private_get_v2_user_api_payment_services = privateGetV2UserApiPaymentServices = Entry('v2/user-api/payment/services', 'private', 'GET', {'cost': 1})
|
16
|
+
private_get_v2_user_api_payout_services = privateGetV2UserApiPayoutServices = Entry('v2/user-api/payout/services', 'private', 'GET', {'cost': 1})
|
17
|
+
private_get_v2_user_api_transaction_list = privateGetV2UserApiTransactionList = Entry('v2/user-api/transaction/list', 'private', 'GET', {'cost': 1})
|
18
|
+
private_post_v2_user_api_exchange_orders = privatePostV2UserApiExchangeOrders = Entry('v2/user-api/exchange/orders', 'private', 'POST', {'cost': 1})
|
19
|
+
private_post_v2_user_api_exchange_orders_market = privatePostV2UserApiExchangeOrdersMarket = Entry('v2/user-api/exchange/orders/market', 'private', 'POST', {'cost': 1})
|
20
|
+
private_delete_v2_user_api_exchange_orders_orderid = privateDeleteV2UserApiExchangeOrdersOrderId = Entry('v2/user-api/exchange/orders/{orderId}', 'private', 'DELETE', {'cost': 1})
|
ccxt/abstract/derive.py
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
from ccxt.base.types import Entry
|
2
|
+
|
3
|
+
|
4
|
+
class ImplicitAPI:
|
5
|
+
public_get_get_all_currencies = publicGetGetAllCurrencies = Entry('get_all_currencies', 'public', 'GET', {})
|
6
|
+
public_post_build_register_session_key_tx = publicPostBuildRegisterSessionKeyTx = Entry('build_register_session_key_tx', 'public', 'POST', {})
|
7
|
+
public_post_register_session_key = publicPostRegisterSessionKey = Entry('register_session_key', 'public', 'POST', {})
|
8
|
+
public_post_deregister_session_key = publicPostDeregisterSessionKey = Entry('deregister_session_key', 'public', 'POST', {})
|
9
|
+
public_post_login = publicPostLogin = Entry('login', 'public', 'POST', {})
|
10
|
+
public_post_statistics = publicPostStatistics = Entry('statistics', 'public', 'POST', {})
|
11
|
+
public_post_get_all_currencies = publicPostGetAllCurrencies = Entry('get_all_currencies', 'public', 'POST', {})
|
12
|
+
public_post_get_currency = publicPostGetCurrency = Entry('get_currency', 'public', 'POST', {})
|
13
|
+
public_post_get_instrument = publicPostGetInstrument = Entry('get_instrument', 'public', 'POST', {})
|
14
|
+
public_post_get_all_instruments = publicPostGetAllInstruments = Entry('get_all_instruments', 'public', 'POST', {})
|
15
|
+
public_post_get_instruments = publicPostGetInstruments = Entry('get_instruments', 'public', 'POST', {})
|
16
|
+
public_post_get_ticker = publicPostGetTicker = Entry('get_ticker', 'public', 'POST', {})
|
17
|
+
public_post_get_latest_signed_feeds = publicPostGetLatestSignedFeeds = Entry('get_latest_signed_feeds', 'public', 'POST', {})
|
18
|
+
public_post_get_option_settlement_prices = publicPostGetOptionSettlementPrices = Entry('get_option_settlement_prices', 'public', 'POST', {})
|
19
|
+
public_post_get_spot_feed_history = publicPostGetSpotFeedHistory = Entry('get_spot_feed_history', 'public', 'POST', {})
|
20
|
+
public_post_get_spot_feed_history_candles = publicPostGetSpotFeedHistoryCandles = Entry('get_spot_feed_history_candles', 'public', 'POST', {})
|
21
|
+
public_post_get_funding_rate_history = publicPostGetFundingRateHistory = Entry('get_funding_rate_history', 'public', 'POST', {})
|
22
|
+
public_post_get_trade_history = publicPostGetTradeHistory = Entry('get_trade_history', 'public', 'POST', {})
|
23
|
+
public_post_get_option_settlement_history = publicPostGetOptionSettlementHistory = Entry('get_option_settlement_history', 'public', 'POST', {})
|
24
|
+
public_post_get_liquidation_history = publicPostGetLiquidationHistory = Entry('get_liquidation_history', 'public', 'POST', {})
|
25
|
+
public_post_get_interest_rate_history = publicPostGetInterestRateHistory = Entry('get_interest_rate_history', 'public', 'POST', {})
|
26
|
+
public_post_get_transaction = publicPostGetTransaction = Entry('get_transaction', 'public', 'POST', {})
|
27
|
+
public_post_get_margin = publicPostGetMargin = Entry('get_margin', 'public', 'POST', {})
|
28
|
+
public_post_margin_watch = publicPostMarginWatch = Entry('margin_watch', 'public', 'POST', {})
|
29
|
+
public_post_validate_invite_code = publicPostValidateInviteCode = Entry('validate_invite_code', 'public', 'POST', {})
|
30
|
+
public_post_get_points = publicPostGetPoints = Entry('get_points', 'public', 'POST', {})
|
31
|
+
public_post_get_all_points = publicPostGetAllPoints = Entry('get_all_points', 'public', 'POST', {})
|
32
|
+
public_post_get_points_leaderboard = publicPostGetPointsLeaderboard = Entry('get_points_leaderboard', 'public', 'POST', {})
|
33
|
+
public_post_get_descendant_tree = publicPostGetDescendantTree = Entry('get_descendant_tree', 'public', 'POST', {})
|
34
|
+
public_post_get_tree_roots = publicPostGetTreeRoots = Entry('get_tree_roots', 'public', 'POST', {})
|
35
|
+
public_post_get_swell_percent_points = publicPostGetSwellPercentPoints = Entry('get_swell_percent_points', 'public', 'POST', {})
|
36
|
+
public_post_get_vault_assets = publicPostGetVaultAssets = Entry('get_vault_assets', 'public', 'POST', {})
|
37
|
+
public_post_get_etherfi_effective_balances = publicPostGetEtherfiEffectiveBalances = Entry('get_etherfi_effective_balances', 'public', 'POST', {})
|
38
|
+
public_post_get_kelp_effective_balances = publicPostGetKelpEffectiveBalances = Entry('get_kelp_effective_balances', 'public', 'POST', {})
|
39
|
+
public_post_get_bridge_balances = publicPostGetBridgeBalances = Entry('get_bridge_balances', 'public', 'POST', {})
|
40
|
+
public_post_get_ethena_participants = publicPostGetEthenaParticipants = Entry('get_ethena_participants', 'public', 'POST', {})
|
41
|
+
public_post_get_vault_share = publicPostGetVaultShare = Entry('get_vault_share', 'public', 'POST', {})
|
42
|
+
public_post_get_vault_statistics = publicPostGetVaultStatistics = Entry('get_vault_statistics', 'public', 'POST', {})
|
43
|
+
public_post_get_vault_balances = publicPostGetVaultBalances = Entry('get_vault_balances', 'public', 'POST', {})
|
44
|
+
public_post_estimate_integrator_points = publicPostEstimateIntegratorPoints = Entry('estimate_integrator_points', 'public', 'POST', {})
|
45
|
+
public_post_create_subaccount_debug = publicPostCreateSubaccountDebug = Entry('create_subaccount_debug', 'public', 'POST', {})
|
46
|
+
public_post_deposit_debug = publicPostDepositDebug = Entry('deposit_debug', 'public', 'POST', {})
|
47
|
+
public_post_withdraw_debug = publicPostWithdrawDebug = Entry('withdraw_debug', 'public', 'POST', {})
|
48
|
+
public_post_send_quote_debug = publicPostSendQuoteDebug = Entry('send_quote_debug', 'public', 'POST', {})
|
49
|
+
public_post_execute_quote_debug = publicPostExecuteQuoteDebug = Entry('execute_quote_debug', 'public', 'POST', {})
|
50
|
+
public_post_get_invite_code = publicPostGetInviteCode = Entry('get_invite_code', 'public', 'POST', {})
|
51
|
+
public_post_register_invite = publicPostRegisterInvite = Entry('register_invite', 'public', 'POST', {})
|
52
|
+
public_post_get_time = publicPostGetTime = Entry('get_time', 'public', 'POST', {})
|
53
|
+
public_post_get_live_incidents = publicPostGetLiveIncidents = Entry('get_live_incidents', 'public', 'POST', {})
|
54
|
+
public_post_get_maker_programs = publicPostGetMakerPrograms = Entry('get_maker_programs', 'public', 'POST', {})
|
55
|
+
public_post_get_maker_program_scores = publicPostGetMakerProgramScores = Entry('get_maker_program_scores', 'public', 'POST', {})
|
56
|
+
private_post_get_account = privatePostGetAccount = Entry('get_account', 'private', 'POST', {})
|
57
|
+
private_post_create_subaccount = privatePostCreateSubaccount = Entry('create_subaccount', 'private', 'POST', {})
|
58
|
+
private_post_get_subaccount = privatePostGetSubaccount = Entry('get_subaccount', 'private', 'POST', {})
|
59
|
+
private_post_get_subaccounts = privatePostGetSubaccounts = Entry('get_subaccounts', 'private', 'POST', {})
|
60
|
+
private_post_get_all_portfolios = privatePostGetAllPortfolios = Entry('get_all_portfolios', 'private', 'POST', {})
|
61
|
+
private_post_change_subaccount_label = privatePostChangeSubaccountLabel = Entry('change_subaccount_label', 'private', 'POST', {})
|
62
|
+
private_post_get_notificationsv = privatePostGetNotificationsv = Entry('get_notificationsv', 'private', 'POST', {})
|
63
|
+
private_post_update_notifications = privatePostUpdateNotifications = Entry('update_notifications', 'private', 'POST', {})
|
64
|
+
private_post_deposit = privatePostDeposit = Entry('deposit', 'private', 'POST', {})
|
65
|
+
private_post_withdraw = privatePostWithdraw = Entry('withdraw', 'private', 'POST', {})
|
66
|
+
private_post_transfer_erc20 = privatePostTransferErc20 = Entry('transfer_erc20', 'private', 'POST', {})
|
67
|
+
private_post_transfer_position = privatePostTransferPosition = Entry('transfer_position', 'private', 'POST', {})
|
68
|
+
private_post_transfer_positions = privatePostTransferPositions = Entry('transfer_positions', 'private', 'POST', {})
|
69
|
+
private_post_order = privatePostOrder = Entry('order', 'private', 'POST', {})
|
70
|
+
private_post_replace = privatePostReplace = Entry('replace', 'private', 'POST', {})
|
71
|
+
private_post_order_debug = privatePostOrderDebug = Entry('order_debug', 'private', 'POST', {})
|
72
|
+
private_post_get_order = privatePostGetOrder = Entry('get_order', 'private', 'POST', {})
|
73
|
+
private_post_get_orders = privatePostGetOrders = Entry('get_orders', 'private', 'POST', {})
|
74
|
+
private_post_get_open_orders = privatePostGetOpenOrders = Entry('get_open_orders', 'private', 'POST', {})
|
75
|
+
private_post_cancel = privatePostCancel = Entry('cancel', 'private', 'POST', {})
|
76
|
+
private_post_cancel_by_label = privatePostCancelByLabel = Entry('cancel_by_label', 'private', 'POST', {})
|
77
|
+
private_post_cancel_by_nonce = privatePostCancelByNonce = Entry('cancel_by_nonce', 'private', 'POST', {})
|
78
|
+
private_post_cancel_by_instrument = privatePostCancelByInstrument = Entry('cancel_by_instrument', 'private', 'POST', {})
|
79
|
+
private_post_cancel_all = privatePostCancelAll = Entry('cancel_all', 'private', 'POST', {})
|
80
|
+
private_post_cancel_trigger_order = privatePostCancelTriggerOrder = Entry('cancel_trigger_order', 'private', 'POST', {})
|
81
|
+
private_post_get_order_history = privatePostGetOrderHistory = Entry('get_order_history', 'private', 'POST', {})
|
82
|
+
private_post_get_trade_history = privatePostGetTradeHistory = Entry('get_trade_history', 'private', 'POST', {})
|
83
|
+
private_post_get_deposit_history = privatePostGetDepositHistory = Entry('get_deposit_history', 'private', 'POST', {})
|
84
|
+
private_post_get_withdrawal_history = privatePostGetWithdrawalHistory = Entry('get_withdrawal_history', 'private', 'POST', {})
|
85
|
+
private_post_send_rfq = privatePostSendRfq = Entry('send_rfq', 'private', 'POST', {})
|
86
|
+
private_post_cancel_rfq = privatePostCancelRfq = Entry('cancel_rfq', 'private', 'POST', {})
|
87
|
+
private_post_cancel_batch_rfqs = privatePostCancelBatchRfqs = Entry('cancel_batch_rfqs', 'private', 'POST', {})
|
88
|
+
private_post_get_rfqs = privatePostGetRfqs = Entry('get_rfqs', 'private', 'POST', {})
|
89
|
+
private_post_poll_rfqs = privatePostPollRfqs = Entry('poll_rfqs', 'private', 'POST', {})
|
90
|
+
private_post_send_quote = privatePostSendQuote = Entry('send_quote', 'private', 'POST', {})
|
91
|
+
private_post_cancel_quote = privatePostCancelQuote = Entry('cancel_quote', 'private', 'POST', {})
|
92
|
+
private_post_cancel_batch_quotes = privatePostCancelBatchQuotes = Entry('cancel_batch_quotes', 'private', 'POST', {})
|
93
|
+
private_post_get_quotes = privatePostGetQuotes = Entry('get_quotes', 'private', 'POST', {})
|
94
|
+
private_post_poll_quotes = privatePostPollQuotes = Entry('poll_quotes', 'private', 'POST', {})
|
95
|
+
private_post_execute_quote = privatePostExecuteQuote = Entry('execute_quote', 'private', 'POST', {})
|
96
|
+
private_post_rfq_get_best_quote = privatePostRfqGetBestQuote = Entry('rfq_get_best_quote', 'private', 'POST', {})
|
97
|
+
private_post_get_margin = privatePostGetMargin = Entry('get_margin', 'private', 'POST', {})
|
98
|
+
private_post_get_collaterals = privatePostGetCollaterals = Entry('get_collaterals', 'private', 'POST', {})
|
99
|
+
private_post_get_positions = privatePostGetPositions = Entry('get_positions', 'private', 'POST', {})
|
100
|
+
private_post_get_option_settlement_history = privatePostGetOptionSettlementHistory = Entry('get_option_settlement_history', 'private', 'POST', {})
|
101
|
+
private_post_get_subaccount_value_history = privatePostGetSubaccountValueHistory = Entry('get_subaccount_value_history', 'private', 'POST', {})
|
102
|
+
private_post_expired_and_cancelled_history = privatePostExpiredAndCancelledHistory = Entry('expired_and_cancelled_history', 'private', 'POST', {})
|
103
|
+
private_post_get_funding_history = privatePostGetFundingHistory = Entry('get_funding_history', 'private', 'POST', {})
|
104
|
+
private_post_get_interest_history = privatePostGetInterestHistory = Entry('get_interest_history', 'private', 'POST', {})
|
105
|
+
private_post_get_erc20_transfer_history = privatePostGetErc20TransferHistory = Entry('get_erc20_transfer_history', 'private', 'POST', {})
|
106
|
+
private_post_get_liquidation_history = privatePostGetLiquidationHistory = Entry('get_liquidation_history', 'private', 'POST', {})
|
107
|
+
private_post_liquidate = privatePostLiquidate = Entry('liquidate', 'private', 'POST', {})
|
108
|
+
private_post_get_liquidator_history = privatePostGetLiquidatorHistory = Entry('get_liquidator_history', 'private', 'POST', {})
|
109
|
+
private_post_session_keys = privatePostSessionKeys = Entry('session_keys', 'private', 'POST', {})
|
110
|
+
private_post_edit_session_key = privatePostEditSessionKey = Entry('edit_session_key', 'private', 'POST', {})
|
111
|
+
private_post_register_scoped_session_key = privatePostRegisterScopedSessionKey = Entry('register_scoped_session_key', 'private', 'POST', {})
|
112
|
+
private_post_get_mmp_config = privatePostGetMmpConfig = Entry('get_mmp_config', 'private', 'POST', {})
|
113
|
+
private_post_set_mmp_config = privatePostSetMmpConfig = Entry('set_mmp_config', 'private', 'POST', {})
|
114
|
+
private_post_reset_mmp = privatePostResetMmp = Entry('reset_mmp', 'private', 'POST', {})
|
115
|
+
private_post_set_cancel_on_disconnect = privatePostSetCancelOnDisconnect = Entry('set_cancel_on_disconnect', 'private', 'POST', {})
|
116
|
+
private_post_get_invite_code = privatePostGetInviteCode = Entry('get_invite_code', 'private', 'POST', {})
|
117
|
+
private_post_register_invite = privatePostRegisterInvite = Entry('register_invite', 'private', 'POST', {})
|
ccxt/abstract/tradeogre.py
CHANGED
@@ -6,6 +6,7 @@ class ImplicitAPI:
|
|
6
6
|
public_get_orders_market = publicGetOrdersMarket = Entry('orders/{market}', 'public', 'GET', {'cost': 1})
|
7
7
|
public_get_ticker_market = publicGetTickerMarket = Entry('ticker/{market}', 'public', 'GET', {'cost': 1})
|
8
8
|
public_get_history_market = publicGetHistoryMarket = Entry('history/{market}', 'public', 'GET', {'cost': 1})
|
9
|
+
public_get_chart_interval_market_timestamp = publicGetChartIntervalMarketTimestamp = Entry('chart/{interval}/{market}/{timestamp}', 'public', 'GET', {'cost': 1})
|
9
10
|
private_get_account_balance = privateGetAccountBalance = Entry('account/balance', 'private', 'GET', {'cost': 1})
|
10
11
|
private_get_account_balances = privateGetAccountBalances = Entry('account/balances', 'private', 'GET', {'cost': 1})
|
11
12
|
private_get_account_order_uuid = privateGetAccountOrderUuid = Entry('account/order/{uuid}', 'private', 'GET', {'cost': 1})
|
ccxt/abstract/whitebit.py
CHANGED
@@ -27,6 +27,7 @@ class ImplicitAPI:
|
|
27
27
|
v4_public_get_assets = v4PublicGetAssets = Entry('assets', ['v4', 'public'], 'GET', {})
|
28
28
|
v4_public_get_collateral_markets = v4PublicGetCollateralMarkets = Entry('collateral/markets', ['v4', 'public'], 'GET', {})
|
29
29
|
v4_public_get_fee = v4PublicGetFee = Entry('fee', ['v4', 'public'], 'GET', {})
|
30
|
+
v4_public_get_orderbook_depth_market = v4PublicGetOrderbookDepthMarket = Entry('orderbook/depth/{market}', ['v4', 'public'], 'GET', {})
|
30
31
|
v4_public_get_orderbook_market = v4PublicGetOrderbookMarket = Entry('orderbook/{market}', ['v4', 'public'], 'GET', {})
|
31
32
|
v4_public_get_ticker = v4PublicGetTicker = Entry('ticker', ['v4', 'public'], 'GET', {})
|
32
33
|
v4_public_get_trades_market = v4PublicGetTradesMarket = Entry('trades/{market}', ['v4', 'public'], 'GET', {})
|
@@ -35,12 +36,14 @@ class ImplicitAPI:
|
|
35
36
|
v4_public_get_markets = v4PublicGetMarkets = Entry('markets', ['v4', 'public'], 'GET', {})
|
36
37
|
v4_public_get_futures = v4PublicGetFutures = Entry('futures', ['v4', 'public'], 'GET', {})
|
37
38
|
v4_public_get_platform_status = v4PublicGetPlatformStatus = Entry('platform/status', ['v4', 'public'], 'GET', {})
|
39
|
+
v4_public_get_mining_pool = v4PublicGetMiningPool = Entry('mining-pool', ['v4', 'public'], 'GET', {})
|
38
40
|
v4_private_post_collateral_account_balance = v4PrivatePostCollateralAccountBalance = Entry('collateral-account/balance', ['v4', 'private'], 'POST', {})
|
39
41
|
v4_private_post_collateral_account_balance_summary = v4PrivatePostCollateralAccountBalanceSummary = Entry('collateral-account/balance-summary', ['v4', 'private'], 'POST', {})
|
40
42
|
v4_private_post_collateral_account_positions_history = v4PrivatePostCollateralAccountPositionsHistory = Entry('collateral-account/positions/history', ['v4', 'private'], 'POST', {})
|
41
43
|
v4_private_post_collateral_account_leverage = v4PrivatePostCollateralAccountLeverage = Entry('collateral-account/leverage', ['v4', 'private'], 'POST', {})
|
42
44
|
v4_private_post_collateral_account_positions_open = v4PrivatePostCollateralAccountPositionsOpen = Entry('collateral-account/positions/open', ['v4', 'private'], 'POST', {})
|
43
45
|
v4_private_post_collateral_account_summary = v4PrivatePostCollateralAccountSummary = Entry('collateral-account/summary', ['v4', 'private'], 'POST', {})
|
46
|
+
v4_private_post_collateral_account_funding_history = v4PrivatePostCollateralAccountFundingHistory = Entry('collateral-account/funding-history', ['v4', 'private'], 'POST', {})
|
44
47
|
v4_private_post_main_account_address = v4PrivatePostMainAccountAddress = Entry('main-account/address', ['v4', 'private'], 'POST', {})
|
45
48
|
v4_private_post_main_account_balance = v4PrivatePostMainAccountBalance = Entry('main-account/balance', ['v4', 'private'], 'POST', {})
|
46
49
|
v4_private_post_main_account_create_new_address = v4PrivatePostMainAccountCreateNewAddress = Entry('main-account/create-new-address', ['v4', 'private'], 'POST', {})
|
@@ -67,6 +70,7 @@ class ImplicitAPI:
|
|
67
70
|
v4_private_post_order_collateral_market = v4PrivatePostOrderCollateralMarket = Entry('order/collateral/market', ['v4', 'private'], 'POST', {})
|
68
71
|
v4_private_post_order_collateral_stop_limit = v4PrivatePostOrderCollateralStopLimit = Entry('order/collateral/stop-limit', ['v4', 'private'], 'POST', {})
|
69
72
|
v4_private_post_order_collateral_trigger_market = v4PrivatePostOrderCollateralTriggerMarket = Entry('order/collateral/trigger-market', ['v4', 'private'], 'POST', {})
|
73
|
+
v4_private_post_order_collateral_bulk = v4PrivatePostOrderCollateralBulk = Entry('order/collateral/bulk', ['v4', 'private'], 'POST', {})
|
70
74
|
v4_private_post_order_new = v4PrivatePostOrderNew = Entry('order/new', ['v4', 'private'], 'POST', {})
|
71
75
|
v4_private_post_order_market = v4PrivatePostOrderMarket = Entry('order/market', ['v4', 'private'], 'POST', {})
|
72
76
|
v4_private_post_order_stock_market = v4PrivatePostOrderStockMarket = Entry('order/stock_market', ['v4', 'private'], 'POST', {})
|
@@ -78,6 +82,7 @@ class ImplicitAPI:
|
|
78
82
|
v4_private_post_order_kill_switch_status = v4PrivatePostOrderKillSwitchStatus = Entry('order/kill-switch/status', ['v4', 'private'], 'POST', {})
|
79
83
|
v4_private_post_order_bulk = v4PrivatePostOrderBulk = Entry('order/bulk', ['v4', 'private'], 'POST', {})
|
80
84
|
v4_private_post_order_modify = v4PrivatePostOrderModify = Entry('order/modify', ['v4', 'private'], 'POST', {})
|
85
|
+
v4_private_post_order_conditional_cancel = v4PrivatePostOrderConditionalCancel = Entry('order/conditional-cancel', ['v4', 'private'], 'POST', {})
|
81
86
|
v4_private_post_orders = v4PrivatePostOrders = Entry('orders', ['v4', 'private'], 'POST', {})
|
82
87
|
v4_private_post_oco_orders = v4PrivatePostOcoOrders = Entry('oco-orders', ['v4', 'private'], 'POST', {})
|
83
88
|
v4_private_post_order_collateral_oco = v4PrivatePostOrderCollateralOco = Entry('order/collateral/oco', ['v4', 'private'], 'POST', {})
|
@@ -96,3 +101,14 @@ class ImplicitAPI:
|
|
96
101
|
v4_private_post_sub_account_unblock = v4PrivatePostSubAccountUnblock = Entry('sub-account/unblock', ['v4', 'private'], 'POST', {})
|
97
102
|
v4_private_post_sub_account_balances = v4PrivatePostSubAccountBalances = Entry('sub-account/balances', ['v4', 'private'], 'POST', {})
|
98
103
|
v4_private_post_sub_account_transfer_history = v4PrivatePostSubAccountTransferHistory = Entry('sub-account/transfer/history', ['v4', 'private'], 'POST', {})
|
104
|
+
v4_private_post_sub_account_api_key_create = v4PrivatePostSubAccountApiKeyCreate = Entry('sub-account/api-key/create', ['v4', 'private'], 'POST', {})
|
105
|
+
v4_private_post_sub_account_api_key_edit = v4PrivatePostSubAccountApiKeyEdit = Entry('sub-account/api-key/edit', ['v4', 'private'], 'POST', {})
|
106
|
+
v4_private_post_sub_account_api_key_delete = v4PrivatePostSubAccountApiKeyDelete = Entry('sub-account/api-key/delete', ['v4', 'private'], 'POST', {})
|
107
|
+
v4_private_post_sub_account_api_key_list = v4PrivatePostSubAccountApiKeyList = Entry('sub-account/api-key/list', ['v4', 'private'], 'POST', {})
|
108
|
+
v4_private_post_sub_account_api_key_reset = v4PrivatePostSubAccountApiKeyReset = Entry('sub-account/api-key/reset', ['v4', 'private'], 'POST', {})
|
109
|
+
v4_private_post_sub_account_api_key_ip_address_list = v4PrivatePostSubAccountApiKeyIpAddressList = Entry('sub-account/api-key/ip-address/list', ['v4', 'private'], 'POST', {})
|
110
|
+
v4_private_post_sub_account_api_key_ip_address_create = v4PrivatePostSubAccountApiKeyIpAddressCreate = Entry('sub-account/api-key/ip-address/create', ['v4', 'private'], 'POST', {})
|
111
|
+
v4_private_post_sub_account_api_key_ip_address_delete = v4PrivatePostSubAccountApiKeyIpAddressDelete = Entry('sub-account/api-key/ip-address/delete', ['v4', 'private'], 'POST', {})
|
112
|
+
v4_private_post_mining_rewards = v4PrivatePostMiningRewards = Entry('mining/rewards', ['v4', 'private'], 'POST', {})
|
113
|
+
v4_private_post_market_fee = v4PrivatePostMarketFee = Entry('market/fee', ['v4', 'private'], 'POST', {})
|
114
|
+
v4_private_post_conditional_orders = v4PrivatePostConditionalOrders = Entry('conditional-orders', ['v4', 'private'], 'POST', {})
|
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.67'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -114,9 +114,11 @@ from ccxt.async_support.coinone import coinone
|
|
114
114
|
from ccxt.async_support.coinsph import coinsph # noqa: F401
|
115
115
|
from ccxt.async_support.coinspot import coinspot # noqa: F401
|
116
116
|
from ccxt.async_support.cryptocom import cryptocom # noqa: F401
|
117
|
+
from ccxt.async_support.cryptomus import cryptomus # noqa: F401
|
117
118
|
from ccxt.async_support.defx import defx # noqa: F401
|
118
119
|
from ccxt.async_support.delta import delta # noqa: F401
|
119
120
|
from ccxt.async_support.deribit import deribit # noqa: F401
|
121
|
+
from ccxt.async_support.derive import derive # noqa: F401
|
120
122
|
from ccxt.async_support.digifinex import digifinex # noqa: F401
|
121
123
|
from ccxt.async_support.ellipx import ellipx # noqa: F401
|
122
124
|
from ccxt.async_support.exmo import exmo # noqa: F401
|
@@ -225,9 +227,11 @@ exchanges = [
|
|
225
227
|
'coinsph',
|
226
228
|
'coinspot',
|
227
229
|
'cryptocom',
|
230
|
+
'cryptomus',
|
228
231
|
'defx',
|
229
232
|
'delta',
|
230
233
|
'deribit',
|
234
|
+
'derive',
|
231
235
|
'digifinex',
|
232
236
|
'ellipx',
|
233
237
|
'exmo',
|
ccxt/async_support/binance.py
CHANGED
@@ -6168,7 +6168,8 @@ class binance(Exchange, ImplicitAPI):
|
|
6168
6168
|
# don't handle/omit params here, omitting happens inside createOrderRequest
|
6169
6169
|
marketType = self.safe_string(params, 'type', market['type'])
|
6170
6170
|
marginMode = self.safe_string(params, 'marginMode')
|
6171
|
-
|
6171
|
+
porfolioOptionsValue = self.safe_bool_2(self.options, 'papi', 'portfolioMargin', False)
|
6172
|
+
isPortfolioMargin = self.safe_bool_2(params, 'papi', 'portfolioMargin', porfolioOptionsValue)
|
6172
6173
|
triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
|
6173
6174
|
stopLossPrice = self.safe_string(params, 'stopLossPrice')
|
6174
6175
|
takeProfitPrice = self.safe_string(params, 'takeProfitPrice')
|
@@ -6180,8 +6181,9 @@ class binance(Exchange, ImplicitAPI):
|
|
6180
6181
|
sor = self.safe_bool_2(params, 'sor', 'SOR', False)
|
6181
6182
|
test = self.safe_bool(params, 'test', False)
|
6182
6183
|
params = self.omit(params, ['sor', 'SOR', 'test'])
|
6183
|
-
if isPortfolioMargin:
|
6184
|
-
|
6184
|
+
# if isPortfolioMargin:
|
6185
|
+
# params['portfolioMargin'] = isPortfolioMargin
|
6186
|
+
# }
|
6185
6187
|
request = self.create_order_request(symbol, type, side, amount, price, params)
|
6186
6188
|
response = None
|
6187
6189
|
if market['option']:
|
ccxt/async_support/bitget.py
CHANGED
@@ -2339,16 +2339,16 @@ class bitget(Exchange, ImplicitAPI):
|
|
2339
2339
|
paginate, params = self.handle_option_and_params(params, 'fetchDeposits', 'paginate')
|
2340
2340
|
if paginate:
|
2341
2341
|
return await self.fetch_paginated_call_cursor('fetchDeposits', None, since, limit, params, 'idLessThan', 'idLessThan', None, 100)
|
2342
|
-
if code is None:
|
2343
|
-
raise ArgumentsRequired(self.id + ' fetchDeposits() requires a `code` argument')
|
2344
|
-
currency = self.currency(code)
|
2345
2342
|
if since is None:
|
2346
2343
|
since = self.milliseconds() - 7776000000 # 90 days
|
2347
2344
|
request: dict = {
|
2348
|
-
'coin': currency['id'],
|
2349
2345
|
'startTime': since,
|
2350
2346
|
'endTime': self.milliseconds(),
|
2351
2347
|
}
|
2348
|
+
currency = None
|
2349
|
+
if code is not None:
|
2350
|
+
currency = self.currency(code)
|
2351
|
+
request['coin'] = currency['id']
|
2352
2352
|
if limit is not None:
|
2353
2353
|
request['limit'] = limit
|
2354
2354
|
request, params = self.handle_until_option('endTime', request, params)
|
@@ -2377,7 +2377,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2377
2377
|
# }
|
2378
2378
|
#
|
2379
2379
|
rawTransactions = self.safe_list(response, 'data', [])
|
2380
|
-
return self.parse_transactions(rawTransactions,
|
2380
|
+
return self.parse_transactions(rawTransactions, None, since, limit)
|
2381
2381
|
|
2382
2382
|
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2383
2383
|
"""
|
@@ -4670,7 +4670,8 @@ class bitget(Exchange, ImplicitAPI):
|
|
4670
4670
|
elif isTakeProfitOrder or isStopLossOrder:
|
4671
4671
|
request['marginCoin'] = market['settleId']
|
4672
4672
|
request['size'] = self.amount_to_precision(symbol, amount)
|
4673
|
-
|
4673
|
+
if price is not None:
|
4674
|
+
request['executePrice'] = self.price_to_precision(symbol, price)
|
4674
4675
|
if isStopLossOrder:
|
4675
4676
|
request['triggerPrice'] = self.price_to_precision(symbol, stopLossPrice)
|
4676
4677
|
elif isTakeProfitOrder:
|
@@ -5451,10 +5452,11 @@ class bitget(Exchange, ImplicitAPI):
|
|
5451
5452
|
:param int [since]: timestamp in ms of the earliest order
|
5452
5453
|
:param int [limit]: the max number of closed orders to return
|
5453
5454
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5454
|
-
:param int [params.until]: the latest time in ms to fetch
|
5455
|
+
:param int [params.until]: the latest time in ms to fetch orders for
|
5456
|
+
:param str [params.planType]: *contract stop only* 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
|
5457
|
+
:param boolean [params.trigger]: set to True for fetching trigger orders
|
5455
5458
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
5456
5459
|
:param str [params.isPlan]: *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
|
5457
|
-
:param str [params.productType]: *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
5458
5460
|
:param boolean [params.trailing]: set to True if you want to fetch trailing orders
|
5459
5461
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
5460
5462
|
"""
|
@@ -5477,10 +5479,11 @@ class bitget(Exchange, ImplicitAPI):
|
|
5477
5479
|
:param int [since]: timestamp in ms of the earliest order
|
5478
5480
|
:param int [limit]: the max number of canceled orders to return
|
5479
5481
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5480
|
-
:param int [params.until]: the latest time in ms to fetch
|
5482
|
+
:param int [params.until]: the latest time in ms to fetch orders for
|
5483
|
+
:param str [params.planType]: *contract stop only* 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
|
5484
|
+
:param boolean [params.trigger]: set to True for fetching trigger orders
|
5481
5485
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
5482
5486
|
:param str [params.isPlan]: *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
|
5483
|
-
:param str [params.productType]: *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
5484
5487
|
:param boolean [params.trailing]: set to True if you want to fetch trailing orders
|
5485
5488
|
:returns dict: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
5486
5489
|
"""
|
@@ -5503,6 +5506,12 @@ class bitget(Exchange, ImplicitAPI):
|
|
5503
5506
|
:param int [since]: the earliest time in ms to fetch orders for
|
5504
5507
|
:param int [limit]: the maximum number of order structures to retrieve
|
5505
5508
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5509
|
+
:param int [params.until]: the latest time in ms to fetch orders for
|
5510
|
+
:param str [params.planType]: *contract stop only* 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
|
5511
|
+
:param boolean [params.trigger]: set to True for fetching trigger orders
|
5512
|
+
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
5513
|
+
:param str [params.isPlan]: *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
|
5514
|
+
:param boolean [params.trailing]: set to True if you want to fetch trailing orders
|
5506
5515
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
5507
5516
|
"""
|
5508
5517
|
await self.load_markets()
|
@@ -5531,7 +5540,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
5531
5540
|
cursorReceived = 'endId'
|
5532
5541
|
return await self.fetch_paginated_call_cursor('fetchCanceledAndClosedOrders', symbol, since, limit, params, cursorReceived, 'idLessThan')
|
5533
5542
|
response = None
|
5534
|
-
trailing = self.
|
5543
|
+
trailing = self.safe_bool(params, 'trailing')
|
5535
5544
|
trigger = self.safe_bool_2(params, 'stop', 'trigger')
|
5536
5545
|
params = self.omit(params, ['stop', 'trigger', 'trailing'])
|
5537
5546
|
request, params = self.handle_until_option('endTime', request, params)
|
@@ -5571,11 +5580,12 @@ class bitget(Exchange, ImplicitAPI):
|
|
5571
5580
|
productType = None
|
5572
5581
|
productType, params = self.handle_product_type_and_params(market, params)
|
5573
5582
|
request['productType'] = productType
|
5583
|
+
planTypeDefined = self.safe_string(params, 'planType') is not None
|
5574
5584
|
if trailing:
|
5575
5585
|
planType = self.safe_string(params, 'planType', 'track_plan')
|
5576
5586
|
request['planType'] = planType
|
5577
5587
|
response = await self.privateMixGetV2MixOrderOrdersPlanHistory(self.extend(request, params))
|
5578
|
-
elif trigger:
|
5588
|
+
elif trigger or planTypeDefined:
|
5579
5589
|
planType = self.safe_string(params, 'planType', 'normal_plan')
|
5580
5590
|
request['planType'] = planType
|
5581
5591
|
response = await self.privateMixGetV2MixOrderOrdersPlanHistory(self.extend(request, params))
|
ccxt/async_support/bitrue.py
CHANGED
@@ -1386,6 +1386,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1386
1386
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
1387
1387
|
:param int [limit]: the maximum amount of candles to fetch
|
1388
1388
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1389
|
+
:param int [params.until]: the latest time in ms to fetch transfers for
|
1389
1390
|
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
1390
1391
|
"""
|
1391
1392
|
await self.load_markets()
|
@@ -1416,8 +1417,10 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1416
1417
|
}
|
1417
1418
|
if limit is not None:
|
1418
1419
|
request['limit'] = limit
|
1419
|
-
|
1420
|
-
|
1420
|
+
until = self.safe_integer(params, 'until')
|
1421
|
+
if until is not None:
|
1422
|
+
params = self.omit(params, 'until')
|
1423
|
+
request['fromIdx'] = until
|
1421
1424
|
response = await self.spotV1PublicGetMarketKline(self.extend(request, params))
|
1422
1425
|
data = self.safe_list(response, 'data', [])
|
1423
1426
|
else:
|