ccxt 4.4.7__py2.py3-none-any.whl → 4.4.9__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/bigone.py +1 -1
- ccxt/abstract/binance.py +1 -0
- ccxt/abstract/binancecoinm.py +1 -0
- ccxt/abstract/binanceus.py +1 -0
- ccxt/abstract/binanceusdm.py +1 -0
- ccxt/abstract/bybit.py +5 -0
- ccxt/abstract/kucoinfutures.py +5 -0
- ccxt/abstract/okx.py +2 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bigone.py +35 -86
- ccxt/async_support/binance.py +49 -12
- ccxt/async_support/bingx.py +7 -2
- ccxt/async_support/bitget.py +3 -0
- ccxt/async_support/bybit.py +354 -2
- ccxt/async_support/gate.py +30 -1
- ccxt/async_support/htx.py +22 -0
- ccxt/async_support/kucoin.py +1 -0
- ccxt/async_support/kucoinfutures.py +152 -3
- ccxt/async_support/okx.py +4 -0
- ccxt/base/exchange.py +1 -1
- ccxt/bigone.py +35 -86
- ccxt/binance.py +49 -12
- ccxt/bingx.py +7 -2
- ccxt/bitget.py +3 -0
- ccxt/bybit.py +354 -2
- ccxt/gate.py +30 -1
- ccxt/htx.py +22 -0
- ccxt/kucoin.py +1 -0
- ccxt/kucoinfutures.py +152 -3
- ccxt/okx.py +4 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +3 -3
- ccxt/pro/bitmart.py +72 -0
- ccxt/pro/bitvavo.py +87 -2
- ccxt/pro/blofin.py +59 -0
- ccxt/pro/hitbtc.py +112 -44
- ccxt/pro/hollaex.py +5 -0
- ccxt/pro/okx.py +12 -1
- ccxt/pro/p2b.py +33 -2
- ccxt/pro/whitebit.py +29 -1
- {ccxt-4.4.7.dist-info → ccxt-4.4.9.dist-info}/METADATA +4 -4
- {ccxt-4.4.7.dist-info → ccxt-4.4.9.dist-info}/RECORD +47 -47
- {ccxt-4.4.7.dist-info → ccxt-4.4.9.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.7.dist-info → ccxt-4.4.9.dist-info}/WHEEL +0 -0
- {ccxt-4.4.7.dist-info → ccxt-4.4.9.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
ccxt/abstract/bigone.py
CHANGED
@@ -42,4 +42,4 @@ class ImplicitAPI:
|
|
42
42
|
contractprivate_put_positions_symbol_risk_limit = contractPrivatePutPositionsSymbolRiskLimit = Entry('positions/{symbol}/risk-limit', 'contractPrivate', 'PUT', {})
|
43
43
|
contractprivate_delete_orders_id = contractPrivateDeleteOrdersId = Entry('orders/{id}', 'contractPrivate', 'DELETE', {})
|
44
44
|
contractprivate_delete_orders_batch = contractPrivateDeleteOrdersBatch = Entry('orders/batch', 'contractPrivate', 'DELETE', {})
|
45
|
-
|
45
|
+
webexchange_get_v3_assets = webExchangeGetV3Assets = Entry('v3/assets', 'webExchange', 'GET', {})
|
ccxt/abstract/binance.py
CHANGED
@@ -702,6 +702,7 @@ class ImplicitAPI:
|
|
702
702
|
papi_post_repay_futures_negative_balance = papiPostRepayFuturesNegativeBalance = Entry('repay-futures-negative-balance', 'papi', 'POST', {'cost': 150})
|
703
703
|
papi_post_listenkey = papiPostListenKey = Entry('listenKey', 'papi', 'POST', {'cost': 1})
|
704
704
|
papi_post_asset_collection = papiPostAssetCollection = Entry('asset-collection', 'papi', 'POST', {'cost': 3})
|
705
|
+
papi_post_margin_repay_debt = papiPostMarginRepayDebt = Entry('margin/repay-debt', 'papi', 'POST', {'cost': 0.4})
|
705
706
|
papi_put_listenkey = papiPutListenKey = Entry('listenKey', 'papi', 'PUT', {'cost': 1})
|
706
707
|
papi_delete_um_order = papiDeleteUmOrder = Entry('um/order', 'papi', 'DELETE', {'cost': 1})
|
707
708
|
papi_delete_um_conditional_order = papiDeleteUmConditionalOrder = Entry('um/conditional/order', 'papi', 'DELETE', {'cost': 1})
|
ccxt/abstract/binancecoinm.py
CHANGED
@@ -702,6 +702,7 @@ class ImplicitAPI:
|
|
702
702
|
papi_post_repay_futures_negative_balance = papiPostRepayFuturesNegativeBalance = Entry('repay-futures-negative-balance', 'papi', 'POST', {'cost': 150})
|
703
703
|
papi_post_listenkey = papiPostListenKey = Entry('listenKey', 'papi', 'POST', {'cost': 1})
|
704
704
|
papi_post_asset_collection = papiPostAssetCollection = Entry('asset-collection', 'papi', 'POST', {'cost': 3})
|
705
|
+
papi_post_margin_repay_debt = papiPostMarginRepayDebt = Entry('margin/repay-debt', 'papi', 'POST', {'cost': 0.4})
|
705
706
|
papi_put_listenkey = papiPutListenKey = Entry('listenKey', 'papi', 'PUT', {'cost': 1})
|
706
707
|
papi_delete_um_order = papiDeleteUmOrder = Entry('um/order', 'papi', 'DELETE', {'cost': 1})
|
707
708
|
papi_delete_um_conditional_order = papiDeleteUmConditionalOrder = Entry('um/conditional/order', 'papi', 'DELETE', {'cost': 1})
|
ccxt/abstract/binanceus.py
CHANGED
@@ -754,6 +754,7 @@ class ImplicitAPI:
|
|
754
754
|
papi_post_repay_futures_negative_balance = papiPostRepayFuturesNegativeBalance = Entry('repay-futures-negative-balance', 'papi', 'POST', {'cost': 150})
|
755
755
|
papi_post_listenkey = papiPostListenKey = Entry('listenKey', 'papi', 'POST', {'cost': 1})
|
756
756
|
papi_post_asset_collection = papiPostAssetCollection = Entry('asset-collection', 'papi', 'POST', {'cost': 3})
|
757
|
+
papi_post_margin_repay_debt = papiPostMarginRepayDebt = Entry('margin/repay-debt', 'papi', 'POST', {'cost': 0.4})
|
757
758
|
papi_put_listenkey = papiPutListenKey = Entry('listenKey', 'papi', 'PUT', {'cost': 1})
|
758
759
|
papi_delete_um_order = papiDeleteUmOrder = Entry('um/order', 'papi', 'DELETE', {'cost': 1})
|
759
760
|
papi_delete_um_conditional_order = papiDeleteUmConditionalOrder = Entry('um/conditional/order', 'papi', 'DELETE', {'cost': 1})
|
ccxt/abstract/binanceusdm.py
CHANGED
@@ -702,6 +702,7 @@ class ImplicitAPI:
|
|
702
702
|
papi_post_repay_futures_negative_balance = papiPostRepayFuturesNegativeBalance = Entry('repay-futures-negative-balance', 'papi', 'POST', {'cost': 150})
|
703
703
|
papi_post_listenkey = papiPostListenKey = Entry('listenKey', 'papi', 'POST', {'cost': 1})
|
704
704
|
papi_post_asset_collection = papiPostAssetCollection = Entry('asset-collection', 'papi', 'POST', {'cost': 3})
|
705
|
+
papi_post_margin_repay_debt = papiPostMarginRepayDebt = Entry('margin/repay-debt', 'papi', 'POST', {'cost': 0.4})
|
705
706
|
papi_put_listenkey = papiPutListenKey = Entry('listenKey', 'papi', 'PUT', {'cost': 1})
|
706
707
|
papi_delete_um_order = papiDeleteUmOrder = Entry('um/order', 'papi', 'DELETE', {'cost': 1})
|
707
708
|
papi_delete_um_conditional_order = papiDeleteUmConditionalOrder = Entry('um/conditional/order', 'papi', 'DELETE', {'cost': 1})
|
ccxt/abstract/bybit.py
CHANGED
@@ -132,6 +132,9 @@ class ImplicitAPI:
|
|
132
132
|
private_get_v5_account_contract_transaction_log = privateGetV5AccountContractTransactionLog = Entry('v5/account/contract-transaction-log', 'private', 'GET', {'cost': 1})
|
133
133
|
private_get_v5_account_smp_group = privateGetV5AccountSmpGroup = Entry('v5/account/smp-group', 'private', 'GET', {'cost': 1})
|
134
134
|
private_get_v5_account_mmp_state = privateGetV5AccountMmpState = Entry('v5/account/mmp-state', 'private', 'GET', {'cost': 5})
|
135
|
+
private_get_v5_asset_exchange_query_coin_list = privateGetV5AssetExchangeQueryCoinList = Entry('v5/asset/exchange/query-coin-list', 'private', 'GET', {'cost': 0.5})
|
136
|
+
private_get_v5_asset_exchange_convert_result_query = privateGetV5AssetExchangeConvertResultQuery = Entry('v5/asset/exchange/convert-result-query', 'private', 'GET', {'cost': 0.5})
|
137
|
+
private_get_v5_asset_exchange_query_convert_history = privateGetV5AssetExchangeQueryConvertHistory = Entry('v5/asset/exchange/query-convert-history', 'private', 'GET', {'cost': 0.5})
|
135
138
|
private_get_v5_asset_exchange_order_record = privateGetV5AssetExchangeOrderRecord = Entry('v5/asset/exchange/order-record', 'private', 'GET', {'cost': 5})
|
136
139
|
private_get_v5_asset_delivery_record = privateGetV5AssetDeliveryRecord = Entry('v5/asset/delivery-record', 'private', 'GET', {'cost': 5})
|
137
140
|
private_get_v5_asset_settlement_record = privateGetV5AssetSettlementRecord = Entry('v5/asset/settlement-record', 'private', 'GET', {'cost': 5})
|
@@ -270,6 +273,8 @@ class ImplicitAPI:
|
|
270
273
|
private_post_v5_account_set_hedging_mode = privatePostV5AccountSetHedgingMode = Entry('v5/account/set-hedging-mode', 'private', 'POST', {'cost': 5})
|
271
274
|
private_post_v5_account_mmp_modify = privatePostV5AccountMmpModify = Entry('v5/account/mmp-modify', 'private', 'POST', {'cost': 5})
|
272
275
|
private_post_v5_account_mmp_reset = privatePostV5AccountMmpReset = Entry('v5/account/mmp-reset', 'private', 'POST', {'cost': 5})
|
276
|
+
private_post_v5_asset_exchange_quote_apply = privatePostV5AssetExchangeQuoteApply = Entry('v5/asset/exchange/quote-apply', 'private', 'POST', {'cost': 1})
|
277
|
+
private_post_v5_asset_exchange_convert_execute = privatePostV5AssetExchangeConvertExecute = Entry('v5/asset/exchange/convert-execute', 'private', 'POST', {'cost': 1})
|
273
278
|
private_post_v5_asset_transfer_inter_transfer = privatePostV5AssetTransferInterTransfer = Entry('v5/asset/transfer/inter-transfer', 'private', 'POST', {'cost': 50})
|
274
279
|
private_post_v5_asset_transfer_save_transfer_sub_member = privatePostV5AssetTransferSaveTransferSubMember = Entry('v5/asset/transfer/save-transfer-sub-member', 'private', 'POST', {'cost': 150})
|
275
280
|
private_post_v5_asset_transfer_universal_transfer = privatePostV5AssetTransferUniversalTransfer = Entry('v5/asset/transfer/universal-transfer', 'private', 'POST', {'cost': 10})
|
ccxt/abstract/kucoinfutures.py
CHANGED
@@ -194,6 +194,8 @@ class ImplicitAPI:
|
|
194
194
|
futuresprivate_get_trade_fees = futuresPrivateGetTradeFees = Entry('trade-fees', 'futuresPrivate', 'GET', {'cost': 1})
|
195
195
|
futuresprivate_get_history_positions = futuresPrivateGetHistoryPositions = Entry('history-positions', 'futuresPrivate', 'GET', {'cost': 1})
|
196
196
|
futuresprivate_get_getmaxopensize = futuresPrivateGetGetMaxOpenSize = Entry('getMaxOpenSize', 'futuresPrivate', 'GET', {'cost': 1})
|
197
|
+
futuresprivate_get_getcrossuserleverage = futuresPrivateGetGetCrossUserLeverage = Entry('getCrossUserLeverage', 'futuresPrivate', 'GET', {'cost': 1})
|
198
|
+
futuresprivate_get_position_getmarginmode = futuresPrivateGetPositionGetMarginMode = Entry('position/getMarginMode', 'futuresPrivate', 'GET', {'cost': 1})
|
197
199
|
futuresprivate_post_transfer_out = futuresPrivatePostTransferOut = Entry('transfer-out', 'futuresPrivate', 'POST', {'cost': 1})
|
198
200
|
futuresprivate_post_transfer_in = futuresPrivatePostTransferIn = Entry('transfer-in', 'futuresPrivate', 'POST', {'cost': 1})
|
199
201
|
futuresprivate_post_orders = futuresPrivatePostOrders = Entry('orders', 'futuresPrivate', 'POST', {'cost': 1.33})
|
@@ -205,8 +207,11 @@ class ImplicitAPI:
|
|
205
207
|
futuresprivate_post_position_risk_limit_level_change = futuresPrivatePostPositionRiskLimitLevelChange = Entry('position/risk-limit-level/change', 'futuresPrivate', 'POST', {'cost': 1})
|
206
208
|
futuresprivate_post_bullet_private = futuresPrivatePostBulletPrivate = Entry('bullet-private', 'futuresPrivate', 'POST', {'cost': 1})
|
207
209
|
futuresprivate_post_withdrawals = futuresPrivatePostWithdrawals = Entry('withdrawals', 'futuresPrivate', 'POST', {'cost': 1})
|
210
|
+
futuresprivate_post_st_orders = futuresPrivatePostStOrders = Entry('st-orders', 'futuresPrivate', 'POST', {'cost': 1.33})
|
208
211
|
futuresprivate_post_sub_api_key = futuresPrivatePostSubApiKey = Entry('sub/api-key', 'futuresPrivate', 'POST', {'cost': 1})
|
209
212
|
futuresprivate_post_sub_api_key_update = futuresPrivatePostSubApiKeyUpdate = Entry('sub/api-key/update', 'futuresPrivate', 'POST', {'cost': 1})
|
213
|
+
futuresprivate_post_changecrossuserleverage = futuresPrivatePostChangeCrossUserLeverage = Entry('changeCrossUserLeverage', 'futuresPrivate', 'POST', {'cost': 1})
|
214
|
+
futuresprivate_post_position_changemarginmode = futuresPrivatePostPositionChangeMarginMode = Entry('position/changeMarginMode', 'futuresPrivate', 'POST', {'cost': 1})
|
210
215
|
futuresprivate_delete_orders_orderid = futuresPrivateDeleteOrdersOrderId = Entry('orders/{orderId}', 'futuresPrivate', 'DELETE', {'cost': 1})
|
211
216
|
futuresprivate_delete_orders_client_order_clientoid = futuresPrivateDeleteOrdersClientOrderClientOid = Entry('orders/client-order/{clientOid}', 'futuresPrivate', 'DELETE', {'cost': 1})
|
212
217
|
futuresprivate_delete_orders = futuresPrivateDeleteOrders = Entry('orders', 'futuresPrivate', 'DELETE', {'cost': 4.44})
|
ccxt/abstract/okx.py
CHANGED
@@ -79,6 +79,7 @@ class ImplicitAPI:
|
|
79
79
|
public_get_copytrading_public_preference_currency = publicGetCopytradingPublicPreferenceCurrency = Entry('copytrading/public-preference-currency', 'public', 'GET', {'cost': 4})
|
80
80
|
public_get_copytrading_public_current_subpositions = publicGetCopytradingPublicCurrentSubpositions = Entry('copytrading/public-current-subpositions', 'public', 'GET', {'cost': 4})
|
81
81
|
public_get_copytrading_public_subpositions_history = publicGetCopytradingPublicSubpositionsHistory = Entry('copytrading/public-subpositions-history', 'public', 'GET', {'cost': 4})
|
82
|
+
public_get_support_announcements_types = publicGetSupportAnnouncementsTypes = Entry('support/announcements-types', 'public', 'GET', {'cost': 20})
|
82
83
|
private_get_rfq_counterparties = privateGetRfqCounterparties = Entry('rfq/counterparties', 'private', 'GET', {'cost': 4})
|
83
84
|
private_get_rfq_maker_instrument_settings = privateGetRfqMakerInstrumentSettings = Entry('rfq/maker-instrument-settings', 'private', 'GET', {'cost': 4})
|
84
85
|
private_get_rfq_mmp_config = privateGetRfqMmpConfig = Entry('rfq/mmp-config', 'private', 'GET', {'cost': 4})
|
@@ -208,6 +209,7 @@ class ImplicitAPI:
|
|
208
209
|
private_get_broker_fd_if_rebate = privateGetBrokerFdIfRebate = Entry('broker/fd/if-rebate', 'private', 'GET', {'cost': 5})
|
209
210
|
private_get_affiliate_invitee_detail = privateGetAffiliateInviteeDetail = Entry('affiliate/invitee/detail', 'private', 'GET', {'cost': 1})
|
210
211
|
private_get_users_partner_if_rebate = privateGetUsersPartnerIfRebate = Entry('users/partner/if-rebate', 'private', 'GET', {'cost': 1})
|
212
|
+
private_get_support_announcements = privateGetSupportAnnouncements = Entry('support/announcements', 'private', 'GET', {'cost': 4})
|
211
213
|
private_post_rfq_create_rfq = privatePostRfqCreateRfq = Entry('rfq/create-rfq', 'private', 'POST', {'cost': 4})
|
212
214
|
private_post_rfq_cancel_rfq = privatePostRfqCancelRfq = Entry('rfq/cancel-rfq', 'private', 'POST', {'cost': 4})
|
213
215
|
private_post_rfq_cancel_batch_rfqs = privatePostRfqCancelBatchRfqs = Entry('rfq/cancel-batch-rfqs', 'private', 'POST', {'cost': 10})
|
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/bigone.py
CHANGED
@@ -168,7 +168,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
168
168
|
},
|
169
169
|
'webExchange': {
|
170
170
|
'get': [
|
171
|
-
'
|
171
|
+
'v3/assets',
|
172
172
|
],
|
173
173
|
},
|
174
174
|
},
|
@@ -347,7 +347,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
347
347
|
:returns dict: an associative dictionary of currencies
|
348
348
|
"""
|
349
349
|
# we use undocumented link(possible, less informative alternative is : https://big.one/api/uc/v3/assets/accounts)
|
350
|
-
data = await self.fetch_web_endpoint('fetchCurrencies', '
|
350
|
+
data = await self.fetch_web_endpoint('fetchCurrencies', 'webExchangeGetV3Assets', True)
|
351
351
|
if data is None:
|
352
352
|
return None
|
353
353
|
#
|
@@ -356,91 +356,40 @@ class bigone(Exchange, ImplicitAPI):
|
|
356
356
|
# "message": "",
|
357
357
|
# "data": [
|
358
358
|
# {
|
359
|
-
#
|
360
|
-
#
|
361
|
-
#
|
362
|
-
#
|
363
|
-
#
|
364
|
-
#
|
365
|
-
#
|
366
|
-
#
|
367
|
-
#
|
368
|
-
#
|
369
|
-
#
|
370
|
-
#
|
359
|
+
# "uuid": "17082d1c-0195-4fb6-8779-2cdbcb9eeb3c",
|
360
|
+
# "symbol": "USDT",
|
361
|
+
# "name": "TetherUS",
|
362
|
+
# "scale": 12,
|
363
|
+
# "is_fiat": False,
|
364
|
+
# "is_transfer_enabled": True,
|
365
|
+
# "transfer_scale": 12,
|
366
|
+
# "binding_gateways": [
|
367
|
+
# {
|
368
|
+
# "guid": "07efc37f-d1ec-4bc9-8339-a745256ea2ba",
|
369
|
+
# "is_deposit_enabled": True,
|
370
|
+
# "gateway_name": "Ethereum",
|
371
|
+
# "min_withdrawal_amount": "0.000001",
|
372
|
+
# "withdrawal_fee": "5.71",
|
373
|
+
# "is_withdrawal_enabled": True,
|
374
|
+
# "min_deposit_amount": "0.000001",
|
375
|
+
# "is_memo_required": False,
|
376
|
+
# "withdrawal_scale": 6,
|
377
|
+
# "scale": 12
|
378
|
+
# },
|
379
|
+
# {
|
380
|
+
# "guid": "4e387a9a-a480-40a3-b4ae-ed1773c2db5a",
|
381
|
+
# "is_deposit_enabled": True,
|
382
|
+
# "gateway_name": "BinanceSmartChain",
|
383
|
+
# "min_withdrawal_amount": "10",
|
384
|
+
# "withdrawal_fee": "5",
|
385
|
+
# "is_withdrawal_enabled": False,
|
386
|
+
# "min_deposit_amount": "1",
|
387
|
+
# "is_memo_required": False,
|
388
|
+
# "withdrawal_scale": 8,
|
389
|
+
# "scale": 12
|
390
|
+
# }
|
391
|
+
# ]
|
371
392
|
# },
|
372
|
-
# "info_link": null,
|
373
|
-
# "scale": "12",
|
374
|
-
# "default_gateway": ..., # one object from "gateways"
|
375
|
-
# "gateways": [
|
376
|
-
# {
|
377
|
-
# "uuid": "f0fa5a85-7f65-428a-b7b7-13aad55c2837",
|
378
|
-
# "name": "Mixin",
|
379
|
-
# "kind": "CHAIN",
|
380
|
-
# "required_confirmations": "0",
|
381
|
-
# },
|
382
|
-
# {
|
383
|
-
# "uuid": "b75446c6-1446-4c8d-b3d1-39f385b0a926",
|
384
|
-
# "name": "Ethereum",
|
385
|
-
# "kind": "CHAIN",
|
386
|
-
# "required_confirmations": "18",
|
387
|
-
# },
|
388
|
-
# {
|
389
|
-
# "uuid": "fe9b1b0b-e55c-4017-b5ce-16f524df5fc0",
|
390
|
-
# "name": "Tron",
|
391
|
-
# "kind": "CHAIN",
|
392
|
-
# "required_confirmations": "1",
|
393
|
-
# },
|
394
|
-
# ...
|
395
|
-
# ],
|
396
|
-
# "payments": [],
|
397
|
-
# "uuid": "17082d1c-0195-4fb6-8779-2cdbcb9eeb3c",
|
398
|
-
# "binding_gateways": [
|
399
|
-
# {
|
400
|
-
# "guid": "07efc37f-d1ec-4bc9-8339-a745256ea2ba",
|
401
|
-
# "contract_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
|
402
|
-
# "is_deposit_enabled": True,
|
403
|
-
# "display_name": "Ethereum(ERC20)",
|
404
|
-
# "gateway_name": "Ethereum",
|
405
|
-
# "min_withdrawal_amount": "0.000001",
|
406
|
-
# "min_internal_withdrawal_amount": "0.00000001",
|
407
|
-
# "withdrawal_fee": "14",
|
408
|
-
# "is_withdrawal_enabled": True,
|
409
|
-
# "min_deposit_amount": "0.000001",
|
410
|
-
# "is_memo_required": False,
|
411
|
-
# "withdrawal_scale": "2",
|
412
|
-
# "gateway": {
|
413
|
-
# "uuid": "b75446c6-1446-4c8d-b3d1-39f385b0a926",
|
414
|
-
# "name": "Ethereum",
|
415
|
-
# "kind": "CHAIN",
|
416
|
-
# "required_confirmations": "18",
|
417
|
-
# },
|
418
|
-
# "scale": "12",
|
419
|
-
# },
|
420
|
-
# {
|
421
|
-
# "guid": "b80a4d13-cac7-4319-842d-b33c3bfab8ec",
|
422
|
-
# "contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
|
423
|
-
# "is_deposit_enabled": True,
|
424
|
-
# "display_name": "Tron(TRC20)",
|
425
|
-
# "gateway_name": "Tron",
|
426
|
-
# "min_withdrawal_amount": "0.000001",
|
427
|
-
# "min_internal_withdrawal_amount": "0.00000001",
|
428
|
-
# "withdrawal_fee": "1",
|
429
|
-
# "is_withdrawal_enabled": True,
|
430
|
-
# "min_deposit_amount": "0.000001",
|
431
|
-
# "is_memo_required": False,
|
432
|
-
# "withdrawal_scale": "6",
|
433
|
-
# "gateway": {
|
434
|
-
# "uuid": "fe9b1b0b-e55c-4017-b5ce-16f524df5fc0",
|
435
|
-
# "name": "Tron",
|
436
|
-
# "kind": "CHAIN",
|
437
|
-
# "required_confirmations": "1",
|
438
|
-
# },
|
439
|
-
# "scale": "12",
|
440
|
-
# },
|
441
|
-
# ...
|
442
|
-
# ],
|
443
|
-
# },
|
444
393
|
# ...
|
445
394
|
# ],
|
446
395
|
# }
|
ccxt/async_support/binance.py
CHANGED
@@ -1115,6 +1115,7 @@ class binance(Exchange, ImplicitAPI):
|
|
1115
1115
|
'repay-futures-negative-balance': 150, # Weight(IP): 1500 => cost = 0.1 * 1500 = 150
|
1116
1116
|
'listenKey': 1, # 1
|
1117
1117
|
'asset-collection': 3,
|
1118
|
+
'margin/repay-debt': 0.4, # Weight(Order): 0.4 =>(1000 / (50 * 0.4)) * 60 = 3000
|
1118
1119
|
},
|
1119
1120
|
'put': {
|
1120
1121
|
'listenKey': 1, # 1
|
@@ -1232,6 +1233,7 @@ class binance(Exchange, ImplicitAPI):
|
|
1232
1233
|
],
|
1233
1234
|
'fetchCurrencies': True, # self is a private call and it requires API keys
|
1234
1235
|
# 'fetchTradesMethod': 'publicGetAggTrades', # publicGetTrades, publicGetHistoricalTrades, eapiPublicGetTrades
|
1236
|
+
# 'repayCrossMarginMethod': 'papiPostRepayLoan', # papiPostMarginRepayDebt
|
1235
1237
|
'defaultTimeInForce': 'GTC', # 'GTC' = Good To Cancel(default), 'IOC' = Immediate Or Cancel
|
1236
1238
|
'defaultType': 'spot', # 'spot', 'future', 'margin', 'delivery', 'option'
|
1237
1239
|
'defaultSubType': None, # 'linear', 'inverse'
|
@@ -2879,7 +2881,7 @@ class binance(Exchange, ImplicitAPI):
|
|
2879
2881
|
res = self.safe_value(results, i)
|
2880
2882
|
if fetchMargins and isinstance(res, list):
|
2881
2883
|
keysList = list(self.index_by(res, 'symbol').keys())
|
2882
|
-
length = (self.options['crossMarginPairsData'])
|
2884
|
+
length = len(self.options['crossMarginPairsData'])
|
2883
2885
|
# first one is the cross-margin promise
|
2884
2886
|
if length == 0:
|
2885
2887
|
self.options['crossMarginPairsData'] = keysList
|
@@ -11242,10 +11244,13 @@ class binance(Exchange, ImplicitAPI):
|
|
11242
11244
|
repay borrowed margin and interest
|
11243
11245
|
:see: https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Repay
|
11244
11246
|
:see: https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
11247
|
+
:see: https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Repay-Debt
|
11245
11248
|
:param str code: unified currency code of the currency to repay
|
11246
11249
|
:param float amount: the amount to repay
|
11247
11250
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
11248
11251
|
:param boolean [params.portfolioMargin]: set to True if you would like to repay margin in a portfolio margin account
|
11252
|
+
:param str [params.repayCrossMarginMethod]: *portfolio margin only* 'papiPostRepayLoan'(default), 'papiPostMarginRepayDebt'(alternative)
|
11253
|
+
:param str [params.specifyRepayAssets]: *portfolio margin papiPostMarginRepayDebt only* specific asset list to repay debt
|
11249
11254
|
:returns dict: a `margin loan structure <https://docs.ccxt.com/#/?id=margin-loan-structure>`
|
11250
11255
|
"""
|
11251
11256
|
await self.load_markets()
|
@@ -11258,17 +11263,37 @@ class binance(Exchange, ImplicitAPI):
|
|
11258
11263
|
isPortfolioMargin = None
|
11259
11264
|
isPortfolioMargin, params = self.handle_option_and_params_2(params, 'repayCrossMargin', 'papi', 'portfolioMargin', False)
|
11260
11265
|
if isPortfolioMargin:
|
11261
|
-
|
11266
|
+
method = None
|
11267
|
+
method, params = self.handle_option_and_params_2(params, 'repayCrossMargin', 'repayCrossMarginMethod', 'method')
|
11268
|
+
if method == 'papiPostMarginRepayDebt':
|
11269
|
+
response = await self.papiPostMarginRepayDebt(self.extend(request, params))
|
11270
|
+
#
|
11271
|
+
# {
|
11272
|
+
# "asset": "USDC",
|
11273
|
+
# "amount": 10,
|
11274
|
+
# "specifyRepayAssets": null,
|
11275
|
+
# "updateTime": 1727170761267,
|
11276
|
+
# "success": True
|
11277
|
+
# }
|
11278
|
+
#
|
11279
|
+
else:
|
11280
|
+
response = await self.papiPostRepayLoan(self.extend(request, params))
|
11281
|
+
#
|
11282
|
+
# {
|
11283
|
+
# "tranId": 108988250265,
|
11284
|
+
# "clientTag":""
|
11285
|
+
# }
|
11286
|
+
#
|
11262
11287
|
else:
|
11263
11288
|
request['isIsolated'] = 'FALSE'
|
11264
11289
|
request['type'] = 'REPAY'
|
11265
11290
|
response = await self.sapiPostMarginBorrowRepay(self.extend(request, params))
|
11266
|
-
|
11267
|
-
|
11268
|
-
|
11269
|
-
|
11270
|
-
|
11271
|
-
|
11291
|
+
#
|
11292
|
+
# {
|
11293
|
+
# "tranId": 108988250265,
|
11294
|
+
# "clientTag":""
|
11295
|
+
# }
|
11296
|
+
#
|
11272
11297
|
return self.parse_margin_loan(response, currency)
|
11273
11298
|
|
11274
11299
|
async def repay_isolated_margin(self, symbol: str, code: str, amount, params={}):
|
@@ -11370,13 +11395,25 @@ class binance(Exchange, ImplicitAPI):
|
|
11370
11395
|
# "clientTag":""
|
11371
11396
|
# }
|
11372
11397
|
#
|
11398
|
+
# repayCrossMargin alternative endpoint
|
11399
|
+
#
|
11400
|
+
# {
|
11401
|
+
# "asset": "USDC",
|
11402
|
+
# "amount": 10,
|
11403
|
+
# "specifyRepayAssets": null,
|
11404
|
+
# "updateTime": 1727170761267,
|
11405
|
+
# "success": True
|
11406
|
+
# }
|
11407
|
+
#
|
11408
|
+
currencyId = self.safe_string(info, 'asset')
|
11409
|
+
timestamp = self.safe_integer(info, 'updateTime')
|
11373
11410
|
return {
|
11374
11411
|
'id': self.safe_integer(info, 'tranId'),
|
11375
|
-
'currency': self.safe_currency_code(
|
11376
|
-
'amount':
|
11412
|
+
'currency': self.safe_currency_code(currencyId, currency),
|
11413
|
+
'amount': self.safe_number(info, 'amount'),
|
11377
11414
|
'symbol': None,
|
11378
|
-
'timestamp':
|
11379
|
-
'datetime':
|
11415
|
+
'timestamp': timestamp,
|
11416
|
+
'datetime': self.iso8601(timestamp),
|
11380
11417
|
'info': info,
|
11381
11418
|
}
|
11382
11419
|
|
ccxt/async_support/bingx.py
CHANGED
@@ -655,7 +655,12 @@ class bingx(Exchange, ImplicitAPI):
|
|
655
655
|
# "maxNotional": 20000,
|
656
656
|
# "status": 1,
|
657
657
|
# "tickSize": 0.000001,
|
658
|
-
# "stepSize": 1
|
658
|
+
# "stepSize": 1,
|
659
|
+
# "apiStateSell": True,
|
660
|
+
# "apiStateBuy": True,
|
661
|
+
# "timeOnline": 0,
|
662
|
+
# "offTime": 0,
|
663
|
+
# "maintainTime": 0
|
659
664
|
# },
|
660
665
|
# ...
|
661
666
|
# ]
|
@@ -759,7 +764,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
759
764
|
isActive = False
|
760
765
|
if (self.safe_string(market, 'apiStateOpen') == 'true') and (self.safe_string(market, 'apiStateClose') == 'true'):
|
761
766
|
isActive = True # swap active
|
762
|
-
elif self.safe_bool(market, 'apiStateSell') and self.safe_bool(market, 'apiStateBuy'):
|
767
|
+
elif self.safe_bool(market, 'apiStateSell') and self.safe_bool(market, 'apiStateBuy') and (self.safe_number(market, 'status') == 1):
|
763
768
|
isActive = True # spot active
|
764
769
|
isInverse = None if (spot) else checkIsInverse
|
765
770
|
isLinear = None if (spot) else checkIsLinear
|
ccxt/async_support/bitget.py
CHANGED