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.
Files changed (134) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ascendex.py +9 -9
  3. ccxt/async_support/__init__.py +1 -1
  4. ccxt/async_support/ascendex.py +9 -9
  5. ccxt/async_support/base/exchange.py +1 -1
  6. ccxt/async_support/base/ws/aiohttp_client.py +2 -2
  7. ccxt/async_support/binance.py +13 -17
  8. ccxt/async_support/bingx.py +1 -2
  9. ccxt/async_support/bit2c.py +0 -1
  10. ccxt/async_support/bitbank.py +0 -1
  11. ccxt/async_support/bitbns.py +0 -1
  12. ccxt/async_support/bitfinex.py +15 -16
  13. ccxt/async_support/bitfinex1.py +0 -1
  14. ccxt/async_support/bitflyer.py +0 -1
  15. ccxt/async_support/bitget.py +1 -2
  16. ccxt/async_support/bithumb.py +0 -1
  17. ccxt/async_support/bitmart.py +3 -4
  18. ccxt/async_support/bitmex.py +5 -6
  19. ccxt/async_support/bitopro.py +4 -5
  20. ccxt/async_support/bitrue.py +5 -7
  21. ccxt/async_support/bitso.py +1 -2
  22. ccxt/async_support/bitstamp.py +1 -2
  23. ccxt/async_support/bitteam.py +1 -3
  24. ccxt/async_support/bitvavo.py +2 -4
  25. ccxt/async_support/blockchaincom.py +5 -5
  26. ccxt/async_support/blofin.py +10 -10
  27. ccxt/async_support/btcalpha.py +0 -1
  28. ccxt/async_support/btcbox.py +0 -1
  29. ccxt/async_support/btcmarkets.py +1 -3
  30. ccxt/async_support/bybit.py +2 -3
  31. ccxt/async_support/cex.py +1 -1
  32. ccxt/async_support/coinbase.py +77 -1
  33. ccxt/async_support/coinbaseexchange.py +1 -1
  34. ccxt/async_support/coinbaseinternational.py +62 -0
  35. ccxt/async_support/coincatch.py +1 -1
  36. ccxt/async_support/coinex.py +9 -9
  37. ccxt/async_support/coinlist.py +1 -1
  38. ccxt/async_support/coinmetro.py +1 -1
  39. ccxt/async_support/cryptocom.py +91 -2
  40. ccxt/async_support/currencycom.py +1 -1
  41. ccxt/async_support/defx.py +1 -2
  42. ccxt/async_support/delta.py +1 -1
  43. ccxt/async_support/digifinex.py +1 -1
  44. ccxt/async_support/exmo.py +2 -2
  45. ccxt/async_support/gate.py +1 -1
  46. ccxt/async_support/hashkey.py +3 -5
  47. ccxt/async_support/htx.py +1 -1
  48. ccxt/async_support/hyperliquid.py +1 -1
  49. ccxt/async_support/kraken.py +1 -1
  50. ccxt/async_support/kucoin.py +24 -24
  51. ccxt/async_support/luno.py +1 -1
  52. ccxt/async_support/mexc.py +137 -1
  53. ccxt/async_support/ndax.py +1 -1
  54. ccxt/async_support/okcoin.py +18 -18
  55. ccxt/async_support/okx.py +21 -21
  56. ccxt/async_support/phemex.py +12 -8
  57. ccxt/async_support/poloniex.py +1 -1
  58. ccxt/async_support/poloniexfutures.py +6 -6
  59. ccxt/async_support/vertex.py +11 -11
  60. ccxt/async_support/woo.py +33 -33
  61. ccxt/async_support/woofipro.py +24 -24
  62. ccxt/async_support/xt.py +26 -26
  63. ccxt/async_support/zonda.py +1 -1
  64. ccxt/base/exchange.py +13 -16
  65. ccxt/binance.py +13 -17
  66. ccxt/bingx.py +1 -2
  67. ccxt/bit2c.py +0 -1
  68. ccxt/bitbank.py +0 -1
  69. ccxt/bitbns.py +0 -1
  70. ccxt/bitfinex.py +15 -16
  71. ccxt/bitfinex1.py +0 -1
  72. ccxt/bitflyer.py +0 -1
  73. ccxt/bitget.py +1 -2
  74. ccxt/bithumb.py +0 -1
  75. ccxt/bitmart.py +3 -4
  76. ccxt/bitmex.py +5 -6
  77. ccxt/bitopro.py +4 -5
  78. ccxt/bitrue.py +5 -7
  79. ccxt/bitso.py +1 -2
  80. ccxt/bitstamp.py +1 -2
  81. ccxt/bitteam.py +1 -3
  82. ccxt/bitvavo.py +2 -4
  83. ccxt/blockchaincom.py +5 -5
  84. ccxt/blofin.py +10 -10
  85. ccxt/btcalpha.py +0 -1
  86. ccxt/btcbox.py +0 -1
  87. ccxt/btcmarkets.py +1 -3
  88. ccxt/bybit.py +2 -3
  89. ccxt/cex.py +1 -1
  90. ccxt/coinbase.py +77 -1
  91. ccxt/coinbaseexchange.py +1 -1
  92. ccxt/coinbaseinternational.py +62 -0
  93. ccxt/coincatch.py +1 -1
  94. ccxt/coinex.py +9 -9
  95. ccxt/coinlist.py +1 -1
  96. ccxt/coinmetro.py +1 -1
  97. ccxt/cryptocom.py +91 -2
  98. ccxt/currencycom.py +1 -1
  99. ccxt/defx.py +1 -2
  100. ccxt/delta.py +1 -1
  101. ccxt/digifinex.py +1 -1
  102. ccxt/exmo.py +2 -2
  103. ccxt/gate.py +1 -1
  104. ccxt/hashkey.py +3 -5
  105. ccxt/htx.py +1 -1
  106. ccxt/hyperliquid.py +1 -1
  107. ccxt/kraken.py +1 -1
  108. ccxt/kucoin.py +24 -24
  109. ccxt/luno.py +1 -1
  110. ccxt/mexc.py +137 -1
  111. ccxt/ndax.py +1 -1
  112. ccxt/okcoin.py +18 -18
  113. ccxt/okx.py +21 -21
  114. ccxt/phemex.py +12 -8
  115. ccxt/poloniex.py +1 -1
  116. ccxt/poloniexfutures.py +6 -6
  117. ccxt/pro/__init__.py +1 -1
  118. ccxt/pro/bitget.py +1 -1
  119. ccxt/pro/bybit.py +12 -1
  120. ccxt/pro/coinex.py +2 -2
  121. ccxt/pro/gate.py +6 -6
  122. ccxt/pro/kucoin.py +3 -3
  123. ccxt/pro/okx.py +11 -11
  124. ccxt/pro/upbit.py +2 -2
  125. ccxt/vertex.py +11 -11
  126. ccxt/woo.py +33 -33
  127. ccxt/woofipro.py +24 -24
  128. ccxt/xt.py +26 -26
  129. ccxt/zonda.py +1 -1
  130. {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/METADATA +4 -4
  131. {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/RECORD +134 -134
  132. {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/LICENSE.txt +0 -0
  133. {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/WHEEL +0 -0
  134. {ccxt-4.4.39.dist-info → ccxt-4.4.40.dist-info}/top_level.txt +0 -0
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.4.39'
25
+ __version__ = '4.4.40'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
ccxt/ascendex.py CHANGED
@@ -1359,7 +1359,7 @@ class ascendex(Exchange, ImplicitAPI):
1359
1359
  'cost': feeCost,
1360
1360
  'currency': feeCurrencyCode,
1361
1361
  }
1362
- stopPrice = self.omit_zero(self.safe_string(order, 'stopPrice'))
1362
+ triggerPrice = self.omit_zero(self.safe_string(order, 'stopPrice'))
1363
1363
  reduceOnly = None
1364
1364
  execInst = self.safe_string(order, 'execInst')
1365
1365
  if execInst == 'reduceOnly':
@@ -1381,8 +1381,8 @@ class ascendex(Exchange, ImplicitAPI):
1381
1381
  'reduceOnly': reduceOnly,
1382
1382
  'side': side,
1383
1383
  'price': price,
1384
- 'stopPrice': stopPrice,
1385
- 'triggerPrice': stopPrice,
1384
+ 'stopPrice': triggerPrice,
1385
+ 'triggerPrice': triggerPrice,
1386
1386
  'amount': amount,
1387
1387
  'cost': None,
1388
1388
  'average': average,
@@ -1453,7 +1453,7 @@ class ascendex(Exchange, ImplicitAPI):
1453
1453
  :param dict [params]: extra parameters specific to the exchange API endpoint
1454
1454
  :param str [params.timeInForce]: "GTC", "IOC", "FOK", or "PO"
1455
1455
  :param bool [params.postOnly]: True or False
1456
- :param float [params.stopPrice]: the price at which a trigger order is triggered at
1456
+ :param float [params.triggerPrice]: the price at which a trigger order is triggered at
1457
1457
  :returns dict: request to be sent to the exchange
1458
1458
  """
1459
1459
  market = self.market(symbol)
@@ -1484,7 +1484,7 @@ class ascendex(Exchange, ImplicitAPI):
1484
1484
  timeInForce = self.safe_string(params, 'timeInForce')
1485
1485
  postOnly = self.is_post_only(isMarketOrder, False, params)
1486
1486
  reduceOnly = self.safe_bool(params, 'reduceOnly', False)
1487
- stopPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1487
+ triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1488
1488
  if isLimitOrder:
1489
1489
  request['orderPrice'] = self.price_to_precision(symbol, price)
1490
1490
  if timeInForce == 'IOC':
@@ -1493,8 +1493,8 @@ class ascendex(Exchange, ImplicitAPI):
1493
1493
  request['timeInForce'] = 'FOK'
1494
1494
  if postOnly:
1495
1495
  request['postOnly'] = True
1496
- if stopPrice is not None:
1497
- request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
1496
+ if triggerPrice is not None:
1497
+ request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
1498
1498
  if isLimitOrder:
1499
1499
  request['orderType'] = 'stop_limit'
1500
1500
  elif isMarketOrder:
@@ -1528,7 +1528,7 @@ class ascendex(Exchange, ImplicitAPI):
1528
1528
  :param dict [params]: extra parameters specific to the exchange API endpoint
1529
1529
  :param str [params.timeInForce]: "GTC", "IOC", "FOK", or "PO"
1530
1530
  :param bool [params.postOnly]: True or False
1531
- :param float [params.stopPrice]: the price at which a trigger order is triggered at
1531
+ :param float [params.triggerPrice]: the price at which a trigger order is triggered at
1532
1532
  :param dict [params.takeProfit]: *takeProfit object in params* containing the triggerPrice that the attached take profit order will be triggered(perpetual swap markets only)
1533
1533
  :param float [params.takeProfit.triggerPrice]: *swap only* take profit trigger price
1534
1534
  :param dict [params.stopLoss]: *stopLoss object in params* containing the triggerPrice that the attached stop loss order will be triggered(perpetual swap markets only)
@@ -1622,7 +1622,7 @@ class ascendex(Exchange, ImplicitAPI):
1622
1622
  :param dict [params]: extra parameters specific to the exchange API endpoint
1623
1623
  :param str [params.timeInForce]: "GTC", "IOC", "FOK", or "PO"
1624
1624
  :param bool [params.postOnly]: True or False
1625
- :param float [params.stopPrice]: the price at which a trigger order is triggered at
1625
+ :param float [params.triggerPrice]: the price at which a trigger order is triggered at
1626
1626
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1627
1627
  """
1628
1628
  self.load_markets()
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.39'
7
+ __version__ = '4.4.40'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -1360,7 +1360,7 @@ class ascendex(Exchange, ImplicitAPI):
1360
1360
  'cost': feeCost,
1361
1361
  'currency': feeCurrencyCode,
1362
1362
  }
1363
- stopPrice = self.omit_zero(self.safe_string(order, 'stopPrice'))
1363
+ triggerPrice = self.omit_zero(self.safe_string(order, 'stopPrice'))
1364
1364
  reduceOnly = None
1365
1365
  execInst = self.safe_string(order, 'execInst')
1366
1366
  if execInst == 'reduceOnly':
@@ -1382,8 +1382,8 @@ class ascendex(Exchange, ImplicitAPI):
1382
1382
  'reduceOnly': reduceOnly,
1383
1383
  'side': side,
1384
1384
  'price': price,
1385
- 'stopPrice': stopPrice,
1386
- 'triggerPrice': stopPrice,
1385
+ 'stopPrice': triggerPrice,
1386
+ 'triggerPrice': triggerPrice,
1387
1387
  'amount': amount,
1388
1388
  'cost': None,
1389
1389
  'average': average,
@@ -1454,7 +1454,7 @@ class ascendex(Exchange, ImplicitAPI):
1454
1454
  :param dict [params]: extra parameters specific to the exchange API endpoint
1455
1455
  :param str [params.timeInForce]: "GTC", "IOC", "FOK", or "PO"
1456
1456
  :param bool [params.postOnly]: True or False
1457
- :param float [params.stopPrice]: the price at which a trigger order is triggered at
1457
+ :param float [params.triggerPrice]: the price at which a trigger order is triggered at
1458
1458
  :returns dict: request to be sent to the exchange
1459
1459
  """
1460
1460
  market = self.market(symbol)
@@ -1485,7 +1485,7 @@ class ascendex(Exchange, ImplicitAPI):
1485
1485
  timeInForce = self.safe_string(params, 'timeInForce')
1486
1486
  postOnly = self.is_post_only(isMarketOrder, False, params)
1487
1487
  reduceOnly = self.safe_bool(params, 'reduceOnly', False)
1488
- stopPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1488
+ triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
1489
1489
  if isLimitOrder:
1490
1490
  request['orderPrice'] = self.price_to_precision(symbol, price)
1491
1491
  if timeInForce == 'IOC':
@@ -1494,8 +1494,8 @@ class ascendex(Exchange, ImplicitAPI):
1494
1494
  request['timeInForce'] = 'FOK'
1495
1495
  if postOnly:
1496
1496
  request['postOnly'] = True
1497
- if stopPrice is not None:
1498
- request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
1497
+ if triggerPrice is not None:
1498
+ request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
1499
1499
  if isLimitOrder:
1500
1500
  request['orderType'] = 'stop_limit'
1501
1501
  elif isMarketOrder:
@@ -1529,7 +1529,7 @@ class ascendex(Exchange, ImplicitAPI):
1529
1529
  :param dict [params]: extra parameters specific to the exchange API endpoint
1530
1530
  :param str [params.timeInForce]: "GTC", "IOC", "FOK", or "PO"
1531
1531
  :param bool [params.postOnly]: True or False
1532
- :param float [params.stopPrice]: the price at which a trigger order is triggered at
1532
+ :param float [params.triggerPrice]: the price at which a trigger order is triggered at
1533
1533
  :param dict [params.takeProfit]: *takeProfit object in params* containing the triggerPrice that the attached take profit order will be triggered(perpetual swap markets only)
1534
1534
  :param float [params.takeProfit.triggerPrice]: *swap only* take profit trigger price
1535
1535
  :param dict [params.stopLoss]: *stopLoss object in params* containing the triggerPrice that the attached stop loss order will be triggered(perpetual swap markets only)
@@ -1623,7 +1623,7 @@ class ascendex(Exchange, ImplicitAPI):
1623
1623
  :param dict [params]: extra parameters specific to the exchange API endpoint
1624
1624
  :param str [params.timeInForce]: "GTC", "IOC", "FOK", or "PO"
1625
1625
  :param bool [params.postOnly]: True or False
1626
- :param float [params.stopPrice]: the price at which a trigger order is triggered at
1626
+ :param float [params.triggerPrice]: the price at which a trigger order is triggered at
1627
1627
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1628
1628
  """
1629
1629
  await self.load_markets()
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.39'
5
+ __version__ = '4.4.40'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -88,8 +88,8 @@ class AiohttpClient(Client):
88
88
  # call aenter here to simulate async with otherwise we get the error "await not called with future"
89
89
  # if connecting to a non-existent endpoint
90
90
  if (self.proxy):
91
- return session.ws_connect(self.url, autoping=False, autoclose=False, headers=self.options.get('headers'), proxy=self.proxy).__aenter__()
92
- return session.ws_connect(self.url, autoping=False, autoclose=False, headers=self.options.get('headers')).__aenter__()
91
+ return session.ws_connect(self.url, autoping=False, autoclose=False, headers=self.options.get('headers'), proxy=self.proxy, max_msg_size=10485760).__aenter__()
92
+ return session.ws_connect(self.url, autoping=False, autoclose=False, headers=self.options.get('headers'), max_msg_size=10485760).__aenter__()
93
93
 
94
94
  async def send(self, message):
95
95
  if self.verbose:
@@ -6010,14 +6010,10 @@ class binance(Exchange, ImplicitAPI):
6010
6010
  marginMode = None
6011
6011
  marginMode, params = self.handle_margin_mode_and_params('createOrder', params)
6012
6012
  reduceOnly = self.safe_bool(params, 'reduceOnly', False)
6013
- if (marketType == 'margin') or (marginMode is not None) or market['option']:
6014
- # for swap and future reduceOnly is a string that cant be sent with close position set to True or in hedge mode
6015
- params = self.omit(params, 'reduceOnly')
6016
- if market['option']:
6017
- request['reduceOnly'] = reduceOnly
6018
- else:
6019
- if reduceOnly:
6020
- request['sideEffectType'] = 'AUTO_REPAY'
6013
+ if reduceOnly:
6014
+ if marketType == 'margin' or (not market['contract'] and (marginMode is not None)):
6015
+ params = self.omit(params, 'reduceOnly')
6016
+ request['sideEffectType'] = 'AUTO_REPAY'
6021
6017
  triggerPrice = self.safe_string_2(params, 'triggerPrice', 'stopPrice')
6022
6018
  stopLossPrice = self.safe_string(params, 'stopLossPrice', triggerPrice) # fallback to stopLoss
6023
6019
  takeProfitPrice = self.safe_string(params, 'takeProfitPrice')
@@ -6374,7 +6370,7 @@ class binance(Exchange, ImplicitAPI):
6374
6370
  :param int [params.until]: the latest time in ms to fetch orders for
6375
6371
  :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)
6376
6372
  :param boolean [params.portfolioMargin]: set to True if you would like to fetch orders in a portfolio margin account
6377
- :param boolean [params.stop]: set to True if you would like to fetch portfolio margin account stop or conditional orders
6373
+ :param boolean [params.trigger]: set to True if you would like to fetch portfolio margin account trigger or conditional orders
6378
6374
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
6379
6375
  """
6380
6376
  if symbol is None:
@@ -6631,7 +6627,7 @@ class binance(Exchange, ImplicitAPI):
6631
6627
  :param dict [params]: extra parameters specific to the exchange API endpoint
6632
6628
  :param str [params.marginMode]: 'cross' or 'isolated', for spot margin trading
6633
6629
  :param boolean [params.portfolioMargin]: set to True if you would like to fetch open orders in the portfolio margin account
6634
- :param boolean [params.stop]: set to True if you would like to fetch portfolio margin account conditional orders
6630
+ :param boolean [params.trigger]: set to True if you would like to fetch portfolio margin account conditional orders
6635
6631
  :param str [params.subType]: "linear" or "inverse"
6636
6632
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
6637
6633
  """
@@ -6917,7 +6913,7 @@ class binance(Exchange, ImplicitAPI):
6917
6913
  :param dict [params]: extra parameters specific to the exchange API endpoint
6918
6914
  :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)
6919
6915
  :param boolean [params.portfolioMargin]: set to True if you would like to fetch orders in a portfolio margin account
6920
- :param boolean [params.stop]: set to True if you would like to fetch portfolio margin account stop or conditional orders
6916
+ :param boolean [params.trigger]: set to True if you would like to fetch portfolio margin account trigger or conditional orders
6921
6917
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
6922
6918
  """
6923
6919
  if symbol is None:
@@ -6946,7 +6942,7 @@ class binance(Exchange, ImplicitAPI):
6946
6942
  :param dict [params]: extra parameters specific to the exchange API endpoint
6947
6943
  :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)
6948
6944
  :param boolean [params.portfolioMargin]: set to True if you would like to fetch orders in a portfolio margin account
6949
- :param boolean [params.stop]: set to True if you would like to fetch portfolio margin account stop or conditional orders
6945
+ :param boolean [params.trigger]: set to True if you would like to fetch portfolio margin account trigger or conditional orders
6950
6946
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
6951
6947
  """
6952
6948
  if symbol is None:
@@ -6975,7 +6971,7 @@ class binance(Exchange, ImplicitAPI):
6975
6971
  :param dict [params]: extra parameters specific to the exchange API endpoint
6976
6972
  :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)
6977
6973
  :param boolean [params.portfolioMargin]: set to True if you would like to fetch orders in a portfolio margin account
6978
- :param boolean [params.stop]: set to True if you would like to fetch portfolio margin account stop or conditional orders
6974
+ :param boolean [params.trigger]: set to True if you would like to fetch portfolio margin account trigger or conditional orders
6979
6975
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
6980
6976
  """
6981
6977
  if symbol is None:
@@ -7006,7 +7002,7 @@ class binance(Exchange, ImplicitAPI):
7006
7002
  :param str symbol: unified symbol of the market the order was made in
7007
7003
  :param dict [params]: extra parameters specific to the exchange API endpoint
7008
7004
  :param boolean [params.portfolioMargin]: set to True if you would like to cancel an order in a portfolio margin account
7009
- :param boolean [params.stop]: set to True if you would like to cancel a portfolio margin account conditional order
7005
+ :param boolean [params.trigger]: set to True if you would like to cancel a portfolio margin account conditional order
7010
7006
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
7011
7007
  """
7012
7008
  if symbol is None:
@@ -7086,7 +7082,7 @@ class binance(Exchange, ImplicitAPI):
7086
7082
  :param dict [params]: extra parameters specific to the exchange API endpoint
7087
7083
  :param str [params.marginMode]: 'cross' or 'isolated', for spot margin trading
7088
7084
  :param boolean [params.portfolioMargin]: set to True if you would like to cancel orders in a portfolio margin account
7089
- :param boolean [params.stop]: set to True if you would like to cancel portfolio margin account conditional orders
7085
+ :param boolean [params.trigger]: set to True if you would like to cancel portfolio margin account conditional orders
7090
7086
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
7091
7087
  """
7092
7088
  if symbol is None:
@@ -10840,7 +10836,7 @@ class binance(Exchange, ImplicitAPI):
10840
10836
  :param str id: the identification number of the ledger entry
10841
10837
  :param str code: unified currency code
10842
10838
  :param dict [params]: extra parameters specific to the exchange API endpoint
10843
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
10839
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
10844
10840
  """
10845
10841
  await self.load_markets()
10846
10842
  type = None
@@ -10886,7 +10882,7 @@ class binance(Exchange, ImplicitAPI):
10886
10882
  :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)
10887
10883
  :param boolean [params.portfolioMargin]: set to True if you would like to fetch the ledger for a portfolio margin account
10888
10884
  :param str [params.subType]: "linear" or "inverse"
10889
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
10885
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
10890
10886
  """
10891
10887
  await self.load_markets()
10892
10888
  paginate = False
@@ -3440,7 +3440,6 @@ class bingx(Exchange, ImplicitAPI):
3440
3440
  'postOnly': None,
3441
3441
  'side': self.parse_order_side(side),
3442
3442
  'price': self.safe_string_2(order, 'price', 'p'),
3443
- 'stopPrice': triggerPrice,
3444
3443
  'triggerPrice': triggerPrice,
3445
3444
  'stopLossPrice': stopLossPrice,
3446
3445
  'takeProfitPrice': takeProfitPrice,
@@ -5873,7 +5872,7 @@ class bingx(Exchange, ImplicitAPI):
5873
5872
  :param float amount: how much of the currency you want to trade in units of the base currency
5874
5873
  :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
5875
5874
  :param dict [params]: extra parameters specific to the exchange API endpoint
5876
- :param str [params.stopPrice]: Trigger price used for TAKE_STOP_LIMIT, TAKE_STOP_MARKET, TRIGGER_LIMIT, TRIGGER_MARKET order types.
5875
+ :param str [params.triggerPrice]: Trigger price used for TAKE_STOP_LIMIT, TAKE_STOP_MARKET, TRIGGER_LIMIT, TRIGGER_MARKET order types.
5877
5876
  :param dict [params.takeProfit]: *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
5878
5877
  :param float [params.takeProfit.triggerPrice]: take profit trigger price
5879
5878
  :param dict [params.stopLoss]: *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
@@ -620,7 +620,6 @@ class bit2c(Exchange, ImplicitAPI):
620
620
  'postOnly': None,
621
621
  'side': side,
622
622
  'price': price,
623
- 'stopPrice': None,
624
623
  'triggerPrice': None,
625
624
  'amount': amount,
626
625
  'filled': None,
@@ -636,7 +636,6 @@ class bitbank(Exchange, ImplicitAPI):
636
636
  'postOnly': None,
637
637
  'side': side,
638
638
  'price': price,
639
- 'stopPrice': None,
640
639
  'triggerPrice': None,
641
640
  'cost': None,
642
641
  'average': average,
@@ -552,7 +552,6 @@ class bitbns(Exchange, ImplicitAPI):
552
552
  'postOnly': None,
553
553
  'side': side,
554
554
  'price': self.safe_string(order, 'rate'),
555
- 'stopPrice': triggerPrice,
556
555
  'triggerPrice': triggerPrice,
557
556
  'amount': self.safe_string(order, 'btc'),
558
557
  'cost': None,
@@ -1484,10 +1484,10 @@ class bitfinex(Exchange, ImplicitAPI):
1484
1484
  if flags[i] == 'postOnly':
1485
1485
  postOnly = True
1486
1486
  price = self.safe_string(orderList, 16)
1487
- stopPrice = None
1487
+ triggerPrice = None
1488
1488
  if (orderType == 'EXCHANGE STOP') or (orderType == 'EXCHANGE STOP LIMIT'):
1489
1489
  price = None
1490
- stopPrice = self.safe_string(orderList, 16)
1490
+ triggerPrice = self.safe_string(orderList, 16)
1491
1491
  if orderType == 'EXCHANGE STOP LIMIT':
1492
1492
  price = self.safe_string(orderList, 19)
1493
1493
  status = None
@@ -1510,8 +1510,7 @@ class bitfinex(Exchange, ImplicitAPI):
1510
1510
  'postOnly': postOnly,
1511
1511
  'side': side,
1512
1512
  'price': price,
1513
- 'stopPrice': stopPrice,
1514
- 'triggerPrice': stopPrice,
1513
+ 'triggerPrice': triggerPrice,
1515
1514
  'amount': amount,
1516
1515
  'cost': None,
1517
1516
  'average': average,
@@ -1532,7 +1531,7 @@ class bitfinex(Exchange, ImplicitAPI):
1532
1531
  :param float amount: how much you want to trade in units of the base currency
1533
1532
  :param float [price]: the price of the order, in units of the quote currency, ignored in market orders
1534
1533
  :param dict [params]: extra parameters specific to the exchange API endpoint
1535
- :param float [params.stopPrice]: The price at which a trigger order is triggered at
1534
+ :param float [params.triggerPrice]: The price at which a trigger order is triggered at
1536
1535
  :param str [params.timeInForce]: "GTC", "IOC", "FOK", or "PO"
1537
1536
  :param bool [params.postOnly]:
1538
1537
  :param bool [params.reduceOnly]: Ensures that the executed order does not flip the opened position.
@@ -1550,7 +1549,7 @@ class bitfinex(Exchange, ImplicitAPI):
1550
1549
  'symbol': market['id'],
1551
1550
  'amount': amountString,
1552
1551
  }
1553
- stopPrice = self.safe_string_2(params, 'stopPrice', 'triggerPrice')
1552
+ triggerPrice = self.safe_string_2(params, 'stopPrice', 'triggerPrice')
1554
1553
  trailingAmount = self.safe_string(params, 'trailingAmount')
1555
1554
  timeInForce = self.safe_string(params, 'timeInForce')
1556
1555
  postOnlyParam = self.safe_bool(params, 'postOnly', False)
@@ -1560,9 +1559,9 @@ class bitfinex(Exchange, ImplicitAPI):
1560
1559
  if trailingAmount is not None:
1561
1560
  orderType = 'TRAILING STOP'
1562
1561
  request['price_trailing'] = trailingAmount
1563
- elif stopPrice is not None:
1562
+ elif triggerPrice is not None:
1564
1563
  # request['price'] is taken for stop orders
1565
- request['price'] = self.price_to_precision(symbol, stopPrice)
1564
+ request['price'] = self.price_to_precision(symbol, triggerPrice)
1566
1565
  if type == 'limit':
1567
1566
  orderType = 'STOP LIMIT'
1568
1567
  request['price_aux_limit'] = self.price_to_precision(symbol, price)
@@ -1575,7 +1574,7 @@ class bitfinex(Exchange, ImplicitAPI):
1575
1574
  raise InvalidOrder(self.id + ' createOrder() requires a price argument with IOC and FOK orders')
1576
1575
  if (ioc or fok) and (type == 'market'):
1577
1576
  raise InvalidOrder(self.id + ' createOrder() does not allow market IOC and FOK orders')
1578
- if (type != 'market') and (stopPrice is None):
1577
+ if (type != 'market') and (triggerPrice is None):
1579
1578
  request['price'] = self.price_to_precision(symbol, price)
1580
1579
  if ioc:
1581
1580
  orderType = 'IOC'
@@ -1612,7 +1611,7 @@ class bitfinex(Exchange, ImplicitAPI):
1612
1611
  :param float amount: the amount of currency to trade
1613
1612
  :param float [price]: price of the order
1614
1613
  :param dict [params]: extra parameters specific to the exchange API endpoint
1615
- :param float [params.stopPrice]: the price that triggers a trigger order
1614
+ :param float [params.triggerPrice]: the price that triggers a trigger order
1616
1615
  :param str [params.timeInForce]: "GTC", "IOC", "FOK", or "PO"
1617
1616
  :param boolean [params.postOnly]: set to True if you want to make a post only order
1618
1617
  :param boolean [params.reduceOnly]: indicates that the order is to reduce the size of a position
@@ -2850,7 +2849,7 @@ class bitfinex(Exchange, ImplicitAPI):
2850
2849
  :param dict [params]: extra parameters specific to the exchange API endpoint
2851
2850
  :param int [params.until]: timestamp in ms of the latest ledger entry
2852
2851
  :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)
2853
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2852
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
2854
2853
  """
2855
2854
  await self.load_markets()
2856
2855
  paginate = False
@@ -3521,7 +3520,7 @@ class bitfinex(Exchange, ImplicitAPI):
3521
3520
  :param float amount: how much you want to trade in units of the base currency
3522
3521
  :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
3523
3522
  :param dict [params]: extra parameters specific to the exchange API endpoint
3524
- :param float [params.stopPrice]: the price that triggers a trigger order
3523
+ :param float [params.triggerPrice]: the price that triggers a trigger order
3525
3524
  :param boolean [params.postOnly]: set to True if you want to make a post only order
3526
3525
  :param boolean [params.reduceOnly]: indicates that the order is to reduce the size of a position
3527
3526
  :param int [params.flags]: additional order parameters: 4096(Post Only), 1024(Reduce Only), 16384(OCO), 64(Hidden), 512(Close), 524288(No Var Rates)
@@ -3539,7 +3538,7 @@ class bitfinex(Exchange, ImplicitAPI):
3539
3538
  amountString = self.amount_to_precision(symbol, amount)
3540
3539
  amountString = amountString if (side == 'buy') else Precise.string_neg(amountString)
3541
3540
  request['amount'] = amountString
3542
- stopPrice = self.safe_string_2(params, 'stopPrice', 'triggerPrice')
3541
+ triggerPrice = self.safe_string_2(params, 'stopPrice', 'triggerPrice')
3543
3542
  trailingAmount = self.safe_string(params, 'trailingAmount')
3544
3543
  timeInForce = self.safe_string(params, 'timeInForce')
3545
3544
  postOnlyParam = self.safe_bool(params, 'postOnly', False)
@@ -3547,13 +3546,13 @@ class bitfinex(Exchange, ImplicitAPI):
3547
3546
  clientOrderId = self.safe_integer_2(params, 'cid', 'clientOrderId')
3548
3547
  if trailingAmount is not None:
3549
3548
  request['price_trailing'] = trailingAmount
3550
- elif stopPrice is not None:
3549
+ elif triggerPrice is not None:
3551
3550
  # request['price'] is taken for stop orders
3552
- request['price'] = self.price_to_precision(symbol, stopPrice)
3551
+ request['price'] = self.price_to_precision(symbol, triggerPrice)
3553
3552
  if type == 'limit':
3554
3553
  request['price_aux_limit'] = self.price_to_precision(symbol, price)
3555
3554
  postOnly = (postOnlyParam or (timeInForce == 'PO'))
3556
- if (type != 'market') and (stopPrice is None):
3555
+ if (type != 'market') and (triggerPrice is None):
3557
3556
  request['price'] = self.price_to_precision(symbol, price)
3558
3557
  # flag values may be summed to combine flags
3559
3558
  flags = 0
@@ -1248,7 +1248,6 @@ class bitfinex1(Exchange, ImplicitAPI):
1248
1248
  'postOnly': None,
1249
1249
  'side': side,
1250
1250
  'price': self.safe_string(order, 'price'),
1251
- 'stopPrice': None,
1252
1251
  'triggerPrice': None,
1253
1252
  'average': self.safe_string(order, 'avg_execution_price'),
1254
1253
  'amount': self.safe_string(order, 'original_amount'),
@@ -638,7 +638,6 @@ class bitflyer(Exchange, ImplicitAPI):
638
638
  'postOnly': None,
639
639
  'side': side,
640
640
  'price': price,
641
- 'stopPrice': None,
642
641
  'triggerPrice': None,
643
642
  'cost': None,
644
643
  'amount': amount,
@@ -4103,7 +4103,6 @@ class bitget(Exchange, ImplicitAPI):
4103
4103
  'timeInForce': timeInForce,
4104
4104
  'postOnly': postOnly,
4105
4105
  'reduceOnly': reduceOnly,
4106
- 'stopPrice': self.safe_number(order, 'triggerPrice'),
4107
4106
  'triggerPrice': self.safe_number(order, 'triggerPrice'),
4108
4107
  'takeProfitPrice': self.safe_number_2(order, 'presetStopSurplusPrice', 'stopSurplusTriggerPrice'),
4109
4108
  'stopLossPrice': self.safe_number_2(order, 'presetStopLossPrice', 'stopLossTriggerPrice'),
@@ -5713,7 +5712,7 @@ class bitget(Exchange, ImplicitAPI):
5713
5712
  :param str [params.symbol]: *contract only* unified market symbol
5714
5713
  :param str [params.productType]: *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
5715
5714
  :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)
5716
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
5715
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
5717
5716
  """
5718
5717
  await self.load_markets()
5719
5718
  symbol = self.safe_string(params, 'symbol')
@@ -906,7 +906,6 @@ class bithumb(Exchange, ImplicitAPI):
906
906
  'postOnly': None,
907
907
  'side': side,
908
908
  'price': price,
909
- 'stopPrice': None,
910
909
  'triggerPrice': None,
911
910
  'amount': amount,
912
911
  'cost': None,
@@ -2482,7 +2482,6 @@ class bitmart(Exchange, ImplicitAPI):
2482
2482
  'postOnly': postOnly,
2483
2483
  'side': self.parse_order_side(self.safe_string(order, 'side')),
2484
2484
  'price': self.omit_zero(priceString),
2485
- 'stopPrice': trailingActivationPrice,
2486
2485
  'triggerPrice': trailingActivationPrice,
2487
2486
  'amount': self.omit_zero(self.safe_string(order, 'size')),
2488
2487
  'cost': self.safe_string_2(order, 'filled_notional', 'filledNotional'),
@@ -2890,7 +2889,7 @@ class bitmart(Exchange, ImplicitAPI):
2890
2889
  :param str symbol: unified symbol of the market the order was made in
2891
2890
  :param dict [params]: extra parameters specific to the exchange API endpoint
2892
2891
  :param str [params.clientOrderId]: *spot only* the client order id of the order to cancel
2893
- :param boolean [params.stop]: *swap only* whether the order is a stop order
2892
+ :param boolean [params.trigger]: *swap only* whether the order is a trigger order
2894
2893
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2895
2894
  """
2896
2895
  if symbol is None:
@@ -2910,9 +2909,9 @@ class bitmart(Exchange, ImplicitAPI):
2910
2909
  if market['spot']:
2911
2910
  response = await self.privatePostSpotV3CancelOrder(self.extend(request, params))
2912
2911
  else:
2913
- stop = self.safe_bool_2(params, 'stop', 'trigger')
2912
+ trigger = self.safe_bool_2(params, 'stop', 'trigger')
2914
2913
  params = self.omit(params, ['stop', 'trigger'])
2915
- if not stop:
2914
+ if not trigger:
2916
2915
  response = await self.privatePostContractPrivateCancelOrder(self.extend(request, params))
2917
2916
  else:
2918
2917
  response = await self.privatePostContractPrivateCancelPlanOrder(self.extend(request, params))
@@ -1277,7 +1277,7 @@ class bitmex(Exchange, ImplicitAPI):
1277
1277
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
1278
1278
  :param int [limit]: max number of ledger entries to return, default is None
1279
1279
  :param dict [params]: extra parameters specific to the exchange API endpoint
1280
- :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
1280
+ :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
1281
1281
  """
1282
1282
  await self.load_markets()
1283
1283
  request: dict = {
@@ -1807,7 +1807,7 @@ class bitmex(Exchange, ImplicitAPI):
1807
1807
  if execInst is not None:
1808
1808
  postOnly = (execInst == 'ParticipateDoNotInitiate')
1809
1809
  timestamp = self.parse8601(self.safe_string(order, 'timestamp'))
1810
- stopPrice = self.safe_number(order, 'stopPx')
1810
+ triggerPrice = self.safe_number(order, 'stopPx')
1811
1811
  remaining = self.safe_string(order, 'leavesQty')
1812
1812
  return self.safe_order({
1813
1813
  'info': order,
@@ -1822,8 +1822,7 @@ class bitmex(Exchange, ImplicitAPI):
1822
1822
  'postOnly': postOnly,
1823
1823
  'side': self.safe_string_lower(order, 'side'),
1824
1824
  'price': self.safe_string(order, 'price'),
1825
- 'stopPrice': stopPrice,
1826
- 'triggerPrice': stopPrice,
1825
+ 'triggerPrice': triggerPrice,
1827
1826
  'amount': amount,
1828
1827
  'cost': cost,
1829
1828
  'average': average,
@@ -1961,7 +1960,7 @@ class bitmex(Exchange, ImplicitAPI):
1961
1960
  else:
1962
1961
  if triggerPrice is None:
1963
1962
  # if exchange specific trigger types were provided
1964
- raise ArgumentsRequired(self.id + ' createOrder() requires a triggerPrice(stopPx|stopPrice) parameter for the ' + orderType + ' order type')
1963
+ raise ArgumentsRequired(self.id + ' createOrder() requires a triggerPrice parameter for the ' + orderType + ' order type')
1965
1964
  request['stopPx'] = self.parse_to_numeric(self.price_to_precision(symbol, triggerPrice))
1966
1965
  request['ordType'] = orderType
1967
1966
  params = self.omit(params, ['triggerPrice', 'stopPrice', 'stopPx', 'triggerDirection', 'trailingAmount'])
@@ -2523,7 +2522,7 @@ class bitmex(Exchange, ImplicitAPI):
2523
2522
  'timestamp': self.parse8601(datetime),
2524
2523
  'datetime': datetime,
2525
2524
  'fundingRate': self.safe_number(contract, 'fundingRate'),
2526
- 'fundingTimestamp': self.parse_to_numeric(self.iso8601(fundingDatetime)),
2525
+ 'fundingTimestamp': self.parse8601(fundingDatetime),
2527
2526
  'fundingDatetime': fundingDatetime,
2528
2527
  'nextFundingRate': self.safe_number(contract, 'indicativeFundingRate'),
2529
2528
  'nextFundingTimestamp': None,
@@ -964,7 +964,6 @@ class bitopro(Exchange, ImplicitAPI):
964
964
  'postOnly': postOnly,
965
965
  'side': side,
966
966
  'price': price,
967
- 'stopPrice': None,
968
967
  'triggerPrice': None,
969
968
  'amount': amount,
970
969
  'cost': None,
@@ -1006,12 +1005,12 @@ class bitopro(Exchange, ImplicitAPI):
1006
1005
  request['price'] = self.price_to_precision(symbol, price)
1007
1006
  if orderType == 'STOP_LIMIT':
1008
1007
  request['price'] = self.price_to_precision(symbol, price)
1009
- stopPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
1008
+ triggerPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
1010
1009
  params = self.omit(params, ['triggerPrice', 'stopPrice'])
1011
- if stopPrice is None:
1012
- raise InvalidOrder(self.id + ' createOrder() requires a stopPrice parameter for ' + orderType + ' orders')
1010
+ if triggerPrice is None:
1011
+ raise InvalidOrder(self.id + ' createOrder() requires a triggerPrice parameter for ' + orderType + ' orders')
1013
1012
  else:
1014
- request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
1013
+ request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
1015
1014
  condition = self.safe_string(params, 'condition')
1016
1015
  if condition is None:
1017
1016
  raise InvalidOrder(self.id + ' createOrder() requires a condition parameter for ' + orderType + ' orders')
@@ -1778,8 +1778,7 @@ class bitrue(Exchange, ImplicitAPI):
1778
1778
  postOnly = (type == 'limit_maker') or (timeInForce == 'GTX') or (type == 'post_only')
1779
1779
  if type == 'limit_maker':
1780
1780
  type = 'limit'
1781
- stopPriceString = self.safe_string(order, 'stopPrice')
1782
- stopPrice = self.parse_number(self.omit_zero(stopPriceString))
1781
+ triggerPrice = self.parse_number(self.omit_zero(self.safe_string(order, 'stopPrice')))
1783
1782
  return self.safe_order({
1784
1783
  'info': order,
1785
1784
  'id': id,
@@ -1793,8 +1792,7 @@ class bitrue(Exchange, ImplicitAPI):
1793
1792
  'postOnly': postOnly,
1794
1793
  'side': side,
1795
1794
  'price': price,
1796
- 'stopPrice': stopPrice,
1797
- 'triggerPrice': stopPrice,
1795
+ 'triggerPrice': triggerPrice,
1798
1796
  'amount': amount,
1799
1797
  'cost': cost,
1800
1798
  'average': average,
@@ -1917,10 +1915,10 @@ class bitrue(Exchange, ImplicitAPI):
1917
1915
  if clientOrderId is not None:
1918
1916
  params = self.omit(params, ['newClientOrderId', 'clientOrderId'])
1919
1917
  request['newClientOrderId'] = clientOrderId
1920
- stopPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
1921
- if stopPrice is not None:
1918
+ triggerPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
1919
+ if triggerPrice is not None:
1922
1920
  params = self.omit(params, ['triggerPrice', 'stopPrice'])
1923
- request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
1921
+ request['stopPrice'] = self.price_to_precision(symbol, triggerPrice)
1924
1922
  response = await self.spotV1PrivatePostOrder(self.extend(request, params))
1925
1923
  data = response
1926
1924
  else: