ccxt 4.4.38__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.
Files changed (140) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/digifinex.py +1 -0
  3. ccxt/abstract/mexc.py +1 -0
  4. ccxt/abstract/woo.py +2 -2
  5. ccxt/alpaca.py +74 -3
  6. ccxt/ascendex.py +9 -9
  7. ccxt/async_support/__init__.py +1 -1
  8. ccxt/async_support/alpaca.py +74 -3
  9. ccxt/async_support/ascendex.py +9 -9
  10. ccxt/async_support/base/exchange.py +1 -1
  11. ccxt/async_support/base/ws/aiohttp_client.py +2 -2
  12. ccxt/async_support/binance.py +13 -17
  13. ccxt/async_support/bingx.py +1 -2
  14. ccxt/async_support/bit2c.py +0 -1
  15. ccxt/async_support/bitbank.py +0 -1
  16. ccxt/async_support/bitbns.py +0 -1
  17. ccxt/async_support/bitfinex.py +15 -16
  18. ccxt/async_support/bitfinex1.py +0 -1
  19. ccxt/async_support/bitflyer.py +0 -1
  20. ccxt/async_support/bitget.py +1 -2
  21. ccxt/async_support/bithumb.py +0 -1
  22. ccxt/async_support/bitmart.py +3 -4
  23. ccxt/async_support/bitmex.py +5 -6
  24. ccxt/async_support/bitopro.py +4 -5
  25. ccxt/async_support/bitrue.py +5 -7
  26. ccxt/async_support/bitso.py +1 -2
  27. ccxt/async_support/bitstamp.py +1 -2
  28. ccxt/async_support/bitteam.py +1 -3
  29. ccxt/async_support/bitvavo.py +2 -4
  30. ccxt/async_support/blockchaincom.py +5 -5
  31. ccxt/async_support/blofin.py +10 -10
  32. ccxt/async_support/btcalpha.py +0 -1
  33. ccxt/async_support/btcbox.py +0 -1
  34. ccxt/async_support/btcmarkets.py +1 -3
  35. ccxt/async_support/bybit.py +2 -3
  36. ccxt/async_support/cex.py +1 -1
  37. ccxt/async_support/coinbase.py +77 -1
  38. ccxt/async_support/coinbaseexchange.py +1 -1
  39. ccxt/async_support/coinbaseinternational.py +62 -0
  40. ccxt/async_support/coincatch.py +1 -1
  41. ccxt/async_support/coinex.py +9 -9
  42. ccxt/async_support/coinlist.py +1 -1
  43. ccxt/async_support/coinmetro.py +1 -1
  44. ccxt/async_support/cryptocom.py +91 -2
  45. ccxt/async_support/currencycom.py +1 -1
  46. ccxt/async_support/defx.py +1 -2
  47. ccxt/async_support/delta.py +1 -1
  48. ccxt/async_support/digifinex.py +58 -19
  49. ccxt/async_support/exmo.py +2 -2
  50. ccxt/async_support/gate.py +1 -1
  51. ccxt/async_support/hashkey.py +3 -5
  52. ccxt/async_support/htx.py +155 -33
  53. ccxt/async_support/hyperliquid.py +1 -1
  54. ccxt/async_support/kraken.py +1 -1
  55. ccxt/async_support/kucoin.py +25 -24
  56. ccxt/async_support/luno.py +1 -1
  57. ccxt/async_support/mexc.py +173 -26
  58. ccxt/async_support/ndax.py +1 -1
  59. ccxt/async_support/okcoin.py +18 -18
  60. ccxt/async_support/okx.py +22 -21
  61. ccxt/async_support/phemex.py +12 -8
  62. ccxt/async_support/poloniex.py +1 -1
  63. ccxt/async_support/poloniexfutures.py +6 -6
  64. ccxt/async_support/vertex.py +11 -11
  65. ccxt/async_support/woo.py +39 -39
  66. ccxt/async_support/woofipro.py +24 -24
  67. ccxt/async_support/xt.py +26 -26
  68. ccxt/async_support/zonda.py +1 -1
  69. ccxt/base/exchange.py +32 -25
  70. ccxt/binance.py +13 -17
  71. ccxt/bingx.py +1 -2
  72. ccxt/bit2c.py +0 -1
  73. ccxt/bitbank.py +0 -1
  74. ccxt/bitbns.py +0 -1
  75. ccxt/bitfinex.py +15 -16
  76. ccxt/bitfinex1.py +0 -1
  77. ccxt/bitflyer.py +0 -1
  78. ccxt/bitget.py +1 -2
  79. ccxt/bithumb.py +0 -1
  80. ccxt/bitmart.py +3 -4
  81. ccxt/bitmex.py +5 -6
  82. ccxt/bitopro.py +4 -5
  83. ccxt/bitrue.py +5 -7
  84. ccxt/bitso.py +1 -2
  85. ccxt/bitstamp.py +1 -2
  86. ccxt/bitteam.py +1 -3
  87. ccxt/bitvavo.py +2 -4
  88. ccxt/blockchaincom.py +5 -5
  89. ccxt/blofin.py +10 -10
  90. ccxt/btcalpha.py +0 -1
  91. ccxt/btcbox.py +0 -1
  92. ccxt/btcmarkets.py +1 -3
  93. ccxt/bybit.py +2 -3
  94. ccxt/cex.py +1 -1
  95. ccxt/coinbase.py +77 -1
  96. ccxt/coinbaseexchange.py +1 -1
  97. ccxt/coinbaseinternational.py +62 -0
  98. ccxt/coincatch.py +1 -1
  99. ccxt/coinex.py +9 -9
  100. ccxt/coinlist.py +1 -1
  101. ccxt/coinmetro.py +1 -1
  102. ccxt/cryptocom.py +91 -2
  103. ccxt/currencycom.py +1 -1
  104. ccxt/defx.py +1 -2
  105. ccxt/delta.py +1 -1
  106. ccxt/digifinex.py +58 -19
  107. ccxt/exmo.py +2 -2
  108. ccxt/gate.py +1 -1
  109. ccxt/hashkey.py +3 -5
  110. ccxt/htx.py +155 -33
  111. ccxt/hyperliquid.py +1 -1
  112. ccxt/kraken.py +1 -1
  113. ccxt/kucoin.py +25 -24
  114. ccxt/luno.py +1 -1
  115. ccxt/mexc.py +173 -26
  116. ccxt/ndax.py +1 -1
  117. ccxt/okcoin.py +18 -18
  118. ccxt/okx.py +22 -21
  119. ccxt/phemex.py +12 -8
  120. ccxt/poloniex.py +1 -1
  121. ccxt/poloniexfutures.py +6 -6
  122. ccxt/pro/__init__.py +1 -1
  123. ccxt/pro/bitget.py +1 -1
  124. ccxt/pro/bybit.py +12 -1
  125. ccxt/pro/coinex.py +2 -2
  126. ccxt/pro/gate.py +6 -6
  127. ccxt/pro/kucoin.py +3 -3
  128. ccxt/pro/okx.py +11 -11
  129. ccxt/pro/upbit.py +2 -2
  130. ccxt/pro/woo.py +1 -1
  131. ccxt/vertex.py +11 -11
  132. ccxt/woo.py +39 -39
  133. ccxt/woofipro.py +24 -24
  134. ccxt/xt.py +26 -26
  135. ccxt/zonda.py +1 -1
  136. {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/METADATA +4 -4
  137. {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/RECORD +140 -140
  138. {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/LICENSE.txt +0 -0
  139. {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/WHEEL +0 -0
  140. {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/top_level.txt +0 -0
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 stop order
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-structure>`
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-structure>`
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-structure>`
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-structure>`
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
@@ -230,6 +230,7 @@ class digifinex(Exchange, ImplicitAPI):
230
230
  'trade/order_info',
231
231
  ],
232
232
  'post': [
233
+ 'account/transfer',
233
234
  'account/leverage',
234
235
  'account/position_mode',
235
236
  'account/position_margin',
@@ -2476,7 +2477,7 @@ class digifinex(Exchange, ImplicitAPI):
2476
2477
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
2477
2478
  :param int [limit]: max number of ledger entries to return, default is None
2478
2479
  :param dict [params]: extra parameters specific to the exchange API endpoint
2479
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2480
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
2480
2481
  """
2481
2482
  self.load_markets()
2482
2483
  request: dict = {}
@@ -2748,12 +2749,23 @@ class digifinex(Exchange, ImplicitAPI):
2748
2749
 
2749
2750
  def parse_transfer(self, transfer: dict, currency: Currency = None) -> TransferEntry:
2750
2751
  #
2751
- # transfer
2752
+ # transfer between spot, margin and OTC
2752
2753
  #
2753
2754
  # {
2754
2755
  # "code": 0
2755
2756
  # }
2756
2757
  #
2758
+ # transfer between spot and swap
2759
+ #
2760
+ # {
2761
+ # "code": 0,
2762
+ # "data": {
2763
+ # "type": 2,
2764
+ # "currency": "USDT",
2765
+ # "transfer_amount": "5"
2766
+ # }
2767
+ # }
2768
+ #
2757
2769
  # fetchTransfers
2758
2770
  #
2759
2771
  # {
@@ -2766,7 +2778,8 @@ class digifinex(Exchange, ImplicitAPI):
2766
2778
  #
2767
2779
  fromAccount = None
2768
2780
  toAccount = None
2769
- type = self.safe_integer(transfer, 'type')
2781
+ data = self.safe_dict(transfer, 'data', transfer)
2782
+ type = self.safe_integer(data, 'type')
2770
2783
  if type == 1:
2771
2784
  fromAccount = 'spot'
2772
2785
  toAccount = 'swap'
@@ -2779,8 +2792,8 @@ class digifinex(Exchange, ImplicitAPI):
2779
2792
  'id': self.safe_string(transfer, 'transfer_id'),
2780
2793
  'timestamp': timestamp,
2781
2794
  'datetime': self.iso8601(timestamp),
2782
- 'currency': self.safe_currency_code(self.safe_string(transfer, 'currency'), currency),
2783
- 'amount': self.safe_number(transfer, 'amount'),
2795
+ 'currency': self.safe_currency_code(self.safe_string(data, 'currency'), currency),
2796
+ 'amount': self.safe_number_2(data, 'amount', 'transfer_amount'),
2784
2797
  'fromAccount': fromAccount,
2785
2798
  'toAccount': toAccount,
2786
2799
  'status': self.parse_transfer_status(self.safe_string(transfer, 'code')),
@@ -2789,30 +2802,56 @@ class digifinex(Exchange, ImplicitAPI):
2789
2802
  def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
2790
2803
  """
2791
2804
  transfer currency internally between wallets on the same account
2805
+
2806
+ https://docs.digifinex.com/en-ww/spot/v3/rest.html#transfer-assets-among-accounts
2807
+ https://docs.digifinex.com/en-ww/swap/v2/rest.html#accounttransfer
2808
+
2792
2809
  :param str code: unified currency code
2793
2810
  :param float amount: amount to transfer
2794
- :param str fromAccount: account to transfer from
2795
- :param str toAccount: account to transfer to
2811
+ :param str fromAccount: 'spot', 'swap', 'margin', 'OTC' - account to transfer from
2812
+ :param str toAccount: 'spot', 'swap', 'margin', 'OTC' - account to transfer to
2796
2813
  :param dict [params]: extra parameters specific to the exchange API endpoint
2797
2814
  :returns dict: a `transfer structure <https://docs.ccxt.com/#/?id=transfer-structure>`
2798
2815
  """
2799
2816
  self.load_markets()
2800
2817
  currency = self.currency(code)
2818
+ currencyId = currency['id']
2801
2819
  accountsByType = self.safe_value(self.options, 'accountsByType', {})
2802
2820
  fromId = self.safe_string(accountsByType, fromAccount, fromAccount)
2803
2821
  toId = self.safe_string(accountsByType, toAccount, toAccount)
2804
- request: dict = {
2805
- 'currency_mark': currency['id'],
2806
- 'num': self.currency_to_precision(code, amount),
2807
- 'from': fromId, # 1 = SPOT, 2 = MARGIN, 3 = OTC
2808
- 'to': toId, # 1 = SPOT, 2 = MARGIN, 3 = OTC
2809
- }
2810
- response = self.privateSpotPostTransfer(self.extend(request, params))
2811
- #
2812
- # {
2813
- # "code": 0
2814
- # }
2815
- #
2822
+ request = {}
2823
+ fromSwap = (fromAccount == 'swap')
2824
+ toSwap = (toAccount == 'swap')
2825
+ response = None
2826
+ amountString = self.currency_to_precision(code, amount)
2827
+ if fromSwap or toSwap:
2828
+ if (fromId != '1') and (toId != '1'):
2829
+ raise ExchangeError(self.id + ' transfer() supports transferring between spot and swap, spot and margin, spot and OTC only')
2830
+ request['type'] = 1 if toSwap else 2 # 1 = spot to swap, 2 = swap to spot
2831
+ request['currency'] = currencyId
2832
+ request['transfer_amount'] = amountString
2833
+ #
2834
+ # {
2835
+ # "code": 0,
2836
+ # "data": {
2837
+ # "type": 2,
2838
+ # "currency": "USDT",
2839
+ # "transfer_amount": "5"
2840
+ # }
2841
+ # }
2842
+ #
2843
+ response = self.privateSwapPostAccountTransfer(self.extend(request, params))
2844
+ else:
2845
+ request['currency_mark'] = currencyId
2846
+ request['num'] = amountString
2847
+ request['from'] = fromId # 1 = SPOT, 2 = MARGIN, 3 = OTC
2848
+ request['to'] = toId # 1 = SPOT, 2 = MARGIN, 3 = OTC
2849
+ #
2850
+ # {
2851
+ # "code": 0
2852
+ # }
2853
+ #
2854
+ response = self.privateSpotPostTransfer(self.extend(request, params))
2816
2855
  return self.parse_transfer(response, currency)
2817
2856
 
2818
2857
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
ccxt/exmo.py CHANGED
@@ -1463,7 +1463,7 @@ class exmo(Exchange, ImplicitAPI):
1463
1463
  """
1464
1464
  self.load_markets()
1465
1465
  request: dict = {}
1466
- stop = self.safe_value_2(params, 'trigger', 'stop')
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 stop:
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-structure>`
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-structure>`
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
- isStop = defaultValue
3341
- isStop, params = self.handle_option_and_params(params, methodName, 'stop', isStop)
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: