gate-io-api 0.0.66__py3-none-any.whl → 0.0.69__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 +1 -1
- gate/ccxt/async_support/__init__.py +1 -1
- gate/ccxt/async_support/base/exchange.py +4 -1
- gate/ccxt/async_support/gate.py +12 -5
- gate/ccxt/base/exchange.py +15 -5
- gate/ccxt/gate.py +12 -5
- gate/ccxt/pro/__init__.py +1 -119
- {gate_io_api-0.0.66.dist-info → gate_io_api-0.0.69.dist-info}/METADATA +1 -1
- {gate_io_api-0.0.66.dist-info → gate_io_api-0.0.69.dist-info}/RECORD +10 -10
- {gate_io_api-0.0.66.dist-info → gate_io_api-0.0.69.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.90'
|
|
30
30
|
|
|
31
31
|
# ----------------------------------------------------------------------------
|
|
32
32
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# -----------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
__version__ = '4.4.
|
|
5
|
+
__version__ = '4.4.90'
|
|
6
6
|
|
|
7
7
|
# -----------------------------------------------------------------------------
|
|
8
8
|
|
|
@@ -282,7 +282,10 @@ class Exchange(BaseExchange):
|
|
|
282
282
|
currencies = None
|
|
283
283
|
if self.has['fetchCurrencies'] is True:
|
|
284
284
|
currencies = await self.fetch_currencies()
|
|
285
|
+
self.options['cachedCurrencies'] = currencies
|
|
285
286
|
markets = await self.fetch_markets(params)
|
|
287
|
+
if 'cachedCurrencies' in self.options:
|
|
288
|
+
del self.options['cachedCurrencies']
|
|
286
289
|
return self.set_markets(markets, currencies)
|
|
287
290
|
|
|
288
291
|
|
gate/ccxt/async_support/gate.py
CHANGED
|
@@ -1264,17 +1264,21 @@ class gate(Exchange, ImplicitAPI):
|
|
|
1264
1264
|
# {
|
|
1265
1265
|
# "id": "QTUM_ETH",
|
|
1266
1266
|
# "base": "QTUM",
|
|
1267
|
+
# "base_name": "Quantum",
|
|
1267
1268
|
# "quote": "ETH",
|
|
1269
|
+
# "quote_name": "Ethereum",
|
|
1268
1270
|
# "fee": "0.2",
|
|
1269
1271
|
# "min_base_amount": "0.01",
|
|
1270
1272
|
# "min_quote_amount": "0.001",
|
|
1273
|
+
# "max_quote_amount": "50000",
|
|
1271
1274
|
# "amount_precision": 3,
|
|
1272
1275
|
# "precision": 6,
|
|
1273
1276
|
# "trade_status": "tradable",
|
|
1274
|
-
# "sell_start":
|
|
1275
|
-
# "buy_start":
|
|
1277
|
+
# "sell_start": 1607313600,
|
|
1278
|
+
# "buy_start": 1700492400,
|
|
1279
|
+
# "type": "normal",
|
|
1280
|
+
# "trade_url": "https://www.gate.io/trade/QTUM_ETH",
|
|
1276
1281
|
# }
|
|
1277
|
-
# ]
|
|
1278
1282
|
#
|
|
1279
1283
|
# Margin
|
|
1280
1284
|
#
|
|
@@ -1305,6 +1309,8 @@ class gate(Exchange, ImplicitAPI):
|
|
|
1305
1309
|
tradeStatus = self.safe_string(market, 'trade_status')
|
|
1306
1310
|
leverage = self.safe_number(market, 'leverage')
|
|
1307
1311
|
margin = leverage is not None
|
|
1312
|
+
buyStart = self.safe_integer_product(spotMarket, 'buy_start', 1000) # buy_start is the trading start time, while sell_start is offline orders start time
|
|
1313
|
+
createdTs = buyStart if (buyStart != 0) else None
|
|
1308
1314
|
result.append({
|
|
1309
1315
|
'id': id,
|
|
1310
1316
|
'symbol': base + '/' + quote,
|
|
@@ -1354,7 +1360,7 @@ class gate(Exchange, ImplicitAPI):
|
|
|
1354
1360
|
'max': self.safe_number(market, 'max_quote_amount') if margin else None,
|
|
1355
1361
|
},
|
|
1356
1362
|
},
|
|
1357
|
-
'created':
|
|
1363
|
+
'created': createdTs,
|
|
1358
1364
|
'info': market,
|
|
1359
1365
|
})
|
|
1360
1366
|
return result
|
|
@@ -1419,6 +1425,7 @@ class gate(Exchange, ImplicitAPI):
|
|
|
1419
1425
|
# "funding_next_apply": 1610035200,
|
|
1420
1426
|
# "short_users": 977,
|
|
1421
1427
|
# "config_change_time": 1609899548,
|
|
1428
|
+
# "create_time": 1609800048,
|
|
1422
1429
|
# "trade_size": 28530850594,
|
|
1423
1430
|
# "position_size": 5223816,
|
|
1424
1431
|
# "long_users": 455,
|
|
@@ -1549,7 +1556,7 @@ class gate(Exchange, ImplicitAPI):
|
|
|
1549
1556
|
'max': None,
|
|
1550
1557
|
},
|
|
1551
1558
|
},
|
|
1552
|
-
'created':
|
|
1559
|
+
'created': self.safe_integer_product(market, 'create_time', 1000),
|
|
1553
1560
|
'info': market,
|
|
1554
1561
|
}
|
|
1555
1562
|
|
gate/ccxt/base/exchange.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# -----------------------------------------------------------------------------
|
|
6
6
|
|
|
7
|
-
__version__ = '4.4.
|
|
7
|
+
__version__ = '4.4.90'
|
|
8
8
|
|
|
9
9
|
# -----------------------------------------------------------------------------
|
|
10
10
|
|
|
@@ -906,6 +906,10 @@ class Exchange(object):
|
|
|
906
906
|
def keysort(dictionary):
|
|
907
907
|
return collections.OrderedDict(sorted(dictionary.items(), key=lambda t: t[0]))
|
|
908
908
|
|
|
909
|
+
@staticmethod
|
|
910
|
+
def sort(array):
|
|
911
|
+
return sorted(array)
|
|
912
|
+
|
|
909
913
|
@staticmethod
|
|
910
914
|
def extend(*args):
|
|
911
915
|
if args is not None:
|
|
@@ -956,6 +960,11 @@ class Exchange(object):
|
|
|
956
960
|
def groupBy(array, key):
|
|
957
961
|
return Exchange.group_by(array, key)
|
|
958
962
|
|
|
963
|
+
|
|
964
|
+
@staticmethod
|
|
965
|
+
def index_by_safe(array, key):
|
|
966
|
+
return Exchange.index_by(array, key) # wrapper for go
|
|
967
|
+
|
|
959
968
|
@staticmethod
|
|
960
969
|
def index_by(array, key):
|
|
961
970
|
result = {}
|
|
@@ -1037,7 +1046,7 @@ class Exchange(object):
|
|
|
1037
1046
|
return _urlencode.urlencode(result, quote_via=_urlencode.quote)
|
|
1038
1047
|
|
|
1039
1048
|
@staticmethod
|
|
1040
|
-
def rawencode(params={}):
|
|
1049
|
+
def rawencode(params={}, sort=False):
|
|
1041
1050
|
return _urlencode.unquote(Exchange.urlencode(params))
|
|
1042
1051
|
|
|
1043
1052
|
@staticmethod
|
|
@@ -1536,7 +1545,8 @@ class Exchange(object):
|
|
|
1536
1545
|
currencies = self.fetch_currencies()
|
|
1537
1546
|
self.options['cachedCurrencies'] = currencies
|
|
1538
1547
|
markets = self.fetch_markets(params)
|
|
1539
|
-
|
|
1548
|
+
if 'cachedCurrencies' in self.options:
|
|
1549
|
+
del self.options['cachedCurrencies']
|
|
1540
1550
|
return self.set_markets(markets, currencies)
|
|
1541
1551
|
|
|
1542
1552
|
def fetch_markets(self, params={}):
|
|
@@ -3186,7 +3196,7 @@ class Exchange(object):
|
|
|
3186
3196
|
|
|
3187
3197
|
def set_markets(self, markets, currencies=None):
|
|
3188
3198
|
values = []
|
|
3189
|
-
self.markets_by_id =
|
|
3199
|
+
self.markets_by_id = self.create_safe_dictionary()
|
|
3190
3200
|
# handle marketId conflicts
|
|
3191
3201
|
# we insert spot markets first
|
|
3192
3202
|
marketValues = self.sort_by(self.to_array(markets), 'spot', True, True)
|
|
@@ -3261,7 +3271,7 @@ class Exchange(object):
|
|
|
3261
3271
|
resultingCurrencies.append(highestPrecisionCurrency)
|
|
3262
3272
|
sortedCurrencies = self.sort_by(resultingCurrencies, 'code')
|
|
3263
3273
|
self.currencies = self.deep_extend(self.currencies, self.index_by(sortedCurrencies, 'code'))
|
|
3264
|
-
self.currencies_by_id = self.
|
|
3274
|
+
self.currencies_by_id = self.index_by_safe(self.currencies, 'id')
|
|
3265
3275
|
currenciesSortedByCode = self.keysort(self.currencies)
|
|
3266
3276
|
self.codes = list(currenciesSortedByCode.keys())
|
|
3267
3277
|
return self.markets
|
gate/ccxt/gate.py
CHANGED
|
@@ -1263,17 +1263,21 @@ class gate(Exchange, ImplicitAPI):
|
|
|
1263
1263
|
# {
|
|
1264
1264
|
# "id": "QTUM_ETH",
|
|
1265
1265
|
# "base": "QTUM",
|
|
1266
|
+
# "base_name": "Quantum",
|
|
1266
1267
|
# "quote": "ETH",
|
|
1268
|
+
# "quote_name": "Ethereum",
|
|
1267
1269
|
# "fee": "0.2",
|
|
1268
1270
|
# "min_base_amount": "0.01",
|
|
1269
1271
|
# "min_quote_amount": "0.001",
|
|
1272
|
+
# "max_quote_amount": "50000",
|
|
1270
1273
|
# "amount_precision": 3,
|
|
1271
1274
|
# "precision": 6,
|
|
1272
1275
|
# "trade_status": "tradable",
|
|
1273
|
-
# "sell_start":
|
|
1274
|
-
# "buy_start":
|
|
1276
|
+
# "sell_start": 1607313600,
|
|
1277
|
+
# "buy_start": 1700492400,
|
|
1278
|
+
# "type": "normal",
|
|
1279
|
+
# "trade_url": "https://www.gate.io/trade/QTUM_ETH",
|
|
1275
1280
|
# }
|
|
1276
|
-
# ]
|
|
1277
1281
|
#
|
|
1278
1282
|
# Margin
|
|
1279
1283
|
#
|
|
@@ -1304,6 +1308,8 @@ class gate(Exchange, ImplicitAPI):
|
|
|
1304
1308
|
tradeStatus = self.safe_string(market, 'trade_status')
|
|
1305
1309
|
leverage = self.safe_number(market, 'leverage')
|
|
1306
1310
|
margin = leverage is not None
|
|
1311
|
+
buyStart = self.safe_integer_product(spotMarket, 'buy_start', 1000) # buy_start is the trading start time, while sell_start is offline orders start time
|
|
1312
|
+
createdTs = buyStart if (buyStart != 0) else None
|
|
1307
1313
|
result.append({
|
|
1308
1314
|
'id': id,
|
|
1309
1315
|
'symbol': base + '/' + quote,
|
|
@@ -1353,7 +1359,7 @@ class gate(Exchange, ImplicitAPI):
|
|
|
1353
1359
|
'max': self.safe_number(market, 'max_quote_amount') if margin else None,
|
|
1354
1360
|
},
|
|
1355
1361
|
},
|
|
1356
|
-
'created':
|
|
1362
|
+
'created': createdTs,
|
|
1357
1363
|
'info': market,
|
|
1358
1364
|
})
|
|
1359
1365
|
return result
|
|
@@ -1418,6 +1424,7 @@ class gate(Exchange, ImplicitAPI):
|
|
|
1418
1424
|
# "funding_next_apply": 1610035200,
|
|
1419
1425
|
# "short_users": 977,
|
|
1420
1426
|
# "config_change_time": 1609899548,
|
|
1427
|
+
# "create_time": 1609800048,
|
|
1421
1428
|
# "trade_size": 28530850594,
|
|
1422
1429
|
# "position_size": 5223816,
|
|
1423
1430
|
# "long_users": 455,
|
|
@@ -1548,7 +1555,7 @@ class gate(Exchange, ImplicitAPI):
|
|
|
1548
1555
|
'max': None,
|
|
1549
1556
|
},
|
|
1550
1557
|
},
|
|
1551
|
-
'created':
|
|
1558
|
+
'created': self.safe_integer_product(market, 'create_time', 1000),
|
|
1552
1559
|
'info': market,
|
|
1553
1560
|
}
|
|
1554
1561
|
|
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.90'
|
|
12
12
|
|
|
13
13
|
# ----------------------------------------------------------------------------
|
|
14
14
|
|
|
@@ -60,124 +60,6 @@ from ccxt.base.errors import UnsubscribeError # noqa: F4
|
|
|
60
60
|
from ccxt.base.errors import error_hierarchy # noqa: F401
|
|
61
61
|
# DO_NOT_REMOVE__ERROR_IMPORTS_END
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
63
|
from ccxt.pro.gate import gate # noqa: F401
|
|
182
64
|
|
|
183
65
|
exchanges = [ 'gate',]
|
|
@@ -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=AKFsfB3CHfJT9JnwB4sZTrqF2sP5WkLpDEZktnqXaCo,6044
|
|
3
|
+
gate/ccxt/gate.py,sha256=5BAYpknIyhsxNbwosFE9u32wiPXEFx8WLriV4IhI-jE,352195
|
|
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=-TAwof7V3abVlGAfli3tNFz5WMPRLYECbZ2D9EgBZbk,4777
|
|
6
|
+
gate/ccxt/async_support/gate.py,sha256=TUQvPxYdUNjFBVeIVwVrUsIM-8AMl3bTfoAvQZlE79c,354154
|
|
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=3qo41BpgIc0nGYI3Fka9-_Wodr_xbzh47eW0jAuMsUQ,119161
|
|
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=b6TLBQicsWseX5icZF9BC89wQfUaqN5IPBSEcNOq1SM,328431
|
|
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=MYyAI_Rq7znM58jsJaPAuLlqc6kBvRxil5QDR9yPhAo,4091
|
|
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.69.dist-info/METADATA,sha256=M2YwToiFeQ60m4Bp0zbYb4Iy1fHYQcb_8jAwqe_1vCY,26789
|
|
286
|
+
gate_io_api-0.0.69.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
287
|
+
gate_io_api-0.0.69.dist-info/RECORD,,
|
|
File without changes
|