ccxt 4.4.39__py2.py3-none-any.whl → 4.4.41__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 -1
- ccxt/abstract/bitmart.py +2 -0
- ccxt/abstract/okx.py +5 -0
- ccxt/ascendex.py +9 -9
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ascendex.py +9 -9
- ccxt/async_support/base/exchange.py +10 -3
- ccxt/async_support/base/ws/aiohttp_client.py +2 -2
- ccxt/async_support/binance.py +37 -41
- ccxt/async_support/bingx.py +4 -3
- ccxt/async_support/bit2c.py +0 -1
- ccxt/async_support/bitbank.py +0 -1
- ccxt/async_support/bitbns.py +0 -1
- ccxt/async_support/bitfinex.py +16 -17
- ccxt/async_support/bitfinex1.py +0 -1
- ccxt/async_support/bitflyer.py +0 -1
- ccxt/async_support/bitget.py +2 -2
- ccxt/async_support/bithumb.py +0 -1
- ccxt/async_support/bitmart.py +246 -6
- ccxt/async_support/bitmex.py +5 -6
- ccxt/async_support/bitopro.py +4 -5
- ccxt/async_support/bitrue.py +5 -7
- ccxt/async_support/bitso.py +1 -2
- ccxt/async_support/bitstamp.py +1 -2
- ccxt/async_support/bitteam.py +1 -3
- ccxt/async_support/bitvavo.py +2 -4
- ccxt/async_support/blockchaincom.py +5 -5
- ccxt/async_support/blofin.py +10 -10
- ccxt/async_support/btcalpha.py +0 -1
- ccxt/async_support/btcbox.py +0 -1
- ccxt/async_support/btcmarkets.py +1 -3
- ccxt/async_support/bybit.py +10 -11
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +77 -1
- ccxt/async_support/coinbaseexchange.py +1 -1
- ccxt/async_support/coinbaseinternational.py +62 -0
- ccxt/async_support/coincatch.py +1 -1
- ccxt/async_support/coinex.py +9 -9
- ccxt/async_support/coinlist.py +1 -1
- ccxt/async_support/coinmetro.py +1 -1
- ccxt/async_support/cryptocom.py +91 -2
- ccxt/async_support/currencycom.py +1 -1
- ccxt/async_support/defx.py +1 -2
- ccxt/async_support/delta.py +1 -1
- ccxt/async_support/digifinex.py +1 -1
- ccxt/async_support/exmo.py +62 -6
- ccxt/async_support/gate.py +2 -2
- ccxt/async_support/hashkey.py +3 -5
- ccxt/async_support/htx.py +2 -2
- ccxt/async_support/hyperliquid.py +61 -2
- ccxt/async_support/kraken.py +124 -26
- ccxt/async_support/kucoin.py +29 -25
- ccxt/async_support/luno.py +1 -1
- ccxt/async_support/mexc.py +137 -1
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/okcoin.py +18 -18
- ccxt/async_support/okx.py +27 -22
- ccxt/async_support/phemex.py +12 -8
- ccxt/async_support/poloniex.py +1 -1
- ccxt/async_support/poloniexfutures.py +6 -6
- ccxt/async_support/vertex.py +11 -11
- ccxt/async_support/woo.py +33 -33
- ccxt/async_support/woofipro.py +24 -24
- ccxt/async_support/xt.py +29 -27
- ccxt/async_support/zonda.py +1 -1
- ccxt/base/exchange.py +31 -19
- ccxt/base/types.py +10 -0
- ccxt/binance.py +37 -41
- ccxt/bingx.py +4 -3
- ccxt/bit2c.py +0 -1
- ccxt/bitbank.py +0 -1
- ccxt/bitbns.py +0 -1
- ccxt/bitfinex.py +16 -17
- ccxt/bitfinex1.py +0 -1
- ccxt/bitflyer.py +0 -1
- ccxt/bitget.py +2 -2
- ccxt/bithumb.py +0 -1
- ccxt/bitmart.py +246 -6
- ccxt/bitmex.py +5 -6
- ccxt/bitopro.py +4 -5
- ccxt/bitrue.py +5 -7
- ccxt/bitso.py +1 -2
- ccxt/bitstamp.py +1 -2
- ccxt/bitteam.py +1 -3
- ccxt/bitvavo.py +2 -4
- ccxt/blockchaincom.py +5 -5
- ccxt/blofin.py +10 -10
- ccxt/btcalpha.py +0 -1
- ccxt/btcbox.py +0 -1
- ccxt/btcmarkets.py +1 -3
- ccxt/bybit.py +10 -11
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +77 -1
- ccxt/coinbaseexchange.py +1 -1
- ccxt/coinbaseinternational.py +62 -0
- ccxt/coincatch.py +1 -1
- ccxt/coinex.py +9 -9
- ccxt/coinlist.py +1 -1
- ccxt/coinmetro.py +1 -1
- ccxt/cryptocom.py +91 -2
- ccxt/currencycom.py +1 -1
- ccxt/defx.py +1 -2
- ccxt/delta.py +1 -1
- ccxt/digifinex.py +1 -1
- ccxt/exmo.py +62 -6
- ccxt/gate.py +2 -2
- ccxt/hashkey.py +3 -5
- ccxt/htx.py +2 -2
- ccxt/hyperliquid.py +61 -2
- ccxt/kraken.py +124 -26
- ccxt/kucoin.py +29 -25
- ccxt/luno.py +1 -1
- ccxt/mexc.py +137 -1
- ccxt/ndax.py +1 -1
- ccxt/okcoin.py +18 -18
- ccxt/okx.py +27 -22
- ccxt/phemex.py +12 -8
- ccxt/poloniex.py +1 -1
- ccxt/poloniexfutures.py +6 -6
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitget.py +1 -1
- ccxt/pro/bybit.py +12 -1
- ccxt/pro/coinex.py +2 -2
- ccxt/pro/gate.py +6 -6
- ccxt/pro/kucoin.py +3 -3
- ccxt/pro/okx.py +11 -11
- ccxt/pro/upbit.py +2 -2
- ccxt/vertex.py +11 -11
- ccxt/woo.py +33 -33
- ccxt/woofipro.py +24 -24
- ccxt/xt.py +29 -27
- ccxt/zonda.py +1 -1
- {ccxt-4.4.39.dist-info → ccxt-4.4.41.dist-info}/METADATA +4 -4
- {ccxt-4.4.39.dist-info → ccxt-4.4.41.dist-info}/RECORD +137 -137
- {ccxt-4.4.39.dist-info → ccxt-4.4.41.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.39.dist-info → ccxt-4.4.41.dist-info}/WHEEL +0 -0
- {ccxt-4.4.39.dist-info → ccxt-4.4.41.dist-info}/top_level.txt +0 -0
ccxt/btcmarkets.py
CHANGED
@@ -1015,7 +1015,6 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
1015
1015
|
id = self.safe_string(order, 'orderId')
|
1016
1016
|
clientOrderId = self.safe_string(order, 'clientOrderId')
|
1017
1017
|
timeInForce = self.safe_string(order, 'timeInForce')
|
1018
|
-
stopPrice = self.safe_number(order, 'triggerPrice')
|
1019
1018
|
postOnly = self.safe_bool(order, 'postOnly')
|
1020
1019
|
return self.safe_order({
|
1021
1020
|
'info': order,
|
@@ -1030,8 +1029,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
1030
1029
|
'postOnly': postOnly,
|
1031
1030
|
'side': side,
|
1032
1031
|
'price': price,
|
1033
|
-
'
|
1034
|
-
'triggerPrice': stopPrice,
|
1032
|
+
'triggerPrice': self.safe_number(order, 'triggerPrice'),
|
1035
1033
|
'cost': None,
|
1036
1034
|
'amount': amount,
|
1037
1035
|
'filled': None,
|
ccxt/bybit.py
CHANGED
@@ -3530,29 +3530,29 @@ class bybit(Exchange, ImplicitAPI):
|
|
3530
3530
|
avgPrice = self.omit_zero(self.safe_string(order, 'avgPrice'))
|
3531
3531
|
rawTimeInForce = self.safe_string(order, 'timeInForce')
|
3532
3532
|
timeInForce = self.parse_time_in_force(rawTimeInForce)
|
3533
|
-
|
3533
|
+
triggerPrice = self.omit_zero(self.safe_string(order, 'triggerPrice'))
|
3534
3534
|
reduceOnly = self.safe_bool(order, 'reduceOnly')
|
3535
3535
|
takeProfitPrice = self.omit_zero(self.safe_string(order, 'takeProfit'))
|
3536
3536
|
stopLossPrice = self.omit_zero(self.safe_string(order, 'stopLoss'))
|
3537
3537
|
triggerDirection = self.safe_string(order, 'triggerDirection')
|
3538
3538
|
isAscending = (triggerDirection == '1')
|
3539
|
-
isStopOrderType2 = (
|
3539
|
+
isStopOrderType2 = (triggerPrice is not None) and reduceOnly
|
3540
3540
|
if (stopLossPrice is None) and isStopOrderType2:
|
3541
3541
|
# check if order is stop order type 2 - stopLossPrice
|
3542
3542
|
if isAscending and (side == 'buy'):
|
3543
3543
|
# stopLoss order against short position
|
3544
|
-
stopLossPrice =
|
3544
|
+
stopLossPrice = triggerPrice
|
3545
3545
|
if not isAscending and (side == 'sell'):
|
3546
3546
|
# stopLoss order against a long position
|
3547
|
-
stopLossPrice =
|
3547
|
+
stopLossPrice = triggerPrice
|
3548
3548
|
if (takeProfitPrice is None) and isStopOrderType2:
|
3549
3549
|
# check if order is stop order type 2 - takeProfitPrice
|
3550
3550
|
if isAscending and (side == 'sell'):
|
3551
3551
|
# takeprofit order against a long position
|
3552
|
-
takeProfitPrice =
|
3552
|
+
takeProfitPrice = triggerPrice
|
3553
3553
|
if not isAscending and (side == 'buy'):
|
3554
3554
|
# takeprofit order against a short position
|
3555
|
-
takeProfitPrice =
|
3555
|
+
takeProfitPrice = triggerPrice
|
3556
3556
|
return self.safe_order({
|
3557
3557
|
'info': order,
|
3558
3558
|
'id': id,
|
@@ -3568,8 +3568,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
3568
3568
|
'reduceOnly': self.safe_bool(order, 'reduceOnly'),
|
3569
3569
|
'side': side,
|
3570
3570
|
'price': price,
|
3571
|
-
'
|
3572
|
-
'triggerPrice': stopPrice,
|
3571
|
+
'triggerPrice': triggerPrice,
|
3573
3572
|
'takeProfitPrice': takeProfitPrice,
|
3574
3573
|
'stopLossPrice': stopLossPrice,
|
3575
3574
|
'amount': amount,
|
@@ -5428,7 +5427,7 @@ classic accounts only/ spot not supported* fetches information on an order made
|
|
5428
5427
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5429
5428
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
5430
5429
|
:param str [params.subType]: if inverse will use v5/account/contract-transaction-log
|
5431
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
5430
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
5432
5431
|
"""
|
5433
5432
|
self.load_markets()
|
5434
5433
|
paginate = False
|
@@ -6370,7 +6369,7 @@ classic accounts only/ spot not supported* fetches information on an order made
|
|
6370
6369
|
data = self.add_pagination_cursor_to_result(response)
|
6371
6370
|
id = self.safe_string(result, 'symbol')
|
6372
6371
|
market = self.safe_market(id, market, None, 'contract')
|
6373
|
-
return self.
|
6372
|
+
return self.parse_open_interests_history(data, market, since, limit)
|
6374
6373
|
|
6375
6374
|
def fetch_open_interest(self, symbol: str, params={}):
|
6376
6375
|
"""
|
@@ -7704,7 +7703,7 @@ classic accounts only/ spot not supported* fetches information on an order made
|
|
7704
7703
|
if market['spot']:
|
7705
7704
|
raise NotSupported(self.id + ' fetchLeverageTiers() is not supported for spot market')
|
7706
7705
|
symbol = market['symbol']
|
7707
|
-
data = self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls':
|
7706
|
+
data = self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 40}, params))
|
7708
7707
|
symbols = self.market_symbols(symbols)
|
7709
7708
|
return self.parse_leverage_tiers(data, symbols, 'symbol')
|
7710
7709
|
|
ccxt/cex.py
CHANGED
@@ -1237,7 +1237,7 @@ class cex(Exchange, ImplicitAPI):
|
|
1237
1237
|
:param int [limit]: max number of ledger entries to return
|
1238
1238
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1239
1239
|
:param int [params.until]: timestamp in ms of the latest ledger entry
|
1240
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
1240
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
1241
1241
|
"""
|
1242
1242
|
self.load_markets()
|
1243
1243
|
currency = None
|
ccxt/coinbase.py
CHANGED
@@ -384,6 +384,82 @@ class coinbase(Exchange, ImplicitAPI):
|
|
384
384
|
'fetchTime': 'v2PublicGetTime', # 'v2PublicGetTime' or 'v3PublicGetBrokerageTime'
|
385
385
|
'user_native_currency': 'USD', # needed to get fees for v3
|
386
386
|
},
|
387
|
+
'features': {
|
388
|
+
'spot': {
|
389
|
+
'sandbox': False,
|
390
|
+
'createOrder': {
|
391
|
+
'marginMode': True,
|
392
|
+
'triggerPrice': True,
|
393
|
+
'triggerPriceType': None,
|
394
|
+
'triggerDirection': True,
|
395
|
+
'stopLossPrice': True,
|
396
|
+
'takeProfitPrice': True,
|
397
|
+
'attachedStopLossTakeProfit': None,
|
398
|
+
'timeInForce': {
|
399
|
+
'IOC': True,
|
400
|
+
'FOK': True,
|
401
|
+
'PO': True,
|
402
|
+
'GTD': True,
|
403
|
+
},
|
404
|
+
'hedged': False,
|
405
|
+
'trailing': False,
|
406
|
+
},
|
407
|
+
'createOrders': None,
|
408
|
+
'fetchMyTrades': {
|
409
|
+
'marginMode': False,
|
410
|
+
'limit': 3000,
|
411
|
+
'daysBack': None,
|
412
|
+
'untilDays': 10000,
|
413
|
+
},
|
414
|
+
'fetchOrder': {
|
415
|
+
'marginMode': False,
|
416
|
+
'trigger': False,
|
417
|
+
'trailing': False,
|
418
|
+
},
|
419
|
+
'fetchOpenOrders': {
|
420
|
+
'marginMode': False,
|
421
|
+
'limit': None,
|
422
|
+
'trigger': False,
|
423
|
+
'trailing': False,
|
424
|
+
},
|
425
|
+
'fetchOrders': {
|
426
|
+
'marginMode': False,
|
427
|
+
'limit': None,
|
428
|
+
'daysBack': None,
|
429
|
+
'untilDays': 10000,
|
430
|
+
'trigger': False,
|
431
|
+
'trailing': False,
|
432
|
+
},
|
433
|
+
'fetchClosedOrders': {
|
434
|
+
'marginMode': False,
|
435
|
+
'limit': None,
|
436
|
+
'daysBackClosed': None,
|
437
|
+
'daysBackCanceled': None,
|
438
|
+
'untilDays': 10000,
|
439
|
+
'trigger': False,
|
440
|
+
'trailing': False,
|
441
|
+
},
|
442
|
+
'fetchOHLCV': {
|
443
|
+
'limit': 350,
|
444
|
+
},
|
445
|
+
},
|
446
|
+
'swap': {
|
447
|
+
'linear': {
|
448
|
+
'extends': 'spot',
|
449
|
+
},
|
450
|
+
'inverse': {
|
451
|
+
'extends': 'spot',
|
452
|
+
},
|
453
|
+
},
|
454
|
+
'future': {
|
455
|
+
'linear': {
|
456
|
+
'extends': 'spot',
|
457
|
+
},
|
458
|
+
'inverse': {
|
459
|
+
'extends': 'spot',
|
460
|
+
},
|
461
|
+
},
|
462
|
+
},
|
387
463
|
})
|
388
464
|
|
389
465
|
def fetch_time(self, params={}):
|
@@ -2288,7 +2364,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2288
2364
|
:param int [limit]: max number of ledger entries to return, default is None
|
2289
2365
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2290
2366
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
2291
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
2367
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
2292
2368
|
"""
|
2293
2369
|
self.load_markets()
|
2294
2370
|
paginate = False
|
ccxt/coinbaseexchange.py
CHANGED
@@ -1449,7 +1449,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
1449
1449
|
:param int [limit]: max number of ledger entries to return, default is None
|
1450
1450
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1451
1451
|
:param int [params.until]: the latest time in ms to fetch trades for
|
1452
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
1452
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
1453
1453
|
"""
|
1454
1454
|
# https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccountledger
|
1455
1455
|
if code is None:
|
ccxt/coinbaseinternational.py
CHANGED
@@ -264,6 +264,68 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
264
264
|
'bitcoin': 'BTC',
|
265
265
|
},
|
266
266
|
},
|
267
|
+
'features': {
|
268
|
+
'spot': {
|
269
|
+
'sandbox': True,
|
270
|
+
'createOrder': {
|
271
|
+
'marginMode': False,
|
272
|
+
'triggerPrice': True,
|
273
|
+
'triggerPriceType': None,
|
274
|
+
'triggerDirection': True,
|
275
|
+
'stopLossPrice': False, # todo implementation
|
276
|
+
'takeProfitPrice': False, # todo implementation
|
277
|
+
'attachedStopLossTakeProfit': None,
|
278
|
+
'timeInForce': {
|
279
|
+
'IOC': True,
|
280
|
+
'FOK': True,
|
281
|
+
'PO': True,
|
282
|
+
'GTD': True,
|
283
|
+
'GTC': True, # has 30 days max
|
284
|
+
},
|
285
|
+
'hedged': False,
|
286
|
+
'trailing': False,
|
287
|
+
},
|
288
|
+
'createOrders': None,
|
289
|
+
'fetchMyTrades': {
|
290
|
+
'marginMode': False,
|
291
|
+
'limit': 100,
|
292
|
+
'daysBack': None,
|
293
|
+
'untilDays': 10000,
|
294
|
+
},
|
295
|
+
'fetchOrder': {
|
296
|
+
'marginMode': False,
|
297
|
+
'trigger': False,
|
298
|
+
'trailing': False,
|
299
|
+
},
|
300
|
+
'fetchOpenOrders': {
|
301
|
+
'marginMode': False,
|
302
|
+
'limit': 100,
|
303
|
+
'trigger': False,
|
304
|
+
'trailing': False,
|
305
|
+
},
|
306
|
+
'fetchOrders': None,
|
307
|
+
'fetchClosedOrders': None,
|
308
|
+
'fetchOHLCV': {
|
309
|
+
'limit': 300,
|
310
|
+
},
|
311
|
+
},
|
312
|
+
'swap': {
|
313
|
+
'linear': {
|
314
|
+
'extends': 'spot',
|
315
|
+
},
|
316
|
+
'inverse': {
|
317
|
+
'extends': 'spot',
|
318
|
+
},
|
319
|
+
},
|
320
|
+
'future': {
|
321
|
+
'linear': {
|
322
|
+
'extends': 'spot',
|
323
|
+
},
|
324
|
+
'inverse': {
|
325
|
+
'extends': 'spot',
|
326
|
+
},
|
327
|
+
},
|
328
|
+
},
|
267
329
|
})
|
268
330
|
|
269
331
|
def handle_portfolio_and_params(self, methodName: str, params={}):
|
ccxt/coincatch.py
CHANGED
@@ -4783,7 +4783,7 @@ class coincatch(Exchange, ImplicitAPI):
|
|
4783
4783
|
:param str [params.business]: *swap only*
|
4784
4784
|
:param str [params.lastEndId]: *swap only*
|
4785
4785
|
:param bool [params.next]: *swap only*
|
4786
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
4786
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
4787
4787
|
"""
|
4788
4788
|
methodName = 'fetchLedger'
|
4789
4789
|
self.load_markets()
|
ccxt/coinex.py
CHANGED
@@ -2542,18 +2542,18 @@ class coinex(Exchange, ImplicitAPI):
|
|
2542
2542
|
request: dict = {
|
2543
2543
|
'market': market['id'],
|
2544
2544
|
}
|
2545
|
-
|
2545
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger')
|
2546
2546
|
params = self.omit(params, ['stop', 'trigger'])
|
2547
2547
|
response = None
|
2548
2548
|
requestIds = []
|
2549
2549
|
for i in range(0, len(ids)):
|
2550
2550
|
requestIds.append(int(ids[i]))
|
2551
|
-
if
|
2551
|
+
if trigger:
|
2552
2552
|
request['stop_ids'] = requestIds
|
2553
2553
|
else:
|
2554
2554
|
request['order_ids'] = requestIds
|
2555
2555
|
if market['spot']:
|
2556
|
-
if
|
2556
|
+
if trigger:
|
2557
2557
|
response = self.v2PrivatePostSpotCancelBatchStopOrder(self.extend(request, params))
|
2558
2558
|
#
|
2559
2559
|
# {
|
@@ -2622,7 +2622,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
2622
2622
|
#
|
2623
2623
|
else:
|
2624
2624
|
request['market_type'] = 'FUTURES'
|
2625
|
-
if
|
2625
|
+
if trigger:
|
2626
2626
|
response = self.v2PrivatePostFuturesCancelBatchStopOrder(self.extend(request, params))
|
2627
2627
|
#
|
2628
2628
|
# {
|
@@ -3270,7 +3270,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3270
3270
|
request['market'] = market['id']
|
3271
3271
|
if limit is not None:
|
3272
3272
|
request['limit'] = limit
|
3273
|
-
|
3273
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger')
|
3274
3274
|
params = self.omit(params, ['stop', 'trigger'])
|
3275
3275
|
marketType = None
|
3276
3276
|
marketType, params = self.handle_market_type_and_params('fetchOrdersByStatus', market, params)
|
@@ -3280,7 +3280,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3280
3280
|
if marketType == 'swap':
|
3281
3281
|
request['market_type'] = 'FUTURES'
|
3282
3282
|
if isClosed:
|
3283
|
-
if
|
3283
|
+
if trigger:
|
3284
3284
|
response = self.v2PrivateGetFuturesFinishedStopOrder(self.extend(request, params))
|
3285
3285
|
#
|
3286
3286
|
# {
|
@@ -3341,7 +3341,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3341
3341
|
# }
|
3342
3342
|
#
|
3343
3343
|
elif isOpen:
|
3344
|
-
if
|
3344
|
+
if trigger:
|
3345
3345
|
response = self.v2PrivateGetFuturesPendingStopOrder(self.extend(request, params))
|
3346
3346
|
#
|
3347
3347
|
# {
|
@@ -3414,7 +3414,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3414
3414
|
else:
|
3415
3415
|
request['market_type'] = 'SPOT'
|
3416
3416
|
if isClosed:
|
3417
|
-
if
|
3417
|
+
if trigger:
|
3418
3418
|
response = self.v2PrivateGetSpotFinishedStopOrder(self.extend(request, params))
|
3419
3419
|
#
|
3420
3420
|
# {
|
@@ -3478,7 +3478,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3478
3478
|
# }
|
3479
3479
|
#
|
3480
3480
|
elif status == 'pending':
|
3481
|
-
if
|
3481
|
+
if trigger:
|
3482
3482
|
response = self.v2PrivateGetSpotPendingStopOrder(self.extend(request, params))
|
3483
3483
|
#
|
3484
3484
|
# {
|
ccxt/coinlist.py
CHANGED
@@ -2046,7 +2046,7 @@ class coinlist(Exchange, ImplicitAPI):
|
|
2046
2046
|
:param int [limit]: max number of ledger entries to return(default 200, max 500)
|
2047
2047
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2048
2048
|
:param int [params.until]: the latest time in ms to fetch entries for
|
2049
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
2049
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
2050
2050
|
"""
|
2051
2051
|
traderId = self.safe_string_2(params, 'trader_id', 'traderId')
|
2052
2052
|
if traderId is None:
|
ccxt/coinmetro.py
CHANGED
@@ -977,7 +977,7 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
977
977
|
:param int [limit]: max number of ledger entries to return(default 200, max 500)
|
978
978
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
979
979
|
:param int [params.until]: the latest time in ms to fetch entries for
|
980
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
980
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
981
981
|
"""
|
982
982
|
self.load_markets()
|
983
983
|
request: dict = {}
|
ccxt/cryptocom.py
CHANGED
@@ -366,6 +366,95 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
366
366
|
},
|
367
367
|
'broker': 'CCXT',
|
368
368
|
},
|
369
|
+
'features': {
|
370
|
+
'default': {
|
371
|
+
'sandbox': True,
|
372
|
+
'createOrder': {
|
373
|
+
'marginMode': True,
|
374
|
+
'triggerPrice': True,
|
375
|
+
# todo: implementation fix
|
376
|
+
'triggerPriceType': {
|
377
|
+
'last': True,
|
378
|
+
'mark': True,
|
379
|
+
'index': True,
|
380
|
+
},
|
381
|
+
'triggerDirection': False,
|
382
|
+
'stopLossPrice': True,
|
383
|
+
'takeProfitPrice': True,
|
384
|
+
'attachedStopLossTakeProfit': None,
|
385
|
+
'timeInForce': {
|
386
|
+
'IOC': True,
|
387
|
+
'FOK': True,
|
388
|
+
'PO': True,
|
389
|
+
'GTD': False,
|
390
|
+
},
|
391
|
+
'hedged': False,
|
392
|
+
# exchange-supported features
|
393
|
+
'selfTradePrevention': True,
|
394
|
+
'trailing': False,
|
395
|
+
'iceberg': False,
|
396
|
+
},
|
397
|
+
'createOrders': {
|
398
|
+
'max': 10,
|
399
|
+
},
|
400
|
+
'fetchMyTrades': {
|
401
|
+
'marginMode': False,
|
402
|
+
'limit': 100,
|
403
|
+
'daysBack': None,
|
404
|
+
'untilDays': 1,
|
405
|
+
},
|
406
|
+
'fetchOrder': {
|
407
|
+
'marginMode': False,
|
408
|
+
'trigger': False,
|
409
|
+
'trailing': False,
|
410
|
+
},
|
411
|
+
'fetchOpenOrders': {
|
412
|
+
'marginMode': True,
|
413
|
+
'limit': 100,
|
414
|
+
'trigger': False,
|
415
|
+
'trailing': False,
|
416
|
+
},
|
417
|
+
'fetchOrders': {
|
418
|
+
'marginMode': False,
|
419
|
+
'limit': 100,
|
420
|
+
'daysBack': None,
|
421
|
+
'untilDays': 1,
|
422
|
+
'trigger': False,
|
423
|
+
'trailing': False,
|
424
|
+
},
|
425
|
+
'fetchClosedOrders': {
|
426
|
+
'marginMode': False,
|
427
|
+
'limit': 100,
|
428
|
+
'daysBackClosed': None,
|
429
|
+
'daysBackCanceled': None,
|
430
|
+
'untilDays': 1,
|
431
|
+
'trigger': False,
|
432
|
+
'trailing': False,
|
433
|
+
},
|
434
|
+
'fetchOHLCV': {
|
435
|
+
'limit': 300,
|
436
|
+
},
|
437
|
+
},
|
438
|
+
'spot': {
|
439
|
+
'extends': 'default',
|
440
|
+
},
|
441
|
+
'swap': {
|
442
|
+
'linear': {
|
443
|
+
'extends': 'default',
|
444
|
+
},
|
445
|
+
'inverse': {
|
446
|
+
'extends': 'default',
|
447
|
+
},
|
448
|
+
},
|
449
|
+
'future': {
|
450
|
+
'linear': {
|
451
|
+
'extends': 'default',
|
452
|
+
},
|
453
|
+
'inverse': {
|
454
|
+
'extends': 'default',
|
455
|
+
},
|
456
|
+
},
|
457
|
+
},
|
369
458
|
# https://exchange-docs.crypto.com/spot/index.html#response-and-reason-codes
|
370
459
|
'commonCurrencies': {
|
371
460
|
'USD_STABLE_COIN': 'USDC',
|
@@ -1147,7 +1236,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
1147
1236
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1148
1237
|
:param str [params.timeInForce]: 'GTC', 'IOC', 'FOK' or 'PO'
|
1149
1238
|
:param str [params.ref_price_type]: 'MARK_PRICE', 'INDEX_PRICE', 'LAST_PRICE' which trigger price type to use, default is MARK_PRICE
|
1150
|
-
:param float [params.triggerPrice]: price to trigger a
|
1239
|
+
:param float [params.triggerPrice]: price to trigger a trigger order
|
1151
1240
|
:param float [params.stopLossPrice]: price to trigger a stop-loss trigger order
|
1152
1241
|
:param float [params.takeProfitPrice]: price to trigger a take-profit trigger order
|
1153
1242
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -2283,7 +2372,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
2283
2372
|
:param int [limit]: max number of ledger entries to return
|
2284
2373
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2285
2374
|
:param int [params.until]: timestamp in ms for the ending date filter, default is the current time
|
2286
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
2375
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
2287
2376
|
"""
|
2288
2377
|
self.load_markets()
|
2289
2378
|
request: dict = {}
|
ccxt/currencycom.py
CHANGED
@@ -1668,7 +1668,7 @@ class currencycom(Exchange, ImplicitAPI):
|
|
1668
1668
|
:param int [since]: timestamp in ms of the earliest ledger entry, default is None
|
1669
1669
|
:param int [limit]: max number of ledger entries to return, default is None
|
1670
1670
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1671
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
1671
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
1672
1672
|
"""
|
1673
1673
|
self.load_markets()
|
1674
1674
|
request: dict = {}
|
ccxt/defx.py
CHANGED
@@ -1316,7 +1316,6 @@ class defx(Exchange, ImplicitAPI):
|
|
1316
1316
|
:param str id: order id
|
1317
1317
|
:param str symbol: unified symbol of the market the order was made in
|
1318
1318
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1319
|
-
:param boolean [params.stop]: whether the order is a stop/algo order
|
1320
1319
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1321
1320
|
"""
|
1322
1321
|
self.load_markets()
|
@@ -1733,7 +1732,7 @@ class defx(Exchange, ImplicitAPI):
|
|
1733
1732
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1734
1733
|
:param int [params.until]: timestamp in ms of the latest ledger entry
|
1735
1734
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
1736
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
1735
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
1737
1736
|
"""
|
1738
1737
|
self.load_markets()
|
1739
1738
|
paginate = False
|
ccxt/delta.py
CHANGED
@@ -2152,7 +2152,7 @@ class delta(Exchange, ImplicitAPI):
|
|
2152
2152
|
:param int [since]: timestamp in ms of the earliest ledger entry, default is None
|
2153
2153
|
:param int [limit]: max number of ledger entries to return, default is None
|
2154
2154
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2155
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
2155
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
2156
2156
|
"""
|
2157
2157
|
self.load_markets()
|
2158
2158
|
request: dict = {
|
ccxt/digifinex.py
CHANGED
@@ -2477,7 +2477,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
2477
2477
|
:param int [since]: timestamp in ms of the earliest ledger entry, default is None
|
2478
2478
|
:param int [limit]: max number of ledger entries to return, default is None
|
2479
2479
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2480
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
2480
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
2481
2481
|
"""
|
2482
2482
|
self.load_markets()
|
2483
2483
|
request: dict = {}
|