ccxt 4.4.85__py2.py3-none-any.whl → 4.4.87__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 +7 -5
- ccxt/abstract/modetrade.py +119 -0
- ccxt/abstract/myokx.py +2 -0
- ccxt/abstract/okx.py +2 -0
- ccxt/abstract/okxus.py +349 -0
- ccxt/ascendex.py +187 -151
- ccxt/async_support/__init__.py +7 -5
- ccxt/async_support/ascendex.py +187 -151
- ccxt/async_support/base/exchange.py +30 -26
- ccxt/async_support/bequant.py +1 -1
- ccxt/async_support/binance.py +1 -1
- ccxt/async_support/bitget.py +4 -4
- ccxt/async_support/bitmart.py +1 -1
- ccxt/async_support/bitteam.py +31 -0
- ccxt/async_support/{huobijp.py → bittrade.py} +11 -11
- ccxt/async_support/coinbase.py +2 -5
- ccxt/async_support/coinmetro.py +3 -0
- ccxt/async_support/deribit.py +4 -5
- ccxt/async_support/gate.py +91 -73
- ccxt/async_support/hollaex.py +106 -49
- ccxt/async_support/htx.py +30 -51
- ccxt/async_support/hyperliquid.py +36 -20
- ccxt/async_support/kraken.py +5 -8
- ccxt/async_support/mexc.py +2 -2
- ccxt/async_support/modetrade.py +2727 -0
- ccxt/async_support/ndax.py +25 -24
- ccxt/async_support/okcoin.py +12 -29
- ccxt/async_support/okx.py +99 -3
- ccxt/async_support/okxus.py +54 -0
- ccxt/async_support/onetrading.py +10 -7
- ccxt/async_support/oxfun.py +40 -110
- ccxt/async_support/paradex.py +6 -0
- ccxt/async_support/phemex.py +4 -6
- ccxt/async_support/poloniex.py +172 -159
- ccxt/async_support/probit.py +18 -47
- ccxt/async_support/timex.py +5 -10
- ccxt/async_support/vertex.py +3 -4
- ccxt/async_support/whitebit.py +41 -11
- ccxt/async_support/woo.py +101 -75
- ccxt/async_support/woofipro.py +25 -20
- ccxt/async_support/xt.py +31 -41
- ccxt/base/exchange.py +12 -9
- ccxt/bequant.py +1 -1
- ccxt/binance.py +1 -1
- ccxt/bitget.py +4 -4
- ccxt/bitmart.py +1 -1
- ccxt/bitteam.py +31 -0
- ccxt/{huobijp.py → bittrade.py} +11 -11
- ccxt/coinbase.py +2 -5
- ccxt/coinmetro.py +3 -0
- ccxt/deribit.py +4 -5
- ccxt/gate.py +91 -73
- ccxt/hollaex.py +106 -49
- ccxt/htx.py +30 -51
- ccxt/hyperliquid.py +36 -20
- ccxt/kraken.py +5 -8
- ccxt/mexc.py +2 -2
- ccxt/modetrade.py +2727 -0
- ccxt/ndax.py +25 -24
- ccxt/okcoin.py +12 -29
- ccxt/okx.py +99 -3
- ccxt/okxus.py +54 -0
- ccxt/onetrading.py +10 -7
- ccxt/oxfun.py +40 -110
- ccxt/paradex.py +6 -0
- ccxt/phemex.py +4 -6
- ccxt/poloniex.py +172 -159
- ccxt/pro/__init__.py +101 -3
- ccxt/pro/binance.py +1 -0
- ccxt/pro/{huobijp.py → bittrade.py} +3 -3
- ccxt/pro/luno.py +6 -5
- ccxt/pro/mexc.py +2 -0
- ccxt/pro/modetrade.py +1271 -0
- ccxt/pro/okxus.py +38 -0
- ccxt/probit.py +18 -47
- ccxt/test/tests_async.py +17 -1
- ccxt/test/tests_sync.py +17 -1
- ccxt/timex.py +5 -10
- ccxt/vertex.py +3 -4
- ccxt/whitebit.py +41 -11
- ccxt/woo.py +100 -75
- ccxt/woofipro.py +24 -20
- ccxt/xt.py +31 -41
- {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/METADATA +19 -8
- {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/RECORD +89 -84
- ccxt/abstract/kuna.py +0 -182
- ccxt/async_support/kuna.py +0 -1935
- ccxt/kuna.py +0 -1935
- /ccxt/abstract/{huobijp.py → bittrade.py} +0 -0
- {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/WHEEL +0 -0
- {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/top_level.txt +0 -0
ccxt/async_support/bitteam.py
CHANGED
@@ -38,12 +38,18 @@ class bitteam(Exchange, ImplicitAPI):
|
|
38
38
|
'future': False,
|
39
39
|
'option': False,
|
40
40
|
'addMargin': False,
|
41
|
+
'borrowCrossMargin': False,
|
42
|
+
'borrowIsolatedMargin': False,
|
41
43
|
'borrowMargin': False,
|
42
44
|
'cancelAllOrders': True,
|
43
45
|
'cancelOrder': True,
|
44
46
|
'cancelOrders': False,
|
47
|
+
'closeAllPositions': False,
|
48
|
+
'closePosition': False,
|
45
49
|
'createDepositAddress': False,
|
46
50
|
'createOrder': True,
|
51
|
+
'createOrderWithTakeProfitAndStopLoss': False,
|
52
|
+
'createOrderWithTakeProfitAndStopLossWs': False,
|
47
53
|
'createPostOnlyOrder': False,
|
48
54
|
'createReduceOnlyOrder': False,
|
49
55
|
'createStopLimitOrder': False,
|
@@ -55,8 +61,11 @@ class bitteam(Exchange, ImplicitAPI):
|
|
55
61
|
'fetchBalance': True,
|
56
62
|
'fetchBidsAsks': False,
|
57
63
|
'fetchBorrowInterest': False,
|
64
|
+
'fetchBorrowRate': False,
|
58
65
|
'fetchBorrowRateHistories': False,
|
59
66
|
'fetchBorrowRateHistory': False,
|
67
|
+
'fetchBorrowRates': False,
|
68
|
+
'fetchBorrowRatesPerSymbol': False,
|
60
69
|
'fetchCanceledOrders': True,
|
61
70
|
'fetchClosedOrder': False,
|
62
71
|
'fetchClosedOrders': True,
|
@@ -72,24 +81,42 @@ class bitteam(Exchange, ImplicitAPI):
|
|
72
81
|
'fetchDepositWithdrawFee': False,
|
73
82
|
'fetchDepositWithdrawFees': False,
|
74
83
|
'fetchFundingHistory': False,
|
84
|
+
'fetchFundingInterval': False,
|
85
|
+
'fetchFundingIntervals': False,
|
75
86
|
'fetchFundingRate': False,
|
76
87
|
'fetchFundingRateHistory': False,
|
77
88
|
'fetchFundingRates': False,
|
89
|
+
'fetchGreeks': False,
|
78
90
|
'fetchIndexOHLCV': False,
|
79
91
|
'fetchIsolatedBorrowRate': False,
|
80
92
|
'fetchIsolatedBorrowRates': False,
|
93
|
+
'fetchIsolatedPositions': False,
|
81
94
|
'fetchL3OrderBook': False,
|
82
95
|
'fetchLedger': False,
|
83
96
|
'fetchLeverage': False,
|
97
|
+
'fetchLeverages': False,
|
84
98
|
'fetchLeverageTiers': False,
|
99
|
+
'fetchLiquidations': False,
|
100
|
+
'fetchLongShortRatio': False,
|
101
|
+
'fetchLongShortRatioHistory': False,
|
102
|
+
'fetchMarginAdjustmentHistory': False,
|
103
|
+
'fetchMarginMode': False,
|
104
|
+
'fetchMarginModes': False,
|
85
105
|
'fetchMarketLeverageTiers': False,
|
86
106
|
'fetchMarkets': True,
|
87
107
|
'fetchMarkOHLCV': False,
|
108
|
+
'fetchMarkPrices': False,
|
109
|
+
'fetchMyLiquidations': False,
|
110
|
+
'fetchMySettlementHistory': False,
|
88
111
|
'fetchMyTrades': True,
|
89
112
|
'fetchOHLCV': True,
|
113
|
+
'fetchOpenInterest': False,
|
90
114
|
'fetchOpenInterestHistory': False,
|
115
|
+
'fetchOpenInterests': False,
|
91
116
|
'fetchOpenOrder': False,
|
92
117
|
'fetchOpenOrders': True,
|
118
|
+
'fetchOption': False,
|
119
|
+
'fetchOptionChain': False,
|
93
120
|
'fetchOrder': True,
|
94
121
|
'fetchOrderBook': True,
|
95
122
|
'fetchOrderBooks': False,
|
@@ -103,6 +130,7 @@ class bitteam(Exchange, ImplicitAPI):
|
|
103
130
|
'fetchPositionsHistory': False,
|
104
131
|
'fetchPositionsRisk': False,
|
105
132
|
'fetchPremiumIndexOHLCV': False,
|
133
|
+
'fetchSettlementHistory': False,
|
106
134
|
'fetchStatus': False,
|
107
135
|
'fetchTicker': True,
|
108
136
|
'fetchTickers': True,
|
@@ -115,10 +143,13 @@ class bitteam(Exchange, ImplicitAPI):
|
|
115
143
|
'fetchTransactionFees': False,
|
116
144
|
'fetchTransactions': True,
|
117
145
|
'fetchTransfers': False,
|
146
|
+
'fetchVolatilityHistory': False,
|
118
147
|
'fetchWithdrawal': False,
|
119
148
|
'fetchWithdrawals': False,
|
120
149
|
'fetchWithdrawalWhitelist': False,
|
121
150
|
'reduceMargin': False,
|
151
|
+
'repayCrossMargin': False,
|
152
|
+
'repayIsolatedMargin': False,
|
122
153
|
'repayMargin': False,
|
123
154
|
'setLeverage': False,
|
124
155
|
'setMargin': False,
|
@@ -4,7 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
-
from ccxt.abstract.
|
7
|
+
from ccxt.abstract.bittrade import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
from ccxt.base.types import Account, Any, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
@@ -27,12 +27,12 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
27
27
|
from ccxt.base.precise import Precise
|
28
28
|
|
29
29
|
|
30
|
-
class
|
30
|
+
class bittrade(Exchange, ImplicitAPI):
|
31
31
|
|
32
32
|
def describe(self) -> Any:
|
33
|
-
return self.deep_extend(super(
|
34
|
-
'id': '
|
35
|
-
'name': '
|
33
|
+
return self.deep_extend(super(bittrade, self).describe(), {
|
34
|
+
'id': 'bittrade',
|
35
|
+
'name': 'BitTrade',
|
36
36
|
'countries': ['JP'],
|
37
37
|
'rateLimit': 100,
|
38
38
|
'userAgent': self.userAgents['chrome39'],
|
@@ -108,10 +108,10 @@ class huobijp(Exchange, ImplicitAPI):
|
|
108
108
|
'v2Public': 'https://{hostname}',
|
109
109
|
'v2Private': 'https://{hostname}',
|
110
110
|
},
|
111
|
-
'www': 'https://www.
|
112
|
-
'referral': 'https://www.
|
113
|
-
'doc': 'https://api-doc.
|
114
|
-
'fees': 'https://www.
|
111
|
+
'www': 'https://www.bittrade.co.jp',
|
112
|
+
'referral': 'https://www.bittrade.co.jp/register/?invite_code=znnq3',
|
113
|
+
'doc': 'https://api-doc.bittrade.co.jp',
|
114
|
+
'fees': 'https://www.bittrade.co.jp/ja-jp/support/fee',
|
115
115
|
},
|
116
116
|
'api': {
|
117
117
|
'v2Public': {
|
@@ -1483,7 +1483,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1483
1483
|
"""
|
1484
1484
|
cancels an open order
|
1485
1485
|
:param str id: order id
|
1486
|
-
:param str symbol: not used by
|
1486
|
+
:param str symbol: not used by bittrade cancelOrder()
|
1487
1487
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1488
1488
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1489
1489
|
"""
|
@@ -1503,7 +1503,7 @@ class huobijp(Exchange, ImplicitAPI):
|
|
1503
1503
|
"""
|
1504
1504
|
cancel multiple orders
|
1505
1505
|
:param str[] ids: order ids
|
1506
|
-
:param str symbol: not used by
|
1506
|
+
:param str symbol: not used by bittrade cancelOrders()
|
1507
1507
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1508
1508
|
:returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1509
1509
|
"""
|
ccxt/async_support/coinbase.py
CHANGED
@@ -1425,9 +1425,6 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1425
1425
|
self.v3PublicGetBrokerageMarketProducts(self.extend(params, {'product_type': 'FUTURE'})),
|
1426
1426
|
self.v3PublicGetBrokerageMarketProducts(self.extend(params, {'product_type': 'FUTURE', 'contract_expiry_type': 'PERPETUAL'})),
|
1427
1427
|
]
|
1428
|
-
if self.check_required_credentials(False):
|
1429
|
-
unresolvedContractPromises.append(self.extend(params, {'product_type': 'FUTURE'}))
|
1430
|
-
unresolvedContractPromises.append(self.extend(params, {'product_type': 'FUTURE', 'contract_expiry_type': 'PERPETUAL'}))
|
1431
1428
|
except Exception as e:
|
1432
1429
|
unresolvedContractPromises = [] # the sync version of ccxt won't have the promise.all line so the request is made here. Some users can't access perpetual products
|
1433
1430
|
promises = await asyncio.gather(*spotUnresolvedPromises)
|
@@ -1440,8 +1437,8 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1440
1437
|
fees = self.safe_dict(promises, 1, {})
|
1441
1438
|
expiringFutures = self.safe_dict(contractPromises, 0, {})
|
1442
1439
|
perpetualFutures = self.safe_dict(contractPromises, 1, {})
|
1443
|
-
expiringFees = self.safe_dict(contractPromises,
|
1444
|
-
perpetualFees = self.safe_dict(contractPromises,
|
1440
|
+
expiringFees = self.safe_dict(contractPromises, 0, {})
|
1441
|
+
perpetualFees = self.safe_dict(contractPromises, 1, {})
|
1445
1442
|
#
|
1446
1443
|
# {
|
1447
1444
|
# "total_volume": 0,
|
ccxt/async_support/coinmetro.py
CHANGED
@@ -394,6 +394,9 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
394
394
|
elif typeRaw == 'fiat':
|
395
395
|
type = 'fiat'
|
396
396
|
precisionDigits = self.safe_string_2(currency, 'digits', 'notabeneDecimals')
|
397
|
+
if code == 'RENDER':
|
398
|
+
# RENDER is an exception(with broken info)
|
399
|
+
precisionDigits = '4'
|
397
400
|
result[code] = self.safe_currency_structure({
|
398
401
|
'id': id,
|
399
402
|
'code': code,
|
ccxt/async_support/deribit.py
CHANGED
@@ -640,18 +640,17 @@ class deribit(Exchange, ImplicitAPI):
|
|
640
640
|
# "testnet": True
|
641
641
|
# }
|
642
642
|
#
|
643
|
-
data = self.
|
643
|
+
data = self.safe_list(response, 'result', [])
|
644
644
|
result: dict = {}
|
645
645
|
for i in range(0, len(data)):
|
646
646
|
currency = data[i]
|
647
647
|
currencyId = self.safe_string(currency, 'currency')
|
648
648
|
code = self.safe_currency_code(currencyId)
|
649
|
-
|
650
|
-
result[code] = {
|
649
|
+
result[code] = self.safe_currency_structure({
|
651
650
|
'info': currency,
|
652
651
|
'code': code,
|
653
652
|
'id': currencyId,
|
654
|
-
'name':
|
653
|
+
'name': self.safe_string(currency, 'currency_long'),
|
655
654
|
'active': None,
|
656
655
|
'deposit': None,
|
657
656
|
'withdraw': None,
|
@@ -673,7 +672,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
673
672
|
},
|
674
673
|
},
|
675
674
|
'networks': None,
|
676
|
-
}
|
675
|
+
})
|
677
676
|
return result
|
678
677
|
|
679
678
|
def code_from_options(self, methodName, params={}):
|
ccxt/async_support/gate.py
CHANGED
@@ -126,7 +126,7 @@ class gate(Exchange, ImplicitAPI):
|
|
126
126
|
'fetchCurrencies': True,
|
127
127
|
'fetchDepositAddress': True,
|
128
128
|
'fetchDepositAddresses': False,
|
129
|
-
'fetchDepositAddressesByNetwork':
|
129
|
+
'fetchDepositAddressesByNetwork': True,
|
130
130
|
'fetchDeposits': True,
|
131
131
|
'fetchDepositWithdrawFee': 'emulated',
|
132
132
|
'fetchDepositWithdrawFees': True,
|
@@ -735,6 +735,16 @@ class gate(Exchange, ImplicitAPI):
|
|
735
735
|
},
|
736
736
|
'networksById': {
|
737
737
|
'OPETH': 'OP',
|
738
|
+
'ETH': 'ERC20', # for GOlang
|
739
|
+
'ERC20': 'ERC20',
|
740
|
+
'TRX': 'TRC20',
|
741
|
+
'TRC20': 'TRC20',
|
742
|
+
'HT': 'HRC20',
|
743
|
+
'HECO': 'HRC20',
|
744
|
+
'BSC': 'BEP20',
|
745
|
+
'BEP20': 'BEP20',
|
746
|
+
'POLYGON': 'MATIC',
|
747
|
+
'POL': 'MATIC',
|
738
748
|
},
|
739
749
|
'timeInForce': {
|
740
750
|
'GTC': 'gtc',
|
@@ -1224,6 +1234,8 @@ class gate(Exchange, ImplicitAPI):
|
|
1224
1234
|
"""
|
1225
1235
|
if self.options['adjustForTimeDifference']:
|
1226
1236
|
await self.load_time_difference()
|
1237
|
+
if self.check_required_credentials(False):
|
1238
|
+
await self.load_unified_status()
|
1227
1239
|
sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
|
1228
1240
|
rawPromises = [
|
1229
1241
|
self.fetch_contract_markets(params),
|
@@ -1797,84 +1809,92 @@ class gate(Exchange, ImplicitAPI):
|
|
1797
1809
|
apiBackup = self.safe_value(self.urls, 'apiBackup')
|
1798
1810
|
if apiBackup is not None:
|
1799
1811
|
return None
|
1800
|
-
if self.check_required_credentials(False):
|
1801
|
-
await self.load_unified_status()
|
1802
1812
|
response = await self.publicSpotGetCurrencies(params)
|
1803
1813
|
#
|
1804
|
-
#
|
1805
|
-
#
|
1806
|
-
#
|
1807
|
-
#
|
1808
|
-
#
|
1809
|
-
#
|
1810
|
-
#
|
1811
|
-
#
|
1812
|
-
#
|
1813
|
-
#
|
1814
|
-
#
|
1815
|
-
#
|
1814
|
+
# [
|
1815
|
+
# {
|
1816
|
+
# "currency": "USDT",
|
1817
|
+
# "name": "Tether",
|
1818
|
+
# "delisted": False,
|
1819
|
+
# "withdraw_disabled": False,
|
1820
|
+
# "withdraw_delayed": False,
|
1821
|
+
# "deposit_disabled": False,
|
1822
|
+
# "trade_disabled": False,
|
1823
|
+
# "fixed_rate": "",
|
1824
|
+
# "chain": "ETH",
|
1825
|
+
# "chains": [
|
1826
|
+
# {
|
1827
|
+
# "name": "ETH",
|
1828
|
+
# "addr": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
1829
|
+
# "withdraw_disabled": False,
|
1830
|
+
# "withdraw_delayed": False,
|
1831
|
+
# "deposit_disabled": False
|
1832
|
+
# },
|
1833
|
+
# {
|
1834
|
+
# "name": "ARBEVM",
|
1835
|
+
# "addr": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
|
1836
|
+
# "withdraw_disabled": False,
|
1837
|
+
# "withdraw_delayed": False,
|
1838
|
+
# "deposit_disabled": False
|
1839
|
+
# },
|
1840
|
+
# {
|
1841
|
+
# "name": "BSC",
|
1842
|
+
# "addr": "0x55d398326f99059fF775485246999027B3197955",
|
1843
|
+
# "withdraw_disabled": False,
|
1844
|
+
# "withdraw_delayed": False,
|
1845
|
+
# "deposit_disabled": False
|
1846
|
+
# },
|
1847
|
+
# ]
|
1848
|
+
# },
|
1849
|
+
# ]
|
1816
1850
|
#
|
1817
1851
|
indexedCurrencies = self.index_by(response, 'currency')
|
1818
1852
|
result: dict = {}
|
1819
1853
|
for i in range(0, len(response)):
|
1820
1854
|
entry = response[i]
|
1821
1855
|
currencyId = self.safe_string(entry, 'currency')
|
1822
|
-
|
1823
|
-
partFirst = self.safe_string(parts, 0)
|
1824
|
-
# if there's an underscore then the second part is always the chain name(except the _OLD suffix)
|
1825
|
-
currencyName = currencyId if currencyId.endswith('_OLD') else partFirst
|
1826
|
-
withdrawDisabled = self.safe_bool(entry, 'withdraw_disabled', False)
|
1827
|
-
depositDisabled = self.safe_bool(entry, 'deposit_disabled', False)
|
1828
|
-
tradeDisabled = self.safe_bool(entry, 'trade_disabled', False)
|
1829
|
-
precision = self.parse_number('0.0001') # temporary safe default, because no value provided from API
|
1830
|
-
code = self.safe_currency_code(currencyName)
|
1856
|
+
code = self.safe_currency_code(currencyId)
|
1831
1857
|
# check leveraged tokens(e.g. BTC3S, ETH5L)
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
'
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1858
|
+
type = 'leveraged' if self.is_leveraged_currency(currencyId, True, indexedCurrencies) else 'crypto'
|
1859
|
+
chains = self.safe_list(entry, 'chains', [])
|
1860
|
+
networks = {}
|
1861
|
+
for j in range(0, len(chains)):
|
1862
|
+
chain = chains[j]
|
1863
|
+
networkId = self.safe_string(chain, 'name')
|
1864
|
+
networkCode = self.network_id_to_code(networkId)
|
1865
|
+
networks[networkCode] = {
|
1866
|
+
'info': chain,
|
1867
|
+
'id': networkId,
|
1868
|
+
'network': networkCode,
|
1869
|
+
'active': None,
|
1870
|
+
'deposit': not self.safe_bool(chain, 'deposit_disabled'),
|
1871
|
+
'withdraw': not self.safe_bool(chain, 'withdraw_disabled'),
|
1872
|
+
'fee': None,
|
1873
|
+
'precision': self.parse_number('0.0001'), # temporary safe default, because no value provided from API,
|
1874
|
+
'limits': {
|
1875
|
+
'deposit': {
|
1876
|
+
'min': None,
|
1877
|
+
'max': None,
|
1878
|
+
},
|
1879
|
+
'withdraw': {
|
1880
|
+
'min': None,
|
1881
|
+
'max': None,
|
1882
|
+
},
|
1853
1883
|
},
|
1854
|
-
},
|
1855
|
-
'active': not tradeDisabled,
|
1856
|
-
'deposit': not depositDisabled,
|
1857
|
-
'withdraw': not withdrawDisabled,
|
1858
|
-
'fee': None,
|
1859
|
-
'precision': precision,
|
1860
|
-
}
|
1861
|
-
# check if first entry for the specific currency
|
1862
|
-
if not (code in result):
|
1863
|
-
result[code] = {
|
1864
|
-
'id': currencyName,
|
1865
|
-
'lowerCaseId': currencyName.lower(),
|
1866
|
-
'code': code,
|
1867
|
-
'type': type,
|
1868
|
-
'precision': precision,
|
1869
|
-
'limits': None,
|
1870
|
-
'networks': {},
|
1871
|
-
'info': [], # will be filled below
|
1872
1884
|
}
|
1873
|
-
result[code]
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1885
|
+
result[code] = self.safe_currency_structure({
|
1886
|
+
'id': currencyId,
|
1887
|
+
'code': code,
|
1888
|
+
'name': self.safe_string(entry, 'name'),
|
1889
|
+
'type': type,
|
1890
|
+
'active': not self.safe_bool(entry, 'delisted'),
|
1891
|
+
'deposit': not self.safe_bool(entry, 'deposit_disabled'),
|
1892
|
+
'withdraw': not self.safe_bool(entry, 'withdraw_disabled'),
|
1893
|
+
'fee': None,
|
1894
|
+
'networks': networks,
|
1895
|
+
'precision': self.parse_number('0.0001'),
|
1896
|
+
'info': entry,
|
1897
|
+
})
|
1878
1898
|
return result
|
1879
1899
|
|
1880
1900
|
async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
@@ -2139,9 +2159,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2139
2159
|
chains = self.safe_value(response, 'multichain_addresses', [])
|
2140
2160
|
currencyId = self.safe_string(response, 'currency')
|
2141
2161
|
currency = self.safe_currency(currencyId, currency)
|
2142
|
-
parsed = self.parse_deposit_addresses(chains,
|
2143
|
-
'currency': currency['id'],
|
2144
|
-
})
|
2162
|
+
parsed = self.parse_deposit_addresses(chains, None, False)
|
2145
2163
|
return self.index_by(parsed, 'network')
|
2146
2164
|
|
2147
2165
|
async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
@@ -2159,8 +2177,8 @@ class gate(Exchange, ImplicitAPI):
|
|
2159
2177
|
networkCode = None
|
2160
2178
|
networkCode, params = self.handle_network_code_and_params(params)
|
2161
2179
|
chainsIndexedById = await self.fetch_deposit_addresses_by_network(code, params)
|
2162
|
-
|
2163
|
-
return chainsIndexedById[
|
2180
|
+
selectedNetworkIdOrCode = self.select_network_code_from_unified_networks(code, networkCode, chainsIndexedById)
|
2181
|
+
return chainsIndexedById[selectedNetworkIdOrCode]
|
2164
2182
|
|
2165
2183
|
def parse_deposit_address(self, depositAddress, currency=None):
|
2166
2184
|
#
|
ccxt/async_support/hollaex.py
CHANGED
@@ -292,6 +292,14 @@ class hollaex(Exchange, ImplicitAPI):
|
|
292
292
|
'BNB': 'bnb',
|
293
293
|
'MATIC': 'matic',
|
294
294
|
},
|
295
|
+
'networksById': {
|
296
|
+
'eth': 'ERC20',
|
297
|
+
'ETH': 'ERC20',
|
298
|
+
'ERC20': 'ERC20',
|
299
|
+
'trx': 'TRC20',
|
300
|
+
'TRX': 'TRC20',
|
301
|
+
'TRC20': 'TRC20',
|
302
|
+
},
|
295
303
|
},
|
296
304
|
})
|
297
305
|
|
@@ -421,66 +429,115 @@ class hollaex(Exchange, ImplicitAPI):
|
|
421
429
|
"""
|
422
430
|
response = await self.publicGetConstants(params)
|
423
431
|
#
|
424
|
-
#
|
425
|
-
#
|
426
|
-
#
|
427
|
-
#
|
428
|
-
#
|
429
|
-
#
|
430
|
-
#
|
431
|
-
#
|
432
|
-
#
|
433
|
-
#
|
434
|
-
#
|
435
|
-
#
|
436
|
-
#
|
437
|
-
#
|
438
|
-
#
|
439
|
-
#
|
440
|
-
#
|
441
|
-
#
|
442
|
-
#
|
443
|
-
#
|
444
|
-
#
|
445
|
-
#
|
446
|
-
#
|
447
|
-
#
|
448
|
-
#
|
449
|
-
#
|
450
|
-
#
|
451
|
-
#
|
452
|
-
#
|
453
|
-
#
|
432
|
+
# {
|
433
|
+
# "coins": {
|
434
|
+
# "usdt": {
|
435
|
+
# "id": "6",
|
436
|
+
# "fullname": "USD Tether",
|
437
|
+
# "symbol": "usdt",
|
438
|
+
# "active": True,
|
439
|
+
# "verified": True,
|
440
|
+
# "allow_deposit": True,
|
441
|
+
# "allow_withdrawal": True,
|
442
|
+
# "withdrawal_fee": "20",
|
443
|
+
# "min": "1",
|
444
|
+
# "max": "10000000",
|
445
|
+
# "increment_unit": "0.0001",
|
446
|
+
# "logo": "https://hollaex-resources.s3.ap-southeast-1.amazonaws.com/icons/usdt.svg",
|
447
|
+
# "code": "usdt",
|
448
|
+
# "is_public": True,
|
449
|
+
# "meta": {
|
450
|
+
# "color": "#27a17a",
|
451
|
+
# "website": "https://tether.to",
|
452
|
+
# "explorer": "https://blockchair.com/tether",
|
453
|
+
# "decimal_points": "6"
|
454
|
+
# },
|
455
|
+
# "estimated_price": "1",
|
456
|
+
# "description": "<p>Tether(USDT) is a stablecoin pegged 1:1 to the US dollar. It is a digital currency that aims to maintain its value while allowing for fast and secure transfer of funds. It was the first stablecoin, and is the most widely used due stablecoin due to its stability and low volatility compared to other cryptocurrencies. It was launched in 2014 by Tether Limited.</p>",
|
457
|
+
# "type": "blockchain",
|
458
|
+
# "network": "eth,trx,bnb,matic",
|
459
|
+
# "standard": "",
|
460
|
+
# "issuer": "HollaEx",
|
461
|
+
# "withdrawal_fees": {
|
462
|
+
# "bnb": {
|
463
|
+
# "value": "0.8",
|
464
|
+
# "active": True,
|
465
|
+
# "symbol": "usdt"
|
466
|
+
# },
|
467
|
+
# "eth": {
|
468
|
+
# "value": "1.5",
|
469
|
+
# "active": True,
|
470
|
+
# "symbol": "usdt"
|
471
|
+
# },
|
472
|
+
# "trx": {
|
473
|
+
# "value": "4",
|
474
|
+
# "active": True,
|
475
|
+
# "symbol": "usdt"
|
476
|
+
# },
|
477
|
+
# "matic": {
|
478
|
+
# "value": "0.3",
|
479
|
+
# "active": True,
|
480
|
+
# "symbol": "usdt"
|
481
|
+
# }
|
482
|
+
# },
|
483
|
+
# "display_name": null,
|
484
|
+
# "deposit_fees": null,
|
485
|
+
# "is_risky": False,
|
486
|
+
# "market_cap": "144568098696.29",
|
487
|
+
# "category": "stable",
|
488
|
+
# "created_at": "2019-08-09T10:45:43.367Z",
|
489
|
+
# "updated_at": "2025-03-25T17:12:37.970Z",
|
490
|
+
# "created_by": "168",
|
491
|
+
# "owner_id": "1"
|
492
|
+
# },
|
454
493
|
# },
|
455
494
|
# "network":"https://api.hollaex.network"
|
456
495
|
# }
|
457
496
|
#
|
458
|
-
coins = self.
|
497
|
+
coins = self.safe_dict(response, 'coins', {})
|
459
498
|
keys = list(coins.keys())
|
460
499
|
result: dict = {}
|
461
500
|
for i in range(0, len(keys)):
|
462
501
|
key = keys[i]
|
463
502
|
currency = coins[key]
|
464
503
|
id = self.safe_string(currency, 'symbol')
|
465
|
-
numericId = self.safe_integer(currency, 'id')
|
466
504
|
code = self.safe_currency_code(id)
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
505
|
+
withdrawalLimits = self.safe_list(currency, 'withdrawal_limits', [])
|
506
|
+
rawType = self.safe_string(currency, 'type')
|
507
|
+
type = 'crypto' if (rawType == 'blockchain') else 'other'
|
508
|
+
rawNetworks = self.safe_dict(currency, 'withdrawal_fees', {})
|
509
|
+
networks = {}
|
510
|
+
networkIds = list(rawNetworks.keys())
|
511
|
+
for j in range(0, len(networkIds)):
|
512
|
+
networkId = networkIds[j]
|
513
|
+
networkEntry = self.safe_dict(rawNetworks, networkId)
|
514
|
+
networkCode = self.network_id_to_code(networkId)
|
515
|
+
networks[networkCode] = {
|
516
|
+
'id': networkId,
|
517
|
+
'network': networkCode,
|
518
|
+
'active': self.safe_bool(networkEntry, 'active'),
|
519
|
+
'deposit': None,
|
520
|
+
'withdraw': None,
|
521
|
+
'fee': self.safe_number(networkEntry, 'value'),
|
522
|
+
'precision': None,
|
523
|
+
'limits': {
|
524
|
+
'withdraw': {
|
525
|
+
'min': None,
|
526
|
+
'max': None,
|
527
|
+
},
|
528
|
+
},
|
529
|
+
'info': networkEntry,
|
530
|
+
}
|
531
|
+
result[code] = self.safe_currency_structure({
|
475
532
|
'id': id,
|
476
|
-
'numericId':
|
533
|
+
'numericId': self.safe_integer(currency, 'id'),
|
477
534
|
'code': code,
|
478
535
|
'info': currency,
|
479
|
-
'name':
|
480
|
-
'active': active,
|
481
|
-
'deposit':
|
482
|
-
'withdraw':
|
483
|
-
'fee':
|
536
|
+
'name': self.safe_string(currency, 'fullname'),
|
537
|
+
'active': self.safe_bool(currency, 'active'),
|
538
|
+
'deposit': self.safe_bool(currency, 'allow_deposit'),
|
539
|
+
'withdraw': self.safe_bool(currency, 'allow_withdrawal'),
|
540
|
+
'fee': self.safe_number(currency, 'withdrawal_fee'),
|
484
541
|
'precision': self.safe_number(currency, 'increment_unit'),
|
485
542
|
'limits': {
|
486
543
|
'amount': {
|
@@ -492,9 +549,9 @@ class hollaex(Exchange, ImplicitAPI):
|
|
492
549
|
'max': self.safe_value(withdrawalLimits, 0),
|
493
550
|
},
|
494
551
|
},
|
495
|
-
'networks':
|
496
|
-
'type':
|
497
|
-
}
|
552
|
+
'networks': networks,
|
553
|
+
'type': type,
|
554
|
+
})
|
498
555
|
return result
|
499
556
|
|
500
557
|
async def fetch_order_books(self, symbols: Strings = None, limit: Int = None, params={}) -> OrderBooks:
|