ccxt 4.5.0__py2.py3-none-any.whl → 4.5.2__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/ascendex.py +1 -1
- ccxt/async_support/__init__.py +1 -5
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +17 -12
- ccxt/async_support/bitget.py +1 -1
- ccxt/async_support/coinbase.py +46 -34
- ccxt/async_support/gate.py +31 -17
- ccxt/async_support/gemini.py +1 -1
- ccxt/async_support/hibachi.py +1 -1
- ccxt/async_support/hyperliquid.py +13 -2
- ccxt/async_support/indodax.py +11 -12
- ccxt/async_support/kraken.py +1 -8
- ccxt/async_support/krakenfutures.py +25 -25
- ccxt/async_support/mexc.py +2 -1
- ccxt/async_support/okx.py +2 -2
- ccxt/async_support/poloniex.py +1 -1
- ccxt/async_support/timex.py +35 -0
- ccxt/async_support/tradeogre.py +32 -0
- ccxt/async_support/wavesexchange.py +33 -0
- ccxt/async_support/zonda.py +12 -0
- ccxt/base/exchange.py +7 -1
- ccxt/binance.py +17 -12
- ccxt/bitget.py +1 -1
- ccxt/coinbase.py +46 -34
- ccxt/gate.py +31 -17
- ccxt/gemini.py +1 -1
- ccxt/hibachi.py +1 -1
- ccxt/hyperliquid.py +13 -2
- ccxt/indodax.py +11 -12
- ccxt/kraken.py +1 -8
- ccxt/krakenfutures.py +25 -25
- ccxt/mexc.py +2 -1
- ccxt/okx.py +2 -2
- ccxt/poloniex.py +1 -1
- ccxt/pro/__init__.py +1 -3
- ccxt/pro/bitget.py +328 -75
- ccxt/pro/bitmart.py +1 -1
- ccxt/pro/bybit.py +8 -10
- ccxt/pro/gate.py +8 -1
- ccxt/pro/gemini.py +6 -2
- ccxt/pro/hyperliquid.py +6 -0
- ccxt/pro/kraken.py +4 -6
- ccxt/pro/lbank.py +56 -2
- ccxt/pro/mexc.py +1 -1
- ccxt/test/tests_async.py +2 -25
- ccxt/test/tests_sync.py +2 -25
- ccxt/timex.py +35 -0
- ccxt/tradeogre.py +32 -0
- ccxt/wavesexchange.py +33 -0
- ccxt/zonda.py +12 -0
- {ccxt-4.5.0.dist-info → ccxt-4.5.2.dist-info}/METADATA +111 -113
- {ccxt-4.5.0.dist-info → ccxt-4.5.2.dist-info}/RECORD +57 -64
- ccxt/abstract/ellipx.py +0 -25
- ccxt/abstract/vertex.py +0 -19
- ccxt/async_support/ellipx.py +0 -2029
- ccxt/async_support/vertex.py +0 -3050
- ccxt/ellipx.py +0 -2029
- ccxt/pro/vertex.py +0 -948
- ccxt/vertex.py +0 -3050
- {ccxt-4.5.0.dist-info → ccxt-4.5.2.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.5.0.dist-info → ccxt-4.5.2.dist-info}/WHEEL +0 -0
- {ccxt-4.5.0.dist-info → ccxt-4.5.2.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
# ----------------------------------------------------------------------------
|
24
24
|
|
25
|
-
__version__ = '4.5.
|
25
|
+
__version__ = '4.5.2'
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
@@ -137,7 +137,6 @@ from ccxt.delta import delta # noqa: F4
|
|
137
137
|
from ccxt.deribit import deribit # noqa: F401
|
138
138
|
from ccxt.derive import derive # noqa: F401
|
139
139
|
from ccxt.digifinex import digifinex # noqa: F401
|
140
|
-
from ccxt.ellipx import ellipx # noqa: F401
|
141
140
|
from ccxt.exmo import exmo # noqa: F401
|
142
141
|
from ccxt.fmfwio import fmfwio # noqa: F401
|
143
142
|
from ccxt.foxbit import foxbit # noqa: F401
|
@@ -182,7 +181,6 @@ from ccxt.timex import timex # noqa: F4
|
|
182
181
|
from ccxt.tokocrypto import tokocrypto # noqa: F401
|
183
182
|
from ccxt.tradeogre import tradeogre # noqa: F401
|
184
183
|
from ccxt.upbit import upbit # noqa: F401
|
185
|
-
from ccxt.vertex import vertex # noqa: F401
|
186
184
|
from ccxt.wavesexchange import wavesexchange # noqa: F401
|
187
185
|
from ccxt.whitebit import whitebit # noqa: F401
|
188
186
|
from ccxt.woo import woo # noqa: F401
|
@@ -246,7 +244,6 @@ exchanges = [
|
|
246
244
|
'deribit',
|
247
245
|
'derive',
|
248
246
|
'digifinex',
|
249
|
-
'ellipx',
|
250
247
|
'exmo',
|
251
248
|
'fmfwio',
|
252
249
|
'foxbit',
|
@@ -291,7 +288,6 @@ exchanges = [
|
|
291
288
|
'tokocrypto',
|
292
289
|
'tradeogre',
|
293
290
|
'upbit',
|
294
|
-
'vertex',
|
295
291
|
'wavesexchange',
|
296
292
|
'whitebit',
|
297
293
|
'woo',
|
ccxt/ascendex.py
CHANGED
@@ -1583,7 +1583,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1583
1583
|
# "code": "0",
|
1584
1584
|
# "data": {
|
1585
1585
|
# "domain": "spot",
|
1586
|
-
# "userUID": "
|
1586
|
+
# "userUID": "U1479576457",
|
1587
1587
|
# "vipLevel": "0",
|
1588
1588
|
# "fees": [
|
1589
1589
|
# {symbol: 'HT/USDT', fee: {taker: '0.001', maker: "0.001"}},
|
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.5.
|
7
|
+
__version__ = '4.5.2'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -117,7 +117,6 @@ from ccxt.async_support.delta import delta
|
|
117
117
|
from ccxt.async_support.deribit import deribit # noqa: F401
|
118
118
|
from ccxt.async_support.derive import derive # noqa: F401
|
119
119
|
from ccxt.async_support.digifinex import digifinex # noqa: F401
|
120
|
-
from ccxt.async_support.ellipx import ellipx # noqa: F401
|
121
120
|
from ccxt.async_support.exmo import exmo # noqa: F401
|
122
121
|
from ccxt.async_support.fmfwio import fmfwio # noqa: F401
|
123
122
|
from ccxt.async_support.foxbit import foxbit # noqa: F401
|
@@ -162,7 +161,6 @@ from ccxt.async_support.timex import timex
|
|
162
161
|
from ccxt.async_support.tokocrypto import tokocrypto # noqa: F401
|
163
162
|
from ccxt.async_support.tradeogre import tradeogre # noqa: F401
|
164
163
|
from ccxt.async_support.upbit import upbit # noqa: F401
|
165
|
-
from ccxt.async_support.vertex import vertex # noqa: F401
|
166
164
|
from ccxt.async_support.wavesexchange import wavesexchange # noqa: F401
|
167
165
|
from ccxt.async_support.whitebit import whitebit # noqa: F401
|
168
166
|
from ccxt.async_support.woo import woo # noqa: F401
|
@@ -226,7 +224,6 @@ exchanges = [
|
|
226
224
|
'deribit',
|
227
225
|
'derive',
|
228
226
|
'digifinex',
|
229
|
-
'ellipx',
|
230
227
|
'exmo',
|
231
228
|
'fmfwio',
|
232
229
|
'foxbit',
|
@@ -271,7 +268,6 @@ exchanges = [
|
|
271
268
|
'tokocrypto',
|
272
269
|
'tradeogre',
|
273
270
|
'upbit',
|
274
|
-
'vertex',
|
275
271
|
'wavesexchange',
|
276
272
|
'whitebit',
|
277
273
|
'woo',
|
ccxt/async_support/ascendex.py
CHANGED
@@ -1584,7 +1584,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1584
1584
|
# "code": "0",
|
1585
1585
|
# "data": {
|
1586
1586
|
# "domain": "spot",
|
1587
|
-
# "userUID": "
|
1587
|
+
# "userUID": "U1479576457",
|
1588
1588
|
# "vipLevel": "0",
|
1589
1589
|
# "fees": [
|
1590
1590
|
# {symbol: 'HT/USDT', fee: {taker: '0.001', maker: "0.001"}},
|
ccxt/async_support/binance.py
CHANGED
@@ -1309,6 +1309,7 @@ class binance(Exchange, ImplicitAPI):
|
|
1309
1309
|
'defaultSubType': None, # 'linear', 'inverse'
|
1310
1310
|
'hasAlreadyAuthenticatedSuccessfully': False,
|
1311
1311
|
'warnOnFetchOpenOrdersWithoutSymbol': True,
|
1312
|
+
'currencyToPrecisionRoundingMode': TRUNCATE,
|
1312
1313
|
# not an error
|
1313
1314
|
# https://github.com/ccxt/ccxt/issues/11268
|
1314
1315
|
# https://github.com/ccxt/ccxt/pull/11624
|
@@ -2753,13 +2754,6 @@ class binance(Exchange, ImplicitAPI):
|
|
2753
2754
|
def cost_to_precision(self, symbol, cost):
|
2754
2755
|
return self.decimal_to_precision(cost, TRUNCATE, self.markets[symbol]['precision']['quote'], self.precisionMode, self.paddingMode)
|
2755
2756
|
|
2756
|
-
def currency_to_precision(self, code, fee, networkCode=None):
|
2757
|
-
# info is available in currencies only if the user has configured his api keys
|
2758
|
-
if self.safe_value(self.currencies[code], 'precision') is not None:
|
2759
|
-
return self.decimal_to_precision(fee, TRUNCATE, self.currencies[code]['precision'], self.precisionMode, self.paddingMode)
|
2760
|
-
else:
|
2761
|
-
return self.number_to_string(fee)
|
2762
|
-
|
2763
2757
|
def nonce(self):
|
2764
2758
|
return self.milliseconds() - self.options['timeDifference']
|
2765
2759
|
|
@@ -7366,6 +7360,7 @@ class binance(Exchange, ImplicitAPI):
|
|
7366
7360
|
:param str[] ids: order ids
|
7367
7361
|
:param str [symbol]: unified market symbol
|
7368
7362
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7363
|
+
:param str[] [params.clientOrderIds]: alternative to ids, array of client order ids
|
7369
7364
|
|
7370
7365
|
EXCHANGE SPECIFIC PARAMETERS
|
7371
7366
|
:param str[] [params.origClientOrderIdList]: max length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma
|
@@ -7380,8 +7375,14 @@ class binance(Exchange, ImplicitAPI):
|
|
7380
7375
|
raise BadRequest(self.id + ' cancelOrders is only supported for swap markets.')
|
7381
7376
|
request: dict = {
|
7382
7377
|
'symbol': market['id'],
|
7383
|
-
'orderidlist': ids,
|
7378
|
+
# 'orderidlist': ids,
|
7384
7379
|
}
|
7380
|
+
origClientOrderIdList = self.safe_list_2(params, 'origClientOrderIdList', 'clientOrderIds')
|
7381
|
+
if origClientOrderIdList is not None:
|
7382
|
+
params = self.omit(params, ['clientOrderIds'])
|
7383
|
+
request['origClientOrderIdList'] = origClientOrderIdList
|
7384
|
+
else:
|
7385
|
+
request['orderidlist'] = ids
|
7385
7386
|
response = None
|
7386
7387
|
if market['linear']:
|
7387
7388
|
response = await self.fapiPrivateDeleteBatchOrders(self.extend(request, params))
|
@@ -8864,7 +8865,6 @@ class binance(Exchange, ImplicitAPI):
|
|
8864
8865
|
request: dict = {
|
8865
8866
|
'coin': currency['id'],
|
8866
8867
|
'address': address,
|
8867
|
-
'amount': self.currency_to_precision(code, amount),
|
8868
8868
|
# issue sapiGetCapitalConfigGetall() to get networks for withdrawing USDT ERC20 vs USDT Omni
|
8869
8869
|
# 'network': 'ETH', # 'BTC', 'TRX', etc, optional
|
8870
8870
|
}
|
@@ -8876,6 +8876,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8876
8876
|
if network is not None:
|
8877
8877
|
request['network'] = network
|
8878
8878
|
params = self.omit(params, 'network')
|
8879
|
+
request['amount'] = self.currency_to_precision(code, amount, network)
|
8879
8880
|
response = await self.sapiPostCapitalWithdrawApply(self.extend(request, params))
|
8880
8881
|
# {id: '9a67628b16ba4988ae20d329333f16bc'}
|
8881
8882
|
return self.parse_transaction(response, currency)
|
@@ -11253,15 +11254,19 @@ class binance(Exchange, ImplicitAPI):
|
|
11253
11254
|
elif (path == 'batchOrders') or (path.find('sub-account') >= 0) or (path == 'capital/withdraw/apply') or (path.find('staking') >= 0) or (path.find('simple-earn') >= 0):
|
11254
11255
|
if (method == 'DELETE') and (path == 'batchOrders'):
|
11255
11256
|
orderidlist = self.safe_list(extendedParams, 'orderidlist', [])
|
11256
|
-
origclientorderidlist = self.
|
11257
|
-
extendedParams = self.omit(extendedParams, ['orderidlist', 'origclientorderidlist'])
|
11257
|
+
origclientorderidlist = self.safe_list_2(extendedParams, 'origclientorderidlist', 'origClientOrderIdList', [])
|
11258
|
+
extendedParams = self.omit(extendedParams, ['orderidlist', 'origclientorderidlist', 'origClientOrderIdList'])
|
11258
11259
|
query = self.rawencode(extendedParams)
|
11259
11260
|
orderidlistLength = len(orderidlist)
|
11260
11261
|
origclientorderidlistLength = len(origclientorderidlist)
|
11261
11262
|
if orderidlistLength > 0:
|
11262
11263
|
query = query + '&' + 'orderidlist=%5B' + '%2C'.join(orderidlist) + '%5D'
|
11263
11264
|
if origclientorderidlistLength > 0:
|
11264
|
-
|
11265
|
+
# wrap clientOrderids around ""
|
11266
|
+
newClientOrderIds = []
|
11267
|
+
for i in range(0, origclientorderidlistLength):
|
11268
|
+
newClientOrderIds.append('%22' + origclientorderidlist[i] + '%22')
|
11269
|
+
query = query + '&' + 'origclientorderidlist=%5B' + '%2C'.join(newClientOrderIds) + '%5D'
|
11265
11270
|
else:
|
11266
11271
|
query = self.rawencode(extendedParams)
|
11267
11272
|
else:
|
ccxt/async_support/bitget.py
CHANGED
@@ -1917,7 +1917,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1917
1917
|
res = self.safe_dict(results, i)
|
1918
1918
|
data = self.safe_list(res, 'data', [])
|
1919
1919
|
firstData = self.safe_dict(data, 0, {})
|
1920
|
-
isBorrowable = self.
|
1920
|
+
isBorrowable = self.safe_bool(firstData, 'isBorrowable')
|
1921
1921
|
if fetchMargins and isBorrowable is not None:
|
1922
1922
|
keysList = list(self.index_by(data, 'symbol').keys())
|
1923
1923
|
self.options['crossMarginPairsData'] = keysList
|
ccxt/async_support/coinbase.py
CHANGED
@@ -2193,34 +2193,44 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2193
2193
|
# fetchTickersV3
|
2194
2194
|
#
|
2195
2195
|
# [
|
2196
|
-
#
|
2197
|
-
#
|
2198
|
-
#
|
2199
|
-
#
|
2200
|
-
#
|
2201
|
-
#
|
2202
|
-
#
|
2203
|
-
#
|
2204
|
-
#
|
2205
|
-
#
|
2206
|
-
#
|
2207
|
-
#
|
2208
|
-
#
|
2209
|
-
#
|
2210
|
-
#
|
2211
|
-
#
|
2212
|
-
#
|
2213
|
-
#
|
2214
|
-
#
|
2215
|
-
#
|
2216
|
-
#
|
2217
|
-
#
|
2218
|
-
#
|
2219
|
-
#
|
2220
|
-
#
|
2221
|
-
#
|
2222
|
-
#
|
2223
|
-
#
|
2196
|
+
# {
|
2197
|
+
# "product_id": "ETH-USD",
|
2198
|
+
# "price": "4471.59",
|
2199
|
+
# "price_percentage_change_24h": "0.14243387238731",
|
2200
|
+
# "volume_24h": "87329.92990204",
|
2201
|
+
# "volume_percentage_change_24h": "-60.7789801794578",
|
2202
|
+
# "base_increment": "0.00000001",
|
2203
|
+
# "quote_increment": "0.01",
|
2204
|
+
# "quote_min_size": "1",
|
2205
|
+
# "quote_max_size": "150000000",
|
2206
|
+
# "base_min_size": "0.00000001",
|
2207
|
+
# "base_max_size": "42000",
|
2208
|
+
# "base_name": "Ethereum",
|
2209
|
+
# "quote_name": "US Dollar",
|
2210
|
+
# "watched": False,
|
2211
|
+
# "is_disabled": False,
|
2212
|
+
# "new": False,
|
2213
|
+
# "status": "online",
|
2214
|
+
# "cancel_only": False,
|
2215
|
+
# "limit_only": False,
|
2216
|
+
# "post_only": False,
|
2217
|
+
# "trading_disabled": False,
|
2218
|
+
# "auction_mode": False,
|
2219
|
+
# "product_type": "SPOT",
|
2220
|
+
# "quote_currency_id": "USD",
|
2221
|
+
# "base_currency_id": "ETH",
|
2222
|
+
# "fcm_trading_session_details": null,
|
2223
|
+
# "mid_market_price": "",
|
2224
|
+
# "alias": "",
|
2225
|
+
# "alias_to": ["ETH-USDC"],
|
2226
|
+
# "base_display_symbol": "ETH",
|
2227
|
+
# "quote_display_symbol": "USD",
|
2228
|
+
# "view_only": False,
|
2229
|
+
# "price_increment": "0.01",
|
2230
|
+
# "display_name": "ETH-USD",
|
2231
|
+
# "product_venue": "CBE",
|
2232
|
+
# "approximate_quote_24h_volume": "390503641.25",
|
2233
|
+
# "new_at": "2023-01-01T00:00:00Z"
|
2224
2234
|
# },
|
2225
2235
|
# ...
|
2226
2236
|
# ]
|
@@ -2251,10 +2261,12 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2251
2261
|
if ('bids' in ticker):
|
2252
2262
|
bids = self.safe_list(ticker, 'bids', [])
|
2253
2263
|
asks = self.safe_list(ticker, 'asks', [])
|
2254
|
-
|
2255
|
-
|
2256
|
-
|
2257
|
-
|
2264
|
+
firstBid = self.safe_dict(bids, 0, {})
|
2265
|
+
firstAsk = self.safe_dict(asks, 0, {})
|
2266
|
+
bid = self.safe_number(firstBid, 'price')
|
2267
|
+
bidVolume = self.safe_number(firstBid, 'size')
|
2268
|
+
ask = self.safe_number(firstAsk, 'price')
|
2269
|
+
askVolume = self.safe_number(firstAsk, 'size')
|
2258
2270
|
marketId = self.safe_string(ticker, 'product_id')
|
2259
2271
|
market = self.safe_market(marketId, market)
|
2260
2272
|
last = self.safe_number(ticker, 'price')
|
@@ -2277,8 +2289,8 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2277
2289
|
'change': None,
|
2278
2290
|
'percentage': self.safe_number(ticker, 'price_percentage_change_24h'),
|
2279
2291
|
'average': None,
|
2280
|
-
'baseVolume':
|
2281
|
-
'quoteVolume':
|
2292
|
+
'baseVolume': self.safe_number(ticker, 'volume_24h'),
|
2293
|
+
'quoteVolume': self.safe_number(ticker, 'approximate_quote_24h_volume'),
|
2282
2294
|
'info': ticker,
|
2283
2295
|
}, market)
|
2284
2296
|
|
ccxt/async_support/gate.py
CHANGED
@@ -765,6 +765,9 @@ class gate(Exchange, ImplicitAPI):
|
|
765
765
|
'option': 'options',
|
766
766
|
'options': 'options',
|
767
767
|
},
|
768
|
+
'fetchMarkets': {
|
769
|
+
'types': ['spot', 'swap', 'future', 'option'],
|
770
|
+
},
|
768
771
|
'swap': {
|
769
772
|
'fetchMarkets': {
|
770
773
|
'settlementCurrencies': ['usdt', 'btc'],
|
@@ -1234,21 +1237,24 @@ class gate(Exchange, ImplicitAPI):
|
|
1234
1237
|
await self.load_time_difference()
|
1235
1238
|
if self.check_required_credentials(False):
|
1236
1239
|
await self.load_unified_status()
|
1240
|
+
rawPromises = []
|
1237
1241
|
sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1242
|
+
fetchMarketsOptions = self.safe_dict(self.options, 'fetchMarkets')
|
1243
|
+
types = self.safe_list(fetchMarketsOptions, 'types', ['spot', 'swap', 'future', 'option'])
|
1244
|
+
for i in range(0, len(types)):
|
1245
|
+
marketType = types[i]
|
1246
|
+
if marketType == 'spot':
|
1247
|
+
if not sandboxMode:
|
1248
|
+
# gate doesn't have a sandbox for spot markets
|
1249
|
+
rawPromises.append(self.fetch_spot_markets(params))
|
1250
|
+
elif marketType == 'swap':
|
1251
|
+
rawPromises.append(self.fetch_swap_markets(params))
|
1252
|
+
elif marketType == 'future':
|
1253
|
+
rawPromises.append(self.fetch_future_markets(params))
|
1254
|
+
elif marketType == 'option':
|
1255
|
+
rawPromises.append(self.fetch_option_markets(params))
|
1256
|
+
results = await asyncio.gather(*rawPromises)
|
1257
|
+
return self.arrays_concat(results)
|
1252
1258
|
|
1253
1259
|
async def fetch_spot_markets(self, params={}):
|
1254
1260
|
marginPromise = self.publicMarginGetCurrencyPairs(params)
|
@@ -1363,10 +1369,9 @@ class gate(Exchange, ImplicitAPI):
|
|
1363
1369
|
})
|
1364
1370
|
return result
|
1365
1371
|
|
1366
|
-
async def
|
1372
|
+
async def fetch_swap_markets(self, params={}):
|
1367
1373
|
result = []
|
1368
1374
|
swapSettlementCurrencies = self.get_settlement_currencies('swap', 'fetchMarkets')
|
1369
|
-
futureSettlementCurrencies = self.get_settlement_currencies('future', 'fetchMarkets')
|
1370
1375
|
for c in range(0, len(swapSettlementCurrencies)):
|
1371
1376
|
settleId = swapSettlementCurrencies[c]
|
1372
1377
|
request: dict = {
|
@@ -1376,6 +1381,11 @@ class gate(Exchange, ImplicitAPI):
|
|
1376
1381
|
for i in range(0, len(response)):
|
1377
1382
|
parsedMarket = self.parse_contract_market(response[i], settleId)
|
1378
1383
|
result.append(parsedMarket)
|
1384
|
+
return result
|
1385
|
+
|
1386
|
+
async def fetch_future_markets(self, params={}):
|
1387
|
+
result = []
|
1388
|
+
futureSettlementCurrencies = self.get_settlement_currencies('future', 'fetchMarkets')
|
1379
1389
|
for c in range(0, len(futureSettlementCurrencies)):
|
1380
1390
|
settleId = futureSettlementCurrencies[c]
|
1381
1391
|
request: dict = {
|
@@ -2543,7 +2553,11 @@ class gate(Exchange, ImplicitAPI):
|
|
2543
2553
|
#
|
2544
2554
|
request, query = self.prepare_request(market, market['type'], params)
|
2545
2555
|
if limit is not None:
|
2546
|
-
|
2556
|
+
if market['spot']:
|
2557
|
+
limit = min(limit, 1000)
|
2558
|
+
else:
|
2559
|
+
limit = min(limit, 300)
|
2560
|
+
request['limit'] = limit
|
2547
2561
|
request['with_id'] = True
|
2548
2562
|
response = None
|
2549
2563
|
if market['spot'] or market['margin']:
|
ccxt/async_support/gemini.py
CHANGED
@@ -276,7 +276,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
276
276
|
'fetchMarketFromWebRetries': 10,
|
277
277
|
'fetchMarketsFromAPI': {
|
278
278
|
'fetchDetailsForAllSymbols': False,
|
279
|
-
'quoteCurrencies': ['USDT', 'GUSD', 'USD', 'DAI', 'EUR', 'GBP', 'SGD', 'BTC', 'ETH', 'LTC', 'BCH', 'SOL'],
|
279
|
+
'quoteCurrencies': ['USDT', 'GUSD', 'USD', 'DAI', 'EUR', 'GBP', 'SGD', 'BTC', 'ETH', 'LTC', 'BCH', 'SOL', 'USDC'],
|
280
280
|
},
|
281
281
|
'fetchMarkets': {
|
282
282
|
'webApiEnable': True, # fetches from WEB
|
ccxt/async_support/hibachi.py
CHANGED
@@ -1562,7 +1562,7 @@ class hibachi(Exchange, ImplicitAPI):
|
|
1562
1562
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
1563
1563
|
endpoint = '/' + self.implode_params(path, params)
|
1564
1564
|
url = self.urls['api'][api] + endpoint
|
1565
|
-
headers = {}
|
1565
|
+
headers = {'Hibachi-Client': 'HibachiCCXT/unversioned'}
|
1566
1566
|
if method == 'GET':
|
1567
1567
|
request = self.omit(params, self.extract_params(path))
|
1568
1568
|
query = self.urlencode(request)
|
@@ -2284,6 +2284,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2284
2284
|
:param str id: order id
|
2285
2285
|
:param str symbol: unified symbol of the market the order was made in
|
2286
2286
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2287
|
+
:param str [params.clientOrderId]: client order id,(optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
2287
2288
|
:param str [params.user]: user address, will default to self.walletAddress if not provided
|
2288
2289
|
:param str [params.subAccountAddress]: sub account user address
|
2289
2290
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -2292,12 +2293,18 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2292
2293
|
userAddress, params = self.handle_public_address('fetchOrder', params)
|
2293
2294
|
await self.load_markets()
|
2294
2295
|
market = self.safe_market(symbol)
|
2295
|
-
|
2296
|
+
clientOrderId = self.safe_string(params, 'clientOrderId')
|
2296
2297
|
request: dict = {
|
2297
2298
|
'type': 'orderStatus',
|
2298
|
-
'oid': id if isClientOrderId else self.parse_to_numeric(id),
|
2299
|
+
# 'oid': id if isClientOrderId else self.parse_to_numeric(id),
|
2299
2300
|
'user': userAddress,
|
2300
2301
|
}
|
2302
|
+
if clientOrderId is not None:
|
2303
|
+
params = self.omit(params, 'clientOrderId')
|
2304
|
+
request['oid'] = clientOrderId
|
2305
|
+
else:
|
2306
|
+
isClientOrderId = len(id) >= 34
|
2307
|
+
request['oid'] = id if isClientOrderId else self.parse_to_numeric(id)
|
2301
2308
|
response = await self.publicPostInfo(self.extend(request, params))
|
2302
2309
|
#
|
2303
2310
|
# {
|
@@ -3669,11 +3676,15 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
3669
3676
|
# }
|
3670
3677
|
# {"status":"ok","response":{"type":"order","data":{"statuses":[{"error":"Insufficient margin to place order. asset=84"}]}}}
|
3671
3678
|
#
|
3679
|
+
# {"status":"unknownOid"}
|
3680
|
+
#
|
3672
3681
|
status = self.safe_string(response, 'status', '')
|
3673
3682
|
error = self.safe_string(response, 'error')
|
3674
3683
|
message = None
|
3675
3684
|
if status == 'err':
|
3676
3685
|
message = self.safe_string(response, 'response')
|
3686
|
+
elif status == 'unknownOid':
|
3687
|
+
raise OrderNotFound(self.id + ' ' + body) # {"status":"unknownOid"}
|
3677
3688
|
elif error is not None:
|
3678
3689
|
message = error
|
3679
3690
|
else:
|
ccxt/async_support/indodax.py
CHANGED
@@ -204,6 +204,16 @@ class indodax(Exchange, ImplicitAPI):
|
|
204
204
|
'Minimum order': InvalidOrder,
|
205
205
|
},
|
206
206
|
},
|
207
|
+
'timeframes': {
|
208
|
+
'1m': '1',
|
209
|
+
'15m': '15',
|
210
|
+
'30m': '30',
|
211
|
+
'1h': '60',
|
212
|
+
'4h': '240',
|
213
|
+
'1d': '1D',
|
214
|
+
'3d': '3D',
|
215
|
+
'1w': '1W',
|
216
|
+
},
|
207
217
|
# exchange-specific options
|
208
218
|
'options': {
|
209
219
|
'recvWindow': 5 * 1000, # default 5 sec
|
@@ -227,16 +237,6 @@ class indodax(Exchange, ImplicitAPI):
|
|
227
237
|
# 'ETH': 'eth'
|
228
238
|
# 'BASE': 'base'
|
229
239
|
},
|
230
|
-
'timeframes': {
|
231
|
-
'1m': '1',
|
232
|
-
'15m': '15',
|
233
|
-
'30m': '30',
|
234
|
-
'1h': '60',
|
235
|
-
'4h': '240',
|
236
|
-
'1d': '1D',
|
237
|
-
'3d': '3D',
|
238
|
-
'1w': '1W',
|
239
|
-
},
|
240
240
|
},
|
241
241
|
'features': {
|
242
242
|
'spot': {
|
@@ -690,8 +690,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
690
690
|
"""
|
691
691
|
await self.load_markets()
|
692
692
|
market = self.market(symbol)
|
693
|
-
|
694
|
-
selectedTimeframe = self.safe_string(timeframes, timeframe, timeframe)
|
693
|
+
selectedTimeframe = self.safe_string(self.timeframes, timeframe, timeframe)
|
695
694
|
now = self.seconds()
|
696
695
|
until = self.safe_integer(params, 'until', now)
|
697
696
|
params = self.omit(params, ['until'])
|
ccxt/async_support/kraken.py
CHANGED
@@ -252,6 +252,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
252
252
|
'UST': 'USTC',
|
253
253
|
'XBT': 'BTC',
|
254
254
|
'XDG': 'DOGE',
|
255
|
+
'FEE': 'KFEE',
|
255
256
|
},
|
256
257
|
'options': {
|
257
258
|
'timeDifference': 0, # the difference between system clock and Binance clock
|
@@ -716,14 +717,6 @@ class kraken(Exchange, ImplicitAPI):
|
|
716
717
|
self.options['marketsByAltname'] = self.index_by(result, 'altname')
|
717
718
|
return result
|
718
719
|
|
719
|
-
def safe_currency(self, currencyId, currency: Currency = None):
|
720
|
-
if currencyId is not None:
|
721
|
-
if len(currencyId) > 3:
|
722
|
-
if (currencyId.find('X') == 0) or (currencyId.find('Z') == 0):
|
723
|
-
if not (currencyId.find('.') > 0) and (currencyId != 'ZEUS'):
|
724
|
-
currencyId = currencyId[1:]
|
725
|
-
return super(kraken, self).safe_currency(currencyId, currency)
|
726
|
-
|
727
720
|
async def fetch_status(self, params={}):
|
728
721
|
"""
|
729
722
|
the latest known information on the availability of the exchange API
|