gate-io-api 0.0.63__py3-none-any.whl → 0.0.65__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.
Potentially problematic release.
This version of gate-io-api might be problematic. Click here for more details.
- gate/ccxt/__init__.py +2 -3
- gate/ccxt/async_support/__init__.py +2 -3
- gate/ccxt/async_support/base/exchange.py +26 -22
- gate/ccxt/async_support/gate.py +87 -67
- gate/ccxt/base/exchange.py +1 -1
- gate/ccxt/gate.py +87 -67
- gate/ccxt/pro/__init__.py +61 -1
- {gate_io_api-0.0.63.dist-info → gate_io_api-0.0.65.dist-info}/METADATA +1 -1
- {gate_io_api-0.0.63.dist-info → gate_io_api-0.0.65.dist-info}/RECORD +10 -10
- {gate_io_api-0.0.63.dist-info → gate_io_api-0.0.65.dist-info}/WHEEL +0 -0
gate/ccxt/__init__.py
CHANGED
|
@@ -26,7 +26,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
|
26
26
|
|
|
27
27
|
# ----------------------------------------------------------------------------
|
|
28
28
|
|
|
29
|
-
__version__ = '4.4.
|
|
29
|
+
__version__ = '4.4.86'
|
|
30
30
|
|
|
31
31
|
# ----------------------------------------------------------------------------
|
|
32
32
|
|
|
@@ -88,9 +88,8 @@ from ccxt.base.errors import UnsubscribeError # noqa: F4
|
|
|
88
88
|
from ccxt.base.errors import error_hierarchy # noqa: F401
|
|
89
89
|
|
|
90
90
|
from ccxt.gate import gate # noqa: F401
|
|
91
|
-
from ccxt.kuna import kuna # noqa: F401
|
|
92
91
|
|
|
93
|
-
exchanges = [ 'gate',
|
|
92
|
+
exchanges = [ 'gate',]
|
|
94
93
|
|
|
95
94
|
base = [
|
|
96
95
|
'Exchange',
|
|
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
|
8
8
|
|
|
9
9
|
# -----------------------------------------------------------------------------
|
|
10
10
|
|
|
11
|
-
__version__ = '4.4.
|
|
11
|
+
__version__ = '4.4.86'
|
|
12
12
|
|
|
13
13
|
# -----------------------------------------------------------------------------
|
|
14
14
|
|
|
@@ -68,9 +68,8 @@ from ccxt.base.errors import error_hierarchy # noqa: F4
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
from ccxt.async_support.gate import gate # noqa: F401
|
|
71
|
-
from ccxt.async_support.kuna import kuna # noqa: F401
|
|
72
71
|
|
|
73
|
-
exchanges = [ 'gate',
|
|
72
|
+
exchanges = [ 'gate',]
|
|
74
73
|
|
|
75
74
|
base = [
|
|
76
75
|
'Exchange',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# -----------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
__version__ = '4.4.
|
|
5
|
+
__version__ = '4.4.86'
|
|
6
6
|
|
|
7
7
|
# -----------------------------------------------------------------------------
|
|
8
8
|
|
|
@@ -176,15 +176,7 @@ class Exchange(BaseExchange):
|
|
|
176
176
|
if (socksProxy not in self.socks_proxy_sessions):
|
|
177
177
|
# Create our SSL context object with our CA cert file
|
|
178
178
|
self.open() # ensure `asyncio_loop` is set
|
|
179
|
-
|
|
180
|
-
socksProxy,
|
|
181
|
-
# extra args copied from self.open()
|
|
182
|
-
ssl=self.ssl_context,
|
|
183
|
-
loop=self.asyncio_loop,
|
|
184
|
-
enable_cleanup_closed=True
|
|
185
|
-
)
|
|
186
|
-
self.socks_proxy_sessions[socksProxy] = aiohttp.ClientSession(loop=self.asyncio_loop, connector=self.aiohttp_socks_connector, trust_env=self.aiohttp_trust_env)
|
|
187
|
-
proxy_session = self.socks_proxy_sessions[socksProxy]
|
|
179
|
+
proxy_session = self.get_socks_proxy_session(socksProxy)
|
|
188
180
|
# add aiohttp_proxy for python as exclusion
|
|
189
181
|
elif self.aiohttp_proxy:
|
|
190
182
|
final_proxy = self.aiohttp_proxy
|
|
@@ -267,6 +259,20 @@ class Exchange(BaseExchange):
|
|
|
267
259
|
return http_response
|
|
268
260
|
return response.content
|
|
269
261
|
|
|
262
|
+
def get_socks_proxy_session(self, socksProxy):
|
|
263
|
+
if (self.socks_proxy_sessions is None):
|
|
264
|
+
self.socks_proxy_sessions = {}
|
|
265
|
+
if (socksProxy not in self.socks_proxy_sessions):
|
|
266
|
+
self.aiohttp_socks_connector = ProxyConnector.from_url(
|
|
267
|
+
socksProxy,
|
|
268
|
+
# extra args copied from self.open()
|
|
269
|
+
ssl=self.ssl_context,
|
|
270
|
+
loop=self.asyncio_loop,
|
|
271
|
+
enable_cleanup_closed=True
|
|
272
|
+
)
|
|
273
|
+
self.socks_proxy_sessions[socksProxy] = aiohttp.ClientSession(loop=self.asyncio_loop, connector=self.aiohttp_socks_connector, trust_env=self.aiohttp_trust_env)
|
|
274
|
+
return self.socks_proxy_sessions[socksProxy]
|
|
275
|
+
|
|
270
276
|
async def load_markets_helper(self, reload=False, params={}):
|
|
271
277
|
if not reload:
|
|
272
278
|
if self.markets:
|
|
@@ -411,19 +417,12 @@ class Exchange(BaseExchange):
|
|
|
411
417
|
# we use aiohttp instead of fastClient now because of this
|
|
412
418
|
# https://github.com/ccxt/ccxt/pull/25995
|
|
413
419
|
self.clients[url] = AiohttpClient(url, on_message, on_error, on_close, on_connected, options)
|
|
414
|
-
|
|
420
|
+
# set http/s proxy (socks proxy should be set in other place)
|
|
421
|
+
httpProxy, httpsProxy, socksProxy = self.check_ws_proxy_settings()
|
|
422
|
+
if (httpProxy or httpsProxy):
|
|
423
|
+
self.clients[url].proxy = httpProxy if httpProxy else httpsProxy
|
|
415
424
|
return self.clients[url]
|
|
416
425
|
|
|
417
|
-
def get_ws_proxy(self):
|
|
418
|
-
httpProxy, httpsProxy, socksProxy = self.check_ws_proxy_settings()
|
|
419
|
-
if httpProxy:
|
|
420
|
-
return httpProxy
|
|
421
|
-
elif httpsProxy:
|
|
422
|
-
return httpsProxy
|
|
423
|
-
elif socksProxy:
|
|
424
|
-
return socksProxy
|
|
425
|
-
return None
|
|
426
|
-
|
|
427
426
|
def delay(self, timeout, method, *args):
|
|
428
427
|
return self.asyncio_loop.call_later(timeout / 1000, self.spawn, method, *args)
|
|
429
428
|
|
|
@@ -486,8 +485,13 @@ class Exchange(BaseExchange):
|
|
|
486
485
|
if not subscribed:
|
|
487
486
|
client.subscriptions[subscribe_hash] = subscription or True
|
|
488
487
|
|
|
488
|
+
selected_session = self.session
|
|
489
|
+
# http/s proxy is being set in other places
|
|
490
|
+
httpProxy, httpsProxy, socksProxy = self.check_ws_proxy_settings()
|
|
491
|
+
if (socksProxy):
|
|
492
|
+
selected_session = self.get_socks_proxy_session(socksProxy)
|
|
489
493
|
connected = client.connected if client.connected.done() \
|
|
490
|
-
else asyncio.ensure_future(client.connect(
|
|
494
|
+
else asyncio.ensure_future(client.connect(selected_session, backoff_delay))
|
|
491
495
|
|
|
492
496
|
def after(fut):
|
|
493
497
|
# todo: decouple signing from subscriptions
|
gate/ccxt/async_support/gate.py
CHANGED
|
@@ -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:
|
gate/ccxt/base/exchange.py
CHANGED
gate/ccxt/gate.py
CHANGED
|
@@ -734,6 +734,16 @@ class gate(Exchange, ImplicitAPI):
|
|
|
734
734
|
},
|
|
735
735
|
'networksById': {
|
|
736
736
|
'OPETH': 'OP',
|
|
737
|
+
'ETH': 'ERC20', # for GOlang
|
|
738
|
+
'ERC20': 'ERC20',
|
|
739
|
+
'TRX': 'TRC20',
|
|
740
|
+
'TRC20': 'TRC20',
|
|
741
|
+
'HT': 'HRC20',
|
|
742
|
+
'HECO': 'HRC20',
|
|
743
|
+
'BSC': 'BEP20',
|
|
744
|
+
'BEP20': 'BEP20',
|
|
745
|
+
'POLYGON': 'MATIC',
|
|
746
|
+
'POL': 'MATIC',
|
|
737
747
|
},
|
|
738
748
|
'timeInForce': {
|
|
739
749
|
'GTC': 'gtc',
|
|
@@ -1223,6 +1233,8 @@ class gate(Exchange, ImplicitAPI):
|
|
|
1223
1233
|
"""
|
|
1224
1234
|
if self.options['adjustForTimeDifference']:
|
|
1225
1235
|
self.load_time_difference()
|
|
1236
|
+
if self.check_required_credentials(False):
|
|
1237
|
+
self.load_unified_status()
|
|
1226
1238
|
sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
|
|
1227
1239
|
rawPromises = [
|
|
1228
1240
|
self.fetch_contract_markets(params),
|
|
@@ -1796,84 +1808,92 @@ class gate(Exchange, ImplicitAPI):
|
|
|
1796
1808
|
apiBackup = self.safe_value(self.urls, 'apiBackup')
|
|
1797
1809
|
if apiBackup is not None:
|
|
1798
1810
|
return None
|
|
1799
|
-
if self.check_required_credentials(False):
|
|
1800
|
-
self.load_unified_status()
|
|
1801
1811
|
response = self.publicSpotGetCurrencies(params)
|
|
1802
1812
|
#
|
|
1803
|
-
#
|
|
1804
|
-
#
|
|
1805
|
-
#
|
|
1806
|
-
#
|
|
1807
|
-
#
|
|
1808
|
-
#
|
|
1809
|
-
#
|
|
1810
|
-
#
|
|
1811
|
-
#
|
|
1812
|
-
#
|
|
1813
|
-
#
|
|
1814
|
-
#
|
|
1813
|
+
# [
|
|
1814
|
+
# {
|
|
1815
|
+
# "currency": "USDT",
|
|
1816
|
+
# "name": "Tether",
|
|
1817
|
+
# "delisted": False,
|
|
1818
|
+
# "withdraw_disabled": False,
|
|
1819
|
+
# "withdraw_delayed": False,
|
|
1820
|
+
# "deposit_disabled": False,
|
|
1821
|
+
# "trade_disabled": False,
|
|
1822
|
+
# "fixed_rate": "",
|
|
1823
|
+
# "chain": "ETH",
|
|
1824
|
+
# "chains": [
|
|
1825
|
+
# {
|
|
1826
|
+
# "name": "ETH",
|
|
1827
|
+
# "addr": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
|
1828
|
+
# "withdraw_disabled": False,
|
|
1829
|
+
# "withdraw_delayed": False,
|
|
1830
|
+
# "deposit_disabled": False
|
|
1831
|
+
# },
|
|
1832
|
+
# {
|
|
1833
|
+
# "name": "ARBEVM",
|
|
1834
|
+
# "addr": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
|
|
1835
|
+
# "withdraw_disabled": False,
|
|
1836
|
+
# "withdraw_delayed": False,
|
|
1837
|
+
# "deposit_disabled": False
|
|
1838
|
+
# },
|
|
1839
|
+
# {
|
|
1840
|
+
# "name": "BSC",
|
|
1841
|
+
# "addr": "0x55d398326f99059fF775485246999027B3197955",
|
|
1842
|
+
# "withdraw_disabled": False,
|
|
1843
|
+
# "withdraw_delayed": False,
|
|
1844
|
+
# "deposit_disabled": False
|
|
1845
|
+
# },
|
|
1846
|
+
# ]
|
|
1847
|
+
# },
|
|
1848
|
+
# ]
|
|
1815
1849
|
#
|
|
1816
1850
|
indexedCurrencies = self.index_by(response, 'currency')
|
|
1817
1851
|
result: dict = {}
|
|
1818
1852
|
for i in range(0, len(response)):
|
|
1819
1853
|
entry = response[i]
|
|
1820
1854
|
currencyId = self.safe_string(entry, 'currency')
|
|
1821
|
-
|
|
1822
|
-
partFirst = self.safe_string(parts, 0)
|
|
1823
|
-
# if there's an underscore then the second part is always the chain name(except the _OLD suffix)
|
|
1824
|
-
currencyName = currencyId if currencyId.endswith('_OLD') else partFirst
|
|
1825
|
-
withdrawDisabled = self.safe_bool(entry, 'withdraw_disabled', False)
|
|
1826
|
-
depositDisabled = self.safe_bool(entry, 'deposit_disabled', False)
|
|
1827
|
-
tradeDisabled = self.safe_bool(entry, 'trade_disabled', False)
|
|
1828
|
-
precision = self.parse_number('0.0001') # temporary safe default, because no value provided from API
|
|
1829
|
-
code = self.safe_currency_code(currencyName)
|
|
1855
|
+
code = self.safe_currency_code(currencyId)
|
|
1830
1856
|
# check leveraged tokens(e.g. BTC3S, ETH5L)
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
'
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1857
|
+
type = 'leveraged' if self.is_leveraged_currency(currencyId, True, indexedCurrencies) else 'crypto'
|
|
1858
|
+
chains = self.safe_list(entry, 'chains', [])
|
|
1859
|
+
networks = {}
|
|
1860
|
+
for j in range(0, len(chains)):
|
|
1861
|
+
chain = chains[j]
|
|
1862
|
+
networkId = self.safe_string(chain, 'name')
|
|
1863
|
+
networkCode = self.network_id_to_code(networkId)
|
|
1864
|
+
networks[networkCode] = {
|
|
1865
|
+
'info': chain,
|
|
1866
|
+
'id': networkId,
|
|
1867
|
+
'network': networkCode,
|
|
1868
|
+
'active': None,
|
|
1869
|
+
'deposit': not self.safe_bool(chain, 'deposit_disabled'),
|
|
1870
|
+
'withdraw': not self.safe_bool(chain, 'withdraw_disabled'),
|
|
1871
|
+
'fee': None,
|
|
1872
|
+
'precision': self.parse_number('0.0001'), # temporary safe default, because no value provided from API,
|
|
1873
|
+
'limits': {
|
|
1874
|
+
'deposit': {
|
|
1875
|
+
'min': None,
|
|
1876
|
+
'max': None,
|
|
1877
|
+
},
|
|
1878
|
+
'withdraw': {
|
|
1879
|
+
'min': None,
|
|
1880
|
+
'max': None,
|
|
1881
|
+
},
|
|
1852
1882
|
},
|
|
1853
|
-
},
|
|
1854
|
-
'active': not tradeDisabled,
|
|
1855
|
-
'deposit': not depositDisabled,
|
|
1856
|
-
'withdraw': not withdrawDisabled,
|
|
1857
|
-
'fee': None,
|
|
1858
|
-
'precision': precision,
|
|
1859
|
-
}
|
|
1860
|
-
# check if first entry for the specific currency
|
|
1861
|
-
if not (code in result):
|
|
1862
|
-
result[code] = {
|
|
1863
|
-
'id': currencyName,
|
|
1864
|
-
'lowerCaseId': currencyName.lower(),
|
|
1865
|
-
'code': code,
|
|
1866
|
-
'type': type,
|
|
1867
|
-
'precision': precision,
|
|
1868
|
-
'limits': None,
|
|
1869
|
-
'networks': {},
|
|
1870
|
-
'info': [], # will be filled below
|
|
1871
1883
|
}
|
|
1872
|
-
result[code]
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1884
|
+
result[code] = self.safe_currency_structure({
|
|
1885
|
+
'id': currencyId,
|
|
1886
|
+
'code': code,
|
|
1887
|
+
'name': self.safe_string(entry, 'name'),
|
|
1888
|
+
'type': type,
|
|
1889
|
+
'active': not self.safe_bool(entry, 'delisted'),
|
|
1890
|
+
'deposit': not self.safe_bool(entry, 'deposit_disabled'),
|
|
1891
|
+
'withdraw': not self.safe_bool(entry, 'withdraw_disabled'),
|
|
1892
|
+
'fee': None,
|
|
1893
|
+
'networks': networks,
|
|
1894
|
+
'precision': self.parse_number('0.0001'),
|
|
1895
|
+
'info': entry,
|
|
1896
|
+
})
|
|
1877
1897
|
return result
|
|
1878
1898
|
|
|
1879
1899
|
def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
gate/ccxt/pro/__init__.py
CHANGED
|
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
|
8
8
|
|
|
9
9
|
# ----------------------------------------------------------------------------
|
|
10
10
|
|
|
11
|
-
__version__ = '4.4.
|
|
11
|
+
__version__ = '4.4.86'
|
|
12
12
|
|
|
13
13
|
# ----------------------------------------------------------------------------
|
|
14
14
|
|
|
@@ -79,6 +79,66 @@ from ccxt.base.errors import error_hierarchy # noqa: F4
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
82
142
|
|
|
83
143
|
|
|
84
144
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
gate/__init__.py,sha256=rmRavmagjlyk7Z5zGWWJiY8tfYIPsk04hRzC4SYJOzA,222
|
|
2
|
-
gate/ccxt/__init__.py,sha256=
|
|
3
|
-
gate/ccxt/gate.py,sha256=
|
|
2
|
+
gate/ccxt/__init__.py,sha256=YjlwBJp6oTvz-t6cofASFpqmMT_SY_JZDiPuXzkS_EI,6044
|
|
3
|
+
gate/ccxt/gate.py,sha256=j4wcnyZjd7LrrBVAPrPnEuhBaaKpThuK_5gduXY1ybM,351663
|
|
4
4
|
gate/ccxt/abstract/gate.py,sha256=MrRMycFEpZKJ6yC7qi0p_qcwZtU9WJi5bBbVllskGoA,45044
|
|
5
|
-
gate/ccxt/async_support/__init__.py,sha256=
|
|
6
|
-
gate/ccxt/async_support/gate.py,sha256=
|
|
5
|
+
gate/ccxt/async_support/__init__.py,sha256=Mll5n_m2v-b1hh4RNFAqYjj1dXAn-u5uS9GvtZAN6wY,4777
|
|
6
|
+
gate/ccxt/async_support/gate.py,sha256=YWd3Lf_XUXu4kHHd-aF1Y2336_5LjhNv5ufcBAxpBP0,353622
|
|
7
7
|
gate/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
|
|
8
|
-
gate/ccxt/async_support/base/exchange.py,sha256=
|
|
8
|
+
gate/ccxt/async_support/base/exchange.py,sha256=v6BUnxiy1aNvGfPIY_Uoc8bO81Hc2KixZhFYLUZtdgc,119007
|
|
9
9
|
gate/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
|
|
10
10
|
gate/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
|
|
11
11
|
gate/ccxt/async_support/base/ws/aiohttp_client.py,sha256=Y5HxAVXyyYduj6b6SbbUZETlq3GrVMzrkW1r-TMgpb8,6329
|
|
@@ -18,10 +18,10 @@ gate/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9prod
|
|
|
18
18
|
gate/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
|
|
19
19
|
gate/ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
|
|
20
20
|
gate/ccxt/base/errors.py,sha256=MvCrL_sAM3de616T6RE0PSxiF2xV6Qqz5b1y1ghidbk,4888
|
|
21
|
-
gate/ccxt/base/exchange.py,sha256=
|
|
21
|
+
gate/ccxt/base/exchange.py,sha256=0eWsLPmC7XqT192_2CilEsKFbcNtDqQktuknty6v8zE,328021
|
|
22
22
|
gate/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
|
|
23
23
|
gate/ccxt/base/types.py,sha256=IbLO7Ni-plO36xlOdJQFqujSJBq0q9qll009ShZ0M_U,11468
|
|
24
|
-
gate/ccxt/pro/__init__.py,sha256=
|
|
24
|
+
gate/ccxt/pro/__init__.py,sha256=3TIx2m35pZBl9G14_dytMx_fdz9xo8OiE4bDQIVF0s0,4179
|
|
25
25
|
gate/ccxt/pro/gate.py,sha256=TImMphR9V8h9xqDJ541s3zb4NOppfLDc-XoBkntT1nA,89399
|
|
26
26
|
gate/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
|
|
27
27
|
gate/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
|
|
@@ -282,6 +282,6 @@ gate/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX2u
|
|
|
282
282
|
gate/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
|
|
283
283
|
gate/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
284
284
|
gate/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
|
|
285
|
-
gate_io_api-0.0.
|
|
286
|
-
gate_io_api-0.0.
|
|
287
|
-
gate_io_api-0.0.
|
|
285
|
+
gate_io_api-0.0.65.dist-info/METADATA,sha256=UqslfjOThUou3zXZRpcKIjIT4qiO6sG-Hc9eEFaOjDg,26789
|
|
286
|
+
gate_io_api-0.0.65.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
287
|
+
gate_io_api-0.0.65.dist-info/RECORD,,
|
|
File without changes
|