ccxt 4.4.88__py2.py3-none-any.whl → 4.4.90__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/bitget.py +58 -0
- ccxt/abstract/bitrue.py +65 -65
- ccxt/abstract/cryptocom.py +2 -0
- ccxt/abstract/luno.py +1 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +1 -1
- ccxt/async_support/bingx.py +55 -29
- ccxt/async_support/bitget.py +469 -147
- ccxt/async_support/bitrue.py +72 -66
- ccxt/async_support/bitvavo.py +34 -0
- ccxt/async_support/btcalpha.py +35 -0
- ccxt/async_support/btcbox.py +35 -0
- ccxt/async_support/btcmarkets.py +35 -0
- ccxt/async_support/btcturk.py +35 -0
- ccxt/async_support/bybit.py +9 -3
- ccxt/async_support/coinbase.py +1 -3
- ccxt/async_support/cryptocom.py +49 -0
- ccxt/async_support/delta.py +2 -2
- ccxt/async_support/digifinex.py +39 -99
- ccxt/async_support/gate.py +12 -5
- ccxt/async_support/hashkey.py +15 -28
- ccxt/async_support/hollaex.py +27 -22
- ccxt/async_support/kraken.py +28 -49
- ccxt/async_support/luno.py +87 -1
- ccxt/async_support/okx.py +2 -1
- ccxt/async_support/phemex.py +16 -8
- ccxt/async_support/tradeogre.py +3 -3
- ccxt/async_support/xt.py +1 -1
- ccxt/base/exchange.py +13 -4
- ccxt/binance.py +1 -1
- ccxt/bingx.py +55 -29
- ccxt/bitget.py +469 -147
- ccxt/bitrue.py +72 -66
- ccxt/bitvavo.py +34 -0
- ccxt/btcalpha.py +35 -0
- ccxt/btcbox.py +35 -0
- ccxt/btcmarkets.py +35 -0
- ccxt/btcturk.py +35 -0
- ccxt/bybit.py +9 -3
- ccxt/coinbase.py +1 -3
- ccxt/cryptocom.py +49 -0
- ccxt/delta.py +2 -2
- ccxt/digifinex.py +39 -99
- ccxt/gate.py +12 -5
- ccxt/hashkey.py +15 -28
- ccxt/hollaex.py +27 -22
- ccxt/kraken.py +27 -49
- ccxt/luno.py +87 -1
- ccxt/okx.py +2 -1
- ccxt/phemex.py +16 -8
- ccxt/pro/__init__.py +1 -127
- ccxt/pro/coinbase.py +2 -0
- ccxt/pro/cryptocom.py +27 -0
- ccxt/pro/kraken.py +3 -9
- ccxt/tradeogre.py +3 -3
- ccxt/xt.py +1 -1
- {ccxt-4.4.88.dist-info → ccxt-4.4.90.dist-info}/METADATA +62 -20
- {ccxt-4.4.88.dist-info → ccxt-4.4.90.dist-info}/RECORD +63 -63
- {ccxt-4.4.88.dist-info → ccxt-4.4.90.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.88.dist-info → ccxt-4.4.90.dist-info}/WHEEL +0 -0
- {ccxt-4.4.88.dist-info → ccxt-4.4.90.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
ccxt/abstract/bitget.py
CHANGED
@@ -78,6 +78,20 @@ class ImplicitAPI:
|
|
78
78
|
public_margin_get_v2_margin_market_long_short_ratio = publicMarginGetV2MarginMarketLongShortRatio = Entry('v2/margin/market/long-short-ratio', ['public', 'margin'], 'GET', {'cost': 20})
|
79
79
|
public_earn_get_v2_earn_loan_public_coininfos = publicEarnGetV2EarnLoanPublicCoinInfos = Entry('v2/earn/loan/public/coinInfos', ['public', 'earn'], 'GET', {'cost': 2})
|
80
80
|
public_earn_get_v2_earn_loan_public_hour_interest = publicEarnGetV2EarnLoanPublicHourInterest = Entry('v2/earn/loan/public/hour-interest', ['public', 'earn'], 'GET', {'cost': 2})
|
81
|
+
public_uta_get_v3_market_instruments = publicUtaGetV3MarketInstruments = Entry('v3/market/instruments', ['public', 'uta'], 'GET', {'cost': 1})
|
82
|
+
public_uta_get_v3_market_tickers = publicUtaGetV3MarketTickers = Entry('v3/market/tickers', ['public', 'uta'], 'GET', {'cost': 1})
|
83
|
+
public_uta_get_v3_market_orderbook = publicUtaGetV3MarketOrderbook = Entry('v3/market/orderbook', ['public', 'uta'], 'GET', {'cost': 1})
|
84
|
+
public_uta_get_v3_market_fills = publicUtaGetV3MarketFills = Entry('v3/market/fills', ['public', 'uta'], 'GET', {'cost': 1})
|
85
|
+
public_uta_get_v3_market_open_interest = publicUtaGetV3MarketOpenInterest = Entry('v3/market/open-interest', ['public', 'uta'], 'GET', {'cost': 1})
|
86
|
+
public_uta_get_v3_market_candles = publicUtaGetV3MarketCandles = Entry('v3/market/candles', ['public', 'uta'], 'GET', {'cost': 1})
|
87
|
+
public_uta_get_v3_market_history_candles = publicUtaGetV3MarketHistoryCandles = Entry('v3/market/history-candles', ['public', 'uta'], 'GET', {'cost': 1})
|
88
|
+
public_uta_get_v3_market_current_fund_rate = publicUtaGetV3MarketCurrentFundRate = Entry('v3/market/current-fund-rate', ['public', 'uta'], 'GET', {'cost': 1})
|
89
|
+
public_uta_get_v3_market_history_fund_rate = publicUtaGetV3MarketHistoryFundRate = Entry('v3/market/history-fund-rate', ['public', 'uta'], 'GET', {'cost': 1})
|
90
|
+
public_uta_get_v3_market_risk_reserve = publicUtaGetV3MarketRiskReserve = Entry('v3/market/risk-reserve', ['public', 'uta'], 'GET', {'cost': 1})
|
91
|
+
public_uta_get_v3_market_discount_rate = publicUtaGetV3MarketDiscountRate = Entry('v3/market/discount-rate', ['public', 'uta'], 'GET', {'cost': 1})
|
92
|
+
public_uta_get_v3_market_margin_loans = publicUtaGetV3MarketMarginLoans = Entry('v3/market/margin-loans', ['public', 'uta'], 'GET', {'cost': 1})
|
93
|
+
public_uta_get_v3_market_position_tier = publicUtaGetV3MarketPositionTier = Entry('v3/market/position-tier', ['public', 'uta'], 'GET', {'cost': 1})
|
94
|
+
public_uta_get_v3_market_oi_limit = publicUtaGetV3MarketOiLimit = Entry('v3/market/oi-limit', ['public', 'uta'], 'GET', {'cost': 2})
|
81
95
|
private_spot_get_spot_v1_wallet_deposit_address = privateSpotGetSpotV1WalletDepositAddress = Entry('spot/v1/wallet/deposit-address', ['private', 'spot'], 'GET', {'cost': 4})
|
82
96
|
private_spot_get_spot_v1_wallet_withdrawal_list = privateSpotGetSpotV1WalletWithdrawalList = Entry('spot/v1/wallet/withdrawal-list', ['private', 'spot'], 'GET', {'cost': 1})
|
83
97
|
private_spot_get_spot_v1_wallet_deposit_list = privateSpotGetSpotV1WalletDepositList = Entry('spot/v1/wallet/deposit-list', ['private', 'spot'], 'GET', {'cost': 1})
|
@@ -509,3 +523,47 @@ class ImplicitAPI:
|
|
509
523
|
private_earn_post_v2_earn_loan_repay = privateEarnPostV2EarnLoanRepay = Entry('v2/earn/loan/repay', ['private', 'earn'], 'POST', {'cost': 2})
|
510
524
|
private_earn_post_v2_earn_loan_revise_pledge = privateEarnPostV2EarnLoanRevisePledge = Entry('v2/earn/loan/revise-pledge', ['private', 'earn'], 'POST', {'cost': 2})
|
511
525
|
private_common_get_v2_common_trade_rate = privateCommonGetV2CommonTradeRate = Entry('v2/common/trade-rate', ['private', 'common'], 'GET', {'cost': 2})
|
526
|
+
private_uta_get_v3_account_assets = privateUtaGetV3AccountAssets = Entry('v3/account/assets', ['private', 'uta'], 'GET', {'cost': 1})
|
527
|
+
private_uta_get_v3_account_settings = privateUtaGetV3AccountSettings = Entry('v3/account/settings', ['private', 'uta'], 'GET', {'cost': 1})
|
528
|
+
private_uta_get_v3_account_financial_records = privateUtaGetV3AccountFinancialRecords = Entry('v3/account/financial-records', ['private', 'uta'], 'GET', {'cost': 1})
|
529
|
+
private_uta_get_v3_account_repayable_coins = privateUtaGetV3AccountRepayableCoins = Entry('v3/account/repayable-coins', ['private', 'uta'], 'GET', {'cost': 2})
|
530
|
+
private_uta_get_v3_account_payment_coins = privateUtaGetV3AccountPaymentCoins = Entry('v3/account/payment-coins', ['private', 'uta'], 'GET', {'cost': 2})
|
531
|
+
private_uta_get_v3_account_convert_records = privateUtaGetV3AccountConvertRecords = Entry('v3/account/convert-records', ['private', 'uta'], 'GET', {'cost': 1})
|
532
|
+
private_uta_get_v3_account_transferable_coins = privateUtaGetV3AccountTransferableCoins = Entry('v3/account/transferable-coins', ['private', 'uta'], 'GET', {'cost': 2})
|
533
|
+
private_uta_get_v3_account_sub_transfer_record = privateUtaGetV3AccountSubTransferRecord = Entry('v3/account/sub-transfer-record', ['private', 'uta'], 'GET', {'cost': 4})
|
534
|
+
private_uta_get_v3_ins_loan_transfered = privateUtaGetV3InsLoanTransfered = Entry('v3/ins-loan/transfered', ['private', 'uta'], 'GET', {'cost': 6.6667})
|
535
|
+
private_uta_get_v3_ins_loan_symbols = privateUtaGetV3InsLoanSymbols = Entry('v3/ins-loan/symbols', ['private', 'uta'], 'GET', {'cost': 6.6667})
|
536
|
+
private_uta_get_v3_ins_loan_risk_unit = privateUtaGetV3InsLoanRiskUnit = Entry('v3/ins-loan/risk-unit', ['private', 'uta'], 'GET', {'cost': 6.6667})
|
537
|
+
private_uta_get_v3_ins_loan_repaid_history = privateUtaGetV3InsLoanRepaidHistory = Entry('v3/ins-loan/repaid-history', ['private', 'uta'], 'GET', {'cost': 6.6667})
|
538
|
+
private_uta_get_v3_ins_loan_product_infos = privateUtaGetV3InsLoanProductInfos = Entry('v3/ins-loan/product-infos', ['private', 'uta'], 'GET', {'cost': 6.6667})
|
539
|
+
private_uta_get_v3_ins_loan_loan_order = privateUtaGetV3InsLoanLoanOrder = Entry('v3/ins-loan/loan-order', ['private', 'uta'], 'GET', {'cost': 6.6667})
|
540
|
+
private_uta_get_v3_ins_loan_ltv_convert = privateUtaGetV3InsLoanLtvConvert = Entry('v3/ins-loan/ltv-convert', ['private', 'uta'], 'GET', {'cost': 6.6667})
|
541
|
+
private_uta_get_v3_ins_loan_ensure_coins_convert = privateUtaGetV3InsLoanEnsureCoinsConvert = Entry('v3/ins-loan/ensure-coins-convert', ['private', 'uta'], 'GET', {'cost': 6.6667})
|
542
|
+
private_uta_get_v3_position_current_position = privateUtaGetV3PositionCurrentPosition = Entry('v3/position/current-position', ['private', 'uta'], 'GET', {'cost': 1})
|
543
|
+
private_uta_get_v3_position_history_position = privateUtaGetV3PositionHistoryPosition = Entry('v3/position/history-position', ['private', 'uta'], 'GET', {'cost': 1})
|
544
|
+
private_uta_get_v3_trade_order_info = privateUtaGetV3TradeOrderInfo = Entry('v3/trade/order-info', ['private', 'uta'], 'GET', {'cost': 1})
|
545
|
+
private_uta_get_v3_trade_unfilled_orders = privateUtaGetV3TradeUnfilledOrders = Entry('v3/trade/unfilled-orders', ['private', 'uta'], 'GET', {'cost': 1})
|
546
|
+
private_uta_get_v3_trade_history_orders = privateUtaGetV3TradeHistoryOrders = Entry('v3/trade/history-orders', ['private', 'uta'], 'GET', {'cost': 1})
|
547
|
+
private_uta_get_v3_trade_fills = privateUtaGetV3TradeFills = Entry('v3/trade/fills', ['private', 'uta'], 'GET', {'cost': 1})
|
548
|
+
private_uta_get_v3_user_sub_list = privateUtaGetV3UserSubList = Entry('v3/user/sub-list', ['private', 'uta'], 'GET', {'cost': 2})
|
549
|
+
private_uta_get_v3_user_sub_api_list = privateUtaGetV3UserSubApiList = Entry('v3/user/sub-api-list', ['private', 'uta'], 'GET', {'cost': 2})
|
550
|
+
private_uta_post_v3_account_set_leverage = privateUtaPostV3AccountSetLeverage = Entry('v3/account/set-leverage', ['private', 'uta'], 'POST', {'cost': 2})
|
551
|
+
private_uta_post_v3_account_set_hold_mode = privateUtaPostV3AccountSetHoldMode = Entry('v3/account/set-hold-mode', ['private', 'uta'], 'POST', {'cost': 2})
|
552
|
+
private_uta_post_v3_account_repay = privateUtaPostV3AccountRepay = Entry('v3/account/repay', ['private', 'uta'], 'POST', {'cost': 4})
|
553
|
+
private_uta_post_v3_account_transfer = privateUtaPostV3AccountTransfer = Entry('v3/account/transfer', ['private', 'uta'], 'POST', {'cost': 4})
|
554
|
+
private_uta_post_v3_account_sub_transfer = privateUtaPostV3AccountSubTransfer = Entry('v3/account/sub-transfer', ['private', 'uta'], 'POST', {'cost': 4})
|
555
|
+
private_uta_post_v3_account_max_open_available = privateUtaPostV3AccountMaxOpenAvailable = Entry('v3/account/max-open-available', ['private', 'uta'], 'POST', {'cost': 4})
|
556
|
+
private_uta_post_v3_ins_loan_bind_uid = privateUtaPostV3InsLoanBindUid = Entry('v3/ins-loan/bind-uid', ['private', 'uta'], 'POST', {'cost': 6.6667})
|
557
|
+
private_uta_post_v3_trade_place_order = privateUtaPostV3TradePlaceOrder = Entry('v3/trade/place-order', ['private', 'uta'], 'POST', {'cost': 2})
|
558
|
+
private_uta_post_v3_trade_modify_order = privateUtaPostV3TradeModifyOrder = Entry('v3/trade/modify-order', ['private', 'uta'], 'POST', {'cost': 2})
|
559
|
+
private_uta_post_v3_trade_cancel_order = privateUtaPostV3TradeCancelOrder = Entry('v3/trade/cancel-order', ['private', 'uta'], 'POST', {'cost': 2})
|
560
|
+
private_uta_post_v3_trade_place_batch = privateUtaPostV3TradePlaceBatch = Entry('v3/trade/place-batch', ['private', 'uta'], 'POST', {'cost': 4})
|
561
|
+
private_uta_post_v3_trade_batch_modify_order = privateUtaPostV3TradeBatchModifyOrder = Entry('v3/trade/batch-modify-order', ['private', 'uta'], 'POST', {'cost': 2})
|
562
|
+
private_uta_post_v3_trade_cancel_batch = privateUtaPostV3TradeCancelBatch = Entry('v3/trade/cancel-batch', ['private', 'uta'], 'POST', {'cost': 4})
|
563
|
+
private_uta_post_v3_trade_cancel_symbol_order = privateUtaPostV3TradeCancelSymbolOrder = Entry('v3/trade/cancel-symbol-order', ['private', 'uta'], 'POST', {'cost': 4})
|
564
|
+
private_uta_post_v3_trade_close_positions = privateUtaPostV3TradeClosePositions = Entry('v3/trade/close-positions', ['private', 'uta'], 'POST', {'cost': 4})
|
565
|
+
private_uta_post_v3_user_create_sub = privateUtaPostV3UserCreateSub = Entry('v3/user/create-sub', ['private', 'uta'], 'POST', {'cost': 2})
|
566
|
+
private_uta_post_v3_user_freeze_sub = privateUtaPostV3UserFreezeSub = Entry('v3/user/freeze-sub', ['private', 'uta'], 'POST', {'cost': 2})
|
567
|
+
private_uta_post_v3_user_create_sub_api = privateUtaPostV3UserCreateSubApi = Entry('v3/user/create-sub-api', ['private', 'uta'], 'POST', {'cost': 2})
|
568
|
+
private_uta_post_v3_user_update_sub_api = privateUtaPostV3UserUpdateSubApi = Entry('v3/user/update-sub-api', ['private', 'uta'], 'POST', {'cost': 2})
|
569
|
+
private_uta_post_v3_user_delete_sub_api = privateUtaPostV3UserDeleteSubApi = Entry('v3/user/delete-sub-api', ['private', 'uta'], 'POST', {'cost': 2})
|
ccxt/abstract/bitrue.py
CHANGED
@@ -2,71 +2,71 @@ from ccxt.base.types import Entry
|
|
2
2
|
|
3
3
|
|
4
4
|
class ImplicitAPI:
|
5
|
-
spot_kline_public_get_public_json = spotKlinePublicGetPublicJson = Entry('public.json', ['spot', 'kline', 'public'], 'GET', {'cost':
|
6
|
-
spot_kline_public_get_public_currency_json = spotKlinePublicGetPublicCurrencyJson = Entry('public{currency}.json', ['spot', 'kline', 'public'], 'GET', {'cost':
|
7
|
-
spot_v1_public_get_ping = spotV1PublicGetPing = Entry('ping', ['spot', 'v1', 'public'], 'GET', {'cost':
|
8
|
-
spot_v1_public_get_time = spotV1PublicGetTime = Entry('time', ['spot', 'v1', 'public'], 'GET', {'cost':
|
9
|
-
spot_v1_public_get_exchangeinfo = spotV1PublicGetExchangeInfo = Entry('exchangeInfo', ['spot', 'v1', 'public'], 'GET', {'cost':
|
10
|
-
spot_v1_public_get_depth = spotV1PublicGetDepth = Entry('depth', ['spot', 'v1', 'public'], 'GET', {'cost': 1, 'byLimit': [[100,
|
11
|
-
spot_v1_public_get_trades = spotV1PublicGetTrades = Entry('trades', ['spot', 'v1', 'public'], 'GET', {'cost':
|
12
|
-
spot_v1_public_get_historicaltrades = spotV1PublicGetHistoricalTrades = Entry('historicalTrades', ['spot', 'v1', 'public'], 'GET', {'cost':
|
13
|
-
spot_v1_public_get_aggtrades = spotV1PublicGetAggTrades = Entry('aggTrades', ['spot', 'v1', 'public'], 'GET', {'cost':
|
14
|
-
spot_v1_public_get_ticker_24hr = spotV1PublicGetTicker24hr = Entry('ticker/24hr', ['spot', 'v1', 'public'], 'GET', {'cost':
|
15
|
-
spot_v1_public_get_ticker_price = spotV1PublicGetTickerPrice = Entry('ticker/price', ['spot', 'v1', 'public'], 'GET', {'cost':
|
16
|
-
spot_v1_public_get_ticker_bookticker = spotV1PublicGetTickerBookTicker = Entry('ticker/bookTicker', ['spot', 'v1', 'public'], 'GET', {'cost':
|
17
|
-
spot_v1_public_get_market_kline = spotV1PublicGetMarketKline = Entry('market/kline', ['spot', 'v1', 'public'], 'GET', {'cost':
|
18
|
-
spot_v1_private_get_order = spotV1PrivateGetOrder = Entry('order', ['spot', 'v1', 'private'], 'GET', {'cost':
|
19
|
-
spot_v1_private_get_openorders = spotV1PrivateGetOpenOrders = Entry('openOrders', ['spot', 'v1', 'private'], 'GET', {'cost':
|
20
|
-
spot_v1_private_get_allorders = spotV1PrivateGetAllOrders = Entry('allOrders', ['spot', 'v1', 'private'], 'GET', {'cost':
|
21
|
-
spot_v1_private_get_account = spotV1PrivateGetAccount = Entry('account', ['spot', 'v1', 'private'], 'GET', {'cost':
|
22
|
-
spot_v1_private_get_mytrades = spotV1PrivateGetMyTrades = Entry('myTrades', ['spot', 'v1', 'private'], 'GET', {'cost':
|
23
|
-
spot_v1_private_get_etf_net_value_symbol = spotV1PrivateGetEtfNetValueSymbol = Entry('etf/net-value/{symbol}', ['spot', 'v1', 'private'], 'GET', {'cost':
|
24
|
-
spot_v1_private_get_withdraw_history = spotV1PrivateGetWithdrawHistory = Entry('withdraw/history', ['spot', 'v1', 'private'], 'GET', {'cost':
|
25
|
-
spot_v1_private_get_deposit_history = spotV1PrivateGetDepositHistory = Entry('deposit/history', ['spot', 'v1', 'private'], 'GET', {'cost':
|
26
|
-
spot_v1_private_post_order = spotV1PrivatePostOrder = Entry('order', ['spot', 'v1', 'private'], 'POST', {'cost':
|
27
|
-
spot_v1_private_post_withdraw_commit = spotV1PrivatePostWithdrawCommit = Entry('withdraw/commit', ['spot', 'v1', 'private'], 'POST', {'cost':
|
28
|
-
spot_v1_private_delete_order = spotV1PrivateDeleteOrder = Entry('order', ['spot', 'v1', 'private'], 'DELETE', {'cost':
|
29
|
-
spot_v2_private_get_mytrades = spotV2PrivateGetMyTrades = Entry('myTrades', ['spot', 'v2', 'private'], 'GET', {'cost':
|
30
|
-
fapi_v1_public_get_ping = fapiV1PublicGetPing = Entry('ping', ['fapi', 'v1', 'public'], 'GET', {'cost':
|
31
|
-
fapi_v1_public_get_time = fapiV1PublicGetTime = Entry('time', ['fapi', 'v1', 'public'], 'GET', {'cost':
|
32
|
-
fapi_v1_public_get_contracts = fapiV1PublicGetContracts = Entry('contracts', ['fapi', 'v1', 'public'], 'GET', {'cost':
|
33
|
-
fapi_v1_public_get_depth = fapiV1PublicGetDepth = Entry('depth', ['fapi', 'v1', 'public'], 'GET', {'cost':
|
34
|
-
fapi_v1_public_get_ticker = fapiV1PublicGetTicker = Entry('ticker', ['fapi', 'v1', 'public'], 'GET', {'cost':
|
35
|
-
fapi_v1_public_get_klines = fapiV1PublicGetKlines = Entry('klines', ['fapi', 'v1', 'public'], 'GET', {'cost':
|
36
|
-
fapi_v2_private_get_mytrades = fapiV2PrivateGetMyTrades = Entry('myTrades', ['fapi', 'v2', 'private'], 'GET', {'cost':
|
37
|
-
fapi_v2_private_get_openorders = fapiV2PrivateGetOpenOrders = Entry('openOrders', ['fapi', 'v2', 'private'], 'GET', {'cost':
|
38
|
-
fapi_v2_private_get_order = fapiV2PrivateGetOrder = Entry('order', ['fapi', 'v2', 'private'], 'GET', {'cost':
|
39
|
-
fapi_v2_private_get_account = fapiV2PrivateGetAccount = Entry('account', ['fapi', 'v2', 'private'], 'GET', {'cost':
|
40
|
-
fapi_v2_private_get_leveragebracket = fapiV2PrivateGetLeverageBracket = Entry('leverageBracket', ['fapi', 'v2', 'private'], 'GET', {'cost':
|
41
|
-
fapi_v2_private_get_commissionrate = fapiV2PrivateGetCommissionRate = Entry('commissionRate', ['fapi', 'v2', 'private'], 'GET', {'cost':
|
42
|
-
fapi_v2_private_get_futures_transfer_history = fapiV2PrivateGetFuturesTransferHistory = Entry('futures_transfer_history', ['fapi', 'v2', 'private'], 'GET', {'cost':
|
43
|
-
fapi_v2_private_get_forceordershistory = fapiV2PrivateGetForceOrdersHistory = Entry('forceOrdersHistory', ['fapi', 'v2', 'private'], 'GET', {'cost':
|
44
|
-
fapi_v2_private_post_positionmargin = fapiV2PrivatePostPositionMargin = Entry('positionMargin', ['fapi', 'v2', 'private'], 'POST', {'cost':
|
45
|
-
fapi_v2_private_post_level_edit = fapiV2PrivatePostLevelEdit = Entry('level_edit', ['fapi', 'v2', 'private'], 'POST', {'cost':
|
46
|
-
fapi_v2_private_post_cancel = fapiV2PrivatePostCancel = Entry('cancel', ['fapi', 'v2', 'private'], 'POST', {'cost':
|
47
|
-
fapi_v2_private_post_order = fapiV2PrivatePostOrder = Entry('order', ['fapi', 'v2', 'private'], 'POST', {'cost':
|
48
|
-
fapi_v2_private_post_allopenorders = fapiV2PrivatePostAllOpenOrders = Entry('allOpenOrders', ['fapi', 'v2', 'private'], 'POST', {'cost':
|
49
|
-
fapi_v2_private_post_futures_transfer = fapiV2PrivatePostFuturesTransfer = Entry('futures_transfer', ['fapi', 'v2', 'private'], 'POST', {'cost':
|
50
|
-
dapi_v1_public_get_ping = dapiV1PublicGetPing = Entry('ping', ['dapi', 'v1', 'public'], 'GET', {'cost':
|
51
|
-
dapi_v1_public_get_time = dapiV1PublicGetTime = Entry('time', ['dapi', 'v1', 'public'], 'GET', {'cost':
|
52
|
-
dapi_v1_public_get_contracts = dapiV1PublicGetContracts = Entry('contracts', ['dapi', 'v1', 'public'], 'GET', {'cost':
|
53
|
-
dapi_v1_public_get_depth = dapiV1PublicGetDepth = Entry('depth', ['dapi', 'v1', 'public'], 'GET', {'cost':
|
54
|
-
dapi_v1_public_get_ticker = dapiV1PublicGetTicker = Entry('ticker', ['dapi', 'v1', 'public'], 'GET', {'cost':
|
55
|
-
dapi_v1_public_get_klines = dapiV1PublicGetKlines = Entry('klines', ['dapi', 'v1', 'public'], 'GET', {'cost':
|
56
|
-
dapi_v2_private_get_mytrades = dapiV2PrivateGetMyTrades = Entry('myTrades', ['dapi', 'v2', 'private'], 'GET', {'cost':
|
57
|
-
dapi_v2_private_get_openorders = dapiV2PrivateGetOpenOrders = Entry('openOrders', ['dapi', 'v2', 'private'], 'GET', {'cost':
|
58
|
-
dapi_v2_private_get_order = dapiV2PrivateGetOrder = Entry('order', ['dapi', 'v2', 'private'], 'GET', {'cost':
|
59
|
-
dapi_v2_private_get_account = dapiV2PrivateGetAccount = Entry('account', ['dapi', 'v2', 'private'], 'GET', {'cost':
|
60
|
-
dapi_v2_private_get_leveragebracket = dapiV2PrivateGetLeverageBracket = Entry('leverageBracket', ['dapi', 'v2', 'private'], 'GET', {'cost':
|
61
|
-
dapi_v2_private_get_commissionrate = dapiV2PrivateGetCommissionRate = Entry('commissionRate', ['dapi', 'v2', 'private'], 'GET', {'cost':
|
62
|
-
dapi_v2_private_get_futures_transfer_history = dapiV2PrivateGetFuturesTransferHistory = Entry('futures_transfer_history', ['dapi', 'v2', 'private'], 'GET', {'cost':
|
63
|
-
dapi_v2_private_get_forceordershistory = dapiV2PrivateGetForceOrdersHistory = Entry('forceOrdersHistory', ['dapi', 'v2', 'private'], 'GET', {'cost':
|
64
|
-
dapi_v2_private_post_positionmargin = dapiV2PrivatePostPositionMargin = Entry('positionMargin', ['dapi', 'v2', 'private'], 'POST', {'cost':
|
65
|
-
dapi_v2_private_post_level_edit = dapiV2PrivatePostLevelEdit = Entry('level_edit', ['dapi', 'v2', 'private'], 'POST', {'cost':
|
66
|
-
dapi_v2_private_post_cancel = dapiV2PrivatePostCancel = Entry('cancel', ['dapi', 'v2', 'private'], 'POST', {'cost':
|
67
|
-
dapi_v2_private_post_order = dapiV2PrivatePostOrder = Entry('order', ['dapi', 'v2', 'private'], 'POST', {'cost':
|
68
|
-
dapi_v2_private_post_allopenorders = dapiV2PrivatePostAllOpenOrders = Entry('allOpenOrders', ['dapi', 'v2', 'private'], 'POST', {'cost':
|
69
|
-
dapi_v2_private_post_futures_transfer = dapiV2PrivatePostFuturesTransfer = Entry('futures_transfer', ['dapi', 'v2', 'private'], 'POST', {'cost':
|
5
|
+
spot_kline_public_get_public_json = spotKlinePublicGetPublicJson = Entry('public.json', ['spot', 'kline', 'public'], 'GET', {'cost': 0.24})
|
6
|
+
spot_kline_public_get_public_currency_json = spotKlinePublicGetPublicCurrencyJson = Entry('public{currency}.json', ['spot', 'kline', 'public'], 'GET', {'cost': 0.24})
|
7
|
+
spot_v1_public_get_ping = spotV1PublicGetPing = Entry('ping', ['spot', 'v1', 'public'], 'GET', {'cost': 0.24})
|
8
|
+
spot_v1_public_get_time = spotV1PublicGetTime = Entry('time', ['spot', 'v1', 'public'], 'GET', {'cost': 0.24})
|
9
|
+
spot_v1_public_get_exchangeinfo = spotV1PublicGetExchangeInfo = Entry('exchangeInfo', ['spot', 'v1', 'public'], 'GET', {'cost': 0.24})
|
10
|
+
spot_v1_public_get_depth = spotV1PublicGetDepth = Entry('depth', ['spot', 'v1', 'public'], 'GET', {'cost': 1, 'byLimit': [[100, 0.24], [500, 1.2], [1000, 2.4]]})
|
11
|
+
spot_v1_public_get_trades = spotV1PublicGetTrades = Entry('trades', ['spot', 'v1', 'public'], 'GET', {'cost': 0.24})
|
12
|
+
spot_v1_public_get_historicaltrades = spotV1PublicGetHistoricalTrades = Entry('historicalTrades', ['spot', 'v1', 'public'], 'GET', {'cost': 1.2})
|
13
|
+
spot_v1_public_get_aggtrades = spotV1PublicGetAggTrades = Entry('aggTrades', ['spot', 'v1', 'public'], 'GET', {'cost': 0.24})
|
14
|
+
spot_v1_public_get_ticker_24hr = spotV1PublicGetTicker24hr = Entry('ticker/24hr', ['spot', 'v1', 'public'], 'GET', {'cost': 0.24, 'noSymbol': 9.6})
|
15
|
+
spot_v1_public_get_ticker_price = spotV1PublicGetTickerPrice = Entry('ticker/price', ['spot', 'v1', 'public'], 'GET', {'cost': 0.24})
|
16
|
+
spot_v1_public_get_ticker_bookticker = spotV1PublicGetTickerBookTicker = Entry('ticker/bookTicker', ['spot', 'v1', 'public'], 'GET', {'cost': 0.24})
|
17
|
+
spot_v1_public_get_market_kline = spotV1PublicGetMarketKline = Entry('market/kline', ['spot', 'v1', 'public'], 'GET', {'cost': 0.24})
|
18
|
+
spot_v1_private_get_order = spotV1PrivateGetOrder = Entry('order', ['spot', 'v1', 'private'], 'GET', {'cost': 5})
|
19
|
+
spot_v1_private_get_openorders = spotV1PrivateGetOpenOrders = Entry('openOrders', ['spot', 'v1', 'private'], 'GET', {'cost': 5})
|
20
|
+
spot_v1_private_get_allorders = spotV1PrivateGetAllOrders = Entry('allOrders', ['spot', 'v1', 'private'], 'GET', {'cost': 25})
|
21
|
+
spot_v1_private_get_account = spotV1PrivateGetAccount = Entry('account', ['spot', 'v1', 'private'], 'GET', {'cost': 25})
|
22
|
+
spot_v1_private_get_mytrades = spotV1PrivateGetMyTrades = Entry('myTrades', ['spot', 'v1', 'private'], 'GET', {'cost': 25})
|
23
|
+
spot_v1_private_get_etf_net_value_symbol = spotV1PrivateGetEtfNetValueSymbol = Entry('etf/net-value/{symbol}', ['spot', 'v1', 'private'], 'GET', {'cost': 0.24})
|
24
|
+
spot_v1_private_get_withdraw_history = spotV1PrivateGetWithdrawHistory = Entry('withdraw/history', ['spot', 'v1', 'private'], 'GET', {'cost': 120})
|
25
|
+
spot_v1_private_get_deposit_history = spotV1PrivateGetDepositHistory = Entry('deposit/history', ['spot', 'v1', 'private'], 'GET', {'cost': 120})
|
26
|
+
spot_v1_private_post_order = spotV1PrivatePostOrder = Entry('order', ['spot', 'v1', 'private'], 'POST', {'cost': 5})
|
27
|
+
spot_v1_private_post_withdraw_commit = spotV1PrivatePostWithdrawCommit = Entry('withdraw/commit', ['spot', 'v1', 'private'], 'POST', {'cost': 120})
|
28
|
+
spot_v1_private_delete_order = spotV1PrivateDeleteOrder = Entry('order', ['spot', 'v1', 'private'], 'DELETE', {'cost': 5})
|
29
|
+
spot_v2_private_get_mytrades = spotV2PrivateGetMyTrades = Entry('myTrades', ['spot', 'v2', 'private'], 'GET', {'cost': 1.2})
|
30
|
+
fapi_v1_public_get_ping = fapiV1PublicGetPing = Entry('ping', ['fapi', 'v1', 'public'], 'GET', {'cost': 0.24})
|
31
|
+
fapi_v1_public_get_time = fapiV1PublicGetTime = Entry('time', ['fapi', 'v1', 'public'], 'GET', {'cost': 0.24})
|
32
|
+
fapi_v1_public_get_contracts = fapiV1PublicGetContracts = Entry('contracts', ['fapi', 'v1', 'public'], 'GET', {'cost': 0.24})
|
33
|
+
fapi_v1_public_get_depth = fapiV1PublicGetDepth = Entry('depth', ['fapi', 'v1', 'public'], 'GET', {'cost': 0.24})
|
34
|
+
fapi_v1_public_get_ticker = fapiV1PublicGetTicker = Entry('ticker', ['fapi', 'v1', 'public'], 'GET', {'cost': 0.24})
|
35
|
+
fapi_v1_public_get_klines = fapiV1PublicGetKlines = Entry('klines', ['fapi', 'v1', 'public'], 'GET', {'cost': 0.24})
|
36
|
+
fapi_v2_private_get_mytrades = fapiV2PrivateGetMyTrades = Entry('myTrades', ['fapi', 'v2', 'private'], 'GET', {'cost': 5})
|
37
|
+
fapi_v2_private_get_openorders = fapiV2PrivateGetOpenOrders = Entry('openOrders', ['fapi', 'v2', 'private'], 'GET', {'cost': 5})
|
38
|
+
fapi_v2_private_get_order = fapiV2PrivateGetOrder = Entry('order', ['fapi', 'v2', 'private'], 'GET', {'cost': 5})
|
39
|
+
fapi_v2_private_get_account = fapiV2PrivateGetAccount = Entry('account', ['fapi', 'v2', 'private'], 'GET', {'cost': 5})
|
40
|
+
fapi_v2_private_get_leveragebracket = fapiV2PrivateGetLeverageBracket = Entry('leverageBracket', ['fapi', 'v2', 'private'], 'GET', {'cost': 5})
|
41
|
+
fapi_v2_private_get_commissionrate = fapiV2PrivateGetCommissionRate = Entry('commissionRate', ['fapi', 'v2', 'private'], 'GET', {'cost': 5})
|
42
|
+
fapi_v2_private_get_futures_transfer_history = fapiV2PrivateGetFuturesTransferHistory = Entry('futures_transfer_history', ['fapi', 'v2', 'private'], 'GET', {'cost': 5})
|
43
|
+
fapi_v2_private_get_forceordershistory = fapiV2PrivateGetForceOrdersHistory = Entry('forceOrdersHistory', ['fapi', 'v2', 'private'], 'GET', {'cost': 5})
|
44
|
+
fapi_v2_private_post_positionmargin = fapiV2PrivatePostPositionMargin = Entry('positionMargin', ['fapi', 'v2', 'private'], 'POST', {'cost': 5})
|
45
|
+
fapi_v2_private_post_level_edit = fapiV2PrivatePostLevelEdit = Entry('level_edit', ['fapi', 'v2', 'private'], 'POST', {'cost': 5})
|
46
|
+
fapi_v2_private_post_cancel = fapiV2PrivatePostCancel = Entry('cancel', ['fapi', 'v2', 'private'], 'POST', {'cost': 5})
|
47
|
+
fapi_v2_private_post_order = fapiV2PrivatePostOrder = Entry('order', ['fapi', 'v2', 'private'], 'POST', {'cost': 25})
|
48
|
+
fapi_v2_private_post_allopenorders = fapiV2PrivatePostAllOpenOrders = Entry('allOpenOrders', ['fapi', 'v2', 'private'], 'POST', {'cost': 5})
|
49
|
+
fapi_v2_private_post_futures_transfer = fapiV2PrivatePostFuturesTransfer = Entry('futures_transfer', ['fapi', 'v2', 'private'], 'POST', {'cost': 5})
|
50
|
+
dapi_v1_public_get_ping = dapiV1PublicGetPing = Entry('ping', ['dapi', 'v1', 'public'], 'GET', {'cost': 0.24})
|
51
|
+
dapi_v1_public_get_time = dapiV1PublicGetTime = Entry('time', ['dapi', 'v1', 'public'], 'GET', {'cost': 0.24})
|
52
|
+
dapi_v1_public_get_contracts = dapiV1PublicGetContracts = Entry('contracts', ['dapi', 'v1', 'public'], 'GET', {'cost': 0.24})
|
53
|
+
dapi_v1_public_get_depth = dapiV1PublicGetDepth = Entry('depth', ['dapi', 'v1', 'public'], 'GET', {'cost': 0.24})
|
54
|
+
dapi_v1_public_get_ticker = dapiV1PublicGetTicker = Entry('ticker', ['dapi', 'v1', 'public'], 'GET', {'cost': 0.24})
|
55
|
+
dapi_v1_public_get_klines = dapiV1PublicGetKlines = Entry('klines', ['dapi', 'v1', 'public'], 'GET', {'cost': 0.24})
|
56
|
+
dapi_v2_private_get_mytrades = dapiV2PrivateGetMyTrades = Entry('myTrades', ['dapi', 'v2', 'private'], 'GET', {'cost': 5})
|
57
|
+
dapi_v2_private_get_openorders = dapiV2PrivateGetOpenOrders = Entry('openOrders', ['dapi', 'v2', 'private'], 'GET', {'cost': 5})
|
58
|
+
dapi_v2_private_get_order = dapiV2PrivateGetOrder = Entry('order', ['dapi', 'v2', 'private'], 'GET', {'cost': 5})
|
59
|
+
dapi_v2_private_get_account = dapiV2PrivateGetAccount = Entry('account', ['dapi', 'v2', 'private'], 'GET', {'cost': 5})
|
60
|
+
dapi_v2_private_get_leveragebracket = dapiV2PrivateGetLeverageBracket = Entry('leverageBracket', ['dapi', 'v2', 'private'], 'GET', {'cost': 5})
|
61
|
+
dapi_v2_private_get_commissionrate = dapiV2PrivateGetCommissionRate = Entry('commissionRate', ['dapi', 'v2', 'private'], 'GET', {'cost': 5})
|
62
|
+
dapi_v2_private_get_futures_transfer_history = dapiV2PrivateGetFuturesTransferHistory = Entry('futures_transfer_history', ['dapi', 'v2', 'private'], 'GET', {'cost': 5})
|
63
|
+
dapi_v2_private_get_forceordershistory = dapiV2PrivateGetForceOrdersHistory = Entry('forceOrdersHistory', ['dapi', 'v2', 'private'], 'GET', {'cost': 5})
|
64
|
+
dapi_v2_private_post_positionmargin = dapiV2PrivatePostPositionMargin = Entry('positionMargin', ['dapi', 'v2', 'private'], 'POST', {'cost': 5})
|
65
|
+
dapi_v2_private_post_level_edit = dapiV2PrivatePostLevelEdit = Entry('level_edit', ['dapi', 'v2', 'private'], 'POST', {'cost': 5})
|
66
|
+
dapi_v2_private_post_cancel = dapiV2PrivatePostCancel = Entry('cancel', ['dapi', 'v2', 'private'], 'POST', {'cost': 5})
|
67
|
+
dapi_v2_private_post_order = dapiV2PrivatePostOrder = Entry('order', ['dapi', 'v2', 'private'], 'POST', {'cost': 5})
|
68
|
+
dapi_v2_private_post_allopenorders = dapiV2PrivatePostAllOpenOrders = Entry('allOpenOrders', ['dapi', 'v2', 'private'], 'POST', {'cost': 5})
|
69
|
+
dapi_v2_private_post_futures_transfer = dapiV2PrivatePostFuturesTransfer = Entry('futures_transfer', ['dapi', 'v2', 'private'], 'POST', {'cost': 5})
|
70
70
|
open_v1_private_post_poseidon_api_v1_listenkey = openV1PrivatePostPoseidonApiV1ListenKey = Entry('poseidon/api/v1/listenKey', ['open', 'v1', 'private'], 'POST', {'cost': 1})
|
71
71
|
open_v1_private_put_poseidon_api_v1_listenkey_listenkey = openV1PrivatePutPoseidonApiV1ListenKeyListenKey = Entry('poseidon/api/v1/listenKey/{listenKey}', ['open', 'v1', 'private'], 'PUT', {'cost': 1})
|
72
72
|
open_v1_private_delete_poseidon_api_v1_listenkey_listenkey = openV1PrivateDeletePoseidonApiV1ListenKeyListenKey = Entry('poseidon/api/v1/listenKey/{listenKey}', ['open', 'v1', 'private'], 'DELETE', {'cost': 1})
|
ccxt/abstract/cryptocom.py
CHANGED
@@ -2,6 +2,7 @@ from ccxt.base.types import Entry
|
|
2
2
|
|
3
3
|
|
4
4
|
class ImplicitAPI:
|
5
|
+
base_public_get_v1_public_get_announcements = basePublicGetV1PublicGetAnnouncements = Entry('v1/public/get-announcements', ['base', 'public'], 'GET', {'cost': 1})
|
5
6
|
v1_public_get_public_auth = v1PublicGetPublicAuth = Entry('public/auth', ['v1', 'public'], 'GET', {'cost': 3.3333333333333335})
|
6
7
|
v1_public_get_public_get_instruments = v1PublicGetPublicGetInstruments = Entry('public/get-instruments', ['v1', 'public'], 'GET', {'cost': 3.3333333333333335})
|
7
8
|
v1_public_get_public_get_book = v1PublicGetPublicGetBook = Entry('public/get-book', ['v1', 'public'], 'GET', {'cost': 1})
|
@@ -19,6 +20,7 @@ class ImplicitAPI:
|
|
19
20
|
v1_private_post_private_user_balance_history = v1PrivatePostPrivateUserBalanceHistory = Entry('private/user-balance-history', ['v1', 'private'], 'POST', {'cost': 3.3333333333333335})
|
20
21
|
v1_private_post_private_get_positions = v1PrivatePostPrivateGetPositions = Entry('private/get-positions', ['v1', 'private'], 'POST', {'cost': 3.3333333333333335})
|
21
22
|
v1_private_post_private_create_order = v1PrivatePostPrivateCreateOrder = Entry('private/create-order', ['v1', 'private'], 'POST', {'cost': 0.6666666666666666})
|
23
|
+
v1_private_post_private_amend_order = v1PrivatePostPrivateAmendOrder = Entry('private/amend-order', ['v1', 'private'], 'POST', {'cost': 1.3333333333333333})
|
22
24
|
v1_private_post_private_create_order_list = v1PrivatePostPrivateCreateOrderList = Entry('private/create-order-list', ['v1', 'private'], 'POST', {'cost': 3.3333333333333335})
|
23
25
|
v1_private_post_private_cancel_order = v1PrivatePostPrivateCancelOrder = Entry('private/cancel-order', ['v1', 'private'], 'POST', {'cost': 0.6666666666666666})
|
24
26
|
v1_private_post_private_cancel_order_list = v1PrivatePostPrivateCancelOrderList = Entry('private/cancel-order-list', ['v1', 'private'], 'POST', {'cost': 3.3333333333333335})
|
ccxt/abstract/luno.py
CHANGED
@@ -13,6 +13,7 @@ class ImplicitAPI:
|
|
13
13
|
private_get_accounts_id_transactions = privateGetAccountsIdTransactions = Entry('accounts/{id}/transactions', 'private', 'GET', {'cost': 1})
|
14
14
|
private_get_balance = privateGetBalance = Entry('balance', 'private', 'GET', {'cost': 1})
|
15
15
|
private_get_beneficiaries = privateGetBeneficiaries = Entry('beneficiaries', 'private', 'GET', {'cost': 1})
|
16
|
+
private_get_send_networks = privateGetSendNetworks = Entry('send/networks', 'private', 'GET', {'cost': 1})
|
16
17
|
private_get_fee_info = privateGetFeeInfo = Entry('fee_info', 'private', 'GET', {'cost': 1})
|
17
18
|
private_get_funding_address = privateGetFundingAddress = Entry('funding_address', 'private', 'GET', {'cost': 1})
|
18
19
|
private_get_listorders = privateGetListorders = Entry('listorders', 'private', 'GET', {'cost': 1})
|
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/binance.py
CHANGED
@@ -9834,7 +9834,7 @@ class binance(Exchange, ImplicitAPI):
|
|
9834
9834
|
response = await self.dapiPrivateV2GetLeverageBracket(query)
|
9835
9835
|
else:
|
9836
9836
|
raise NotSupported(self.id + ' loadLeverageBrackets() supports linear and inverse contracts only')
|
9837
|
-
self.options['leverageBrackets'] =
|
9837
|
+
self.options['leverageBrackets'] = self.create_safe_dictionary()
|
9838
9838
|
for i in range(0, len(response)):
|
9839
9839
|
entry = response[i]
|
9840
9840
|
marketId = self.safe_string(entry, 'symbol')
|
ccxt/async_support/bingx.py
CHANGED
@@ -514,6 +514,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
514
514
|
'100437': BadRequest, # {"code":100437,"msg":"The withdrawal amount is lower than the minimum limit, please re-enter.","timestamp":1689258588845}
|
515
515
|
'101204': InsufficientFunds, # {"code":101204,"msg":"","data":{}}
|
516
516
|
'110425': InvalidOrder, # {"code":110425,"msg":"Please ensure that the minimum nominal value of the order placed must be greater than 2u","data":{}}
|
517
|
+
'Insufficient assets': InsufficientFunds, # {"transferErrorMsg":"Insufficient assets"}
|
518
|
+
'illegal transferType': BadRequest, # {"transferErrorMsg":"illegal transferType"}
|
517
519
|
},
|
518
520
|
'broad': {},
|
519
521
|
},
|
@@ -527,12 +529,14 @@ class bingx(Exchange, ImplicitAPI):
|
|
527
529
|
'options': {
|
528
530
|
'defaultType': 'spot',
|
529
531
|
'accountsByType': {
|
530
|
-
'
|
532
|
+
'funding': 'FUND',
|
533
|
+
'spot': 'SPOT',
|
531
534
|
'swap': 'PFUTURES',
|
532
535
|
'future': 'SFUTURES',
|
533
536
|
},
|
534
537
|
'accountsById': {
|
535
|
-
'FUND': '
|
538
|
+
'FUND': 'funding',
|
539
|
+
'SPOT': 'spot',
|
536
540
|
'PFUTURES': 'swap',
|
537
541
|
'SFUTURES': 'future',
|
538
542
|
},
|
@@ -1530,7 +1534,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1530
1534
|
# ]
|
1531
1535
|
# }
|
1532
1536
|
#
|
1533
|
-
data = self.
|
1537
|
+
data = self.safe_dict(response, 'data')
|
1534
1538
|
return self.parse_funding_rate(data, market)
|
1535
1539
|
|
1536
1540
|
async def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
|
@@ -4638,12 +4642,12 @@ class bingx(Exchange, ImplicitAPI):
|
|
4638
4642
|
"""
|
4639
4643
|
transfer currency internally between wallets on the same account
|
4640
4644
|
|
4641
|
-
https://bingx-api.github.io/docs/#/
|
4645
|
+
https://bingx-api.github.io/docs/#/en-us/common/account-api.html#Asset%20Transfer
|
4642
4646
|
|
4643
4647
|
:param str code: unified currency code
|
4644
4648
|
:param float amount: amount to transfer
|
4645
|
-
:param str fromAccount: account to transfer from
|
4646
|
-
:param str toAccount: account to transfer to
|
4649
|
+
:param str fromAccount: account to transfer from(spot, swap, futures, or funding)
|
4650
|
+
:param str toAccount: account to transfer to(spot, swap, futures, or funding)
|
4647
4651
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4648
4652
|
:returns dict: a `transfer structure <https://docs.ccxt.com/#/?id=transfer-structure>`
|
4649
4653
|
"""
|
@@ -4659,9 +4663,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
4659
4663
|
}
|
4660
4664
|
response = await self.spotV3PrivateGetGetAssetTransfer(self.extend(request, params))
|
4661
4665
|
#
|
4662
|
-
#
|
4663
|
-
#
|
4664
|
-
#
|
4666
|
+
# {
|
4667
|
+
# "tranId": 1933130865269936128,
|
4668
|
+
# "transferId": "1051450703949464903736"
|
4669
|
+
# }
|
4665
4670
|
#
|
4666
4671
|
return {
|
4667
4672
|
'info': response,
|
@@ -4683,8 +4688,11 @@ class bingx(Exchange, ImplicitAPI):
|
|
4683
4688
|
|
4684
4689
|
:param str [code]: unified currency code of the currency transferred
|
4685
4690
|
:param int [since]: the earliest time in ms to fetch transfers for
|
4686
|
-
:param int [limit]: the maximum number of transfers structures to retrieve
|
4691
|
+
:param int [limit]: the maximum number of transfers structures to retrieve(default 10, max 100)
|
4687
4692
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4693
|
+
:param str params.fromAccount:(mandatory) transfer from(spot, swap, futures, or funding)
|
4694
|
+
:param str params.toAccount:(mandatory) transfer to(spot, swap, futures, or funding)
|
4695
|
+
:param boolean [params.paginate]: whether to paginate the results(default False)
|
4688
4696
|
:returns dict[]: a list of `transfer structures <https://docs.ccxt.com/#/?id=transfer-structure>`
|
4689
4697
|
"""
|
4690
4698
|
await self.load_markets()
|
@@ -4698,6 +4706,12 @@ class bingx(Exchange, ImplicitAPI):
|
|
4698
4706
|
toId = self.safe_string(accountsByType, toAccount, toAccount)
|
4699
4707
|
if fromId is None or toId is None:
|
4700
4708
|
raise ExchangeError(self.id + ' fromAccount & toAccount parameter are required')
|
4709
|
+
params = self.omit(params, ['fromAccount', 'toAccount'])
|
4710
|
+
maxLimit = 100
|
4711
|
+
paginate = False
|
4712
|
+
paginate, params = self.handle_option_and_params(params, 'fetchTransfers', 'paginate', False)
|
4713
|
+
if paginate:
|
4714
|
+
return await self.fetch_paginated_call_dynamic('fetchTransfers', None, since, limit, params, maxLimit)
|
4701
4715
|
request: dict = {
|
4702
4716
|
'type': fromId + '_' + toId,
|
4703
4717
|
}
|
@@ -4705,18 +4719,19 @@ class bingx(Exchange, ImplicitAPI):
|
|
4705
4719
|
request['startTime'] = since
|
4706
4720
|
if limit is not None:
|
4707
4721
|
request['size'] = limit
|
4722
|
+
request, params = self.handle_until_option('endTime', request, params)
|
4708
4723
|
response = await self.spotV3PrivateGetAssetTransfer(self.extend(request, params))
|
4709
4724
|
#
|
4710
4725
|
# {
|
4711
4726
|
# "total": 3,
|
4712
4727
|
# "rows": [
|
4713
4728
|
# {
|
4714
|
-
# "asset":"USDT",
|
4715
|
-
# "amount":"
|
4716
|
-
# "type":"FUND_SFUTURES",
|
4717
|
-
# "status":"CONFIRMED",
|
4718
|
-
# "tranId":1067594500957016069,
|
4719
|
-
# "timestamp":1658388859000
|
4729
|
+
# "asset": "USDT",
|
4730
|
+
# "amount": "100.00000000000000000000",
|
4731
|
+
# "type": "FUND_SFUTURES",
|
4732
|
+
# "status": "CONFIRMED",
|
4733
|
+
# "tranId": 1067594500957016069,
|
4734
|
+
# "timestamp": 1658388859000
|
4720
4735
|
# },
|
4721
4736
|
# ]
|
4722
4737
|
# }
|
@@ -4733,7 +4748,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
4733
4748
|
typeId = self.safe_string(transfer, 'type')
|
4734
4749
|
typeIdSplit = typeId.split('_')
|
4735
4750
|
fromId = self.safe_string(typeIdSplit, 0)
|
4736
|
-
toId = self.safe_string(
|
4751
|
+
toId = self.safe_string(typeIdSplit, 1)
|
4737
4752
|
fromAccount = self.safe_string(accountsById, fromId, fromId)
|
4738
4753
|
toAccount = self.safe_string(accountsById, toId, toId)
|
4739
4754
|
return {
|
@@ -4745,9 +4760,15 @@ class bingx(Exchange, ImplicitAPI):
|
|
4745
4760
|
'amount': self.safe_number(transfer, 'amount'),
|
4746
4761
|
'fromAccount': fromAccount,
|
4747
4762
|
'toAccount': toAccount,
|
4748
|
-
'status': status,
|
4763
|
+
'status': self.parse_transfer_status(status),
|
4749
4764
|
}
|
4750
4765
|
|
4766
|
+
def parse_transfer_status(self, status: Str) -> str:
|
4767
|
+
statuses: dict = {
|
4768
|
+
'CONFIRMED': 'ok',
|
4769
|
+
}
|
4770
|
+
return self.safe_string(statuses, status, status)
|
4771
|
+
|
4751
4772
|
async def fetch_deposit_addresses_by_network(self, code: str, params={}) -> List[DepositAddress]:
|
4752
4773
|
"""
|
4753
4774
|
fetch the deposit addresses for a currency associated with self account
|
@@ -5553,11 +5574,12 @@ class bingx(Exchange, ImplicitAPI):
|
|
5553
5574
|
return self.parse_transaction(data)
|
5554
5575
|
|
5555
5576
|
def parse_params(self, params):
|
5556
|
-
sortedParams = self.keysort(params)
|
5557
|
-
|
5577
|
+
# sortedParams = self.keysort(params)
|
5578
|
+
rawKeys = list(params.keys())
|
5579
|
+
keys = self.sort(rawKeys)
|
5558
5580
|
for i in range(0, len(keys)):
|
5559
5581
|
key = keys[i]
|
5560
|
-
value =
|
5582
|
+
value = params[key]
|
5561
5583
|
if isinstance(value, list):
|
5562
5584
|
arrStr = '['
|
5563
5585
|
for j in range(0, len(value)):
|
@@ -5566,8 +5588,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
5566
5588
|
arrStr += ','
|
5567
5589
|
arrStr += str(arrayElement)
|
5568
5590
|
arrStr += ']'
|
5569
|
-
|
5570
|
-
return
|
5591
|
+
params[key] = arrStr
|
5592
|
+
return params
|
5571
5593
|
|
5572
5594
|
async def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
5573
5595
|
"""
|
@@ -6167,13 +6189,14 @@ class bingx(Exchange, ImplicitAPI):
|
|
6167
6189
|
}
|
6168
6190
|
|
6169
6191
|
def custom_encode(self, params):
|
6170
|
-
sortedParams = self.keysort(params)
|
6171
|
-
|
6192
|
+
# sortedParams = self.keysort(params)
|
6193
|
+
rawKeys = list(params.keys())
|
6194
|
+
keys = self.sort(rawKeys)
|
6172
6195
|
adjustedValue = None
|
6173
6196
|
result = None
|
6174
6197
|
for i in range(0, len(keys)):
|
6175
6198
|
key = keys[i]
|
6176
|
-
value =
|
6199
|
+
value = params[key]
|
6177
6200
|
if isinstance(value, list):
|
6178
6201
|
arrStr = None
|
6179
6202
|
for j in range(0, len(value)):
|
@@ -6231,7 +6254,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
6231
6254
|
encodeRequest = self.custom_encode(params)
|
6232
6255
|
else:
|
6233
6256
|
parsedParams = self.parse_params(params)
|
6234
|
-
encodeRequest = self.rawencode(parsedParams)
|
6257
|
+
encodeRequest = self.rawencode(parsedParams, True)
|
6235
6258
|
signature = self.hmac(self.encode(encodeRequest), self.encode(self.secret), hashlib.sha256)
|
6236
6259
|
headers = {
|
6237
6260
|
'X-BX-APIKEY': self.apiKey,
|
@@ -6242,7 +6265,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
6242
6265
|
params['signature'] = signature
|
6243
6266
|
body = self.json(params)
|
6244
6267
|
else:
|
6245
|
-
query = self.urlencode(parsedParams)
|
6268
|
+
query = self.urlencode(parsedParams, True)
|
6246
6269
|
url += '?' + query + '&' + 'signature=' + signature
|
6247
6270
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
6248
6271
|
|
@@ -6266,7 +6289,10 @@ class bingx(Exchange, ImplicitAPI):
|
|
6266
6289
|
#
|
6267
6290
|
code = self.safe_string(response, 'code')
|
6268
6291
|
message = self.safe_string(response, 'msg')
|
6269
|
-
|
6292
|
+
transferErrorMsg = self.safe_string(response, 'transferErrorMsg') # handling with errors from transfer endpoint
|
6293
|
+
if (transferErrorMsg is not None) or (code is not None and code != '0'):
|
6294
|
+
if transferErrorMsg is not None:
|
6295
|
+
message = transferErrorMsg
|
6270
6296
|
feedback = self.id + ' ' + body
|
6271
6297
|
self.throw_exactly_matched_exception(self.exceptions['exact'], message, feedback)
|
6272
6298
|
self.throw_exactly_matched_exception(self.exceptions['exact'], code, feedback)
|