ccxt 4.4.52__py2.py3-none-any.whl → 4.4.57__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 -3
- ccxt/abstract/binance.py +0 -1
- ccxt/abstract/binancecoinm.py +0 -1
- ccxt/abstract/binanceus.py +0 -1
- ccxt/abstract/binanceusdm.py +0 -1
- ccxt/ace.py +3 -0
- ccxt/alpaca.py +5 -0
- ccxt/ascendex.py +2 -1
- ccxt/async_support/__init__.py +1 -3
- ccxt/async_support/ace.py +3 -0
- ccxt/async_support/alpaca.py +5 -0
- ccxt/async_support/ascendex.py +2 -1
- ccxt/async_support/base/exchange.py +24 -7
- ccxt/async_support/bigone.py +5 -0
- ccxt/async_support/binance.py +54 -54
- ccxt/async_support/bingx.py +25 -29
- ccxt/async_support/bit2c.py +3 -0
- ccxt/async_support/bitbank.py +3 -0
- ccxt/async_support/bitbns.py +3 -0
- ccxt/async_support/bitfinex.py +6 -1
- ccxt/async_support/bitflyer.py +6 -1
- ccxt/async_support/bitget.py +9 -5
- ccxt/async_support/bithumb.py +3 -1
- ccxt/async_support/bitmart.py +22 -12
- ccxt/async_support/bitmex.py +99 -93
- ccxt/async_support/bitopro.py +7 -2
- ccxt/async_support/bitrue.py +4 -0
- ccxt/async_support/bitso.py +5 -2
- ccxt/async_support/bitstamp.py +3 -0
- ccxt/async_support/bitteam.py +5 -0
- ccxt/async_support/bitvavo.py +4 -0
- ccxt/async_support/blockchaincom.py +4 -0
- ccxt/async_support/blofin.py +3 -0
- ccxt/async_support/btcalpha.py +5 -0
- ccxt/async_support/btcbox.py +3 -2
- ccxt/async_support/btcmarkets.py +5 -0
- ccxt/async_support/btcturk.py +3 -0
- ccxt/async_support/bybit.py +13 -5
- ccxt/async_support/cex.py +2 -0
- ccxt/async_support/coinbase.py +20 -13
- ccxt/async_support/coinbaseexchange.py +5 -0
- ccxt/async_support/coinbaseinternational.py +23 -4
- ccxt/async_support/coincatch.py +3 -0
- ccxt/async_support/coincheck.py +2 -0
- ccxt/async_support/coinex.py +6 -2
- ccxt/async_support/coinlist.py +5 -0
- ccxt/async_support/coinmate.py +4 -0
- ccxt/async_support/coinmetro.py +9 -5
- ccxt/async_support/coinone.py +3 -0
- ccxt/async_support/coinsph.py +4 -0
- ccxt/async_support/coinspot.py +1 -0
- ccxt/async_support/cryptocom.py +5 -0
- ccxt/async_support/currencycom.py +3 -0
- ccxt/async_support/defx.py +5 -0
- ccxt/async_support/delta.py +4 -1
- ccxt/async_support/deribit.py +15 -28
- ccxt/async_support/digifinex.py +10 -5
- ccxt/async_support/ellipx.py +9 -5
- ccxt/async_support/exmo.py +7 -4
- ccxt/async_support/gate.py +5 -1
- ccxt/async_support/gemini.py +3 -0
- ccxt/async_support/hashkey.py +5 -4
- ccxt/async_support/hitbtc.py +6 -2
- ccxt/async_support/hollaex.py +7 -2
- ccxt/async_support/htx.py +8 -1
- ccxt/async_support/huobijp.py +5 -0
- ccxt/async_support/hyperliquid.py +9 -4
- ccxt/async_support/idex.py +5 -1
- ccxt/async_support/independentreserve.py +4 -0
- ccxt/async_support/indodax.py +3 -0
- ccxt/async_support/kraken.py +7 -5
- ccxt/async_support/krakenfutures.py +5 -2
- ccxt/async_support/kucoin.py +13 -6
- ccxt/async_support/kucoinfutures.py +5 -1
- ccxt/async_support/kuna.py +3 -0
- ccxt/async_support/latoken.py +4 -0
- ccxt/async_support/lbank.py +6 -1
- ccxt/async_support/luno.py +6 -1
- ccxt/async_support/mercado.py +4 -0
- ccxt/async_support/mexc.py +10 -9
- ccxt/async_support/ndax.py +6 -1
- ccxt/async_support/novadax.py +5 -0
- ccxt/async_support/oceanex.py +6 -2
- ccxt/async_support/okcoin.py +4 -0
- ccxt/async_support/okx.py +17 -5
- ccxt/async_support/onetrading.py +4 -0
- ccxt/async_support/oxfun.py +3 -0
- ccxt/async_support/p2b.py +3 -0
- ccxt/async_support/paradex.py +8 -2
- ccxt/async_support/phemex.py +10 -4
- ccxt/async_support/poloniex.py +6 -3
- ccxt/async_support/poloniexfutures.py +5 -1
- ccxt/async_support/probit.py +4 -0
- ccxt/async_support/timex.py +4 -0
- ccxt/async_support/tokocrypto.py +5 -0
- ccxt/async_support/tradeogre.py +2 -0
- ccxt/async_support/upbit.py +5 -2
- ccxt/async_support/vertex.py +6 -2
- ccxt/async_support/wavesexchange.py +20 -3
- ccxt/async_support/wazirx.py +2 -0
- ccxt/async_support/whitebit.py +5 -4
- ccxt/async_support/woo.py +15 -5
- ccxt/async_support/woofipro.py +23 -9
- ccxt/async_support/xt.py +5 -0
- ccxt/async_support/yobit.py +5 -2
- ccxt/async_support/zaif.py +2 -0
- ccxt/async_support/zonda.py +2 -0
- ccxt/base/exchange.py +96 -54
- ccxt/base/types.py +1 -1
- ccxt/bigone.py +5 -0
- ccxt/binance.py +54 -54
- ccxt/bingx.py +25 -29
- ccxt/bit2c.py +3 -0
- ccxt/bitbank.py +3 -0
- ccxt/bitbns.py +3 -0
- ccxt/bitfinex.py +6 -1
- ccxt/bitflyer.py +6 -1
- ccxt/bitget.py +9 -5
- ccxt/bithumb.py +3 -1
- ccxt/bitmart.py +22 -12
- ccxt/bitmex.py +99 -93
- ccxt/bitopro.py +7 -2
- ccxt/bitrue.py +4 -0
- ccxt/bitso.py +5 -2
- ccxt/bitstamp.py +3 -0
- ccxt/bitteam.py +5 -0
- ccxt/bitvavo.py +4 -0
- ccxt/blockchaincom.py +4 -0
- ccxt/blofin.py +3 -0
- ccxt/btcalpha.py +5 -0
- ccxt/btcbox.py +3 -2
- ccxt/btcmarkets.py +5 -0
- ccxt/btcturk.py +3 -0
- ccxt/bybit.py +13 -5
- ccxt/cex.py +2 -0
- ccxt/coinbase.py +20 -13
- ccxt/coinbaseexchange.py +5 -0
- ccxt/coinbaseinternational.py +23 -4
- ccxt/coincatch.py +3 -0
- ccxt/coincheck.py +2 -0
- ccxt/coinex.py +6 -2
- ccxt/coinlist.py +5 -0
- ccxt/coinmate.py +4 -0
- ccxt/coinmetro.py +9 -5
- ccxt/coinone.py +3 -0
- ccxt/coinsph.py +4 -0
- ccxt/coinspot.py +1 -0
- ccxt/cryptocom.py +5 -0
- ccxt/currencycom.py +3 -0
- ccxt/defx.py +5 -0
- ccxt/delta.py +4 -1
- ccxt/deribit.py +15 -28
- ccxt/digifinex.py +10 -5
- ccxt/ellipx.py +9 -5
- ccxt/exmo.py +7 -4
- ccxt/gate.py +5 -1
- ccxt/gemini.py +3 -0
- ccxt/hashkey.py +5 -4
- ccxt/hitbtc.py +6 -2
- ccxt/hollaex.py +7 -2
- ccxt/htx.py +8 -1
- ccxt/huobijp.py +5 -0
- ccxt/hyperliquid.py +9 -4
- ccxt/idex.py +5 -1
- ccxt/independentreserve.py +4 -0
- ccxt/indodax.py +3 -0
- ccxt/kraken.py +7 -5
- ccxt/krakenfutures.py +5 -2
- ccxt/kucoin.py +13 -6
- ccxt/kucoinfutures.py +5 -1
- ccxt/kuna.py +3 -0
- ccxt/latoken.py +4 -0
- ccxt/lbank.py +6 -1
- ccxt/luno.py +6 -1
- ccxt/mercado.py +4 -0
- ccxt/mexc.py +10 -9
- ccxt/ndax.py +6 -1
- ccxt/novadax.py +5 -0
- ccxt/oceanex.py +6 -2
- ccxt/okcoin.py +4 -0
- ccxt/okx.py +17 -5
- ccxt/onetrading.py +4 -0
- ccxt/oxfun.py +3 -0
- ccxt/p2b.py +3 -0
- ccxt/paradex.py +8 -2
- ccxt/phemex.py +10 -4
- ccxt/poloniex.py +6 -3
- ccxt/poloniexfutures.py +5 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +2 -2
- ccxt/pro/bitcoincom.py +1 -4
- ccxt/pro/bitget.py +3 -3
- ccxt/pro/bitopro.py +1 -1
- ccxt/pro/bybit.py +7 -2
- ccxt/pro/cex.py +1 -1
- ccxt/pro/coincatch.py +3 -3
- ccxt/pro/mexc.py +3 -3
- ccxt/pro/okx.py +1 -1
- ccxt/probit.py +4 -0
- ccxt/test/tests_async.py +57 -30
- ccxt/test/tests_sync.py +57 -30
- ccxt/timex.py +4 -0
- ccxt/tokocrypto.py +5 -0
- ccxt/tradeogre.py +2 -0
- ccxt/upbit.py +5 -2
- ccxt/vertex.py +6 -2
- ccxt/wavesexchange.py +20 -3
- ccxt/wazirx.py +2 -0
- ccxt/whitebit.py +5 -4
- ccxt/woo.py +15 -5
- ccxt/woofipro.py +23 -9
- ccxt/xt.py +5 -0
- ccxt/yobit.py +5 -2
- ccxt/zaif.py +2 -0
- ccxt/zonda.py +2 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/METADATA +225 -143
- {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/RECORD +220 -223
- ccxt/abstract/lykke.py +0 -29
- ccxt/async_support/lykke.py +0 -1370
- ccxt/lykke.py +0 -1370
- {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/WHEEL +0 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.57.dist-info}/top_level.txt +0 -0
ccxt/async_support/coincatch.py
CHANGED
@@ -464,11 +464,13 @@ class coincatch(Exchange, ImplicitAPI):
|
|
464
464
|
'limit': 500,
|
465
465
|
'daysBack': 100000, # todo implement
|
466
466
|
'untilDays': 100000, # todo implement
|
467
|
+
'symbolRequired': True,
|
467
468
|
},
|
468
469
|
'fetchOrder': {
|
469
470
|
'marginMode': False,
|
470
471
|
'trigger': False,
|
471
472
|
'trailing': False,
|
473
|
+
'symbolRequired': False,
|
472
474
|
},
|
473
475
|
'fetchOpenOrders': {
|
474
476
|
'marginMode': False,
|
@@ -476,6 +478,7 @@ class coincatch(Exchange, ImplicitAPI):
|
|
476
478
|
'trigger': True,
|
477
479
|
'trailing': False,
|
478
480
|
'marketType': True,
|
481
|
+
'symbolRequired': False,
|
479
482
|
},
|
480
483
|
'fetchOrders': None,
|
481
484
|
'fetchClosedOrders': None, # todo implement
|
ccxt/async_support/coincheck.py
CHANGED
@@ -187,6 +187,7 @@ class coincheck(Exchange, ImplicitAPI):
|
|
187
187
|
'limit': None,
|
188
188
|
'daysBack': None,
|
189
189
|
'untilDays': None,
|
190
|
+
'symbolRequired': True,
|
190
191
|
},
|
191
192
|
'fetchOrder': None,
|
192
193
|
'fetchOpenOrders': {
|
@@ -194,6 +195,7 @@ class coincheck(Exchange, ImplicitAPI):
|
|
194
195
|
'limit': None,
|
195
196
|
'trigger': False,
|
196
197
|
'trailing': False,
|
198
|
+
'symbolRequired': False,
|
197
199
|
},
|
198
200
|
'fetchOrders': None,
|
199
201
|
'fetchClosedOrders': None,
|
ccxt/async_support/coinex.py
CHANGED
@@ -547,17 +547,20 @@ class coinex(Exchange, ImplicitAPI):
|
|
547
547
|
'limit': 1000,
|
548
548
|
'daysBack': None,
|
549
549
|
'untilDays': 100000,
|
550
|
+
'symbolRequired': True,
|
550
551
|
},
|
551
552
|
'fetchOrder': {
|
552
553
|
'marginMode': False,
|
553
554
|
'trigger': False,
|
554
555
|
'trailing': False,
|
556
|
+
'symbolRequired': True,
|
555
557
|
},
|
556
558
|
'fetchOpenOrders': {
|
557
559
|
'marginMode': True,
|
558
560
|
'limit': 1000,
|
559
561
|
'trigger': True,
|
560
562
|
'trailing': False,
|
563
|
+
'symbolRequired': False,
|
561
564
|
},
|
562
565
|
'fetchOrders': None,
|
563
566
|
'fetchClosedOrders': {
|
@@ -568,6 +571,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
568
571
|
'untilDays': None,
|
569
572
|
'trigger': True,
|
570
573
|
'trailing': False,
|
574
|
+
'symbolRequired': False,
|
571
575
|
},
|
572
576
|
'fetchOHLCV': {
|
573
577
|
'limit': 1000,
|
@@ -814,7 +818,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
814
818
|
swapMarkets = promises[1]
|
815
819
|
return self.array_concat(spotMarkets, swapMarkets)
|
816
820
|
|
817
|
-
async def fetch_spot_markets(self, params):
|
821
|
+
async def fetch_spot_markets(self, params) -> List[Market]:
|
818
822
|
response = await self.v2PublicGetSpotMarket(params)
|
819
823
|
#
|
820
824
|
# {
|
@@ -4612,7 +4616,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
4612
4616
|
request: dict = {
|
4613
4617
|
'ccy': currency['id'],
|
4614
4618
|
'to_address': address, # must be authorized, inter-user transfer by a registered mobile phone number or an email address is supported
|
4615
|
-
'amount': self.
|
4619
|
+
'amount': self.currency_to_precision(code, amount), # the actual amount without fees, https://www.coinex.com/fees
|
4616
4620
|
}
|
4617
4621
|
if tag is not None:
|
4618
4622
|
request['memo'] = tag
|
ccxt/async_support/coinlist.py
CHANGED
@@ -255,17 +255,20 @@ class coinlist(Exchange, ImplicitAPI):
|
|
255
255
|
'limit': 500,
|
256
256
|
'daysBack': 100000,
|
257
257
|
'untilDays': 100000,
|
258
|
+
'symbolRequired': False,
|
258
259
|
},
|
259
260
|
'fetchOrder': {
|
260
261
|
'marginMode': False,
|
261
262
|
'trigger': False,
|
262
263
|
'trailing': False,
|
264
|
+
'symbolRequired': False,
|
263
265
|
},
|
264
266
|
'fetchOpenOrders': {
|
265
267
|
'marginMode': False,
|
266
268
|
'limit': 500,
|
267
269
|
'trigger': False,
|
268
270
|
'trailing': False,
|
271
|
+
'symbolRequired': False,
|
269
272
|
},
|
270
273
|
'fetchOrders': {
|
271
274
|
'marginMode': False,
|
@@ -274,6 +277,7 @@ class coinlist(Exchange, ImplicitAPI):
|
|
274
277
|
'untilDays': 100000,
|
275
278
|
'trigger': False,
|
276
279
|
'trailing': False,
|
280
|
+
'symbolRequired': False,
|
277
281
|
},
|
278
282
|
'fetchClosedOrders': {
|
279
283
|
'marginMode': False,
|
@@ -283,6 +287,7 @@ class coinlist(Exchange, ImplicitAPI):
|
|
283
287
|
'untilDays': 100000,
|
284
288
|
'trigger': False,
|
285
289
|
'trailing': False,
|
290
|
+
'symbolRequired': False,
|
286
291
|
},
|
287
292
|
'fetchOHLCV': {
|
288
293
|
'limit': 300,
|
ccxt/async_support/coinmate.py
CHANGED
@@ -248,17 +248,20 @@ class coinmate(Exchange, ImplicitAPI):
|
|
248
248
|
'limit': 1000,
|
249
249
|
'daysBack': 100000,
|
250
250
|
'untilDays': 100000, # todo implement
|
251
|
+
'symbolRequired': False,
|
251
252
|
},
|
252
253
|
'fetchOrder': {
|
253
254
|
'marginMode': False,
|
254
255
|
'trigger': False,
|
255
256
|
'trailing': False,
|
257
|
+
'symbolRequired': False,
|
256
258
|
},
|
257
259
|
'fetchOpenOrders': {
|
258
260
|
'marginMode': False,
|
259
261
|
'limit': None,
|
260
262
|
'trigger': False,
|
261
263
|
'trailing': False,
|
264
|
+
'symbolRequired': True,
|
262
265
|
},
|
263
266
|
'fetchOrders': {
|
264
267
|
'marginMode': False,
|
@@ -267,6 +270,7 @@ class coinmate(Exchange, ImplicitAPI):
|
|
267
270
|
'untilDays': None,
|
268
271
|
'trigger': False,
|
269
272
|
'trailing': False,
|
273
|
+
'symbolRequired': True,
|
270
274
|
},
|
271
275
|
'fetchClosedOrders': None,
|
272
276
|
'fetchOHLCV': None,
|
ccxt/async_support/coinmetro.py
CHANGED
@@ -255,17 +255,20 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
255
255
|
'limit': None,
|
256
256
|
'daysBack': 100000,
|
257
257
|
'untilDays': None,
|
258
|
+
'symbolRequired': False,
|
258
259
|
},
|
259
260
|
'fetchOrder': {
|
260
261
|
'marginMode': False,
|
261
262
|
'trigger': False,
|
262
263
|
'trailing': False,
|
264
|
+
'symbolRequired': False,
|
263
265
|
},
|
264
266
|
'fetchOpenOrders': {
|
265
267
|
'marginMode': False,
|
266
268
|
'limit': None,
|
267
269
|
'trigger': False,
|
268
270
|
'trailing': False,
|
271
|
+
'symbolRequired': False,
|
269
272
|
},
|
270
273
|
'fetchOrders': {
|
271
274
|
'marginMode': False,
|
@@ -274,6 +277,7 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
274
277
|
'untilDays': None,
|
275
278
|
'trigger': False,
|
276
279
|
'trailing': False,
|
280
|
+
'symbolRequired': False,
|
277
281
|
},
|
278
282
|
'fetchClosedOrders': None,
|
279
283
|
'fetchOHLCV': {
|
@@ -1261,24 +1265,24 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
1261
1265
|
request: dict = {
|
1262
1266
|
}
|
1263
1267
|
request['orderType'] = type
|
1264
|
-
|
1268
|
+
formattedAmount = None
|
1265
1269
|
if amount is not None:
|
1266
|
-
|
1270
|
+
formattedAmount = self.amount_to_precision(symbol, amount)
|
1267
1271
|
cost = self.safe_value(params, 'cost')
|
1268
1272
|
params = self.omit(params, 'cost')
|
1269
1273
|
if type == 'limit':
|
1270
1274
|
if (price is None) and (cost is None):
|
1271
1275
|
raise ArgumentsRequired(self.id + ' createOrder() requires a price or params.cost argument for a ' + type + ' order')
|
1272
1276
|
elif (price is not None) and (amount is not None):
|
1273
|
-
costString = Precise.string_mul(self.number_to_string(price), self.number_to_string(
|
1277
|
+
costString = Precise.string_mul(self.number_to_string(price), self.number_to_string(formattedAmount))
|
1274
1278
|
cost = self.parse_to_numeric(costString)
|
1275
1279
|
precisedCost = None
|
1276
1280
|
if cost is not None:
|
1277
1281
|
precisedCost = self.cost_to_precision(symbol, cost)
|
1278
1282
|
if side == 'sell':
|
1279
|
-
request = self.handle_create_order_side(market['baseId'], market['quoteId'],
|
1283
|
+
request = self.handle_create_order_side(market['baseId'], market['quoteId'], formattedAmount, precisedCost, request)
|
1280
1284
|
elif side == 'buy':
|
1281
|
-
request = self.handle_create_order_side(market['quoteId'], market['baseId'], precisedCost,
|
1285
|
+
request = self.handle_create_order_side(market['quoteId'], market['baseId'], precisedCost, formattedAmount, request)
|
1282
1286
|
timeInForce = self.safe_value(params, 'timeInForce')
|
1283
1287
|
if timeInForce is not None:
|
1284
1288
|
params = self.omit(params, 'timeInForce')
|
ccxt/async_support/coinone.py
CHANGED
@@ -228,17 +228,20 @@ class coinone(Exchange, ImplicitAPI):
|
|
228
228
|
'limit': 100, # todo implement
|
229
229
|
'daysBack': 100000, # todo implement
|
230
230
|
'untilDays': 100000, # todo implement
|
231
|
+
'symbolRequired': True,
|
231
232
|
},
|
232
233
|
'fetchOrder': {
|
233
234
|
'marginMode': False,
|
234
235
|
'trigger': False,
|
235
236
|
'trailing': False,
|
237
|
+
'symbolRequired': True,
|
236
238
|
},
|
237
239
|
'fetchOpenOrders': {
|
238
240
|
'marginMode': False,
|
239
241
|
'limit': None,
|
240
242
|
'trigger': False,
|
241
243
|
'trailing': False,
|
244
|
+
'symbolRequired': True,
|
242
245
|
},
|
243
246
|
'fetchOrders': None,
|
244
247
|
'fetchClosedOrders': None, # todo implement
|
ccxt/async_support/coinsph.py
CHANGED
@@ -344,17 +344,20 @@ class coinsph(Exchange, ImplicitAPI):
|
|
344
344
|
'limit': 1000,
|
345
345
|
'daysBack': 100000,
|
346
346
|
'untilDays': 100000, # todo implement
|
347
|
+
'symbolRequired': True,
|
347
348
|
},
|
348
349
|
'fetchOrder': {
|
349
350
|
'marginMode': False,
|
350
351
|
'trigger': False,
|
351
352
|
'trailing': False,
|
353
|
+
'symbolRequired': False,
|
352
354
|
},
|
353
355
|
'fetchOpenOrders': {
|
354
356
|
'marginMode': False,
|
355
357
|
'limit': None,
|
356
358
|
'trigger': False,
|
357
359
|
'trailing': False,
|
360
|
+
'symbolRequired': False,
|
358
361
|
},
|
359
362
|
'fetchOrders': None,
|
360
363
|
'fetchClosedOrders': {
|
@@ -365,6 +368,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
365
368
|
'untilDays': 100000,
|
366
369
|
'trigger': False,
|
367
370
|
'trailing': False,
|
371
|
+
'symbolRequired': True,
|
368
372
|
},
|
369
373
|
'fetchOHLCV': {
|
370
374
|
'limit': 1000,
|
ccxt/async_support/coinspot.py
CHANGED
ccxt/async_support/cryptocom.py
CHANGED
@@ -404,17 +404,20 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
404
404
|
'limit': 100,
|
405
405
|
'daysBack': None,
|
406
406
|
'untilDays': 1,
|
407
|
+
'symbolRequired': False,
|
407
408
|
},
|
408
409
|
'fetchOrder': {
|
409
410
|
'marginMode': False,
|
410
411
|
'trigger': False,
|
411
412
|
'trailing': False,
|
413
|
+
'symbolRequired': False,
|
412
414
|
},
|
413
415
|
'fetchOpenOrders': {
|
414
416
|
'marginMode': True,
|
415
417
|
'limit': 100,
|
416
418
|
'trigger': False,
|
417
419
|
'trailing': False,
|
420
|
+
'symbolRequired': False,
|
418
421
|
},
|
419
422
|
'fetchOrders': {
|
420
423
|
'marginMode': False,
|
@@ -423,6 +426,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
423
426
|
'untilDays': 1,
|
424
427
|
'trigger': False,
|
425
428
|
'trailing': False,
|
429
|
+
'symbolRequired': False,
|
426
430
|
},
|
427
431
|
'fetchClosedOrders': {
|
428
432
|
'marginMode': False,
|
@@ -432,6 +436,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
432
436
|
'untilDays': 1,
|
433
437
|
'trigger': False,
|
434
438
|
'trailing': False,
|
439
|
+
'symbolRequired': False,
|
435
440
|
},
|
436
441
|
'fetchOHLCV': {
|
437
442
|
'limit': 300,
|
@@ -295,17 +295,20 @@ class currencycom(Exchange, ImplicitAPI):
|
|
295
295
|
'limit': 500,
|
296
296
|
'daysBack': 100000,
|
297
297
|
'untilDays': 100000, # todo implementation
|
298
|
+
'symbolRequired': False,
|
298
299
|
},
|
299
300
|
'fetchOrder': {
|
300
301
|
'marginMode': False,
|
301
302
|
'trigger': False,
|
302
303
|
'trailing': False,
|
304
|
+
'symbolRequired': False,
|
303
305
|
},
|
304
306
|
'fetchOpenOrders': {
|
305
307
|
'marginMode': True,
|
306
308
|
'limit': 100,
|
307
309
|
'trigger': False,
|
308
310
|
'trailing': False,
|
311
|
+
'symbolRequired': False,
|
309
312
|
},
|
310
313
|
'fetchOrders': None,
|
311
314
|
'fetchClosedOrders': None,
|
ccxt/async_support/defx.py
CHANGED
@@ -295,17 +295,20 @@ class defx(Exchange, ImplicitAPI):
|
|
295
295
|
'limit': 1000,
|
296
296
|
'daysBack': None,
|
297
297
|
'untilDays': None,
|
298
|
+
'symbolRequired': False,
|
298
299
|
},
|
299
300
|
'fetchOrder': {
|
300
301
|
'marginMode': False,
|
301
302
|
'trigger': False,
|
302
303
|
'trailing': False,
|
304
|
+
'symbolRequired': False,
|
303
305
|
},
|
304
306
|
'fetchOpenOrders': {
|
305
307
|
'marginMode': True,
|
306
308
|
'limit': 100,
|
307
309
|
'trigger': False,
|
308
310
|
'trailing': False,
|
311
|
+
'symbolRequired': False,
|
309
312
|
},
|
310
313
|
'fetchOrders': {
|
311
314
|
'marginMode': False,
|
@@ -314,6 +317,7 @@ class defx(Exchange, ImplicitAPI):
|
|
314
317
|
'untilDays': 100000,
|
315
318
|
'trigger': False,
|
316
319
|
'trailing': False,
|
320
|
+
'symbolRequired': False,
|
317
321
|
},
|
318
322
|
'fetchClosedOrders': {
|
319
323
|
'marginMode': False,
|
@@ -323,6 +327,7 @@ class defx(Exchange, ImplicitAPI):
|
|
323
327
|
'untilDays': 100000,
|
324
328
|
'trigger': False,
|
325
329
|
'trailing': False,
|
330
|
+
'symbolRequired': False,
|
326
331
|
},
|
327
332
|
'fetchOHLCV': {
|
328
333
|
'limit': 1000,
|
ccxt/async_support/delta.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.delta import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, MarginMode, MarginModification, Market,
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Greeks, Int, LedgerEntry, Leverage, MarginMode, MarginModification, Market, Num, Option, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, MarketInterface
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -269,6 +269,7 @@ class delta(Exchange, ImplicitAPI):
|
|
269
269
|
'limit': 100, # todo: revise
|
270
270
|
'daysBack': 100000,
|
271
271
|
'untilDays': 100000,
|
272
|
+
'symbolRequired': False,
|
272
273
|
},
|
273
274
|
'fetchOrder': None,
|
274
275
|
'fetchOpenOrders': {
|
@@ -276,6 +277,7 @@ class delta(Exchange, ImplicitAPI):
|
|
276
277
|
'limit': 100, # todo: revise
|
277
278
|
'trigger': False,
|
278
279
|
'trailing': False,
|
280
|
+
'symbolRequired': False,
|
279
281
|
},
|
280
282
|
'fetchOrders': None,
|
281
283
|
'fetchClosedOrders': {
|
@@ -286,6 +288,7 @@ class delta(Exchange, ImplicitAPI):
|
|
286
288
|
'untilDays': 100000,
|
287
289
|
'trigger': False,
|
288
290
|
'trailing': False,
|
291
|
+
'symbolRequired': False,
|
289
292
|
},
|
290
293
|
'fetchOHLCV': {
|
291
294
|
'limit': 2000, # todo: recheck
|
ccxt/async_support/deribit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.deribit import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currencies, Currency, DepositAddress, Greeks, Int, Market,
|
9
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, DepositAddress, Greeks, Int, Market, Num, Option, OptionChain, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFees, Transaction, MarketInterface, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -327,17 +327,20 @@ class deribit(Exchange, ImplicitAPI):
|
|
327
327
|
'limit': 100, # todo: revise
|
328
328
|
'daysBack': 100000,
|
329
329
|
'untilDays': 100000,
|
330
|
+
'symbolRequired': True, # todo
|
330
331
|
},
|
331
332
|
'fetchOrder': {
|
332
333
|
'marginMode': False,
|
333
334
|
'trigger': False,
|
334
335
|
'trailing': False,
|
336
|
+
'symbolRequired': True, # todo
|
335
337
|
},
|
336
338
|
'fetchOpenOrders': {
|
337
339
|
'marginMode': False,
|
338
340
|
'limit': None,
|
339
341
|
'trigger': False,
|
340
342
|
'trailing': False,
|
343
|
+
'symbolRequired': True, # todo
|
341
344
|
},
|
342
345
|
'fetchOrders': None,
|
343
346
|
'fetchClosedOrders': {
|
@@ -348,6 +351,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
348
351
|
'untilDays': 100000,
|
349
352
|
'trigger': False,
|
350
353
|
'trailing': False,
|
354
|
+
'symbolRequired': True, # todo
|
351
355
|
},
|
352
356
|
'fetchOHLCV': {
|
353
357
|
'limit': 1000, # todo: recheck
|
@@ -494,9 +498,6 @@ class deribit(Exchange, ImplicitAPI):
|
|
494
498
|
'fetchBalance': {
|
495
499
|
'code': 'BTC',
|
496
500
|
},
|
497
|
-
'fetchPositions': {
|
498
|
-
'code': 'BTC',
|
499
|
-
},
|
500
501
|
'transfer': {
|
501
502
|
'method': 'privateGetSubmitTransferToSubaccount', # or 'privateGetSubmitTransferToUser'
|
502
503
|
},
|
@@ -760,7 +761,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
760
761
|
result = self.safe_value(response, 'result', [])
|
761
762
|
return self.parse_accounts(result)
|
762
763
|
|
763
|
-
def parse_account(self, account
|
764
|
+
def parse_account(self, account):
|
764
765
|
#
|
765
766
|
# {
|
766
767
|
# "username": "someusername_1",
|
@@ -779,7 +780,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
779
780
|
'info': account,
|
780
781
|
'id': self.safe_string(account, 'id'),
|
781
782
|
'type': self.safe_string(account, 'type'),
|
782
|
-
'code':
|
783
|
+
'code': None,
|
783
784
|
}
|
784
785
|
|
785
786
|
async def fetch_markets(self, params={}) -> List[Market]:
|
@@ -2659,32 +2660,18 @@ class deribit(Exchange, ImplicitAPI):
|
|
2659
2660
|
|
2660
2661
|
:param str[]|None symbols: list of unified market symbols
|
2661
2662
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2663
|
+
:param str [params.currency]: currency code filter for positions
|
2662
2664
|
:param str [params.kind]: market type filter for positions 'future', 'option', 'spot', 'future_combo' or 'option_combo'
|
2665
|
+
:param int [params.subaccount_id]: the user id for the subaccount
|
2663
2666
|
:returns dict[]: a list of `position structure <https://docs.ccxt.com/#/?id=position-structure>`
|
2664
2667
|
"""
|
2665
2668
|
await self.load_markets()
|
2666
|
-
|
2667
|
-
|
2668
|
-
if
|
2669
|
-
|
2670
|
-
|
2671
|
-
|
2672
|
-
symbols = None # fix https://github.com/ccxt/ccxt/issues/13961
|
2673
|
-
else:
|
2674
|
-
if isinstance(symbols, list):
|
2675
|
-
length = len(symbols)
|
2676
|
-
if length != 1:
|
2677
|
-
raise BadRequest(self.id + ' fetchPositions() symbols argument cannot contain more than 1 symbol')
|
2678
|
-
market = self.market(symbols[0])
|
2679
|
-
settle = market['settle']
|
2680
|
-
code = settle if (settle is not None) else market['base']
|
2681
|
-
kind = market['info']['kind']
|
2682
|
-
currency = self.currency(code)
|
2683
|
-
request: dict = {
|
2684
|
-
'currency': currency['id'],
|
2685
|
-
}
|
2686
|
-
if kind is not None:
|
2687
|
-
request['kind'] = kind
|
2669
|
+
code = self.safe_string(params, 'currency')
|
2670
|
+
request: dict = {}
|
2671
|
+
if code is not None:
|
2672
|
+
params = self.omit(params, 'currency')
|
2673
|
+
currency = self.currency(code)
|
2674
|
+
request['currency'] = currency['id']
|
2688
2675
|
response = await self.privateGetGetPositions(self.extend(request, params))
|
2689
2676
|
#
|
2690
2677
|
# {
|
ccxt/async_support/digifinex.py
CHANGED
@@ -281,25 +281,27 @@ class digifinex(Exchange, ImplicitAPI):
|
|
281
281
|
},
|
282
282
|
'createOrders': {
|
283
283
|
'max': 10,
|
284
|
-
'marginMode': True,
|
285
284
|
},
|
286
285
|
'fetchMyTrades': {
|
287
286
|
'marginMode': True,
|
288
287
|
'limit': 500,
|
289
288
|
'daysBack': 100000, # todo
|
290
289
|
'untilDays': 30,
|
290
|
+
'symbolRequired': False,
|
291
291
|
},
|
292
292
|
'fetchOrder': {
|
293
293
|
'marginMode': True,
|
294
294
|
'trigger': False,
|
295
295
|
'trailing': False,
|
296
296
|
'marketType': True,
|
297
|
+
'symbolRequired': True,
|
297
298
|
},
|
298
299
|
'fetchOpenOrders': {
|
299
300
|
'marginMode': True,
|
300
301
|
'limit': None,
|
301
302
|
'trigger': False,
|
302
303
|
'trailing': False,
|
304
|
+
'symbolRequired': False,
|
303
305
|
},
|
304
306
|
'fetchOrders': {
|
305
307
|
'marginMode': True,
|
@@ -308,6 +310,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
308
310
|
'untilDays': 30,
|
309
311
|
'trigger': False,
|
310
312
|
'trailing': False,
|
313
|
+
'symbolRequired': False,
|
311
314
|
},
|
312
315
|
'fetchClosedOrders': None,
|
313
316
|
'fetchOHLCV': {
|
@@ -567,10 +570,11 @@ class digifinex(Exchange, ImplicitAPI):
|
|
567
570
|
},
|
568
571
|
}
|
569
572
|
if code in result:
|
570
|
-
|
571
|
-
|
573
|
+
resultCodeInfo = result[code]['info']
|
574
|
+
if isinstance(resultCodeInfo, list):
|
575
|
+
resultCodeInfo.append(currency)
|
572
576
|
else:
|
573
|
-
|
577
|
+
resultCodeInfo = [resultCodeInfo, currency]
|
574
578
|
if withdraw:
|
575
579
|
result[code]['withdraw'] = True
|
576
580
|
result[code]['limits']['withdraw']['min'] = min(result[code]['limits']['withdraw']['min'], minWithdraw)
|
@@ -3971,7 +3975,8 @@ class digifinex(Exchange, ImplicitAPI):
|
|
3971
3975
|
if depositWithdrawFee is None:
|
3972
3976
|
depositWithdrawFees[code] = self.deposit_withdraw_fee({})
|
3973
3977
|
depositWithdrawFees[code]['info'] = []
|
3974
|
-
depositWithdrawFees[code]['info']
|
3978
|
+
depositWithdrawInfo = depositWithdrawFees[code]['info']
|
3979
|
+
depositWithdrawInfo.append(entry)
|
3975
3980
|
networkId = self.safe_string(entry, 'chain')
|
3976
3981
|
withdrawFee = self.safe_value(entry, 'min_withdraw_fee')
|
3977
3982
|
withdrawResult: dict = {
|
ccxt/async_support/ellipx.py
CHANGED
@@ -266,12 +266,14 @@ class ellipx(Exchange, ImplicitAPI):
|
|
266
266
|
'marginMode': False,
|
267
267
|
'trigger': False,
|
268
268
|
'trailing': False,
|
269
|
+
'symbolRequired': False,
|
269
270
|
},
|
270
271
|
'fetchOpenOrders': {
|
271
272
|
'marginMode': False,
|
272
273
|
'limit': None,
|
273
274
|
'trigger': False,
|
274
275
|
'trailing': False,
|
276
|
+
'symbolRequired': True,
|
275
277
|
},
|
276
278
|
'fetchOrders': {
|
277
279
|
'marginMode': False,
|
@@ -280,6 +282,7 @@ class ellipx(Exchange, ImplicitAPI):
|
|
280
282
|
'untilDays': None, # todo
|
281
283
|
'trigger': False,
|
282
284
|
'trailing': False,
|
285
|
+
'symbolRequired': True,
|
283
286
|
},
|
284
287
|
'fetchClosedOrders': None,
|
285
288
|
'fetchOHLCV': {
|
@@ -1621,7 +1624,7 @@ class ellipx(Exchange, ImplicitAPI):
|
|
1621
1624
|
'info': response,
|
1622
1625
|
}
|
1623
1626
|
|
1624
|
-
async def fetch_trading_fee(self, symbol: str
|
1627
|
+
async def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
1625
1628
|
"""
|
1626
1629
|
Fetches the current trading fees(maker and taker) applicable to the user.
|
1627
1630
|
|
@@ -1855,10 +1858,11 @@ class ellipx(Exchange, ImplicitAPI):
|
|
1855
1858
|
e = self.safe_integer(amount, 'e', None)
|
1856
1859
|
if v is None or e is None:
|
1857
1860
|
return None
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
1861
|
+
precise = Precise(v)
|
1862
|
+
precise.decimals = e
|
1863
|
+
precise.reduce()
|
1864
|
+
amountString = str(precise)
|
1865
|
+
return amountString
|
1862
1866
|
|
1863
1867
|
def to_amount(self, amount: float, precision: float) -> dict:
|
1864
1868
|
v = str(amount)
|