ccxt 4.4.80__py2.py3-none-any.whl → 4.4.85__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 -5
- ccxt/abstract/blofin.py +8 -0
- ccxt/abstract/btcbox.py +1 -0
- ccxt/apex.py +21 -30
- ccxt/ascendex.py +1 -1
- ccxt/async_support/__init__.py +1 -5
- ccxt/async_support/apex.py +21 -30
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +26 -3
- ccxt/async_support/base/ws/cache.py +6 -1
- ccxt/async_support/bigone.py +17 -14
- ccxt/async_support/bingx.py +13 -32
- ccxt/async_support/bitfinex.py +61 -48
- ccxt/async_support/bitget.py +7 -4
- ccxt/async_support/bitrue.py +14 -32
- ccxt/async_support/bitso.py +33 -0
- ccxt/async_support/bitstamp.py +33 -0
- ccxt/async_support/blofin.py +145 -14
- ccxt/async_support/btcbox.py +25 -5
- ccxt/async_support/bybit.py +20 -39
- ccxt/async_support/cex.py +2 -4
- ccxt/async_support/coinbase.py +56 -42
- ccxt/async_support/coinbaseexchange.py +141 -32
- ccxt/async_support/coincatch.py +14 -67
- ccxt/async_support/coinex.py +28 -29
- ccxt/async_support/coinlist.py +17 -16
- ccxt/async_support/coinmetro.py +20 -11
- ccxt/async_support/coinone.py +8 -10
- ccxt/async_support/coinsph.py +124 -2
- ccxt/async_support/cryptocom.py +109 -2
- ccxt/async_support/cryptomus.py +42 -80
- ccxt/async_support/delta.py +75 -36
- ccxt/async_support/derive.py +46 -10
- ccxt/async_support/ellipx.py +175 -77
- ccxt/async_support/gate.py +1 -1
- ccxt/async_support/gemini.py +3 -4
- ccxt/async_support/hitbtc.py +56 -65
- ccxt/async_support/htx.py +2 -2
- ccxt/async_support/hyperliquid.py +15 -2
- ccxt/async_support/kraken.py +27 -23
- ccxt/async_support/kucoinfutures.py +5 -0
- ccxt/async_support/lbank.py +1 -1
- ccxt/async_support/okx.py +1 -2
- ccxt/async_support/oxfun.py +21 -1
- ccxt/async_support/paradex.py +120 -4
- ccxt/base/errors.py +6 -0
- ccxt/base/exchange.py +40 -3
- ccxt/base/types.py +3 -0
- ccxt/bigone.py +17 -14
- ccxt/bingx.py +13 -32
- ccxt/bitfinex.py +61 -48
- ccxt/bitget.py +7 -4
- ccxt/bitrue.py +14 -32
- ccxt/bitso.py +33 -0
- ccxt/bitstamp.py +33 -0
- ccxt/blofin.py +145 -14
- ccxt/btcbox.py +24 -5
- ccxt/bybit.py +20 -39
- ccxt/cex.py +2 -4
- ccxt/coinbase.py +56 -42
- ccxt/coinbaseexchange.py +141 -32
- ccxt/coincatch.py +14 -67
- ccxt/coinex.py +28 -29
- ccxt/coinlist.py +17 -16
- ccxt/coinmetro.py +20 -11
- ccxt/coinone.py +8 -10
- ccxt/coinsph.py +124 -2
- ccxt/cryptocom.py +109 -2
- ccxt/cryptomus.py +42 -80
- ccxt/delta.py +75 -36
- ccxt/derive.py +46 -10
- ccxt/ellipx.py +175 -77
- ccxt/gate.py +1 -1
- ccxt/gemini.py +3 -4
- ccxt/hitbtc.py +56 -65
- ccxt/htx.py +2 -2
- ccxt/hyperliquid.py +15 -2
- ccxt/kraken.py +27 -23
- ccxt/kucoinfutures.py +5 -0
- ccxt/lbank.py +1 -1
- ccxt/okx.py +1 -2
- ccxt/oxfun.py +21 -1
- ccxt/paradex.py +120 -4
- ccxt/pro/__init__.py +69 -3
- ccxt/pro/binance.py +31 -33
- ccxt/pro/bithumb.py +5 -3
- ccxt/pro/coinbase.py +1 -1
- ccxt/pro/hyperliquid.py +10 -2
- ccxt/pro/kraken.py +249 -79
- ccxt/pro/mexc.py +252 -7
- ccxt/pro/poloniex.py +6 -2
- {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/METADATA +7 -11
- {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/RECORD +96 -104
- ccxt/abstract/bl3p.py +0 -19
- ccxt/abstract/idex.py +0 -26
- ccxt/async_support/base/ws/fast_client.py +0 -97
- ccxt/async_support/bl3p.py +0 -543
- ccxt/async_support/idex.py +0 -1889
- ccxt/bl3p.py +0 -543
- ccxt/idex.py +0 -1889
- ccxt/pro/idex.py +0 -687
- {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/WHEEL +0 -0
- {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
# ----------------------------------------------------------------------------
|
24
24
|
|
25
|
-
__version__ = '4.4.
|
25
|
+
__version__ = '4.4.85'
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
@@ -108,7 +108,6 @@ from ccxt.bitso import bitso # noqa: F4
|
|
108
108
|
from ccxt.bitstamp import bitstamp # noqa: F401
|
109
109
|
from ccxt.bitteam import bitteam # noqa: F401
|
110
110
|
from ccxt.bitvavo import bitvavo # noqa: F401
|
111
|
-
from ccxt.bl3p import bl3p # noqa: F401
|
112
111
|
from ccxt.blockchaincom import blockchaincom # noqa: F401
|
113
112
|
from ccxt.blofin import blofin # noqa: F401
|
114
113
|
from ccxt.btcalpha import btcalpha # noqa: F401
|
@@ -150,7 +149,6 @@ from ccxt.htx import htx # noqa: F4
|
|
150
149
|
from ccxt.huobi import huobi # noqa: F401
|
151
150
|
from ccxt.huobijp import huobijp # noqa: F401
|
152
151
|
from ccxt.hyperliquid import hyperliquid # noqa: F401
|
153
|
-
from ccxt.idex import idex # noqa: F401
|
154
152
|
from ccxt.independentreserve import independentreserve # noqa: F401
|
155
153
|
from ccxt.indodax import indodax # noqa: F401
|
156
154
|
from ccxt.kraken import kraken # noqa: F401
|
@@ -217,7 +215,6 @@ exchanges = [
|
|
217
215
|
'bitstamp',
|
218
216
|
'bitteam',
|
219
217
|
'bitvavo',
|
220
|
-
'bl3p',
|
221
218
|
'blockchaincom',
|
222
219
|
'blofin',
|
223
220
|
'btcalpha',
|
@@ -259,7 +256,6 @@ exchanges = [
|
|
259
256
|
'huobi',
|
260
257
|
'huobijp',
|
261
258
|
'hyperliquid',
|
262
|
-
'idex',
|
263
259
|
'independentreserve',
|
264
260
|
'indodax',
|
265
261
|
'kraken',
|
ccxt/abstract/blofin.py
CHANGED
@@ -20,10 +20,14 @@ class ImplicitAPI:
|
|
20
20
|
private_get_account_positions = privateGetAccountPositions = Entry('account/positions', 'private', 'GET', {'cost': 1})
|
21
21
|
private_get_account_leverage_info = privateGetAccountLeverageInfo = Entry('account/leverage-info', 'private', 'GET', {'cost': 1})
|
22
22
|
private_get_account_margin_mode = privateGetAccountMarginMode = Entry('account/margin-mode', 'private', 'GET', {'cost': 1})
|
23
|
+
private_get_account_position_mode = privateGetAccountPositionMode = Entry('account/position-mode', 'private', 'GET', {'cost': 1})
|
23
24
|
private_get_account_batch_leverage_info = privateGetAccountBatchLeverageInfo = Entry('account/batch-leverage-info', 'private', 'GET', {'cost': 1})
|
24
25
|
private_get_trade_orders_tpsl_pending = privateGetTradeOrdersTpslPending = Entry('trade/orders-tpsl-pending', 'private', 'GET', {'cost': 1})
|
26
|
+
private_get_trade_orders_algo_pending = privateGetTradeOrdersAlgoPending = Entry('trade/orders-algo-pending', 'private', 'GET', {'cost': 1})
|
25
27
|
private_get_trade_orders_history = privateGetTradeOrdersHistory = Entry('trade/orders-history', 'private', 'GET', {'cost': 1})
|
26
28
|
private_get_trade_orders_tpsl_history = privateGetTradeOrdersTpslHistory = Entry('trade/orders-tpsl-history', 'private', 'GET', {'cost': 1})
|
29
|
+
private_get_trade_orders_algo_history = privateGetTradeOrdersAlgoHistory = Entry('trade/orders-algo-history', 'private', 'GET', {'cost': 1})
|
30
|
+
private_get_trade_order_price_range = privateGetTradeOrderPriceRange = Entry('trade/order/price-range', 'private', 'GET', {'cost': 1})
|
27
31
|
private_get_user_query_apikey = privateGetUserQueryApikey = Entry('user/query-apikey', 'private', 'GET', {'cost': 1})
|
28
32
|
private_get_affiliate_basic = privateGetAffiliateBasic = Entry('affiliate/basic', 'private', 'GET', {'cost': 1})
|
29
33
|
private_get_copytrading_instruments = privateGetCopytradingInstruments = Entry('copytrading/instruments', 'private', 'GET', {'cost': 1})
|
@@ -38,8 +42,12 @@ class ImplicitAPI:
|
|
38
42
|
private_get_copytrading_trade_position_history_by_order = privateGetCopytradingTradePositionHistoryByOrder = Entry('copytrading/trade/position-history-by-order', 'private', 'GET', {'cost': 1})
|
39
43
|
private_get_copytrading_trade_orders_history = privateGetCopytradingTradeOrdersHistory = Entry('copytrading/trade/orders-history', 'private', 'GET', {'cost': 1})
|
40
44
|
private_get_copytrading_trade_pending_tpsl_by_order = privateGetCopytradingTradePendingTpslByOrder = Entry('copytrading/trade/pending-tpsl-by-order', 'private', 'GET', {'cost': 1})
|
45
|
+
private_post_account_set_margin_mode = privatePostAccountSetMarginMode = Entry('account/set-margin-mode', 'private', 'POST', {'cost': 1})
|
46
|
+
private_post_account_set_position_mode = privatePostAccountSetPositionMode = Entry('account/set-position-mode', 'private', 'POST', {'cost': 1})
|
41
47
|
private_post_trade_order = privatePostTradeOrder = Entry('trade/order', 'private', 'POST', {'cost': 1})
|
48
|
+
private_post_trade_order_algo = privatePostTradeOrderAlgo = Entry('trade/order-algo', 'private', 'POST', {'cost': 1})
|
42
49
|
private_post_trade_cancel_order = privatePostTradeCancelOrder = Entry('trade/cancel-order', 'private', 'POST', {'cost': 1})
|
50
|
+
private_post_trade_cancel_algo = privatePostTradeCancelAlgo = Entry('trade/cancel-algo', 'private', 'POST', {'cost': 1})
|
43
51
|
private_post_account_set_leverage = privatePostAccountSetLeverage = Entry('account/set-leverage', 'private', 'POST', {'cost': 1})
|
44
52
|
private_post_trade_batch_orders = privatePostTradeBatchOrders = Entry('trade/batch-orders', 'private', 'POST', {'cost': 1})
|
45
53
|
private_post_trade_order_tpsl = privatePostTradeOrderTpsl = Entry('trade/order-tpsl', 'private', 'POST', {'cost': 1})
|
ccxt/abstract/btcbox.py
CHANGED
@@ -12,3 +12,4 @@ class ImplicitAPI:
|
|
12
12
|
private_post_trade_list = privatePostTradeList = Entry('trade_list', 'private', 'POST', {})
|
13
13
|
private_post_trade_view = privatePostTradeView = Entry('trade_view', 'private', 'POST', {})
|
14
14
|
private_post_wallet = privatePostWallet = Entry('wallet', 'private', 'POST', {})
|
15
|
+
webapi_get_ajax_coin_coininfo = webApiGetAjaxCoinCoinInfo = Entry('ajax/coin/coinInfo', 'webApi', 'GET', {})
|
ccxt/apex.py
CHANGED
@@ -498,11 +498,6 @@ class apex(Exchange, ImplicitAPI):
|
|
498
498
|
code = self.safe_currency_code(currencyId)
|
499
499
|
name = self.safe_string(currency, 'displayName')
|
500
500
|
networks: dict = {}
|
501
|
-
minPrecision = None
|
502
|
-
minWithdrawFeeString = None
|
503
|
-
minWithdrawString = None
|
504
|
-
deposit = False
|
505
|
-
withdraw = False
|
506
501
|
for j in range(0, len(chains)):
|
507
502
|
chain = chains[j]
|
508
503
|
tokens = self.safe_list(chain, 'tokens', [])
|
@@ -512,53 +507,48 @@ class apex(Exchange, ImplicitAPI):
|
|
512
507
|
if tokenName == currencyId:
|
513
508
|
networkId = self.safe_string(chain, 'chainId')
|
514
509
|
networkCode = self.network_id_to_code(networkId)
|
515
|
-
precision = self.parse_number(self.parse_precision(self.safe_string(currency, 'decimals')))
|
516
|
-
minPrecision = precision if (minPrecision is None) else min(minPrecision, precision)
|
517
|
-
depositAllowed = not self.safe_bool(chain, 'stopDeposit')
|
518
|
-
deposit = depositAllowed if (depositAllowed) else deposit
|
519
|
-
withdrawAllowed = self.safe_bool(token, 'withdrawEnable')
|
520
|
-
withdraw = withdrawAllowed if (withdrawAllowed) else withdraw
|
521
|
-
minWithdrawFeeString = self.safe_string(token, 'minFee')
|
522
|
-
minWithdrawString = self.safe_string(token, 'minWithdraw')
|
523
|
-
minNetworkDepositString = self.safe_string(chain, 'depositMin')
|
524
510
|
networks[networkCode] = {
|
525
511
|
'info': chain,
|
526
512
|
'id': networkId,
|
527
513
|
'network': networkCode,
|
528
|
-
'active':
|
529
|
-
'deposit':
|
530
|
-
'withdraw':
|
531
|
-
'fee': self.
|
532
|
-
'precision':
|
514
|
+
'active': None,
|
515
|
+
'deposit': not self.safe_bool(chain, 'depositDisable'),
|
516
|
+
'withdraw': self.safe_bool(token, 'withdrawEnable'),
|
517
|
+
'fee': self.safe_number(token, 'minFee'),
|
518
|
+
'precision': self.parse_number(self.parse_precision(self.safe_string(token, 'decimals'))),
|
533
519
|
'limits': {
|
534
520
|
'withdraw': {
|
535
|
-
'min': self.
|
521
|
+
'min': self.safe_number(token, 'minWithdraw'),
|
536
522
|
'max': None,
|
537
523
|
},
|
538
524
|
'deposit': {
|
539
|
-
'min': self.
|
525
|
+
'min': self.safe_number(chain, 'minDeposit'),
|
540
526
|
'max': None,
|
541
527
|
},
|
542
528
|
},
|
543
529
|
}
|
544
|
-
|
530
|
+
networkKeys = list(networks.keys())
|
531
|
+
networksLength = len(networkKeys)
|
532
|
+
emptyChains = networksLength == 0 # non-functional coins
|
533
|
+
valueForEmpty = False if emptyChains else None
|
534
|
+
result[code] = self.safe_currency_structure({
|
545
535
|
'info': currency,
|
546
536
|
'code': code,
|
547
537
|
'id': currencyId,
|
548
538
|
'type': 'crypto',
|
549
539
|
'name': name,
|
550
|
-
'active':
|
551
|
-
'deposit':
|
552
|
-
'withdraw':
|
553
|
-
'fee':
|
554
|
-
'precision':
|
540
|
+
'active': None,
|
541
|
+
'deposit': valueForEmpty,
|
542
|
+
'withdraw': valueForEmpty,
|
543
|
+
'fee': None,
|
544
|
+
'precision': None,
|
555
545
|
'limits': {
|
556
546
|
'amount': {
|
557
547
|
'min': None,
|
558
548
|
'max': None,
|
559
549
|
},
|
560
550
|
'withdraw': {
|
561
|
-
'min':
|
551
|
+
'min': None,
|
562
552
|
'max': None,
|
563
553
|
},
|
564
554
|
'deposit': {
|
@@ -567,7 +557,7 @@ class apex(Exchange, ImplicitAPI):
|
|
567
557
|
},
|
568
558
|
},
|
569
559
|
'networks': networks,
|
570
|
-
}
|
560
|
+
})
|
571
561
|
return result
|
572
562
|
|
573
563
|
def fetch_markets(self, params={}) -> List[Market]:
|
@@ -1087,9 +1077,10 @@ class apex(Exchange, ImplicitAPI):
|
|
1087
1077
|
for i in range(0, len(resultList)):
|
1088
1078
|
entry = resultList[i]
|
1089
1079
|
timestamp = self.safe_integer(entry, 'fundingTimestamp')
|
1080
|
+
marketId = self.safe_string(entry, 'symbol')
|
1090
1081
|
rates.append({
|
1091
1082
|
'info': entry,
|
1092
|
-
'symbol': self.
|
1083
|
+
'symbol': self.safe_symbol(marketId, market),
|
1093
1084
|
'fundingRate': self.safe_number(entry, 'rate'),
|
1094
1085
|
'timestamp': timestamp,
|
1095
1086
|
'datetime': self.iso8601(timestamp),
|
ccxt/ascendex.py
CHANGED
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.85'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -88,7 +88,6 @@ from ccxt.async_support.bitso import bitso
|
|
88
88
|
from ccxt.async_support.bitstamp import bitstamp # noqa: F401
|
89
89
|
from ccxt.async_support.bitteam import bitteam # noqa: F401
|
90
90
|
from ccxt.async_support.bitvavo import bitvavo # noqa: F401
|
91
|
-
from ccxt.async_support.bl3p import bl3p # noqa: F401
|
92
91
|
from ccxt.async_support.blockchaincom import blockchaincom # noqa: F401
|
93
92
|
from ccxt.async_support.blofin import blofin # noqa: F401
|
94
93
|
from ccxt.async_support.btcalpha import btcalpha # noqa: F401
|
@@ -130,7 +129,6 @@ from ccxt.async_support.htx import htx
|
|
130
129
|
from ccxt.async_support.huobi import huobi # noqa: F401
|
131
130
|
from ccxt.async_support.huobijp import huobijp # noqa: F401
|
132
131
|
from ccxt.async_support.hyperliquid import hyperliquid # noqa: F401
|
133
|
-
from ccxt.async_support.idex import idex # noqa: F401
|
134
132
|
from ccxt.async_support.independentreserve import independentreserve # noqa: F401
|
135
133
|
from ccxt.async_support.indodax import indodax # noqa: F401
|
136
134
|
from ccxt.async_support.kraken import kraken # noqa: F401
|
@@ -197,7 +195,6 @@ exchanges = [
|
|
197
195
|
'bitstamp',
|
198
196
|
'bitteam',
|
199
197
|
'bitvavo',
|
200
|
-
'bl3p',
|
201
198
|
'blockchaincom',
|
202
199
|
'blofin',
|
203
200
|
'btcalpha',
|
@@ -239,7 +236,6 @@ exchanges = [
|
|
239
236
|
'huobi',
|
240
237
|
'huobijp',
|
241
238
|
'hyperliquid',
|
242
|
-
'idex',
|
243
239
|
'independentreserve',
|
244
240
|
'indodax',
|
245
241
|
'kraken',
|
ccxt/async_support/apex.py
CHANGED
@@ -498,11 +498,6 @@ class apex(Exchange, ImplicitAPI):
|
|
498
498
|
code = self.safe_currency_code(currencyId)
|
499
499
|
name = self.safe_string(currency, 'displayName')
|
500
500
|
networks: dict = {}
|
501
|
-
minPrecision = None
|
502
|
-
minWithdrawFeeString = None
|
503
|
-
minWithdrawString = None
|
504
|
-
deposit = False
|
505
|
-
withdraw = False
|
506
501
|
for j in range(0, len(chains)):
|
507
502
|
chain = chains[j]
|
508
503
|
tokens = self.safe_list(chain, 'tokens', [])
|
@@ -512,53 +507,48 @@ class apex(Exchange, ImplicitAPI):
|
|
512
507
|
if tokenName == currencyId:
|
513
508
|
networkId = self.safe_string(chain, 'chainId')
|
514
509
|
networkCode = self.network_id_to_code(networkId)
|
515
|
-
precision = self.parse_number(self.parse_precision(self.safe_string(currency, 'decimals')))
|
516
|
-
minPrecision = precision if (minPrecision is None) else min(minPrecision, precision)
|
517
|
-
depositAllowed = not self.safe_bool(chain, 'stopDeposit')
|
518
|
-
deposit = depositAllowed if (depositAllowed) else deposit
|
519
|
-
withdrawAllowed = self.safe_bool(token, 'withdrawEnable')
|
520
|
-
withdraw = withdrawAllowed if (withdrawAllowed) else withdraw
|
521
|
-
minWithdrawFeeString = self.safe_string(token, 'minFee')
|
522
|
-
minWithdrawString = self.safe_string(token, 'minWithdraw')
|
523
|
-
minNetworkDepositString = self.safe_string(chain, 'depositMin')
|
524
510
|
networks[networkCode] = {
|
525
511
|
'info': chain,
|
526
512
|
'id': networkId,
|
527
513
|
'network': networkCode,
|
528
|
-
'active':
|
529
|
-
'deposit':
|
530
|
-
'withdraw':
|
531
|
-
'fee': self.
|
532
|
-
'precision':
|
514
|
+
'active': None,
|
515
|
+
'deposit': not self.safe_bool(chain, 'depositDisable'),
|
516
|
+
'withdraw': self.safe_bool(token, 'withdrawEnable'),
|
517
|
+
'fee': self.safe_number(token, 'minFee'),
|
518
|
+
'precision': self.parse_number(self.parse_precision(self.safe_string(token, 'decimals'))),
|
533
519
|
'limits': {
|
534
520
|
'withdraw': {
|
535
|
-
'min': self.
|
521
|
+
'min': self.safe_number(token, 'minWithdraw'),
|
536
522
|
'max': None,
|
537
523
|
},
|
538
524
|
'deposit': {
|
539
|
-
'min': self.
|
525
|
+
'min': self.safe_number(chain, 'minDeposit'),
|
540
526
|
'max': None,
|
541
527
|
},
|
542
528
|
},
|
543
529
|
}
|
544
|
-
|
530
|
+
networkKeys = list(networks.keys())
|
531
|
+
networksLength = len(networkKeys)
|
532
|
+
emptyChains = networksLength == 0 # non-functional coins
|
533
|
+
valueForEmpty = False if emptyChains else None
|
534
|
+
result[code] = self.safe_currency_structure({
|
545
535
|
'info': currency,
|
546
536
|
'code': code,
|
547
537
|
'id': currencyId,
|
548
538
|
'type': 'crypto',
|
549
539
|
'name': name,
|
550
|
-
'active':
|
551
|
-
'deposit':
|
552
|
-
'withdraw':
|
553
|
-
'fee':
|
554
|
-
'precision':
|
540
|
+
'active': None,
|
541
|
+
'deposit': valueForEmpty,
|
542
|
+
'withdraw': valueForEmpty,
|
543
|
+
'fee': None,
|
544
|
+
'precision': None,
|
555
545
|
'limits': {
|
556
546
|
'amount': {
|
557
547
|
'min': None,
|
558
548
|
'max': None,
|
559
549
|
},
|
560
550
|
'withdraw': {
|
561
|
-
'min':
|
551
|
+
'min': None,
|
562
552
|
'max': None,
|
563
553
|
},
|
564
554
|
'deposit': {
|
@@ -567,7 +557,7 @@ class apex(Exchange, ImplicitAPI):
|
|
567
557
|
},
|
568
558
|
},
|
569
559
|
'networks': networks,
|
570
|
-
}
|
560
|
+
})
|
571
561
|
return result
|
572
562
|
|
573
563
|
async def fetch_markets(self, params={}) -> List[Market]:
|
@@ -1087,9 +1077,10 @@ class apex(Exchange, ImplicitAPI):
|
|
1087
1077
|
for i in range(0, len(resultList)):
|
1088
1078
|
entry = resultList[i]
|
1089
1079
|
timestamp = self.safe_integer(entry, 'fundingTimestamp')
|
1080
|
+
marketId = self.safe_string(entry, 'symbol')
|
1090
1081
|
rates.append({
|
1091
1082
|
'info': entry,
|
1092
|
-
'symbol': self.
|
1083
|
+
'symbol': self.safe_symbol(marketId, market),
|
1093
1084
|
'fundingRate': self.safe_number(entry, 'rate'),
|
1094
1085
|
'timestamp': timestamp,
|
1095
1086
|
'datetime': self.iso8601(timestamp),
|
ccxt/async_support/ascendex.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.4.
|
5
|
+
__version__ = '4.4.85'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -34,7 +34,7 @@ from ccxt.base.exchange import Exchange as BaseExchange, ArgumentsRequired
|
|
34
34
|
# -----------------------------------------------------------------------------
|
35
35
|
|
36
36
|
from ccxt.async_support.base.ws.functions import inflate, inflate64, gunzip
|
37
|
-
from ccxt.async_support.base.ws.
|
37
|
+
from ccxt.async_support.base.ws.aiohttp_client import AiohttpClient
|
38
38
|
from ccxt.async_support.base.ws.future import Future
|
39
39
|
from ccxt.async_support.base.ws.order_book import OrderBook, IndexedOrderBook, CountedOrderBook
|
40
40
|
|
@@ -279,7 +279,28 @@ class Exchange(BaseExchange):
|
|
279
279
|
markets = await self.fetch_markets(params)
|
280
280
|
return self.set_markets(markets, currencies)
|
281
281
|
|
282
|
+
|
282
283
|
async def load_markets(self, reload=False, params={}):
|
284
|
+
"""
|
285
|
+
Loads and prepares the markets for trading.
|
286
|
+
|
287
|
+
Args:
|
288
|
+
reload (bool): If True, the markets will be reloaded from the exchange.
|
289
|
+
params (dict): Additional exchange-specific parameters for the request.
|
290
|
+
|
291
|
+
Returns:
|
292
|
+
dict: A dictionary of markets.
|
293
|
+
|
294
|
+
Raises:
|
295
|
+
Exception: If the markets cannot be loaded or prepared.
|
296
|
+
|
297
|
+
Notes:
|
298
|
+
This method is asynchronous.
|
299
|
+
It ensures that the markets are only loaded once, even if called multiple times.
|
300
|
+
If the markets are already loaded and `reload` is False or not provided, it returns the existing markets.
|
301
|
+
If a reload is in progress, it waits for completion before returning.
|
302
|
+
If an error occurs during loading or preparation, an exception is raised.
|
303
|
+
"""
|
283
304
|
if (reload and not self.reloading_markets) or not self.markets_loading:
|
284
305
|
self.reloading_markets = True
|
285
306
|
coroutine = self.load_markets_helper(reload, params)
|
@@ -387,7 +408,9 @@ class Exchange(BaseExchange):
|
|
387
408
|
'throttle': Throttler(self.tokenBucket, self.asyncio_loop),
|
388
409
|
'asyncio_loop': self.asyncio_loop,
|
389
410
|
}, ws_options)
|
390
|
-
|
411
|
+
# we use aiohttp instead of fastClient now because of this
|
412
|
+
# https://github.com/ccxt/ccxt/pull/25995
|
413
|
+
self.clients[url] = AiohttpClient(url, on_message, on_error, on_close, on_connected, options)
|
391
414
|
self.clients[url].proxy = self.get_ws_proxy()
|
392
415
|
return self.clients[url]
|
393
416
|
|
@@ -1,5 +1,7 @@
|
|
1
1
|
import collections
|
2
|
+
import logging
|
2
3
|
|
4
|
+
logger = logging.getLogger(__name__)
|
3
5
|
|
4
6
|
class Delegate:
|
5
7
|
def __init__(self, name, delegated):
|
@@ -151,7 +153,10 @@ class ArrayCacheBySymbolById(ArrayCache):
|
|
151
153
|
if len(self._deque) == self._deque.maxlen:
|
152
154
|
delete_item = self._deque.popleft()
|
153
155
|
self._index.popleft()
|
154
|
-
|
156
|
+
try:
|
157
|
+
del self.hashmap[delete_item['symbol']][delete_item['id']]
|
158
|
+
except Exception as e:
|
159
|
+
logger.error(f"Error deleting item from hashmap: {delete_item}. Error:{e}")
|
155
160
|
self._deque.append(item)
|
156
161
|
self._index.append(item['id'])
|
157
162
|
if self._clear_all_updates:
|
ccxt/async_support/bigone.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bigone import ImplicitAPI
|
8
8
|
import asyncio
|
9
|
-
from ccxt.base.types import Any, Balances,
|
9
|
+
from ccxt.base.types import Any, Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -510,19 +510,15 @@ class bigone(Exchange, ImplicitAPI):
|
|
510
510
|
id = self.safe_string(currency, 'symbol')
|
511
511
|
code = self.safe_currency_code(id)
|
512
512
|
name = self.safe_string(currency, 'name')
|
513
|
-
type = 'fiat' if self.safe_bool(currency, 'is_fiat') else 'crypto'
|
514
513
|
networks: dict = {}
|
515
514
|
chains = self.safe_list(currency, 'binding_gateways', [])
|
516
515
|
currencyMaxPrecision = self.parse_precision(self.safe_string_2(currency, 'withdrawal_scale', 'scale'))
|
517
|
-
currencyDepositEnabled: Bool = None
|
518
|
-
currencyWithdrawEnabled: Bool = None
|
519
516
|
for j in range(0, len(chains)):
|
520
517
|
chain = chains[j]
|
521
518
|
networkId = self.safe_string(chain, 'gateway_name')
|
522
519
|
networkCode = self.network_id_to_code(networkId)
|
523
520
|
deposit = self.safe_bool(chain, 'is_deposit_enabled')
|
524
521
|
withdraw = self.safe_bool(chain, 'is_withdrawal_enabled')
|
525
|
-
isActive = (deposit and withdraw)
|
526
522
|
minDepositAmount = self.safe_string(chain, 'min_deposit_amount')
|
527
523
|
minWithdrawalAmount = self.safe_string(chain, 'min_withdrawal_amount')
|
528
524
|
withdrawalFee = self.safe_string(chain, 'withdrawal_fee')
|
@@ -533,7 +529,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
533
529
|
'margin': None,
|
534
530
|
'deposit': deposit,
|
535
531
|
'withdraw': withdraw,
|
536
|
-
'active':
|
532
|
+
'active': None,
|
537
533
|
'fee': self.parse_number(withdrawalFee),
|
538
534
|
'precision': self.parse_number(precision),
|
539
535
|
'limits': {
|
@@ -548,19 +544,26 @@ class bigone(Exchange, ImplicitAPI):
|
|
548
544
|
},
|
549
545
|
'info': chain,
|
550
546
|
}
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
547
|
+
chainLength = len(chains)
|
548
|
+
type: Str = None
|
549
|
+
if self.safe_bool(currency, 'is_fiat'):
|
550
|
+
type = 'fiat'
|
551
|
+
elif chainLength == 0:
|
552
|
+
if self.is_leveraged_currency(id):
|
553
|
+
type = 'leveraged'
|
554
|
+
else:
|
555
|
+
type = 'other'
|
556
|
+
else:
|
557
|
+
type = 'crypto'
|
558
|
+
result[code] = self.safe_currency_structure({
|
556
559
|
'id': id,
|
557
560
|
'code': code,
|
558
561
|
'info': currency,
|
559
562
|
'name': name,
|
560
563
|
'type': type,
|
561
564
|
'active': None,
|
562
|
-
'deposit':
|
563
|
-
'withdraw':
|
565
|
+
'deposit': None,
|
566
|
+
'withdraw': None,
|
564
567
|
'fee': None,
|
565
568
|
'precision': self.parse_number(currencyMaxPrecision),
|
566
569
|
'limits': {
|
@@ -574,7 +577,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
574
577
|
},
|
575
578
|
},
|
576
579
|
'networks': networks,
|
577
|
-
}
|
580
|
+
})
|
578
581
|
return result
|
579
582
|
|
580
583
|
async def fetch_markets(self, params={}) -> List[Market]:
|
ccxt/async_support/bingx.py
CHANGED
@@ -767,56 +767,41 @@ class bingx(Exchange, ImplicitAPI):
|
|
767
767
|
name = self.safe_string(entry, 'name')
|
768
768
|
networkList = self.safe_list(entry, 'networkList')
|
769
769
|
networks: dict = {}
|
770
|
-
fee = None
|
771
|
-
depositEnabled = False
|
772
|
-
withdrawEnabled = False
|
773
|
-
defaultLimits: dict = {}
|
774
770
|
for j in range(0, len(networkList)):
|
775
771
|
rawNetwork = networkList[j]
|
776
772
|
network = self.safe_string(rawNetwork, 'network')
|
777
773
|
networkCode = self.network_id_to_code(network)
|
778
|
-
isDefault = self.safe_bool(rawNetwork, 'isDefault')
|
779
|
-
networkDepositEnabled = self.safe_bool(rawNetwork, 'depositEnable')
|
780
|
-
if networkDepositEnabled:
|
781
|
-
depositEnabled = True
|
782
|
-
networkWithdrawEnabled = self.safe_bool(rawNetwork, 'withdrawEnable')
|
783
|
-
if networkWithdrawEnabled:
|
784
|
-
withdrawEnabled = True
|
785
774
|
limits: dict = {
|
786
775
|
'withdraw': {
|
787
776
|
'min': self.safe_number(rawNetwork, 'withdrawMin'),
|
788
777
|
'max': self.safe_number(rawNetwork, 'withdrawMax'),
|
789
778
|
},
|
790
779
|
}
|
791
|
-
|
792
|
-
if isDefault:
|
793
|
-
defaultLimits = limits
|
794
|
-
precision = self.safe_number(rawNetwork, 'withdrawPrecision')
|
795
|
-
networkActive = networkDepositEnabled or networkWithdrawEnabled
|
780
|
+
precision = self.parse_number(self.parse_precision(self.safe_string(rawNetwork, 'withdrawPrecision')))
|
796
781
|
networks[networkCode] = {
|
797
782
|
'info': rawNetwork,
|
798
783
|
'id': network,
|
799
784
|
'network': networkCode,
|
800
|
-
'fee':
|
801
|
-
'active':
|
802
|
-
'deposit':
|
803
|
-
'withdraw':
|
785
|
+
'fee': self.safe_number(rawNetwork, 'withdrawFee'),
|
786
|
+
'active': None,
|
787
|
+
'deposit': self.safe_bool(rawNetwork, 'depositEnable'),
|
788
|
+
'withdraw': self.safe_bool(rawNetwork, 'withdrawEnable'),
|
804
789
|
'precision': precision,
|
805
790
|
'limits': limits,
|
806
791
|
}
|
807
|
-
active = depositEnabled or withdrawEnabled
|
808
792
|
result[code] = self.safe_currency_structure({
|
809
793
|
'info': entry,
|
810
794
|
'code': code,
|
811
795
|
'id': currencyId,
|
812
796
|
'precision': None,
|
813
797
|
'name': name,
|
814
|
-
'active':
|
815
|
-
'deposit':
|
816
|
-
'withdraw':
|
798
|
+
'active': None,
|
799
|
+
'deposit': None,
|
800
|
+
'withdraw': None,
|
817
801
|
'networks': networks,
|
818
|
-
'fee':
|
819
|
-
'limits':
|
802
|
+
'fee': None,
|
803
|
+
'limits': None,
|
804
|
+
'type': 'crypto', # only cryptos now
|
820
805
|
})
|
821
806
|
return result
|
822
807
|
|
@@ -5536,18 +5521,14 @@ class bingx(Exchange, ImplicitAPI):
|
|
5536
5521
|
:param str address: the address to withdraw to
|
5537
5522
|
:param str [tag]:
|
5538
5523
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5539
|
-
:param int [params.walletType]: 1 fund account, 2 standard account, 3 perpetual account
|
5524
|
+
:param int [params.walletType]: 1 fund account, 2 standard account, 3 perpetual account, 15 spot account
|
5540
5525
|
:returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
5541
5526
|
"""
|
5542
5527
|
tag, params = self.handle_withdraw_tag_and_params(tag, params)
|
5543
5528
|
self.check_address(address)
|
5544
5529
|
await self.load_markets()
|
5545
5530
|
currency = self.currency(code)
|
5546
|
-
walletType = self.safe_integer(params, 'walletType')
|
5547
|
-
if walletType is None:
|
5548
|
-
walletType = 1
|
5549
|
-
if not self.in_array(walletType, [1, 2, 3]):
|
5550
|
-
raise BadRequest(self.id + ' withdraw() requires either 1 fund account, 2 standard futures account, 3 perpetual account for walletType')
|
5531
|
+
walletType = self.safe_integer(params, 'walletType', 1)
|
5551
5532
|
request: dict = {
|
5552
5533
|
'coin': currency['id'],
|
5553
5534
|
'address': address,
|