ccxt 4.4.74__py2.py3-none-any.whl → 4.4.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/coinlist.py +3 -0
- ccxt/abstract/myokx.py +4 -0
- ccxt/abstract/okx.py +4 -0
- ccxt/abstract/upbit.py +51 -37
- ccxt/abstract/xt.py +3 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +2 -2
- ccxt/async_support/binance.py +36 -214
- ccxt/async_support/bitget.py +1 -1
- ccxt/async_support/bitopro.py +37 -0
- ccxt/async_support/bitrue.py +48 -0
- ccxt/async_support/coinex.py +2 -0
- ccxt/async_support/coinlist.py +90 -2
- ccxt/async_support/okx.py +44 -32
- ccxt/async_support/paradex.py +3 -8
- ccxt/async_support/upbit.py +64 -46
- ccxt/async_support/xt.py +106 -3
- ccxt/base/exchange.py +16 -9
- ccxt/binance.py +36 -214
- ccxt/bitget.py +1 -1
- ccxt/bitopro.py +37 -0
- ccxt/bitrue.py +48 -0
- ccxt/coinex.py +2 -0
- ccxt/coinlist.py +90 -2
- ccxt/okx.py +44 -32
- ccxt/paradex.py +3 -8
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/hyperliquid.py +1 -1
- ccxt/test/tests_async.py +23 -0
- ccxt/test/tests_sync.py +23 -0
- ccxt/upbit.py +64 -46
- ccxt/xt.py +106 -3
- {ccxt-4.4.74.dist-info → ccxt-4.4.77.dist-info}/METADATA +4 -4
- {ccxt-4.4.74.dist-info → ccxt-4.4.77.dist-info}/RECORD +38 -38
- {ccxt-4.4.74.dist-info → ccxt-4.4.77.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.74.dist-info → ccxt-4.4.77.dist-info}/WHEEL +0 -0
- {ccxt-4.4.74.dist-info → ccxt-4.4.77.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
ccxt/abstract/coinlist.py
CHANGED
@@ -16,6 +16,7 @@ class ImplicitAPI:
|
|
16
16
|
public_get_v1_leaderboard = publicGetV1Leaderboard = Entry('v1/leaderboard', 'public', 'GET', {'cost': 1})
|
17
17
|
public_get_v1_affiliate_competition_code = publicGetV1AffiliateCompetitionCode = Entry('v1/affiliate/{competition_code}', 'public', 'GET', {'cost': 1})
|
18
18
|
public_get_v1_competition_competition_id = publicGetV1CompetitionCompetitionId = Entry('v1/competition/{competition_id}', 'public', 'GET', {'cost': 1})
|
19
|
+
public_get_v1_symbols_symbol_funding = publicGetV1SymbolsSymbolFunding = Entry('v1/symbols/{symbol}/funding', 'public', 'GET', {'cost': 1})
|
19
20
|
private_get_v1_fees = privateGetV1Fees = Entry('v1/fees', 'private', 'GET', {'cost': 1})
|
20
21
|
private_get_v1_accounts = privateGetV1Accounts = Entry('v1/accounts', 'private', 'GET', {'cost': 1})
|
21
22
|
private_get_v1_accounts_trader_id = privateGetV1AccountsTraderId = Entry('v1/accounts/{trader_id}', 'private', 'GET', {'cost': 1})
|
@@ -35,6 +36,7 @@ class ImplicitAPI:
|
|
35
36
|
private_get_v1_credits = privateGetV1Credits = Entry('v1/credits', 'private', 'GET', {'cost': 1})
|
36
37
|
private_get_v1_positions = privateGetV1Positions = Entry('v1/positions', 'private', 'GET', {'cost': 1})
|
37
38
|
private_get_v1_accounts_trader_id_competitions = privateGetV1AccountsTraderIdCompetitions = Entry('v1/accounts/{trader_id}/competitions', 'private', 'GET', {'cost': 1})
|
39
|
+
private_get_v1_closedpositions = privateGetV1ClosedPositions = Entry('v1/closedPositions', 'private', 'GET', {'cost': 1})
|
38
40
|
private_post_v1_keys = privatePostV1Keys = Entry('v1/keys', 'private', 'POST', {'cost': 1})
|
39
41
|
private_post_v1_orders = privatePostV1Orders = Entry('v1/orders', 'private', 'POST', {'cost': 1})
|
40
42
|
private_post_v1_orders_cancel_all_after = privatePostV1OrdersCancelAllAfter = Entry('v1/orders/cancel-all-after', 'private', 'POST', {'cost': 1})
|
@@ -48,6 +50,7 @@ class ImplicitAPI:
|
|
48
50
|
private_post_v1_accounts_trader_id_create_competition = privatePostV1AccountsTraderIdCreateCompetition = Entry('v1/accounts/{trader_id}/create-competition', 'private', 'POST', {'cost': 1})
|
49
51
|
private_patch_v1_orders_order_id = privatePatchV1OrdersOrderId = Entry('v1/orders/{order_id}', 'private', 'PATCH', {'cost': 1})
|
50
52
|
private_patch_v1_orders_bulk = privatePatchV1OrdersBulk = Entry('v1/orders/bulk', 'private', 'PATCH', {'cost': 1})
|
53
|
+
private_put_v1_accounts_trader_id_alias = privatePutV1AccountsTraderIdAlias = Entry('v1/accounts/{trader_id}/alias', 'private', 'PUT', {'cost': 1})
|
51
54
|
private_delete_v1_keys_key = privateDeleteV1KeysKey = Entry('v1/keys/{key}', 'private', 'DELETE', {'cost': 1})
|
52
55
|
private_delete_v1_orders = privateDeleteV1Orders = Entry('v1/orders', 'private', 'DELETE', {'cost': 1})
|
53
56
|
private_delete_v1_orders_order_id = privateDeleteV1OrdersOrderId = Entry('v1/orders/{order_id}', 'private', 'DELETE', {'cost': 1})
|
ccxt/abstract/myokx.py
CHANGED
@@ -169,6 +169,7 @@ class ImplicitAPI:
|
|
169
169
|
private_get_asset_subaccount_managed_subaccount_bills = privateGetAssetSubaccountManagedSubaccountBills = Entry('asset/subaccount/managed-subaccount-bills', 'private', 'GET', {'cost': 1.6666666666666667})
|
170
170
|
private_get_users_entrust_subaccount_list = privateGetUsersEntrustSubaccountList = Entry('users/entrust-subaccount-list', 'private', 'GET', {'cost': 10})
|
171
171
|
private_get_account_subaccount_interest_limits = privateGetAccountSubaccountInterestLimits = Entry('account/subaccount/interest-limits', 'private', 'GET', {'cost': 4})
|
172
|
+
private_get_users_subaccount_apikey = privateGetUsersSubaccountApikey = Entry('users/subaccount/apikey', 'private', 'GET', {'cost': 10})
|
172
173
|
private_get_tradingbot_grid_orders_algo_pending = privateGetTradingBotGridOrdersAlgoPending = Entry('tradingBot/grid/orders-algo-pending', 'private', 'GET', {'cost': 1})
|
173
174
|
private_get_tradingbot_grid_orders_algo_history = privateGetTradingBotGridOrdersAlgoHistory = Entry('tradingBot/grid/orders-algo-history', 'private', 'GET', {'cost': 1})
|
174
175
|
private_get_tradingbot_grid_orders_algo_details = privateGetTradingBotGridOrdersAlgoDetails = Entry('tradingBot/grid/orders-algo-details', 'private', 'GET', {'cost': 1})
|
@@ -287,6 +288,9 @@ class ImplicitAPI:
|
|
287
288
|
private_post_asset_subaccount_transfer = privatePostAssetSubaccountTransfer = Entry('asset/subaccount/transfer', 'private', 'POST', {'cost': 10})
|
288
289
|
private_post_users_subaccount_set_transfer_out = privatePostUsersSubaccountSetTransferOut = Entry('users/subaccount/set-transfer-out', 'private', 'POST', {'cost': 10})
|
289
290
|
private_post_account_subaccount_set_loan_allocation = privatePostAccountSubaccountSetLoanAllocation = Entry('account/subaccount/set-loan-allocation', 'private', 'POST', {'cost': 4})
|
291
|
+
private_post_users_subaccount_create_subaccount = privatePostUsersSubaccountCreateSubaccount = Entry('users/subaccount/create-subaccount', 'private', 'POST', {'cost': 10})
|
292
|
+
private_post_users_subaccount_subaccount_apikey = privatePostUsersSubaccountSubaccountApikey = Entry('users/subaccount/subaccount-apikey', 'private', 'POST', {'cost': 10})
|
293
|
+
private_post_users_subaccount_delete_apikey = privatePostUsersSubaccountDeleteApikey = Entry('users/subaccount/delete-apikey', 'private', 'POST', {'cost': 10})
|
290
294
|
private_post_tradingbot_grid_order_algo = privatePostTradingBotGridOrderAlgo = Entry('tradingBot/grid/order-algo', 'private', 'POST', {'cost': 1})
|
291
295
|
private_post_tradingbot_grid_amend_order_algo = privatePostTradingBotGridAmendOrderAlgo = Entry('tradingBot/grid/amend-order-algo', 'private', 'POST', {'cost': 1})
|
292
296
|
private_post_tradingbot_grid_stop_order_algo = privatePostTradingBotGridStopOrderAlgo = Entry('tradingBot/grid/stop-order-algo', 'private', 'POST', {'cost': 1})
|
ccxt/abstract/okx.py
CHANGED
@@ -169,6 +169,7 @@ class ImplicitAPI:
|
|
169
169
|
private_get_asset_subaccount_managed_subaccount_bills = privateGetAssetSubaccountManagedSubaccountBills = Entry('asset/subaccount/managed-subaccount-bills', 'private', 'GET', {'cost': 1.6666666666666667})
|
170
170
|
private_get_users_entrust_subaccount_list = privateGetUsersEntrustSubaccountList = Entry('users/entrust-subaccount-list', 'private', 'GET', {'cost': 10})
|
171
171
|
private_get_account_subaccount_interest_limits = privateGetAccountSubaccountInterestLimits = Entry('account/subaccount/interest-limits', 'private', 'GET', {'cost': 4})
|
172
|
+
private_get_users_subaccount_apikey = privateGetUsersSubaccountApikey = Entry('users/subaccount/apikey', 'private', 'GET', {'cost': 10})
|
172
173
|
private_get_tradingbot_grid_orders_algo_pending = privateGetTradingBotGridOrdersAlgoPending = Entry('tradingBot/grid/orders-algo-pending', 'private', 'GET', {'cost': 1})
|
173
174
|
private_get_tradingbot_grid_orders_algo_history = privateGetTradingBotGridOrdersAlgoHistory = Entry('tradingBot/grid/orders-algo-history', 'private', 'GET', {'cost': 1})
|
174
175
|
private_get_tradingbot_grid_orders_algo_details = privateGetTradingBotGridOrdersAlgoDetails = Entry('tradingBot/grid/orders-algo-details', 'private', 'GET', {'cost': 1})
|
@@ -287,6 +288,9 @@ class ImplicitAPI:
|
|
287
288
|
private_post_asset_subaccount_transfer = privatePostAssetSubaccountTransfer = Entry('asset/subaccount/transfer', 'private', 'POST', {'cost': 10})
|
288
289
|
private_post_users_subaccount_set_transfer_out = privatePostUsersSubaccountSetTransferOut = Entry('users/subaccount/set-transfer-out', 'private', 'POST', {'cost': 10})
|
289
290
|
private_post_account_subaccount_set_loan_allocation = privatePostAccountSubaccountSetLoanAllocation = Entry('account/subaccount/set-loan-allocation', 'private', 'POST', {'cost': 4})
|
291
|
+
private_post_users_subaccount_create_subaccount = privatePostUsersSubaccountCreateSubaccount = Entry('users/subaccount/create-subaccount', 'private', 'POST', {'cost': 10})
|
292
|
+
private_post_users_subaccount_subaccount_apikey = privatePostUsersSubaccountSubaccountApikey = Entry('users/subaccount/subaccount-apikey', 'private', 'POST', {'cost': 10})
|
293
|
+
private_post_users_subaccount_delete_apikey = privatePostUsersSubaccountDeleteApikey = Entry('users/subaccount/delete-apikey', 'private', 'POST', {'cost': 10})
|
290
294
|
private_post_tradingbot_grid_order_algo = privatePostTradingBotGridOrderAlgo = Entry('tradingBot/grid/order-algo', 'private', 'POST', {'cost': 1})
|
291
295
|
private_post_tradingbot_grid_amend_order_algo = privatePostTradingBotGridAmendOrderAlgo = Entry('tradingBot/grid/amend-order-algo', 'private', 'POST', {'cost': 1})
|
292
296
|
private_post_tradingbot_grid_stop_order_algo = privatePostTradingBotGridStopOrderAlgo = Entry('tradingBot/grid/stop-order-algo', 'private', 'POST', {'cost': 1})
|
ccxt/abstract/upbit.py
CHANGED
@@ -2,40 +2,54 @@ from ccxt.base.types import Entry
|
|
2
2
|
|
3
3
|
|
4
4
|
class ImplicitAPI:
|
5
|
-
public_get_market_all = publicGetMarketAll = Entry('market/all', 'public', 'GET', {})
|
6
|
-
public_get_candles_timeframe = publicGetCandlesTimeframe = Entry('candles/{timeframe}', 'public', 'GET', {})
|
7
|
-
public_get_candles_timeframe_unit = publicGetCandlesTimeframeUnit = Entry('candles/{timeframe}/{unit}', 'public', 'GET', {})
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
5
|
+
public_get_market_all = publicGetMarketAll = Entry('market/all', 'public', 'GET', {'cost': 2})
|
6
|
+
public_get_candles_timeframe = publicGetCandlesTimeframe = Entry('candles/{timeframe}', 'public', 'GET', {'cost': 2})
|
7
|
+
public_get_candles_timeframe_unit = publicGetCandlesTimeframeUnit = Entry('candles/{timeframe}/{unit}', 'public', 'GET', {'cost': 2})
|
8
|
+
public_get_candles_seconds = publicGetCandlesSeconds = Entry('candles/seconds', 'public', 'GET', {'cost': 2})
|
9
|
+
public_get_candles_minutes_unit = publicGetCandlesMinutesUnit = Entry('candles/minutes/{unit}', 'public', 'GET', {'cost': 2})
|
10
|
+
public_get_candles_minutes_1 = publicGetCandlesMinutes1 = Entry('candles/minutes/1', 'public', 'GET', {'cost': 2})
|
11
|
+
public_get_candles_minutes_3 = publicGetCandlesMinutes3 = Entry('candles/minutes/3', 'public', 'GET', {'cost': 2})
|
12
|
+
public_get_candles_minutes_5 = publicGetCandlesMinutes5 = Entry('candles/minutes/5', 'public', 'GET', {'cost': 2})
|
13
|
+
public_get_candles_minutes_10 = publicGetCandlesMinutes10 = Entry('candles/minutes/10', 'public', 'GET', {'cost': 2})
|
14
|
+
public_get_candles_minutes_15 = publicGetCandlesMinutes15 = Entry('candles/minutes/15', 'public', 'GET', {'cost': 2})
|
15
|
+
public_get_candles_minutes_30 = publicGetCandlesMinutes30 = Entry('candles/minutes/30', 'public', 'GET', {'cost': 2})
|
16
|
+
public_get_candles_minutes_60 = publicGetCandlesMinutes60 = Entry('candles/minutes/60', 'public', 'GET', {'cost': 2})
|
17
|
+
public_get_candles_minutes_240 = publicGetCandlesMinutes240 = Entry('candles/minutes/240', 'public', 'GET', {'cost': 2})
|
18
|
+
public_get_candles_days = publicGetCandlesDays = Entry('candles/days', 'public', 'GET', {'cost': 2})
|
19
|
+
public_get_candles_weeks = publicGetCandlesWeeks = Entry('candles/weeks', 'public', 'GET', {'cost': 2})
|
20
|
+
public_get_candles_months = publicGetCandlesMonths = Entry('candles/months', 'public', 'GET', {'cost': 2})
|
21
|
+
public_get_candles_years = publicGetCandlesYears = Entry('candles/years', 'public', 'GET', {'cost': 2})
|
22
|
+
public_get_trades_ticks = publicGetTradesTicks = Entry('trades/ticks', 'public', 'GET', {'cost': 2})
|
23
|
+
public_get_ticker = publicGetTicker = Entry('ticker', 'public', 'GET', {'cost': 2})
|
24
|
+
public_get_ticker_all = publicGetTickerAll = Entry('ticker/all', 'public', 'GET', {'cost': 2})
|
25
|
+
public_get_orderbook = publicGetOrderbook = Entry('orderbook', 'public', 'GET', {'cost': 2})
|
26
|
+
public_get_orderbook_supported_levels = publicGetOrderbookSupportedLevels = Entry('orderbook/supported_levels', 'public', 'GET', {'cost': 2})
|
27
|
+
private_get_accounts = privateGetAccounts = Entry('accounts', 'private', 'GET', {'cost': 0.67})
|
28
|
+
private_get_orders_chance = privateGetOrdersChance = Entry('orders/chance', 'private', 'GET', {'cost': 0.67})
|
29
|
+
private_get_order = privateGetOrder = Entry('order', 'private', 'GET', {'cost': 0.67})
|
30
|
+
private_get_orders_closed = privateGetOrdersClosed = Entry('orders/closed', 'private', 'GET', {'cost': 0.67})
|
31
|
+
private_get_orders_open = privateGetOrdersOpen = Entry('orders/open', 'private', 'GET', {'cost': 0.67})
|
32
|
+
private_get_orders_uuids = privateGetOrdersUuids = Entry('orders/uuids', 'private', 'GET', {'cost': 0.67})
|
33
|
+
private_get_withdraws = privateGetWithdraws = Entry('withdraws', 'private', 'GET', {'cost': 0.67})
|
34
|
+
private_get_withdraw = privateGetWithdraw = Entry('withdraw', 'private', 'GET', {'cost': 0.67})
|
35
|
+
private_get_withdraws_chance = privateGetWithdrawsChance = Entry('withdraws/chance', 'private', 'GET', {'cost': 0.67})
|
36
|
+
private_get_withdraws_coin_addresses = privateGetWithdrawsCoinAddresses = Entry('withdraws/coin_addresses', 'private', 'GET', {'cost': 0.67})
|
37
|
+
private_get_deposits = privateGetDeposits = Entry('deposits', 'private', 'GET', {'cost': 0.67})
|
38
|
+
private_get_deposits_chance_coin = privateGetDepositsChanceCoin = Entry('deposits/chance/coin', 'private', 'GET', {'cost': 0.67})
|
39
|
+
private_get_deposit = privateGetDeposit = Entry('deposit', 'private', 'GET', {'cost': 0.67})
|
40
|
+
private_get_deposits_coin_addresses = privateGetDepositsCoinAddresses = Entry('deposits/coin_addresses', 'private', 'GET', {'cost': 0.67})
|
41
|
+
private_get_deposits_coin_address = privateGetDepositsCoinAddress = Entry('deposits/coin_address', 'private', 'GET', {'cost': 0.67})
|
42
|
+
private_get_travel_rule_vasps = privateGetTravelRuleVasps = Entry('travel_rule/vasps', 'private', 'GET', {'cost': 0.67})
|
43
|
+
private_get_status_wallet = privateGetStatusWallet = Entry('status/wallet', 'private', 'GET', {'cost': 0.67})
|
44
|
+
private_get_api_keys = privateGetApiKeys = Entry('api_keys', 'private', 'GET', {'cost': 0.67})
|
45
|
+
private_post_orders = privatePostOrders = Entry('orders', 'private', 'POST', {'cost': 2.5})
|
46
|
+
private_post_orders_cancel_and_new = privatePostOrdersCancelAndNew = Entry('orders/cancel_and_new', 'private', 'POST', {'cost': 2.5})
|
47
|
+
private_post_withdraws_coin = privatePostWithdrawsCoin = Entry('withdraws/coin', 'private', 'POST', {'cost': 0.67})
|
48
|
+
private_post_withdraws_krw = privatePostWithdrawsKrw = Entry('withdraws/krw', 'private', 'POST', {'cost': 0.67})
|
49
|
+
private_post_deposits_krw = privatePostDepositsKrw = Entry('deposits/krw', 'private', 'POST', {'cost': 0.67})
|
50
|
+
private_post_deposits_generate_coin_address = privatePostDepositsGenerateCoinAddress = Entry('deposits/generate_coin_address', 'private', 'POST', {'cost': 0.67})
|
51
|
+
private_post_travel_rule_deposit_uuid = privatePostTravelRuleDepositUuid = Entry('travel_rule/deposit/uuid', 'private', 'POST', {'cost': 0.67})
|
52
|
+
private_post_travel_rule_deposit_txid = privatePostTravelRuleDepositTxid = Entry('travel_rule/deposit/txid', 'private', 'POST', {'cost': 0.67})
|
53
|
+
private_delete_order = privateDeleteOrder = Entry('order', 'private', 'DELETE', {'cost': 0.67})
|
54
|
+
private_delete_orders_open = privateDeleteOrdersOpen = Entry('orders/open', 'private', 'DELETE', {'cost': 40})
|
55
|
+
private_delete_orders_uuids = privateDeleteOrdersUuids = Entry('orders/uuids', 'private', 'DELETE', {'cost': 0.67})
|
ccxt/abstract/xt.py
CHANGED
@@ -73,6 +73,7 @@ class ImplicitAPI:
|
|
73
73
|
private_spot_delete_batch_order = privateSpotDeleteBatchOrder = Entry('batch-order', ['private', 'spot'], 'DELETE', {'cost': 1})
|
74
74
|
private_spot_delete_open_order = privateSpotDeleteOpenOrder = Entry('open-order', ['private', 'spot'], 'DELETE', {'cost': 1})
|
75
75
|
private_spot_delete_order_orderid = privateSpotDeleteOrderOrderId = Entry('order/{orderId}', ['private', 'spot'], 'DELETE', {'cost': 1})
|
76
|
+
private_spot_put_order_orderid = privateSpotPutOrderOrderId = Entry('order/{orderId}', ['private', 'spot'], 'PUT', {'cost': 1})
|
76
77
|
private_linear_get_future_trade_v1_entrust_plan_detail = privateLinearGetFutureTradeV1EntrustPlanDetail = Entry('future/trade/v1/entrust/plan-detail', ['private', 'linear'], 'GET', {'cost': 1})
|
77
78
|
private_linear_get_future_trade_v1_entrust_plan_list = privateLinearGetFutureTradeV1EntrustPlanList = Entry('future/trade/v1/entrust/plan-list', ['private', 'linear'], 'GET', {'cost': 1})
|
78
79
|
private_linear_get_future_trade_v1_entrust_plan_list_history = privateLinearGetFutureTradeV1EntrustPlanListHistory = Entry('future/trade/v1/entrust/plan-list-history', ['private', 'linear'], 'GET', {'cost': 1})
|
@@ -102,6 +103,7 @@ class ImplicitAPI:
|
|
102
103
|
private_linear_post_future_trade_v1_order_cancel_all = privateLinearPostFutureTradeV1OrderCancelAll = Entry('future/trade/v1/order/cancel-all', ['private', 'linear'], 'POST', {'cost': 1})
|
103
104
|
private_linear_post_future_trade_v1_order_create = privateLinearPostFutureTradeV1OrderCreate = Entry('future/trade/v1/order/create', ['private', 'linear'], 'POST', {'cost': 1})
|
104
105
|
private_linear_post_future_trade_v1_order_create_batch = privateLinearPostFutureTradeV1OrderCreateBatch = Entry('future/trade/v1/order/create-batch', ['private', 'linear'], 'POST', {'cost': 1})
|
106
|
+
private_linear_post_future_trade_v1_order_update = privateLinearPostFutureTradeV1OrderUpdate = Entry('future/trade/v1/order/update', ['private', 'linear'], 'POST', {'cost': 1})
|
105
107
|
private_linear_post_future_user_v1_account_open = privateLinearPostFutureUserV1AccountOpen = Entry('future/user/v1/account/open', ['private', 'linear'], 'POST', {'cost': 1})
|
106
108
|
private_linear_post_future_user_v1_position_adjust_leverage = privateLinearPostFutureUserV1PositionAdjustLeverage = Entry('future/user/v1/position/adjust-leverage', ['private', 'linear'], 'POST', {'cost': 1})
|
107
109
|
private_linear_post_future_user_v1_position_auto_margin = privateLinearPostFutureUserV1PositionAutoMargin = Entry('future/user/v1/position/auto-margin', ['private', 'linear'], 'POST', {'cost': 1})
|
@@ -139,6 +141,7 @@ class ImplicitAPI:
|
|
139
141
|
private_inverse_post_future_trade_v1_order_cancel_all = privateInversePostFutureTradeV1OrderCancelAll = Entry('future/trade/v1/order/cancel-all', ['private', 'inverse'], 'POST', {'cost': 1})
|
140
142
|
private_inverse_post_future_trade_v1_order_create = privateInversePostFutureTradeV1OrderCreate = Entry('future/trade/v1/order/create', ['private', 'inverse'], 'POST', {'cost': 1})
|
141
143
|
private_inverse_post_future_trade_v1_order_create_batch = privateInversePostFutureTradeV1OrderCreateBatch = Entry('future/trade/v1/order/create-batch', ['private', 'inverse'], 'POST', {'cost': 1})
|
144
|
+
private_inverse_post_future_trade_v1_order_update = privateInversePostFutureTradeV1OrderUpdate = Entry('future/trade/v1/order/update', ['private', 'inverse'], 'POST', {'cost': 1})
|
142
145
|
private_inverse_post_future_user_v1_account_open = privateInversePostFutureUserV1AccountOpen = Entry('future/user/v1/account/open', ['private', 'inverse'], 'POST', {'cost': 1})
|
143
146
|
private_inverse_post_future_user_v1_position_adjust_leverage = privateInversePostFutureUserV1PositionAdjustLeverage = Entry('future/user/v1/position/adjust-leverage', ['private', 'inverse'], 'POST', {'cost': 1})
|
144
147
|
private_inverse_post_future_user_v1_position_auto_margin = privateInversePostFutureUserV1PositionAutoMargin = Entry('future/user/v1/position/auto-margin', ['private', 'inverse'], 'POST', {'cost': 1})
|
ccxt/async_support/__init__.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.4.
|
5
|
+
__version__ = '4.4.77'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -154,7 +154,7 @@ class Exchange(BaseExchange):
|
|
154
154
|
proxyUrl = self.check_proxy_url_settings(url, method, headers, body)
|
155
155
|
if proxyUrl is not None:
|
156
156
|
request_headers.update({'Origin': self.origin})
|
157
|
-
url = proxyUrl + url
|
157
|
+
url = proxyUrl + self.url_encoder_for_proxy_url(url)
|
158
158
|
# proxy agents
|
159
159
|
final_proxy = None # set default
|
160
160
|
proxy_session = None
|
ccxt/async_support/binance.py
CHANGED
@@ -1357,195 +1357,8 @@ class binance(Exchange, ImplicitAPI):
|
|
1357
1357
|
'SPL': 'SOL', # temporarily keep support for SPL(old name)
|
1358
1358
|
'SOL': 'SOL', # we shouldn't rename SOL
|
1359
1359
|
},
|
1360
|
-
# keeping self object for backward-compatibility
|
1361
|
-
'reverseNetworks': {
|
1362
|
-
'tronscan.org': 'TRC20',
|
1363
|
-
'etherscan.io': 'ERC20',
|
1364
|
-
'bscscan.com': 'BSC',
|
1365
|
-
'explorer.binance.org': 'BEP2',
|
1366
|
-
'bithomp.com': 'XRP',
|
1367
|
-
'bloks.io': 'EOS',
|
1368
|
-
'stellar.expert': 'XLM',
|
1369
|
-
'blockchair.com/bitcoin': 'BTC',
|
1370
|
-
'blockchair.com/bitcoin-cash': 'BCH',
|
1371
|
-
'blockchair.com/ecash': 'XEC',
|
1372
|
-
'explorer.litecoin.net': 'LTC',
|
1373
|
-
'explorer.avax.network': 'AVAX',
|
1374
|
-
'solscan.io': 'SOL',
|
1375
|
-
'polkadot.subscan.io': 'DOT',
|
1376
|
-
'dashboard.internetcomputer.org': 'ICP',
|
1377
|
-
'explorer.chiliz.com': 'CHZ',
|
1378
|
-
'cardanoscan.io': 'ADA',
|
1379
|
-
'mainnet.theoan.com': 'AION',
|
1380
|
-
'algoexplorer.io': 'ALGO',
|
1381
|
-
'explorer.ambrosus.com': 'AMB',
|
1382
|
-
'viewblock.io/zilliqa': 'ZIL',
|
1383
|
-
'viewblock.io/arweave': 'AR',
|
1384
|
-
'explorer.ark.io': 'ARK',
|
1385
|
-
'atomscan.com': 'ATOM',
|
1386
|
-
'www.mintscan.io': 'CTK',
|
1387
|
-
'explorer.bitcoindiamond.org': 'BCD',
|
1388
|
-
'btgexplorer.com': 'BTG',
|
1389
|
-
'bts.ai': 'BTS',
|
1390
|
-
'explorer.celo.org': 'CELO',
|
1391
|
-
'explorer.nervos.org': 'CKB',
|
1392
|
-
'cerebro.cortexlabs.ai': 'CTXC',
|
1393
|
-
'chainz.cryptoid.info': 'VIA',
|
1394
|
-
'explorer.dcrdata.org': 'DCR',
|
1395
|
-
'digiexplorer.info': 'DGB',
|
1396
|
-
'dock.subscan.io': 'DOCK',
|
1397
|
-
'dogechain.info': 'DOGE',
|
1398
|
-
'explorer.elrond.com': 'EGLD',
|
1399
|
-
'blockscout.com': 'ETC',
|
1400
|
-
'explore-fetchhub.fetch.ai': 'FET',
|
1401
|
-
'filfox.info': 'FIL',
|
1402
|
-
'fio.bloks.io': 'FIO',
|
1403
|
-
'explorer.firo.org': 'FIRO',
|
1404
|
-
'neoscan.io': 'NEO',
|
1405
|
-
'ftmscan.com': 'FTM',
|
1406
|
-
'explorer.gochain.io': 'GO',
|
1407
|
-
'block.gxb.io': 'GXS',
|
1408
|
-
'hash-hash.info': 'HBAR',
|
1409
|
-
'www.hiveblockexplorer.com': 'HIVE',
|
1410
|
-
'explorer.helium.com': 'HNT',
|
1411
|
-
'tracker.icon.foundation': 'ICX',
|
1412
|
-
'www.iostabc.com': 'IOST',
|
1413
|
-
'explorer.iota.org': 'IOTA',
|
1414
|
-
'iotexscan.io': 'IOTX',
|
1415
|
-
'irishub.iobscan.io': 'IRIS',
|
1416
|
-
'kava.mintscan.io': 'KAVA',
|
1417
|
-
'scope.klaytn.com': 'KLAY',
|
1418
|
-
'kmdexplorer.io': 'KMD',
|
1419
|
-
'kusama.subscan.io': 'KSM',
|
1420
|
-
'explorer.lto.network': 'LTO',
|
1421
|
-
'polygonscan.com': 'POLYGON',
|
1422
|
-
'explorer.ont.io': 'ONT',
|
1423
|
-
'minaexplorer.com': 'MINA',
|
1424
|
-
'nanolooker.com': 'NANO',
|
1425
|
-
'explorer.nebulas.io': 'NAS',
|
1426
|
-
'explorer.nbs.plus': 'NBS',
|
1427
|
-
'explorer.nebl.io': 'NEBL',
|
1428
|
-
'nulscan.io': 'NULS',
|
1429
|
-
'nxscan.com': 'NXS',
|
1430
|
-
'explorer.harmony.one': 'ONE',
|
1431
|
-
'explorer.poa.network': 'POA',
|
1432
|
-
'qtum.info': 'QTUM',
|
1433
|
-
'explorer.rsk.co': 'RSK',
|
1434
|
-
'www.oasisscan.com': 'ROSE',
|
1435
|
-
'ravencoin.network': 'RVN',
|
1436
|
-
'sc.tokenview.com': 'SC',
|
1437
|
-
'secretnodes.com': 'SCRT',
|
1438
|
-
'explorer.skycoin.com': 'SKY',
|
1439
|
-
'steemscan.com': 'STEEM',
|
1440
|
-
'explorer.stacks.co': 'STX',
|
1441
|
-
'www.thetascan.io': 'THETA',
|
1442
|
-
'scan.tomochain.com': 'TOMO',
|
1443
|
-
'explore.vechain.org': 'VET',
|
1444
|
-
'explorer.vite.net': 'VITE',
|
1445
|
-
'www.wanscan.org': 'WAN',
|
1446
|
-
'wavesexplorer.com': 'WAVES',
|
1447
|
-
'wax.eosx.io': 'WAXP',
|
1448
|
-
'waltonchain.pro': 'WTC',
|
1449
|
-
'chain.nem.ninja': 'XEM',
|
1450
|
-
'verge-blockchain.info': 'XVG',
|
1451
|
-
'explorer.yoyow.org': 'YOYOW',
|
1452
|
-
'explorer.zcha.in': 'ZEC',
|
1453
|
-
'explorer.zensystem.io': 'ZEN',
|
1454
|
-
},
|
1455
1360
|
'networksById': {
|
1456
1361
|
'SOL': 'SOL', # temporary fix for SPL definition
|
1457
|
-
'tronscan.org': 'TRC20',
|
1458
|
-
'etherscan.io': 'ERC20',
|
1459
|
-
'bscscan.com': 'BSC',
|
1460
|
-
'explorer.binance.org': 'BEP2',
|
1461
|
-
'bithomp.com': 'XRP',
|
1462
|
-
'bloks.io': 'EOS',
|
1463
|
-
'stellar.expert': 'XLM',
|
1464
|
-
'blockchair.com/bitcoin': 'BTC',
|
1465
|
-
'blockchair.com/bitcoin-cash': 'BCH',
|
1466
|
-
'blockchair.com/ecash': 'XEC',
|
1467
|
-
'explorer.litecoin.net': 'LTC',
|
1468
|
-
'explorer.avax.network': 'AVAX',
|
1469
|
-
'solscan.io': 'SOL',
|
1470
|
-
'polkadot.subscan.io': 'DOT',
|
1471
|
-
'dashboard.internetcomputer.org': 'ICP',
|
1472
|
-
'explorer.chiliz.com': 'CHZ',
|
1473
|
-
'cardanoscan.io': 'ADA',
|
1474
|
-
'mainnet.theoan.com': 'AION',
|
1475
|
-
'algoexplorer.io': 'ALGO',
|
1476
|
-
'explorer.ambrosus.com': 'AMB',
|
1477
|
-
'viewblock.io/zilliqa': 'ZIL',
|
1478
|
-
'viewblock.io/arweave': 'AR',
|
1479
|
-
'explorer.ark.io': 'ARK',
|
1480
|
-
'atomscan.com': 'ATOM',
|
1481
|
-
'www.mintscan.io': 'CTK',
|
1482
|
-
'explorer.bitcoindiamond.org': 'BCD',
|
1483
|
-
'btgexplorer.com': 'BTG',
|
1484
|
-
'bts.ai': 'BTS',
|
1485
|
-
'explorer.celo.org': 'CELO',
|
1486
|
-
'explorer.nervos.org': 'CKB',
|
1487
|
-
'cerebro.cortexlabs.ai': 'CTXC',
|
1488
|
-
'chainz.cryptoid.info': 'VIA',
|
1489
|
-
'explorer.dcrdata.org': 'DCR',
|
1490
|
-
'digiexplorer.info': 'DGB',
|
1491
|
-
'dock.subscan.io': 'DOCK',
|
1492
|
-
'dogechain.info': 'DOGE',
|
1493
|
-
'explorer.elrond.com': 'EGLD',
|
1494
|
-
'blockscout.com': 'ETC',
|
1495
|
-
'explore-fetchhub.fetch.ai': 'FET',
|
1496
|
-
'filfox.info': 'FIL',
|
1497
|
-
'fio.bloks.io': 'FIO',
|
1498
|
-
'explorer.firo.org': 'FIRO',
|
1499
|
-
'neoscan.io': 'NEO',
|
1500
|
-
'ftmscan.com': 'FTM',
|
1501
|
-
'explorer.gochain.io': 'GO',
|
1502
|
-
'block.gxb.io': 'GXS',
|
1503
|
-
'hash-hash.info': 'HBAR',
|
1504
|
-
'www.hiveblockexplorer.com': 'HIVE',
|
1505
|
-
'explorer.helium.com': 'HNT',
|
1506
|
-
'tracker.icon.foundation': 'ICX',
|
1507
|
-
'www.iostabc.com': 'IOST',
|
1508
|
-
'explorer.iota.org': 'IOTA',
|
1509
|
-
'iotexscan.io': 'IOTX',
|
1510
|
-
'irishub.iobscan.io': 'IRIS',
|
1511
|
-
'kava.mintscan.io': 'KAVA',
|
1512
|
-
'scope.klaytn.com': 'KLAY',
|
1513
|
-
'kmdexplorer.io': 'KMD',
|
1514
|
-
'kusama.subscan.io': 'KSM',
|
1515
|
-
'explorer.lto.network': 'LTO',
|
1516
|
-
'polygonscan.com': 'POLYGON',
|
1517
|
-
'explorer.ont.io': 'ONT',
|
1518
|
-
'minaexplorer.com': 'MINA',
|
1519
|
-
'nanolooker.com': 'NANO',
|
1520
|
-
'explorer.nebulas.io': 'NAS',
|
1521
|
-
'explorer.nbs.plus': 'NBS',
|
1522
|
-
'explorer.nebl.io': 'NEBL',
|
1523
|
-
'nulscan.io': 'NULS',
|
1524
|
-
'nxscan.com': 'NXS',
|
1525
|
-
'explorer.harmony.one': 'ONE',
|
1526
|
-
'explorer.poa.network': 'POA',
|
1527
|
-
'qtum.info': 'QTUM',
|
1528
|
-
'explorer.rsk.co': 'RSK',
|
1529
|
-
'www.oasisscan.com': 'ROSE',
|
1530
|
-
'ravencoin.network': 'RVN',
|
1531
|
-
'sc.tokenview.com': 'SC',
|
1532
|
-
'secretnodes.com': 'SCRT',
|
1533
|
-
'explorer.skycoin.com': 'SKY',
|
1534
|
-
'steemscan.com': 'STEEM',
|
1535
|
-
'explorer.stacks.co': 'STX',
|
1536
|
-
'www.thetascan.io': 'THETA',
|
1537
|
-
'scan.tomochain.com': 'TOMO',
|
1538
|
-
'explore.vechain.org': 'VET',
|
1539
|
-
'explorer.vite.net': 'VITE',
|
1540
|
-
'www.wanscan.org': 'WAN',
|
1541
|
-
'wavesexplorer.com': 'WAVES',
|
1542
|
-
'wax.eosx.io': 'WAXP',
|
1543
|
-
'waltonchain.pro': 'WTC',
|
1544
|
-
'chain.nem.ninja': 'XEM',
|
1545
|
-
'verge-blockchain.info': 'XVG',
|
1546
|
-
'explorer.yoyow.org': 'YOYOW',
|
1547
|
-
'explorer.zcha.in': 'ZEC',
|
1548
|
-
'explorer.zensystem.io': 'ZEN',
|
1549
1362
|
},
|
1550
1363
|
'impliedNetworks': {
|
1551
1364
|
'ETH': {'ERC20': 'ETH'},
|
@@ -8707,39 +8520,19 @@ class binance(Exchange, ImplicitAPI):
|
|
8707
8520
|
def parse_deposit_address(self, response, currency: Currency = None) -> DepositAddress:
|
8708
8521
|
#
|
8709
8522
|
# {
|
8710
|
-
# "
|
8523
|
+
# "coin": "XRP",
|
8711
8524
|
# "address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
|
8712
8525
|
# "tag": "108618262",
|
8713
|
-
# "
|
8714
|
-
# "coin": "XRP",
|
8715
|
-
# "address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
|
8716
|
-
# "tag": "108618262",
|
8717
|
-
# "url": "https://bithomp.com/explorer/rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh"
|
8718
|
-
# }
|
8526
|
+
# "url": "https://bithomp.com/explorer/rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh"
|
8719
8527
|
# }
|
8720
8528
|
#
|
8721
|
-
|
8722
|
-
url = self.safe_string(info, 'url')
|
8529
|
+
url = self.safe_string(response, 'url')
|
8723
8530
|
address = self.safe_string(response, 'address')
|
8724
8531
|
currencyId = self.safe_string(response, 'currency')
|
8725
8532
|
code = self.safe_currency_code(currencyId, currency)
|
8726
|
-
|
8727
|
-
|
8728
|
-
|
8729
|
-
parts = url.split('/')
|
8730
|
-
topLevel = self.safe_string(parts, 2)
|
8731
|
-
if (topLevel == 'blockchair.com') or (topLevel == 'viewblock.io'):
|
8732
|
-
subLevel = self.safe_string(parts, 3)
|
8733
|
-
if subLevel is not None:
|
8734
|
-
topLevel = topLevel + '/' + subLevel
|
8735
|
-
impliedNetwork = self.safe_string(reverseNetworks, topLevel)
|
8736
|
-
impliedNetworks = self.safe_dict(self.options, 'impliedNetworks', {
|
8737
|
-
'ETH': {'ERC20': 'ETH'},
|
8738
|
-
'TRX': {'TRC20': 'TRX'},
|
8739
|
-
})
|
8740
|
-
if code in impliedNetworks:
|
8741
|
-
conversion = self.safe_dict(impliedNetworks, code, {})
|
8742
|
-
impliedNetwork = self.safe_string(conversion, impliedNetwork, impliedNetwork)
|
8533
|
+
# deposit-address endpoint provides only network url(not network ID/CODE)
|
8534
|
+
# so we should map the url to network(their data is inside currencies)
|
8535
|
+
networkCode = self.get_network_code_by_network_url(code, url)
|
8743
8536
|
tag = self.safe_string(response, 'tag', '')
|
8744
8537
|
if len(tag) == 0:
|
8745
8538
|
tag = None
|
@@ -8747,7 +8540,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8747
8540
|
return {
|
8748
8541
|
'info': response,
|
8749
8542
|
'currency': code,
|
8750
|
-
'network':
|
8543
|
+
'network': networkCode,
|
8751
8544
|
'address': address,
|
8752
8545
|
'tag': tag,
|
8753
8546
|
}
|
@@ -11295,6 +11088,35 @@ class binance(Exchange, ImplicitAPI):
|
|
11295
11088
|
}
|
11296
11089
|
return self.safe_string(ledgerType, type, type)
|
11297
11090
|
|
11091
|
+
def get_network_code_by_network_url(self, currencyCode: str, depositUrl: Str = None) -> Str:
|
11092
|
+
# depositUrl is like : https://bscscan.com/address/0xEF238AB229342849..
|
11093
|
+
if depositUrl is None:
|
11094
|
+
return None
|
11095
|
+
networkCode = None
|
11096
|
+
currency = self.currency(currencyCode)
|
11097
|
+
networks = self.safe_dict(currency, 'networks', {})
|
11098
|
+
networkCodes = list(networks.keys())
|
11099
|
+
for i in range(0, len(networkCodes)):
|
11100
|
+
currentNetworkCode = networkCodes[i]
|
11101
|
+
info = self.safe_dict(networks[currentNetworkCode], 'info', {})
|
11102
|
+
siteUrl = self.safe_string(info, 'contractAddressUrl')
|
11103
|
+
# check if url matches the field's value
|
11104
|
+
if siteUrl is not None and depositUrl.startswith(self.get_base_domain_from_url(siteUrl)):
|
11105
|
+
networkCode = currentNetworkCode
|
11106
|
+
return networkCode
|
11107
|
+
|
11108
|
+
def get_base_domain_from_url(self, url: Str) -> Str:
|
11109
|
+
if url is None:
|
11110
|
+
return None
|
11111
|
+
urlParts = url.split('/')
|
11112
|
+
scheme = self.safe_string(urlParts, 0)
|
11113
|
+
if scheme is None:
|
11114
|
+
return None
|
11115
|
+
domain = self.safe_string(urlParts, 2)
|
11116
|
+
if domain is None:
|
11117
|
+
return None
|
11118
|
+
return scheme + '//' + domain + '/'
|
11119
|
+
|
11298
11120
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
11299
11121
|
urls = self.urls
|
11300
11122
|
if not (api in urls['api']):
|
ccxt/async_support/bitget.py
CHANGED
@@ -3219,7 +3219,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3219
3219
|
else:
|
3220
3220
|
request['businessType'] = 'spot'
|
3221
3221
|
else:
|
3222
|
-
request['businessType'] = '
|
3222
|
+
request['businessType'] = 'mix'
|
3223
3223
|
response = await self.privateCommonGetV2CommonTradeRate(self.extend(request, params))
|
3224
3224
|
#
|
3225
3225
|
# {
|