ccxt 4.4.39__py2.py3-none-any.whl → 4.4.40__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/ascendex.py +9 -9
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ascendex.py +9 -9
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/base/ws/aiohttp_client.py +2 -2
- ccxt/async_support/binance.py +13 -17
- ccxt/async_support/bingx.py +1 -2
- 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 +15 -16
- ccxt/async_support/bitfinex1.py +0 -1
- ccxt/async_support/bitflyer.py +0 -1
- ccxt/async_support/bitget.py +1 -2
- ccxt/async_support/bithumb.py +0 -1
- ccxt/async_support/bitmart.py +3 -4
- 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 +2 -3
- 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 +2 -2
- ccxt/async_support/gate.py +1 -1
- ccxt/async_support/hashkey.py +3 -5
- ccxt/async_support/htx.py +1 -1
- ccxt/async_support/hyperliquid.py +1 -1
- ccxt/async_support/kraken.py +1 -1
- ccxt/async_support/kucoin.py +24 -24
- 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 +21 -21
- 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 +26 -26
- ccxt/async_support/zonda.py +1 -1
- ccxt/base/exchange.py +13 -16
- ccxt/binance.py +13 -17
- ccxt/bingx.py +1 -2
- ccxt/bit2c.py +0 -1
- ccxt/bitbank.py +0 -1
- ccxt/bitbns.py +0 -1
- ccxt/bitfinex.py +15 -16
- ccxt/bitfinex1.py +0 -1
- ccxt/bitflyer.py +0 -1
- ccxt/bitget.py +1 -2
- ccxt/bithumb.py +0 -1
- ccxt/bitmart.py +3 -4
- 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 +2 -3
- 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 +2 -2
- ccxt/gate.py +1 -1
- ccxt/hashkey.py +3 -5
- ccxt/htx.py +1 -1
- ccxt/hyperliquid.py +1 -1
- ccxt/kraken.py +1 -1
- ccxt/kucoin.py +24 -24
- ccxt/luno.py +1 -1
- ccxt/mexc.py +137 -1
- ccxt/ndax.py +1 -1
- ccxt/okcoin.py +18 -18
- ccxt/okx.py +21 -21
- 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 +26 -26
- ccxt/zonda.py +1 -1
- {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/METADATA +4 -4
- {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/RECORD +134 -134
- {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/WHEEL +0 -0
- {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/top_level.txt +0 -0
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 = {}
|
ccxt/exmo.py
CHANGED
@@ -1463,7 +1463,7 @@ class exmo(Exchange, ImplicitAPI):
|
|
1463
1463
|
"""
|
1464
1464
|
self.load_markets()
|
1465
1465
|
request: dict = {}
|
1466
|
-
|
1466
|
+
trigger = self.safe_value_2(params, 'trigger', 'stop')
|
1467
1467
|
params = self.omit(params, ['trigger', 'stop'])
|
1468
1468
|
marginMode = None
|
1469
1469
|
marginMode, params = self.handle_margin_mode_and_params('cancelOrder', params)
|
@@ -1477,7 +1477,7 @@ class exmo(Exchange, ImplicitAPI):
|
|
1477
1477
|
# {}
|
1478
1478
|
#
|
1479
1479
|
else:
|
1480
|
-
if
|
1480
|
+
if trigger:
|
1481
1481
|
request['parent_order_id'] = id
|
1482
1482
|
response = self.privatePostStopMarketOrderCancel(self.extend(request, params))
|
1483
1483
|
#
|
ccxt/gate.py
CHANGED
@@ -6705,7 +6705,7 @@ class gate(Exchange, ImplicitAPI):
|
|
6705
6705
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
6706
6706
|
:param int [params.until]: end time in ms
|
6707
6707
|
: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)
|
6708
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
6708
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
6709
6709
|
"""
|
6710
6710
|
self.load_markets()
|
6711
6711
|
paginate = False
|
ccxt/hashkey.py
CHANGED
@@ -2199,7 +2199,7 @@ class hashkey(Exchange, ImplicitAPI):
|
|
2199
2199
|
:param int [params.until]: the latest time in ms to fetch entries for
|
2200
2200
|
:param int [params.flowType]: trade, fee, transfer, deposit, withdrawal
|
2201
2201
|
:param int [params.accountType]: spot, swap, custody
|
2202
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
2202
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
2203
2203
|
"""
|
2204
2204
|
methodName = 'fetchLedger'
|
2205
2205
|
if since is None:
|
@@ -3337,10 +3337,8 @@ class hashkey(Exchange, ImplicitAPI):
|
|
3337
3337
|
raise BadRequest(self.id + ' ' + methodName + '() type parameter can not be "' + paramsType + '". It should define the type of the market("spot" or "swap"). To define the type of an order use the trigger parameter(True for trigger orders)')
|
3338
3338
|
|
3339
3339
|
def handle_trigger_option_and_params(self, params: object, methodName: str, defaultValue=None):
|
3340
|
-
|
3341
|
-
|
3342
|
-
isTrigger = isStop
|
3343
|
-
isTrigger, params = self.handle_option_and_params(params, methodName, 'trigger', isTrigger)
|
3340
|
+
isTrigger = defaultValue
|
3341
|
+
isTrigger, params = self.handle_option_and_params_2(params, methodName, 'stop', 'trigger', isTrigger)
|
3344
3342
|
return [isTrigger, params]
|
3345
3343
|
|
3346
3344
|
def parse_order(self, order: dict, market: Market = None) -> Order:
|
ccxt/htx.py
CHANGED
@@ -7763,7 +7763,7 @@ class htx(Exchange, ImplicitAPI):
|
|
7763
7763
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7764
7764
|
:param int [params.until]: the latest time in ms to fetch entries for
|
7765
7765
|
: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)
|
7766
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
7766
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
7767
7767
|
"""
|
7768
7768
|
self.load_markets()
|
7769
7769
|
paginate = False
|
ccxt/hyperliquid.py
CHANGED
@@ -2970,7 +2970,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2970
2970
|
:param int [limit]: max number of ledger entries to return
|
2971
2971
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2972
2972
|
:param int [params.until]: timestamp in ms of the latest ledger entry
|
2973
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
2973
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
2974
2974
|
"""
|
2975
2975
|
self.load_markets()
|
2976
2976
|
userAddress = None
|
ccxt/kraken.py
CHANGED
@@ -1129,7 +1129,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
1129
1129
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1130
1130
|
:param int [params.until]: timestamp in ms of the latest ledger entry
|
1131
1131
|
:param int [params.end]: timestamp in seconds of the latest ledger entry
|
1132
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
1132
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
1133
1133
|
"""
|
1134
1134
|
# https://www.kraken.com/features/api#get-ledgers-info
|
1135
1135
|
self.load_markets()
|
ccxt/kucoin.py
CHANGED
@@ -2213,7 +2213,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2213
2213
|
market orders --------------------------------------------------
|
2214
2214
|
:param str [params.funds]: # Amount of quote currency to use
|
2215
2215
|
stop orders ----------------------------------------------------
|
2216
|
-
:param str [params.stop]: Either loss or entry, the default is loss. Requires
|
2216
|
+
:param str [params.stop]: Either loss or entry, the default is loss. Requires triggerPrice to be defined
|
2217
2217
|
margin orders --------------------------------------------------
|
2218
2218
|
:param float [params.leverage]: Leverage size of the order
|
2219
2219
|
:param str [params.stp]: '', # self trade prevention, CN, CO, CB or DC
|
@@ -2518,7 +2518,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2518
2518
|
:param str id: order id
|
2519
2519
|
:param str symbol: unified symbol of the market the order was made in
|
2520
2520
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2521
|
-
:param bool [params.
|
2521
|
+
:param bool [params.trigger]: True if cancelling a stop order
|
2522
2522
|
:param bool [params.hf]: False, # True for hf order
|
2523
2523
|
:param bool [params.sync]: False, # True to use the hf sync call
|
2524
2524
|
:returns: Response from the exchange
|
@@ -2526,7 +2526,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2526
2526
|
self.load_markets()
|
2527
2527
|
request: dict = {}
|
2528
2528
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
|
2529
|
-
|
2529
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger', False)
|
2530
2530
|
hf = None
|
2531
2531
|
hf, params = self.handle_hf_and_params(params)
|
2532
2532
|
useSync = False
|
@@ -2540,7 +2540,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2540
2540
|
params = self.omit(params, ['clientOid', 'clientOrderId', 'stop', 'trigger'])
|
2541
2541
|
if clientOrderId is not None:
|
2542
2542
|
request['clientOid'] = clientOrderId
|
2543
|
-
if
|
2543
|
+
if trigger:
|
2544
2544
|
response = self.privateDeleteStopOrderCancelOrderByClientOid(self.extend(request, params))
|
2545
2545
|
#
|
2546
2546
|
# {
|
@@ -2579,7 +2579,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2579
2579
|
return self.parse_order(response)
|
2580
2580
|
else:
|
2581
2581
|
request['orderId'] = id
|
2582
|
-
if
|
2582
|
+
if trigger:
|
2583
2583
|
response = self.privateDeleteStopOrderOrderId(self.extend(request, params))
|
2584
2584
|
#
|
2585
2585
|
# {
|
@@ -2627,7 +2627,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2627
2627
|
|
2628
2628
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
2629
2629
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2630
|
-
:param bool [params.
|
2630
|
+
:param bool [params.trigger]: *invalid for isolated margin* True if cancelling all stop orders
|
2631
2631
|
:param str [params.marginMode]: 'cross' or 'isolated'
|
2632
2632
|
:param str [params.orderIds]: *stop orders only* Comma seperated order IDs
|
2633
2633
|
:param bool [params.hf]: False, # True for hf order
|
@@ -2635,7 +2635,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2635
2635
|
"""
|
2636
2636
|
self.load_markets()
|
2637
2637
|
request: dict = {}
|
2638
|
-
|
2638
|
+
trigger = self.safe_bool(params, 'stop', False)
|
2639
2639
|
hf = None
|
2640
2640
|
hf, params = self.handle_hf_and_params(params)
|
2641
2641
|
params = self.omit(params, 'stop')
|
@@ -2644,10 +2644,10 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2644
2644
|
request['symbol'] = self.market_id(symbol)
|
2645
2645
|
if marginMode is not None:
|
2646
2646
|
request['tradeType'] = self.options['marginModes'][marginMode]
|
2647
|
-
if marginMode == 'isolated' and
|
2647
|
+
if marginMode == 'isolated' and trigger:
|
2648
2648
|
raise BadRequest(self.id + ' cancelAllOrders does not support isolated margin for stop orders')
|
2649
2649
|
response = None
|
2650
|
-
if
|
2650
|
+
if trigger:
|
2651
2651
|
response = self.privateDeleteStopOrderCancel(self.extend(request, query))
|
2652
2652
|
elif hf:
|
2653
2653
|
if symbol is None:
|
@@ -2676,9 +2676,9 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2676
2676
|
:param str [params.side]: buy or sell
|
2677
2677
|
:param str [params.type]: limit, market, limit_stop or market_stop
|
2678
2678
|
:param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
2679
|
-
:param int [params.currentPage]: *
|
2680
|
-
:param str [params.orderIds]: *
|
2681
|
-
:param bool [params.
|
2679
|
+
:param int [params.currentPage]: *trigger orders only* current page
|
2680
|
+
:param str [params.orderIds]: *trigger orders only* comma seperated order ID list
|
2681
|
+
:param bool [params.trigger]: True if fetching a trigger order
|
2682
2682
|
:param bool [params.hf]: False, # True for hf order
|
2683
2683
|
:returns: An `array of order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
2684
2684
|
"""
|
@@ -2787,7 +2787,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2787
2787
|
:param str [params.side]: buy or sell
|
2788
2788
|
:param str [params.type]: limit, market, limit_stop or market_stop
|
2789
2789
|
:param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
2790
|
-
:param bool [params.
|
2790
|
+
:param bool [params.trigger]: True if fetching a trigger order
|
2791
2791
|
:param bool [params.hf]: False, # True for hf order
|
2792
2792
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
2793
2793
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -2813,12 +2813,12 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2813
2813
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
2814
2814
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2815
2815
|
:param int [params.until]: end time in ms
|
2816
|
-
:param bool [params.
|
2816
|
+
:param bool [params.trigger]: True if fetching trigger orders
|
2817
2817
|
:param str [params.side]: buy or sell
|
2818
2818
|
:param str [params.type]: limit, market, limit_stop or market_stop
|
2819
2819
|
:param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
2820
|
-
:param int [params.currentPage]: *
|
2821
|
-
:param str [params.orderIds]: *
|
2820
|
+
:param int [params.currentPage]: *trigger orders only* current page
|
2821
|
+
:param str [params.orderIds]: *trigger orders only* comma seperated order ID list
|
2822
2822
|
:param bool [params.hf]: False, # True for hf order
|
2823
2823
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
2824
2824
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -2842,9 +2842,9 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2842
2842
|
https://docs.kucoin.com/spot-hf/#obtain-details-of-a-single-hf-order-using-clientoid
|
2843
2843
|
|
2844
2844
|
:param str id: Order id
|
2845
|
-
:param str symbol: not sent to exchange except for
|
2845
|
+
:param str symbol: not sent to exchange except for trigger orders with clientOid, but used internally by CCXT to filter
|
2846
2846
|
:param dict [params]: exchange specific parameters
|
2847
|
-
:param bool [params.
|
2847
|
+
:param bool [params.trigger]: True if fetching a trigger order
|
2848
2848
|
:param bool [params.hf]: False, # True for hf order
|
2849
2849
|
:param bool [params.clientOid]: unique order id created by users to identify their orders
|
2850
2850
|
:returns: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -2852,7 +2852,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2852
2852
|
self.load_markets()
|
2853
2853
|
request: dict = {}
|
2854
2854
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
|
2855
|
-
|
2855
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger', False)
|
2856
2856
|
hf = None
|
2857
2857
|
hf, params = self.handle_hf_and_params(params)
|
2858
2858
|
market = None
|
@@ -2866,7 +2866,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2866
2866
|
response = None
|
2867
2867
|
if clientOrderId is not None:
|
2868
2868
|
request['clientOid'] = clientOrderId
|
2869
|
-
if
|
2869
|
+
if trigger:
|
2870
2870
|
if symbol is not None:
|
2871
2871
|
request['symbol'] = market['id']
|
2872
2872
|
response = self.privateGetStopOrderQueryOrderByClientOid(self.extend(request, params))
|
@@ -2881,7 +2881,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2881
2881
|
if id is None:
|
2882
2882
|
raise InvalidOrder(self.id + ' fetchOrder() requires an order id')
|
2883
2883
|
request['orderId'] = id
|
2884
|
-
if
|
2884
|
+
if trigger:
|
2885
2885
|
response = self.privateGetStopOrderOrderId(self.extend(request, params))
|
2886
2886
|
elif hf:
|
2887
2887
|
response = self.privateGetHfOrdersOrderId(self.extend(request, params))
|
@@ -3019,7 +3019,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3019
3019
|
feeCurrencyId = self.safe_string(order, 'feeCurrency')
|
3020
3020
|
cancelExist = self.safe_bool(order, 'cancelExist', False)
|
3021
3021
|
responseStop = self.safe_string(order, 'stop')
|
3022
|
-
|
3022
|
+
trigger = responseStop is not None
|
3023
3023
|
stopTriggered = self.safe_bool(order, 'stopTriggered', False)
|
3024
3024
|
isActive = self.safe_bool_2(order, 'isActive', 'active')
|
3025
3025
|
responseStatus = self.safe_string(order, 'status')
|
@@ -3029,7 +3029,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3029
3029
|
status = 'open'
|
3030
3030
|
else:
|
3031
3031
|
status = 'closed'
|
3032
|
-
if
|
3032
|
+
if trigger:
|
3033
3033
|
if responseStatus == 'NEW':
|
3034
3034
|
status = 'open'
|
3035
3035
|
elif not isActive and not stopTriggered:
|
@@ -4182,7 +4182,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4182
4182
|
:param boolean [params.hf]: default False, when True will fetch ledger entries for the high frequency trading account
|
4183
4183
|
:param int [params.until]: the latest time in ms to fetch entries for
|
4184
4184
|
: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)
|
4185
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
4185
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
4186
4186
|
"""
|
4187
4187
|
self.load_markets()
|
4188
4188
|
self.load_accounts()
|
ccxt/luno.py
CHANGED
@@ -963,7 +963,7 @@ class luno(Exchange, ImplicitAPI):
|
|
963
963
|
:param int [since]: timestamp in ms of the earliest ledger entry, default is None
|
964
964
|
:param int [limit]: max number of ledger entries to return, default is None
|
965
965
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
966
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
966
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
967
967
|
"""
|
968
968
|
self.load_markets()
|
969
969
|
self.load_accounts()
|