ccxt 4.4.11__py2.py3-none-any.whl → 4.4.12__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 CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.4.11'
25
+ __version__ = '4.4.12'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.11'
7
+ __version__ = '4.4.12'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.11'
5
+ __version__ = '4.4.12'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -5596,6 +5596,8 @@ class binance(Exchange, ImplicitAPI):
5596
5596
  :param float [params.takeProfitPrice]: the price that a take profit order is triggered at
5597
5597
  :param boolean [params.portfolioMargin]: set to True if you would like to create an order in a portfolio margin account
5598
5598
  :param str [params.stopLossOrTakeProfit]: 'stopLoss' or 'takeProfit', required for spot trailing orders
5599
+ :param str [params.positionSide]: *swap and portfolio margin only* "BOTH" for one-way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode
5600
+ :param bool [params.hedged]: *swap and portfolio margin only* True for hedged mode, False for one way mode, default is False
5599
5601
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
5600
5602
  """
5601
5603
  await self.load_markets()
@@ -5681,9 +5683,9 @@ class binance(Exchange, ImplicitAPI):
5681
5683
  isPortfolioMargin, params = self.handle_option_and_params_2(params, 'createOrder', 'papi', 'portfolioMargin', False)
5682
5684
  marginMode = None
5683
5685
  marginMode, params = self.handle_margin_mode_and_params('createOrder', params)
5686
+ reduceOnly = self.safe_bool(params, 'reduceOnly', False)
5684
5687
  if (marketType == 'margin') or (marginMode is not None) or market['option']:
5685
5688
  # for swap and future reduceOnly is a string that cant be sent with close position set to True or in hedge mode
5686
- reduceOnly = self.safe_bool(params, 'reduceOnly', False)
5687
5689
  params = self.omit(params, 'reduceOnly')
5688
5690
  if market['option']:
5689
5691
  request['reduceOnly'] = reduceOnly
@@ -5884,7 +5886,13 @@ class binance(Exchange, ImplicitAPI):
5884
5886
  # remove timeInForce from params because PO is only used by self.is_post_only and it's not a valid value for Binance
5885
5887
  if self.safe_string(params, 'timeInForce') == 'PO':
5886
5888
  params = self.omit(params, 'timeInForce')
5887
- requestParams = self.omit(params, ['type', 'newClientOrderId', 'clientOrderId', 'postOnly', 'stopLossPrice', 'takeProfitPrice', 'stopPrice', 'triggerPrice', 'trailingTriggerPrice', 'trailingPercent', 'quoteOrderQty', 'cost', 'test'])
5889
+ hedged = self.safe_bool(params, 'hedged', False)
5890
+ if not market['spot'] and not market['option'] and hedged:
5891
+ if reduceOnly:
5892
+ params = self.omit(params, 'reduceOnly')
5893
+ side = 'sell' if (side == 'buy') else 'buy'
5894
+ request['positionSide'] = 'LONG' if (side == 'buy') else 'SHORT'
5895
+ requestParams = self.omit(params, ['type', 'newClientOrderId', 'clientOrderId', 'postOnly', 'stopLossPrice', 'takeProfitPrice', 'stopPrice', 'triggerPrice', 'trailingTriggerPrice', 'trailingPercent', 'quoteOrderQty', 'cost', 'test', 'hedged'])
5888
5896
  return self.extend(request, requestParams)
5889
5897
 
5890
5898
  async def create_market_order_with_cost(self, symbol: str, side: OrderSide, cost: float, params={}):
@@ -2458,6 +2458,7 @@ class bingx(Exchange, ImplicitAPI):
2458
2458
  :param dict [params.stopLoss]: *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
2459
2459
  :param float [params.stopLoss.triggerPrice]: stop loss trigger price
2460
2460
  :param boolean [params.test]: *swap only* whether to use the test endpoint or not, default is False
2461
+ :param str [params.positionSide]: *contracts only* "BOTH" for one way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode
2461
2462
  :param boolean [params.hedged]: *swap only* whether the order is in hedged mode or one way mode
2462
2463
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2463
2464
  """
@@ -4184,13 +4185,25 @@ class bingx(Exchange, ImplicitAPI):
4184
4185
  currencyId = self.safe_string(depositAddress, 'coin')
4185
4186
  currency = self.safe_currency(currencyId, currency)
4186
4187
  code = currency['code']
4187
- network = self.safe_string(depositAddress, 'network')
4188
+ # the exchange API returns deposit addresses without the leading '0x' prefix
4189
+ # however, the exchange API does require the 0x prefix to withdraw
4190
+ # so we append the prefix before returning the address to the user
4191
+ # that is only if the underlying contract address has the 0x prefix
4192
+ networkCode = self.safe_string(depositAddress, 'network')
4193
+ if networkCode is not None:
4194
+ if networkCode in currency['networks']:
4195
+ network = currency['networks'][networkCode]
4196
+ contractAddress = self.safe_string(network['info'], 'contractAddress')
4197
+ if contractAddress is not None:
4198
+ if contractAddress[0] == '0' and contractAddress[1] == 'x':
4199
+ if address[0] != '0' or address[1] != 'x':
4200
+ address = '0x' + address
4188
4201
  self.check_address(address)
4189
4202
  return {
4190
4203
  'currency': code,
4191
4204
  'address': address,
4192
4205
  'tag': tag,
4193
- 'network': network,
4206
+ 'network': networkCode,
4194
4207
  'info': depositAddress,
4195
4208
  }
4196
4209
 
@@ -3948,6 +3948,7 @@ class bitget(Exchange, ImplicitAPI):
3948
3948
  :param str [params.trailingTriggerPrice]: *swap and future only* the price to trigger a trailing stop order, default uses the price argument
3949
3949
  :param str [params.triggerType]: *swap and future only* 'fill_price', 'mark_price' or 'index_price'
3950
3950
  :param boolean [params.oneWayMode]: *swap and future only* required to set self to True in one_way_mode and you can leave self in hedge_mode, can adjust the mode using the setPositionMode() method
3951
+ :param bool [params.hedged]: *swap and future only* True for hedged mode, False for one way mode, default is False
3951
3952
  :param bool [params.reduceOnly]: True or False whether the order is reduce-only
3952
3953
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
3953
3954
  """
@@ -3431,7 +3431,8 @@ class bybit(Exchange, ImplicitAPI):
3431
3431
  :param str [params.timeInForce]: "GTC", "IOC", "FOK"
3432
3432
  :param bool [params.postOnly]: True or False whether the order is post-only
3433
3433
  :param bool [params.reduceOnly]: True or False whether the order is reduce-only
3434
- :param str [params.positionIdx]: *contracts only* 0 for one-way mode, 1 buy side of hedged mode, 2 sell side of hedged mode
3434
+ :param str [params.positionIdx]: *contracts only* 0 for one-way mode, 1 buy side of hedged mode, 2 sell side of hedged mode
3435
+ :param bool [params.hedged]: *contracts only* True for hedged mode, False for one way mode, default is False
3435
3436
  :param boolean [params.isLeverage]: *unified spot only* False then spot trading True then margin trading
3436
3437
  :param str [params.tpslMode]: *contract only* 'full' or 'partial'
3437
3438
  :param str [params.mmp]: *option only* market maker protection
ccxt/async_support/htx.py CHANGED
@@ -3482,6 +3482,12 @@ class htx(Exchange, ImplicitAPI):
3482
3482
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
3483
3483
  """
3484
3484
  fetches information on an order made by the user
3485
+ :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order-based-on-client-order-id
3486
+ :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order
3487
+ :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-information-of-an-order
3488
+ :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-information-of-order
3489
+ :see: https://huobiapi.github.io/docs/dm/v1/en/#get-information-of-an-order
3490
+ :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-information-of-an-order
3485
3491
  :param str symbol: unified symbol of the market the order was made in
3486
3492
  :param dict [params]: extra parameters specific to the exchange API endpoint
3487
3493
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -1740,7 +1740,7 @@ class kraken(Exchange, ImplicitAPI):
1740
1740
  request['volume'] = self.cost_to_precision(symbol, cost)
1741
1741
  extendedOflags = flags + ',viqc' if (flags is not None) else 'viqc'
1742
1742
  request['oflags'] = extendedOflags
1743
- elif isLimitOrder and not isTrailingAmountOrder:
1743
+ elif isLimitOrder and not isTrailingAmountOrder and not isTrailingPercentOrder:
1744
1744
  request['price'] = self.price_to_precision(symbol, price)
1745
1745
  reduceOnly = self.safe_bool_2(params, 'reduceOnly', 'reduce_only')
1746
1746
  if isStopLossOrTakeProfitTrigger:
@@ -1760,8 +1760,8 @@ class kraken(Exchange, ImplicitAPI):
1760
1760
  request['price2'] = self.price_to_precision(symbol, price)
1761
1761
  elif isTrailingAmountOrder or isTrailingPercentOrder:
1762
1762
  trailingPercentString = None
1763
- if isTrailingPercentOrder:
1764
- trailingPercentString = trailingPercent if (trailingPercent.endswith('%')) else '+' + (self.number_to_string(trailingPercent) + '%')
1763
+ if trailingPercent is not None:
1764
+ trailingPercentString = ('+' + trailingPercent) if (trailingPercent.endswith('%')) else ('+' + trailingPercent + '%')
1765
1765
  trailingAmountString = '+' + trailingAmount if (trailingAmount is not None) else None # must use + for self
1766
1766
  offset = self.safe_string(params, 'offset', '-') # can use + or - for self
1767
1767
  trailingLimitAmountString = offset + self.number_to_string(trailingLimitAmount) if (trailingLimitAmount is not None) else None
@@ -1770,7 +1770,7 @@ class kraken(Exchange, ImplicitAPI):
1770
1770
  if isLimitOrder or (trailingLimitAmount is not None) or (trailingLimitPercent is not None):
1771
1771
  request['ordertype'] = 'trailing-stop-limit'
1772
1772
  if trailingLimitPercent is not None:
1773
- trailingLimitPercentString = trailingLimitPercent if (trailingLimitPercent.endswith('%')) else (self.number_to_string(trailingLimitPercent) + '%')
1773
+ trailingLimitPercentString = (offset + trailingLimitPercent) if (trailingLimitPercent.endswith('%')) else (offset + trailingLimitPercent + '%')
1774
1774
  request['price'] = trailingPercentString
1775
1775
  request['price2'] = trailingLimitPercentString
1776
1776
  elif trailingLimitAmount is not None:
@@ -2055,6 +2055,7 @@ class mexc(Exchange, ImplicitAPI):
2055
2055
  :param float [params.triggerPrice]: The price at which a trigger order is triggered at
2056
2056
  :param bool [params.postOnly]: if True, the order will only be posted if it will be a maker order
2057
2057
  :param bool [params.reduceOnly]: *contract only* indicates if self order is to reduce the size of a position
2058
+ :param bool [params.hedged]: *swap only* True for hedged mode, False for one way mode, default is False
2058
2059
  *
2059
2060
  * EXCHANGE SPECIFIC PARAMETERS
2060
2061
  :param int [params.leverage]: *contract only* leverage is necessary on isolated margin
@@ -2180,6 +2181,7 @@ class mexc(Exchange, ImplicitAPI):
2180
2181
  :param float [params.triggerPrice]: The price at which a trigger order is triggered at
2181
2182
  :param bool [params.postOnly]: if True, the order will only be posted if it will be a maker order
2182
2183
  :param bool [params.reduceOnly]: indicates if self order is to reduce the size of a position
2184
+ :param bool [params.hedged]: *swap only* True for hedged mode, False for one way mode, default is False
2183
2185
  *
2184
2186
  * EXCHANGE SPECIFIC PARAMETERS
2185
2187
  :param int [params.leverage]: leverage is necessary on isolated margin
@@ -2247,15 +2249,25 @@ class mexc(Exchange, ImplicitAPI):
2247
2249
  if leverage is None:
2248
2250
  raise ArgumentsRequired(self.id + ' createSwapOrder() requires a leverage parameter for isolated margin orders')
2249
2251
  reduceOnly = self.safe_bool(params, 'reduceOnly', False)
2250
- if reduceOnly:
2251
- request['side'] = 2 if (side == 'buy') else 4
2252
+ hedged = self.safe_bool(params, 'hedged', False)
2253
+ sideInteger = None
2254
+ if hedged:
2255
+ if reduceOnly:
2256
+ params = self.omit(params, 'reduceOnly') # hedged mode does not accept self parameter
2257
+ side = 'sell' if (side == 'buy') else 'buy'
2258
+ sideInteger = 1 if (side == 'buy') else 3
2259
+ request['positionMode'] = 1
2252
2260
  else:
2253
- request['side'] = 1 if (side == 'buy') else 3
2261
+ if reduceOnly:
2262
+ sideInteger = 2 if (side == 'buy') else 4
2263
+ else:
2264
+ sideInteger = 1 if (side == 'buy') else 3
2265
+ request['side'] = sideInteger
2254
2266
  clientOrderId = self.safe_string_2(params, 'clientOrderId', 'externalOid')
2255
2267
  if clientOrderId is not None:
2256
2268
  request['externalOid'] = clientOrderId
2257
2269
  stopPrice = self.safe_number_2(params, 'triggerPrice', 'stopPrice')
2258
- params = self.omit(params, ['clientOrderId', 'externalOid', 'postOnly', 'stopPrice', 'triggerPrice'])
2270
+ params = self.omit(params, ['clientOrderId', 'externalOid', 'postOnly', 'stopPrice', 'triggerPrice', 'hedged'])
2259
2271
  response = None
2260
2272
  if stopPrice:
2261
2273
  request['triggerPrice'] = self.price_to_precision(symbol, stopPrice)
ccxt/async_support/okx.py CHANGED
@@ -2795,7 +2795,7 @@ class okx(Exchange, ImplicitAPI):
2795
2795
  :param str [params.positionSide]: if position mode is one-way: set to 'net', if position mode is hedge-mode: set to 'long' or 'short'
2796
2796
  :param str [params.trailingPercent]: the percent to trail away from the current market price
2797
2797
  :param str [params.tpOrdKind]: 'condition' or 'limit', the default is 'condition'
2798
- :param str [params.hedged]: True/false, to automatically set exchange-specific params needed when trading in hedge mode
2798
+ :param bool [params.hedged]: *swap and future only* True for hedged mode, False for one way mode
2799
2799
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2800
2800
  """
2801
2801
  await self.load_markets()
@@ -4528,32 +4528,27 @@ class okx(Exchange, ImplicitAPI):
4528
4528
  :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
4529
4529
  :param str code: unified currency code
4530
4530
  :param dict [params]: extra parameters specific to the exchange API endpoint
4531
+ :param str [params.network]: the network name for the deposit address
4531
4532
  :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
4532
4533
  """
4534
+ await self.load_markets()
4533
4535
  rawNetwork = self.safe_string_upper(params, 'network')
4534
- networks = self.safe_value(self.options, 'networks', {})
4535
- network = self.safe_string(networks, rawNetwork, rawNetwork)
4536
4536
  params = self.omit(params, 'network')
4537
+ code = self.safe_currency_code(code)
4538
+ network = self.network_id_to_code(rawNetwork, code)
4537
4539
  response = await self.fetch_deposit_addresses_by_network(code, params)
4538
- result = None
4539
- if network is None:
4540
- result = self.safe_value(response, code)
4540
+ if network is not None:
4541
+ result = self.safe_dict(response, network)
4541
4542
  if result is None:
4542
- alias = self.safe_string(networks, code, code)
4543
- result = self.safe_value(response, alias)
4544
- if result is None:
4545
- defaultNetwork = self.safe_string(self.options, 'defaultNetwork', 'ERC20')
4546
- result = self.safe_value(response, defaultNetwork)
4547
- if result is None:
4548
- values = list(response.values())
4549
- result = self.safe_value(values, 0)
4550
- if result is None:
4551
- raise InvalidAddress(self.id + ' fetchDepositAddress() cannot find deposit address for ' + code)
4543
+ raise InvalidAddress(self.id + ' fetchDepositAddress() cannot find ' + network + ' deposit address for ' + code)
4552
4544
  return result
4553
- result = self.safe_value(response, network)
4554
- if result is None:
4555
- raise InvalidAddress(self.id + ' fetchDepositAddress() cannot find ' + network + ' deposit address for ' + code)
4556
- return result
4545
+ codeNetwork = self.network_id_to_code(code, code)
4546
+ if codeNetwork in response:
4547
+ return response[codeNetwork]
4548
+ # if the network is not specified, return the first address
4549
+ keys = list(response.keys())
4550
+ first = self.safe_string(keys, 0)
4551
+ return self.safe_dict(response, first)
4557
4552
 
4558
4553
  async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
4559
4554
  """
@@ -2402,6 +2402,8 @@ class phemex(Exchange, ImplicitAPI):
2402
2402
  :param float [params.takeProfit.triggerPrice]: take profit trigger price
2403
2403
  :param dict [params.stopLoss]: *swap only* *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered(perpetual swap markets only)
2404
2404
  :param float [params.stopLoss.triggerPrice]: stop loss trigger price
2405
+ :param str [params.posSide]: *swap only* "Merged" for one way mode, "Long" for buy side of hedged mode, "Short" for sell side of hedged mode
2406
+ :param bool [params.hedged]: *swap only* True for hedged mode, False for one way mode, default is False
2405
2407
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2406
2408
  """
2407
2409
  await self.load_markets()
@@ -2486,13 +2488,18 @@ class phemex(Exchange, ImplicitAPI):
2486
2488
  amountString = self.number_to_string(amount)
2487
2489
  request['baseQtyEv'] = self.to_ev(amountString, market)
2488
2490
  elif market['swap']:
2491
+ hedged = self.safe_bool(params, 'hedged', False)
2492
+ params = self.omit(params, 'hedged')
2489
2493
  posSide = self.safe_string_lower(params, 'posSide')
2490
2494
  if posSide is None:
2491
- posSide = 'Merged'
2495
+ if hedged:
2496
+ if reduceOnly:
2497
+ side = 'sell' if (side == 'buy') else 'buy'
2498
+ posSide = 'Long' if (side == 'buy') else 'Short'
2499
+ else:
2500
+ posSide = 'Merged'
2492
2501
  posSide = self.capitalize(posSide)
2493
2502
  request['posSide'] = posSide
2494
- if reduceOnly is not None:
2495
- request['reduceOnly'] = reduceOnly
2496
2503
  if market['settle'] == 'USDT':
2497
2504
  request['orderQtyRq'] = amount
2498
2505
  else:
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.11'
7
+ __version__ = '4.4.12'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/binance.py CHANGED
@@ -5595,6 +5595,8 @@ class binance(Exchange, ImplicitAPI):
5595
5595
  :param float [params.takeProfitPrice]: the price that a take profit order is triggered at
5596
5596
  :param boolean [params.portfolioMargin]: set to True if you would like to create an order in a portfolio margin account
5597
5597
  :param str [params.stopLossOrTakeProfit]: 'stopLoss' or 'takeProfit', required for spot trailing orders
5598
+ :param str [params.positionSide]: *swap and portfolio margin only* "BOTH" for one-way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode
5599
+ :param bool [params.hedged]: *swap and portfolio margin only* True for hedged mode, False for one way mode, default is False
5598
5600
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
5599
5601
  """
5600
5602
  self.load_markets()
@@ -5680,9 +5682,9 @@ class binance(Exchange, ImplicitAPI):
5680
5682
  isPortfolioMargin, params = self.handle_option_and_params_2(params, 'createOrder', 'papi', 'portfolioMargin', False)
5681
5683
  marginMode = None
5682
5684
  marginMode, params = self.handle_margin_mode_and_params('createOrder', params)
5685
+ reduceOnly = self.safe_bool(params, 'reduceOnly', False)
5683
5686
  if (marketType == 'margin') or (marginMode is not None) or market['option']:
5684
5687
  # for swap and future reduceOnly is a string that cant be sent with close position set to True or in hedge mode
5685
- reduceOnly = self.safe_bool(params, 'reduceOnly', False)
5686
5688
  params = self.omit(params, 'reduceOnly')
5687
5689
  if market['option']:
5688
5690
  request['reduceOnly'] = reduceOnly
@@ -5883,7 +5885,13 @@ class binance(Exchange, ImplicitAPI):
5883
5885
  # remove timeInForce from params because PO is only used by self.is_post_only and it's not a valid value for Binance
5884
5886
  if self.safe_string(params, 'timeInForce') == 'PO':
5885
5887
  params = self.omit(params, 'timeInForce')
5886
- requestParams = self.omit(params, ['type', 'newClientOrderId', 'clientOrderId', 'postOnly', 'stopLossPrice', 'takeProfitPrice', 'stopPrice', 'triggerPrice', 'trailingTriggerPrice', 'trailingPercent', 'quoteOrderQty', 'cost', 'test'])
5888
+ hedged = self.safe_bool(params, 'hedged', False)
5889
+ if not market['spot'] and not market['option'] and hedged:
5890
+ if reduceOnly:
5891
+ params = self.omit(params, 'reduceOnly')
5892
+ side = 'sell' if (side == 'buy') else 'buy'
5893
+ request['positionSide'] = 'LONG' if (side == 'buy') else 'SHORT'
5894
+ requestParams = self.omit(params, ['type', 'newClientOrderId', 'clientOrderId', 'postOnly', 'stopLossPrice', 'takeProfitPrice', 'stopPrice', 'triggerPrice', 'trailingTriggerPrice', 'trailingPercent', 'quoteOrderQty', 'cost', 'test', 'hedged'])
5887
5895
  return self.extend(request, requestParams)
5888
5896
 
5889
5897
  def create_market_order_with_cost(self, symbol: str, side: OrderSide, cost: float, params={}):
ccxt/bingx.py CHANGED
@@ -2457,6 +2457,7 @@ class bingx(Exchange, ImplicitAPI):
2457
2457
  :param dict [params.stopLoss]: *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
2458
2458
  :param float [params.stopLoss.triggerPrice]: stop loss trigger price
2459
2459
  :param boolean [params.test]: *swap only* whether to use the test endpoint or not, default is False
2460
+ :param str [params.positionSide]: *contracts only* "BOTH" for one way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode
2460
2461
  :param boolean [params.hedged]: *swap only* whether the order is in hedged mode or one way mode
2461
2462
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2462
2463
  """
@@ -4183,13 +4184,25 @@ class bingx(Exchange, ImplicitAPI):
4183
4184
  currencyId = self.safe_string(depositAddress, 'coin')
4184
4185
  currency = self.safe_currency(currencyId, currency)
4185
4186
  code = currency['code']
4186
- network = self.safe_string(depositAddress, 'network')
4187
+ # the exchange API returns deposit addresses without the leading '0x' prefix
4188
+ # however, the exchange API does require the 0x prefix to withdraw
4189
+ # so we append the prefix before returning the address to the user
4190
+ # that is only if the underlying contract address has the 0x prefix
4191
+ networkCode = self.safe_string(depositAddress, 'network')
4192
+ if networkCode is not None:
4193
+ if networkCode in currency['networks']:
4194
+ network = currency['networks'][networkCode]
4195
+ contractAddress = self.safe_string(network['info'], 'contractAddress')
4196
+ if contractAddress is not None:
4197
+ if contractAddress[0] == '0' and contractAddress[1] == 'x':
4198
+ if address[0] != '0' or address[1] != 'x':
4199
+ address = '0x' + address
4187
4200
  self.check_address(address)
4188
4201
  return {
4189
4202
  'currency': code,
4190
4203
  'address': address,
4191
4204
  'tag': tag,
4192
- 'network': network,
4205
+ 'network': networkCode,
4193
4206
  'info': depositAddress,
4194
4207
  }
4195
4208
 
ccxt/bitget.py CHANGED
@@ -3947,6 +3947,7 @@ class bitget(Exchange, ImplicitAPI):
3947
3947
  :param str [params.trailingTriggerPrice]: *swap and future only* the price to trigger a trailing stop order, default uses the price argument
3948
3948
  :param str [params.triggerType]: *swap and future only* 'fill_price', 'mark_price' or 'index_price'
3949
3949
  :param boolean [params.oneWayMode]: *swap and future only* required to set self to True in one_way_mode and you can leave self in hedge_mode, can adjust the mode using the setPositionMode() method
3950
+ :param bool [params.hedged]: *swap and future only* True for hedged mode, False for one way mode, default is False
3950
3951
  :param bool [params.reduceOnly]: True or False whether the order is reduce-only
3951
3952
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
3952
3953
  """
ccxt/bybit.py CHANGED
@@ -3430,7 +3430,8 @@ class bybit(Exchange, ImplicitAPI):
3430
3430
  :param str [params.timeInForce]: "GTC", "IOC", "FOK"
3431
3431
  :param bool [params.postOnly]: True or False whether the order is post-only
3432
3432
  :param bool [params.reduceOnly]: True or False whether the order is reduce-only
3433
- :param str [params.positionIdx]: *contracts only* 0 for one-way mode, 1 buy side of hedged mode, 2 sell side of hedged mode
3433
+ :param str [params.positionIdx]: *contracts only* 0 for one-way mode, 1 buy side of hedged mode, 2 sell side of hedged mode
3434
+ :param bool [params.hedged]: *contracts only* True for hedged mode, False for one way mode, default is False
3434
3435
  :param boolean [params.isLeverage]: *unified spot only* False then spot trading True then margin trading
3435
3436
  :param str [params.tpslMode]: *contract only* 'full' or 'partial'
3436
3437
  :param str [params.mmp]: *option only* market maker protection
ccxt/htx.py CHANGED
@@ -3481,6 +3481,12 @@ class htx(Exchange, ImplicitAPI):
3481
3481
  def fetch_order(self, id: str, symbol: Str = None, params={}):
3482
3482
  """
3483
3483
  fetches information on an order made by the user
3484
+ :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order-based-on-client-order-id
3485
+ :see: https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order
3486
+ :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-information-of-an-order
3487
+ :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-information-of-order
3488
+ :see: https://huobiapi.github.io/docs/dm/v1/en/#get-information-of-an-order
3489
+ :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-information-of-an-order
3484
3490
  :param str symbol: unified symbol of the market the order was made in
3485
3491
  :param dict [params]: extra parameters specific to the exchange API endpoint
3486
3492
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
ccxt/kraken.py CHANGED
@@ -1740,7 +1740,7 @@ class kraken(Exchange, ImplicitAPI):
1740
1740
  request['volume'] = self.cost_to_precision(symbol, cost)
1741
1741
  extendedOflags = flags + ',viqc' if (flags is not None) else 'viqc'
1742
1742
  request['oflags'] = extendedOflags
1743
- elif isLimitOrder and not isTrailingAmountOrder:
1743
+ elif isLimitOrder and not isTrailingAmountOrder and not isTrailingPercentOrder:
1744
1744
  request['price'] = self.price_to_precision(symbol, price)
1745
1745
  reduceOnly = self.safe_bool_2(params, 'reduceOnly', 'reduce_only')
1746
1746
  if isStopLossOrTakeProfitTrigger:
@@ -1760,8 +1760,8 @@ class kraken(Exchange, ImplicitAPI):
1760
1760
  request['price2'] = self.price_to_precision(symbol, price)
1761
1761
  elif isTrailingAmountOrder or isTrailingPercentOrder:
1762
1762
  trailingPercentString = None
1763
- if isTrailingPercentOrder:
1764
- trailingPercentString = trailingPercent if (trailingPercent.endswith('%')) else '+' + (self.number_to_string(trailingPercent) + '%')
1763
+ if trailingPercent is not None:
1764
+ trailingPercentString = ('+' + trailingPercent) if (trailingPercent.endswith('%')) else ('+' + trailingPercent + '%')
1765
1765
  trailingAmountString = '+' + trailingAmount if (trailingAmount is not None) else None # must use + for self
1766
1766
  offset = self.safe_string(params, 'offset', '-') # can use + or - for self
1767
1767
  trailingLimitAmountString = offset + self.number_to_string(trailingLimitAmount) if (trailingLimitAmount is not None) else None
@@ -1770,7 +1770,7 @@ class kraken(Exchange, ImplicitAPI):
1770
1770
  if isLimitOrder or (trailingLimitAmount is not None) or (trailingLimitPercent is not None):
1771
1771
  request['ordertype'] = 'trailing-stop-limit'
1772
1772
  if trailingLimitPercent is not None:
1773
- trailingLimitPercentString = trailingLimitPercent if (trailingLimitPercent.endswith('%')) else (self.number_to_string(trailingLimitPercent) + '%')
1773
+ trailingLimitPercentString = (offset + trailingLimitPercent) if (trailingLimitPercent.endswith('%')) else (offset + trailingLimitPercent + '%')
1774
1774
  request['price'] = trailingPercentString
1775
1775
  request['price2'] = trailingLimitPercentString
1776
1776
  elif trailingLimitAmount is not None:
ccxt/mexc.py CHANGED
@@ -2054,6 +2054,7 @@ class mexc(Exchange, ImplicitAPI):
2054
2054
  :param float [params.triggerPrice]: The price at which a trigger order is triggered at
2055
2055
  :param bool [params.postOnly]: if True, the order will only be posted if it will be a maker order
2056
2056
  :param bool [params.reduceOnly]: *contract only* indicates if self order is to reduce the size of a position
2057
+ :param bool [params.hedged]: *swap only* True for hedged mode, False for one way mode, default is False
2057
2058
  *
2058
2059
  * EXCHANGE SPECIFIC PARAMETERS
2059
2060
  :param int [params.leverage]: *contract only* leverage is necessary on isolated margin
@@ -2179,6 +2180,7 @@ class mexc(Exchange, ImplicitAPI):
2179
2180
  :param float [params.triggerPrice]: The price at which a trigger order is triggered at
2180
2181
  :param bool [params.postOnly]: if True, the order will only be posted if it will be a maker order
2181
2182
  :param bool [params.reduceOnly]: indicates if self order is to reduce the size of a position
2183
+ :param bool [params.hedged]: *swap only* True for hedged mode, False for one way mode, default is False
2182
2184
  *
2183
2185
  * EXCHANGE SPECIFIC PARAMETERS
2184
2186
  :param int [params.leverage]: leverage is necessary on isolated margin
@@ -2246,15 +2248,25 @@ class mexc(Exchange, ImplicitAPI):
2246
2248
  if leverage is None:
2247
2249
  raise ArgumentsRequired(self.id + ' createSwapOrder() requires a leverage parameter for isolated margin orders')
2248
2250
  reduceOnly = self.safe_bool(params, 'reduceOnly', False)
2249
- if reduceOnly:
2250
- request['side'] = 2 if (side == 'buy') else 4
2251
+ hedged = self.safe_bool(params, 'hedged', False)
2252
+ sideInteger = None
2253
+ if hedged:
2254
+ if reduceOnly:
2255
+ params = self.omit(params, 'reduceOnly') # hedged mode does not accept self parameter
2256
+ side = 'sell' if (side == 'buy') else 'buy'
2257
+ sideInteger = 1 if (side == 'buy') else 3
2258
+ request['positionMode'] = 1
2251
2259
  else:
2252
- request['side'] = 1 if (side == 'buy') else 3
2260
+ if reduceOnly:
2261
+ sideInteger = 2 if (side == 'buy') else 4
2262
+ else:
2263
+ sideInteger = 1 if (side == 'buy') else 3
2264
+ request['side'] = sideInteger
2253
2265
  clientOrderId = self.safe_string_2(params, 'clientOrderId', 'externalOid')
2254
2266
  if clientOrderId is not None:
2255
2267
  request['externalOid'] = clientOrderId
2256
2268
  stopPrice = self.safe_number_2(params, 'triggerPrice', 'stopPrice')
2257
- params = self.omit(params, ['clientOrderId', 'externalOid', 'postOnly', 'stopPrice', 'triggerPrice'])
2269
+ params = self.omit(params, ['clientOrderId', 'externalOid', 'postOnly', 'stopPrice', 'triggerPrice', 'hedged'])
2258
2270
  response = None
2259
2271
  if stopPrice:
2260
2272
  request['triggerPrice'] = self.price_to_precision(symbol, stopPrice)
ccxt/okx.py CHANGED
@@ -2794,7 +2794,7 @@ class okx(Exchange, ImplicitAPI):
2794
2794
  :param str [params.positionSide]: if position mode is one-way: set to 'net', if position mode is hedge-mode: set to 'long' or 'short'
2795
2795
  :param str [params.trailingPercent]: the percent to trail away from the current market price
2796
2796
  :param str [params.tpOrdKind]: 'condition' or 'limit', the default is 'condition'
2797
- :param str [params.hedged]: True/false, to automatically set exchange-specific params needed when trading in hedge mode
2797
+ :param bool [params.hedged]: *swap and future only* True for hedged mode, False for one way mode
2798
2798
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2799
2799
  """
2800
2800
  self.load_markets()
@@ -4527,32 +4527,27 @@ class okx(Exchange, ImplicitAPI):
4527
4527
  :see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
4528
4528
  :param str code: unified currency code
4529
4529
  :param dict [params]: extra parameters specific to the exchange API endpoint
4530
+ :param str [params.network]: the network name for the deposit address
4530
4531
  :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
4531
4532
  """
4533
+ self.load_markets()
4532
4534
  rawNetwork = self.safe_string_upper(params, 'network')
4533
- networks = self.safe_value(self.options, 'networks', {})
4534
- network = self.safe_string(networks, rawNetwork, rawNetwork)
4535
4535
  params = self.omit(params, 'network')
4536
+ code = self.safe_currency_code(code)
4537
+ network = self.network_id_to_code(rawNetwork, code)
4536
4538
  response = self.fetch_deposit_addresses_by_network(code, params)
4537
- result = None
4538
- if network is None:
4539
- result = self.safe_value(response, code)
4539
+ if network is not None:
4540
+ result = self.safe_dict(response, network)
4540
4541
  if result is None:
4541
- alias = self.safe_string(networks, code, code)
4542
- result = self.safe_value(response, alias)
4543
- if result is None:
4544
- defaultNetwork = self.safe_string(self.options, 'defaultNetwork', 'ERC20')
4545
- result = self.safe_value(response, defaultNetwork)
4546
- if result is None:
4547
- values = list(response.values())
4548
- result = self.safe_value(values, 0)
4549
- if result is None:
4550
- raise InvalidAddress(self.id + ' fetchDepositAddress() cannot find deposit address for ' + code)
4542
+ raise InvalidAddress(self.id + ' fetchDepositAddress() cannot find ' + network + ' deposit address for ' + code)
4551
4543
  return result
4552
- result = self.safe_value(response, network)
4553
- if result is None:
4554
- raise InvalidAddress(self.id + ' fetchDepositAddress() cannot find ' + network + ' deposit address for ' + code)
4555
- return result
4544
+ codeNetwork = self.network_id_to_code(code, code)
4545
+ if codeNetwork in response:
4546
+ return response[codeNetwork]
4547
+ # if the network is not specified, return the first address
4548
+ keys = list(response.keys())
4549
+ first = self.safe_string(keys, 0)
4550
+ return self.safe_dict(response, first)
4556
4551
 
4557
4552
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
4558
4553
  """
ccxt/phemex.py CHANGED
@@ -2402,6 +2402,8 @@ class phemex(Exchange, ImplicitAPI):
2402
2402
  :param float [params.takeProfit.triggerPrice]: take profit trigger price
2403
2403
  :param dict [params.stopLoss]: *swap only* *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered(perpetual swap markets only)
2404
2404
  :param float [params.stopLoss.triggerPrice]: stop loss trigger price
2405
+ :param str [params.posSide]: *swap only* "Merged" for one way mode, "Long" for buy side of hedged mode, "Short" for sell side of hedged mode
2406
+ :param bool [params.hedged]: *swap only* True for hedged mode, False for one way mode, default is False
2405
2407
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2406
2408
  """
2407
2409
  self.load_markets()
@@ -2486,13 +2488,18 @@ class phemex(Exchange, ImplicitAPI):
2486
2488
  amountString = self.number_to_string(amount)
2487
2489
  request['baseQtyEv'] = self.to_ev(amountString, market)
2488
2490
  elif market['swap']:
2491
+ hedged = self.safe_bool(params, 'hedged', False)
2492
+ params = self.omit(params, 'hedged')
2489
2493
  posSide = self.safe_string_lower(params, 'posSide')
2490
2494
  if posSide is None:
2491
- posSide = 'Merged'
2495
+ if hedged:
2496
+ if reduceOnly:
2497
+ side = 'sell' if (side == 'buy') else 'buy'
2498
+ posSide = 'Long' if (side == 'buy') else 'Short'
2499
+ else:
2500
+ posSide = 'Merged'
2492
2501
  posSide = self.capitalize(posSide)
2493
2502
  request['posSide'] = posSide
2494
- if reduceOnly is not None:
2495
- request['reduceOnly'] = reduceOnly
2496
2503
  if market['settle'] == 'USDT':
2497
2504
  request['orderQtyRq'] = amount
2498
2505
  else:
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.11'
7
+ __version__ = '4.4.12'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ccxt
3
- Version: 4.4.11
3
+ Version: 4.4.12
4
4
  Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges
5
5
  Home-page: https://ccxt.com
6
6
  Author: Igor Kroitor
@@ -272,13 +272,13 @@ console.log(version, Object.keys(exchanges));
272
272
 
273
273
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
274
274
 
275
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.11/dist/ccxt.browser.min.js
276
- * unpkg: https://unpkg.com/ccxt@4.4.11/dist/ccxt.browser.min.js
275
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.12/dist/ccxt.browser.min.js
276
+ * unpkg: https://unpkg.com/ccxt@4.4.12/dist/ccxt.browser.min.js
277
277
 
278
278
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
279
279
 
280
280
  ```HTML
281
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.11/dist/ccxt.browser.min.js"></script>
281
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.12/dist/ccxt.browser.min.js"></script>
282
282
  ```
283
283
 
284
284
  Creates a global `ccxt` object:
@@ -1,14 +1,14 @@
1
- ccxt/__init__.py,sha256=Gax7ltl-abmr5WE-fBwP-o4TICuEFP9YFkoyKoOuvZk,16486
1
+ ccxt/__init__.py,sha256=77RnCYK970kXTx905nM3HzbRQhZNnWJl2Vc9nipVtgg,16486
2
2
  ccxt/ace.py,sha256=3KFlbRm6N9hXsKUsgZbQCFPZT5WGLm4HOjR19Q3uPts,42419
3
3
  ccxt/alpaca.py,sha256=nVQJ8vG4JrjEvMlu_nPoyR2lBq41j9Z2smPq95nDhng,47504
4
4
  ccxt/ascendex.py,sha256=LIC9mnNkXzkxUWJDsgyDkL4gQUkzMHq5peHlD8EBKPw,151624
5
5
  ccxt/bequant.py,sha256=RBiAmaTbL35DgiV3Hl6uchLUd78V0z1T9riTlNsrpdc,1174
6
6
  ccxt/bigone.py,sha256=Gu9bXaa4rVRRVZEkUEKDWEUZ2Hjly22C6jrbseGv-r8,90980
7
- ccxt/binance.py,sha256=PWeiyyXaUij99E96WS3-47uSBYmibyRzskorlS4OlAQ,647761
7
+ ccxt/binance.py,sha256=FuatBHbjAD3xkb69gcESv5hddkMdwXgzz4cd22tsj78,648418
8
8
  ccxt/binancecoinm.py,sha256=arFnEh8mErSyi23eVPWE4iwoT7PWQyxGGVJCKCy6UJY,1702
9
9
  ccxt/binanceus.py,sha256=HRsk0fIoi8AAFdzRCUMkkXUGLqBrf0guUOfUxupHFeY,9202
10
10
  ccxt/binanceusdm.py,sha256=bAPcJj5HLxoCdPolriM8sJpoTBwbV78vBTbKRmWhNP4,2632
11
- ccxt/bingx.py,sha256=HZOWt3XrIYuJV06Fl3gSSvjtfwnNcohrnsqNcbO7h2U,245879
11
+ ccxt/bingx.py,sha256=x0vcfceNywJ83xjki5I3J_gLCf78QxDKWsjbReYWLcw,246838
12
12
  ccxt/bit2c.py,sha256=nJgmrsEpOaYB0ylSIVhzf-tbyLCa3g4yxpmF3BSz3Qk,37097
13
13
  ccxt/bitbank.py,sha256=rROws6WlMgzgGQiKT7vqHxOQjy-DI_-uwSxUhXzMxjY,43570
14
14
  ccxt/bitbay.py,sha256=xAIjzGRDVGwoy-Gygd99H0YN4wiaz_0lR0Z14oxaaxc,478
@@ -17,7 +17,7 @@ ccxt/bitcoincom.py,sha256=PyWIl4nC4jp5Uba2lI1At0N_hhNyWD0DoZC_MSyL_s4,502
17
17
  ccxt/bitfinex.py,sha256=w3t0YAwtOfCwLy5_w2wTq90qkTgUUyn0sqdO22zD-9U,73527
18
18
  ccxt/bitfinex2.py,sha256=4374ASOWdG6FMPEQAliCVnGX1w1ZGQrYZJHg-pb0wPs,160678
19
19
  ccxt/bitflyer.py,sha256=nh1EDzO66S-Ps9xBy-U4CErt6Q06E77wbWF_aTRw6RI,41663
20
- ccxt/bitget.py,sha256=CAecOpBVLlorL4I1S1iVfcNN57BZo8Od01FgtcLiQ94,424354
20
+ ccxt/bitget.py,sha256=UEoxtK12lgL8aOdkC9bARjV3Q-FS3YcZ4gdzIpnQnEI,424477
21
21
  ccxt/bithumb.py,sha256=8oTnFWi8Ai9fnm5FPXvNmaUAVJEOqYi-18VC23cWmXY,47935
22
22
  ccxt/bitmart.py,sha256=xhBbJO2vxoKdMA4MKTQfmtJ4j8DRsstCg3P2VaTyDTk,221980
23
23
  ccxt/bitmex.py,sha256=7ipuNwCEqU8KduLJIvhxxF4GLNmtP6SOsVHBnRcHH74,127309
@@ -35,7 +35,7 @@ ccxt/btcalpha.py,sha256=plU5SSsJn0ZMLW7I8sXb_L0Woc3-kamGMSlqPGujUzE,36751
35
35
  ccxt/btcbox.py,sha256=lvY7cgoe4tglaQiTJZ4vILmzvoEjAWxgswRuB2iYzmE,27780
36
36
  ccxt/btcmarkets.py,sha256=WDDbtbUQ9I0odVZp8nJdIjc4-zv4li49EDSt8EqQbRU,52733
37
37
  ccxt/btcturk.py,sha256=jSA4UnD1GiJu24gXNkfb94f-zXifP5By_Ptery_cMnY,37024
38
- ccxt/bybit.py,sha256=OL2-ATljN0Gqu5quvLazR5qywYMKdQlC_0wRNOOosyk,440915
38
+ ccxt/bybit.py,sha256=usIBvJs-LpoLcNNSpe-MQhHEzXs39_7mz-fNiDWPo1U,441030
39
39
  ccxt/cex.py,sha256=WkzjeUi22kVFNU_f2PB7SwGiddOulKS6DDzmxdVDkXs,70120
40
40
  ccxt/coinbase.py,sha256=pHPkUkGRC9UzpGAl3-QEFUEHT2tts-NoSvbc7s3EMP8,218667
41
41
  ccxt/coinbaseadvanced.py,sha256=d5g6nRx-NCcCwZDdtp8FsI2D-pRjSvnAP9ISSKY_nCQ,538
@@ -63,14 +63,14 @@ ccxt/hashkey.py,sha256=bJAXP1YkNOB92oT0WUVpygn0eKREvW43wu7ntdN9yhI,191991
63
63
  ccxt/hitbtc.py,sha256=dY9ghNwp76I9_xhoCIH2W1jMahq7FYn5rWRDPbPnU88,153572
64
64
  ccxt/hitbtc3.py,sha256=qRAr4Zvaju9IQWRZUohdoN7xRnzIMPq8AyYb3gPv-Is,455
65
65
  ccxt/hollaex.py,sha256=2KIbenZ3vcBDN_rs2CxG5_foKLaYxJd73vVV7M8n_8E,76140
66
- ccxt/htx.py,sha256=On5IPppcM_KQ-KdMj2K62QKyu5FJEezLF4YZUo_HxbM,430944
66
+ ccxt/htx.py,sha256=T_1G5sRfP2xX5UEoMsVgDhEh1CV4SnBPucLG0uNdJSg,431529
67
67
  ccxt/huobi.py,sha256=4vaG7IRN7fyjaJ_ac6S-njlHOfSEN5de7aq0noznxYw,438
68
68
  ccxt/huobijp.py,sha256=m9rYCCApGDtpbiqCK6Gw4GDd5EskEmho4xSemGbY1kY,89852
69
69
  ccxt/hyperliquid.py,sha256=QTly1QFJoFse-ioADxf7KRQWCvK-Ksiopemg0D9y59k,122981
70
70
  ccxt/idex.py,sha256=P2jNsxiwIlMgrfPKbtmjLJQrzFcWp_TjgJaLq793oco,73255
71
71
  ccxt/independentreserve.py,sha256=k2T7rA1zcvlHC8QpmkKYO7ik44SayiElaSpW0EsTevA,37847
72
72
  ccxt/indodax.py,sha256=o5YLVpQzm1LFWPAsvUOnvJxeBEWtaB_jQCvCOmXEw1Y,54758
73
- ccxt/kraken.py,sha256=XbdltZVqZqZuLWxCxNfSPj6D_68aGzJxnFujNXvSPwc,135729
73
+ ccxt/kraken.py,sha256=hMne2ENv-UE6-duoWvRW7cK0B8y6KfXdDZFPFtuCXHA,135747
74
74
  ccxt/krakenfutures.py,sha256=3hMs_WJWkt5numbsdT4ip8AaY5SLLeRQe98c4N_sJrU,119709
75
75
  ccxt/kucoin.py,sha256=kD33ixY0cJKSrkAyDFhcy4Qt2nbTrjh-fBGHTwygwf0,229853
76
76
  ccxt/kucoinfutures.py,sha256=ACYvHVWNoidt5Y9taKnBLt1qs1iui7hvpkFn46WvvkE,132560
@@ -80,18 +80,18 @@ ccxt/lbank.py,sha256=Glx9CN_jdQMiUngJLYioxzwDfgFTdusdOfK53_Bg6A8,116045
80
80
  ccxt/luno.py,sha256=P3cZ_CnVyjMjDFn5e7jaev-pqs_rgmWQTsiJThRtffE,46353
81
81
  ccxt/lykke.py,sha256=gmjb8bQsPztMtoZsHxWGe_T2381HLb1ar1S667UZzIE,51411
82
82
  ccxt/mercado.py,sha256=LWCh89IzXu-yhPGqhkdPW6wqOqfO8nmbSQhAyYiSH8U,35710
83
- ccxt/mexc.py,sha256=rxYgPUGCEM7jrFmE0u4f2SjBSLxxQ2WgmtIbPxr1eJI,249595
83
+ ccxt/mexc.py,sha256=v3v63Ztfn69zdeK5LTkkzaZLbuSSKltsI2Qo29z8eVA,250276
84
84
  ccxt/ndax.py,sha256=m9MhE8i8JmaSf7Lc-I_CcvUpQ5VNTRcfYZLrFEwk3UI,109097
85
85
  ccxt/novadax.py,sha256=_xFkuZ72vHhpJb1N9h_MQHRD05GDWlqUeLQQcOp43BM,64436
86
86
  ccxt/oceanex.py,sha256=jBXRD1hZk_wa9PXVp9feistAO_jK7UvzG5zznhPQgH4,41120
87
87
  ccxt/okcoin.py,sha256=nKWsJTRprIODYHUTIoXRz6eANM2zdRPF7BHY86ExEyQ,151126
88
- ccxt/okx.py,sha256=SZSb6orS2-b1i8-PEEUFfJDxhu-_xgz6xxLaZH6jaxM,380566
88
+ ccxt/okx.py,sha256=3pRwdtaEzf686jU0vlo_T40XQlTJJSxXIlY9sjuiCX4,380190
89
89
  ccxt/onetrading.py,sha256=evWWr4z7-HglV2ma2z-R34_JYJqlr6LQT0rV_OyWKGs,88375
90
90
  ccxt/oxfun.py,sha256=iHy_pywYS8t-cbmh-AkhGc8Kfp9aMgawVr0VloKW_ik,124760
91
91
  ccxt/p2b.py,sha256=iPzHv663K8F1F0uTWEYpfQBcaqowY8MQ5tZt2ZNpoQE,54290
92
92
  ccxt/paradex.py,sha256=LabpIUrV3DGbi14tfOi2UOtlSzBdvZHEDkHMGwch_sU,85602
93
93
  ccxt/paymium.py,sha256=Xz-H66MQWQcQ1KJbciSMeremCD9kl2up_-IQUvBt22Y,24419
94
- ccxt/phemex.py,sha256=aajHQZWUQR3XwkjbJTqQb9yGQQNBmyePuE_oKaD9gmY,223362
94
+ ccxt/phemex.py,sha256=KuJjGe49xKwy9diEPZGFn9gRYuOowFgtWoXDa1swx2c,223868
95
95
  ccxt/poloniex.py,sha256=vaLhyTpZpzBvrrM6dCA_TVypLwLICXotixqiM27q-MA,102301
96
96
  ccxt/poloniexfutures.py,sha256=ZZ7Vs12Tt1D_twM40jhGa28wEBN_Iyy0IdbyUcEGnKA,79005
97
97
  ccxt/probit.py,sha256=IuKLtAprvH6_oo0ajqUHkK33aZ-d39oe2GXT0yK83RQ,76201
@@ -218,17 +218,17 @@ ccxt/abstract/xt.py,sha256=JkWvsic3L2O968BCr9H5Wd5NIbRE9aTT2A-9WbAtl0c,27146
218
218
  ccxt/abstract/yobit.py,sha256=8ycfCO8ORFly9hc0Aa47sZyX4_ZKPXS9h9yJzI-uQ7Q,1339
219
219
  ccxt/abstract/zaif.py,sha256=m15WHdl3gYy0GOXNZ8NEH8eE7sVh8c0T_ITNuU8vXeU,3935
220
220
  ccxt/abstract/zonda.py,sha256=X-hCW0SdX3YKZWixDyW-O2211M58Rno8kKJ6quY7rw4,7183
221
- ccxt/async_support/__init__.py,sha256=14BDk1kiL1YsotKP9oLDSiWj8nVvmywySk4775RgbsA,16289
221
+ ccxt/async_support/__init__.py,sha256=pL-ROTyLKdnKsAxydkv2Z65VXId5psjUAcXGCz78Y4E,16289
222
222
  ccxt/async_support/ace.py,sha256=ucCkKaWRkILAIK9g4iEi1Q_-zmn0V89-rX8Al4WdK8s,42643
223
223
  ccxt/async_support/alpaca.py,sha256=HxonsP_MzbE7Z9r6hZ1rgmf_jPcP4H7H3z1YQgCv4qc,47716
224
224
  ccxt/async_support/ascendex.py,sha256=rSsbtR8BKtun-QFKduQ4rHr_h4rKqU0eB_-jYdWeWuM,152437
225
225
  ccxt/async_support/bequant.py,sha256=1hTwHovo1bW1XTIc8ZKjvJ-Xg6LfmpGdzT7TepykaVM,1188
226
226
  ccxt/async_support/bigone.py,sha256=0Ljt-JAt4i4Hvl7Jxd-MOggzqC0ra1v9_NlTgCbtptM,91434
227
- ccxt/async_support/binance.py,sha256=-jntdp26Spw4vW0tWGhFb5mLQ8VaCGuWaOAqQHtOxmY,650518
227
+ ccxt/async_support/binance.py,sha256=I3ReyQXrK07QLRK5Pt8sqRUNb3_GyXXE3y9vNSQTPLc,651175
228
228
  ccxt/async_support/binancecoinm.py,sha256=yeE73xG5UXD_X3VPul6DMGnV_mgJfWYskpas1BUDdCU,1740
229
229
  ccxt/async_support/binanceus.py,sha256=ZkGgQGB0bWYZTz7PqBCgw22yyOZbvd7GuJAJzzgDTCA,9216
230
230
  ccxt/async_support/binanceusdm.py,sha256=8ugRkx7vyYmn67wdkEEf2f-DFMGAoC4t09usKlPVNyw,2670
231
- ccxt/async_support/bingx.py,sha256=2PsKn7RGX0H_z1b3T4BDl5x_W1mFa4Ka1o_r56GWpAg,247149
231
+ ccxt/async_support/bingx.py,sha256=egzd8Awb-KOgh_fUa_BWVWllTG_V7fcAH4fCXN0_ycg,248108
232
232
  ccxt/async_support/bit2c.py,sha256=Ix9TBLFXAlyCspEr707RGsSMsaRE22odMjdAYLfbbog,37309
233
233
  ccxt/async_support/bitbank.py,sha256=ZicMgUF9fZMYZ5EXPnUWy9S0lHYEJCv_wt0t0JZFvPg,43830
234
234
  ccxt/async_support/bitbay.py,sha256=jcaEXi2IhYTva8ezO_SfJhwxEZk7HST4J3NaxD16BQA,492
@@ -237,7 +237,7 @@ ccxt/async_support/bitcoincom.py,sha256=RiqwhK3RfxQ_PXTa860fphDCvwA8dalL-_rXlK85
237
237
  ccxt/async_support/bitfinex.py,sha256=pzyfQzUSxFYd6Ted0hNLgL545S8rFCrsoJc9Odk3zoo,73993
238
238
  ccxt/async_support/bitfinex2.py,sha256=Dn20G_rQ2Z5TdDWjjg45MiNrSuSRR8JowZ1X7Th7Nh0,161420
239
239
  ccxt/async_support/bitflyer.py,sha256=DTyHe4QBOED0xUEYoDfpGFL0sULp_3CxTXCWfDPbGbE,41971
240
- ccxt/async_support/bitget.py,sha256=zcOkulMNUCYvt5SzJc2C1ThxhbEaD56bIx1ryqKn2zw,425966
240
+ ccxt/async_support/bitget.py,sha256=g5NUgS_unqA7iwursi15c3OFmnu74hR1sp8I0BBs8nc,426089
241
241
  ccxt/async_support/bithumb.py,sha256=Q0Cx_cRKZRfdpBAhQyINm63Qw3M6BRYQRiF0UqYzfis,48214
242
242
  ccxt/async_support/bitmart.py,sha256=DK5e-GZvF66oeJrwhclxlumdW9e-FUxI5PUZ0H73qxs,222972
243
243
  ccxt/async_support/bitmex.py,sha256=Kd_Mw3VuNB1PGxhpz3my295tzkAVQlT_GZVadTHR6nY,127887
@@ -255,7 +255,7 @@ ccxt/async_support/btcalpha.py,sha256=8OefA3GsJ27eAL44yQQcRNOruHXAwTemjTPkpLKwjE
255
255
  ccxt/async_support/btcbox.py,sha256=rBXxuvdQaku5QYseQ4XSvMrCkohDefYmf-rGeS9W0IU,28004
256
256
  ccxt/async_support/btcmarkets.py,sha256=fTf_MDIM7NMwpbv6X5lYPLNg8tFKcviNiUB7N3yO6FI,53083
257
257
  ccxt/async_support/btcturk.py,sha256=Uq9rXMoDkXIy0nw1rzmw2e8eeRepcNtXKNYuw-02tkM,37242
258
- ccxt/async_support/bybit.py,sha256=6X-DPsPOH46B-QZztqj4siDRUKgbBx9P25WNREXnICo,442934
258
+ ccxt/async_support/bybit.py,sha256=gUc2PtEGzLYUxgXkWLofSN3NbWhJRnuPRHKyQVNe7us,443049
259
259
  ccxt/async_support/cex.py,sha256=DPQ4-rrO4Ut3zHax7wOnk47rfF5zVh4AgheFQ05pWDs,70470
260
260
  ccxt/async_support/coinbase.py,sha256=SK8RaT5LFn-y9EVKaa8vKacMA5IWxuJzQ6anBKHPpIQ,219821
261
261
  ccxt/async_support/coinbaseadvanced.py,sha256=Kupwnuxiu_qTjwCNV2asacoDUNFQvcaHNAznUJPhdQs,552
@@ -283,14 +283,14 @@ ccxt/async_support/hashkey.py,sha256=xiS8FXemxDKVKQNJBtyOYG5-QaizyyGR8-I1CusmFcY
283
283
  ccxt/async_support/hitbtc.py,sha256=_CPsYQhE-1wDAOFGi4Xq9OxTqMuZ4ABwXbpSuOvMuNg,154618
284
284
  ccxt/async_support/hitbtc3.py,sha256=dmSYoD2o4av_zzbZI8HNIoj8BWxA7QozsVpy8JaOXzU,469
285
285
  ccxt/async_support/hollaex.py,sha256=msUnnbWLNeCxFW77BnfLoFWBdvQIDwV7Rtbi9TA4TYY,76574
286
- ccxt/async_support/htx.py,sha256=RpgDpDJ5LRmeBQliDvJgjvJ1VVtRZkO85DvMiWwuwLU,433336
286
+ ccxt/async_support/htx.py,sha256=y56SHOMwkVX5iPUPuWAm---t1X1Yoshf6izdSSw_Li4,433921
287
287
  ccxt/async_support/huobi.py,sha256=fup0j6wQ1khAtfbb1H4CSyJAOzhxuoHMmrM6sgTuhr8,452
288
288
  ccxt/async_support/huobijp.py,sha256=OeEHn0GXQ56YGeUM21zwRqsEm8d2LD_SDspBsQMlds4,90352
289
289
  ccxt/async_support/hyperliquid.py,sha256=sjt1Z2dv2YCWdhSfOmjYLmxYhcp2zd7M-_3Wh1S4lWE,123645
290
290
  ccxt/async_support/idex.py,sha256=UcAvdMc2CP_6E8lET4rmQiIP-RaUfZHSo6pQeA17v-g,73731
291
291
  ccxt/async_support/independentreserve.py,sha256=-W-SMPkJwY9FMN5I6l5eL8cPwC0_UuqmfU5yMmyJoiw,38145
292
292
  ccxt/async_support/indodax.py,sha256=-dcr5VdpSkcLgy2KUlumm0NhGs4_mNstysIlunhF2-4,55066
293
- ccxt/async_support/kraken.py,sha256=rAqVk8LnAqlbUVCPelyUOjmreiCsfKh5lfwDR00WPVU,136385
293
+ ccxt/async_support/kraken.py,sha256=ou7UWH5-I6uoEFQvCiBaKZUYGjYc4lewK72Q1CUM094,136403
294
294
  ccxt/async_support/krakenfutures.py,sha256=qtXSy52rlCa8LeqrqFWkiPvO7Og-nCoqXJlL3ZDph5A,120197
295
295
  ccxt/async_support/kucoin.py,sha256=5Tf9244VECUmOvckxH-_6ug1_i-SJimUo_LUv1XnBEc,230996
296
296
  ccxt/async_support/kucoinfutures.py,sha256=KYqgQcDQMaOEHHKA_XChoF4V6uLTHv5Qkdc44HjJwy4,133288
@@ -300,18 +300,18 @@ ccxt/async_support/lbank.py,sha256=MeqPjECSmsplCtatu7Ns6sHRwzAGP_6S5MwB2BomnXk,1
300
300
  ccxt/async_support/luno.py,sha256=WRQ5uH3Wr1HHZa9ZtcWCYdrmz-Y8proS5XOGZpBtiZo,46691
301
301
  ccxt/async_support/lykke.py,sha256=JW9HaTjFCQJzk1tbczjMGKie0BkKdZF2Kmm2Hg69qQE,51725
302
302
  ccxt/async_support/mercado.py,sha256=mb7ULqvEr9PQ7jBOpQxiufgYzwTeAfr0G2NZmrUeUgs,35952
303
- ccxt/async_support/mexc.py,sha256=Ot2-4RSf1ahqd0gEBtbxdRgiqaadi_v-uJYMuFt1jsY,250847
303
+ ccxt/async_support/mexc.py,sha256=Ovzp-g4gLTrmZsSBkw0FTl2xg5ooAy4QO8o02N_dKVA,251528
304
304
  ccxt/async_support/ndax.py,sha256=IX7cFNjCELJIImof_jVsNzihXjCOmMyqRnlFHnzOq_w,109621
305
305
  ccxt/async_support/novadax.py,sha256=YNKUM1CGFK7lpBwbxSSL1IAEJCRVsNxeITkwtw6VWCM,64804
306
306
  ccxt/async_support/oceanex.py,sha256=nU_3t_nXz4WP0k3m5cHL3i67REZMpFSgtboeKPrwY-c,41458
307
307
  ccxt/async_support/okcoin.py,sha256=TV0xooV4DIw1M8DrMNQBsDv4fhSTEp7Xtb5WK-F9bvc,151650
308
- ccxt/async_support/okx.py,sha256=W7oaFg-Uz6RcQAyrJtapwrLMgXnWkpg9BETs5GmMqsE,382153
308
+ ccxt/async_support/okx.py,sha256=VjfpKDVsCpOJ0HB72MSyhBCj0cdGUjYKSoDVugLIJ24,381783
309
309
  ccxt/async_support/onetrading.py,sha256=cZSvu7ZIavao-bqv1CgQatPfsrfXDgCt2UfxMtYsOMM,88827
310
310
  ccxt/async_support/oxfun.py,sha256=dwBuBi8-JFyU4IoNQCtq73zoiU_i6CK4vhEi2YT02Dc,125304
311
311
  ccxt/async_support/p2b.py,sha256=VKUX8u7gtHkKDwBjAyskScm2FEs6xxDuKLXE-jSHXwY,54532
312
312
  ccxt/async_support/paradex.py,sha256=OUzR0JoTe2cjYQa6AilFTJ-XfU8KKSbuSmFtDOl69iw,86210
313
313
  ccxt/async_support/paymium.py,sha256=GIAgyOjR11o1pfq8om4Pwr68jMkLoEwEz7sB8lIDMI0,24607
314
- ccxt/async_support/phemex.py,sha256=TTULQguhwwe7t0XIveZKQzOm9nOMs5ZBUvqck3qOOaU,224180
314
+ ccxt/async_support/phemex.py,sha256=7Tx7m5Yy_LltWX1EDSeJOU-9wz2-ZouAk7sp8-11DGQ,224686
315
315
  ccxt/async_support/poloniex.py,sha256=hYmiGQfwKyYcaPp1Q1Qa4gPP0TaqJrG2367y-q0WxXE,102849
316
316
  ccxt/async_support/poloniexfutures.py,sha256=6_RpKxHjezUpd9kvUpUogVtMGpn9jYOPODdnsngZyyk,79391
317
317
  ccxt/async_support/probit.py,sha256=nj7lDM1cQ6c1SL0dw4fX814t8y1zKS2RumpgjDYopsc,76593
@@ -330,7 +330,7 @@ ccxt/async_support/yobit.py,sha256=GQhvYrsGHQrVdTrNHQxx9isEGqUABexlllzao9HL3f8,5
330
330
  ccxt/async_support/zaif.py,sha256=-ZTr8M2JaIRCL90VrbCDXBMAsZwbiwsFChSQ2rWODuQ,29044
331
331
  ccxt/async_support/zonda.py,sha256=njWK4t42n7BowCvc3j5WKwCxEDc2Y8vi0d-yp296-q0,81883
332
332
  ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
333
- ccxt/async_support/base/exchange.py,sha256=2f2lzJRVhrxhV4BqceHQOZbRmAj824zXkL58h2Q-R8A,111720
333
+ ccxt/async_support/base/exchange.py,sha256=6kBDNCIgAlFjJ6ITqBm_UvlAVKmRQ0_y09gNlUQ9nGo,111720
334
334
  ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
335
335
  ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
336
336
  ccxt/async_support/base/ws/aiohttp_client.py,sha256=5IEiT0elWI9a7Vr-KV0jgmlbpLJWBzIlrLaCkTKGaqY,5752
@@ -344,10 +344,10 @@ ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9produGjmB
344
344
  ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
345
345
  ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
346
346
  ccxt/base/errors.py,sha256=Pad-6ugvGUwhoYuKUliX-N7FTrcnKCQGFjsaq2tMn0I,4610
347
- ccxt/base/exchange.py,sha256=JxtlI0_lmff261S-1D6bIVzovfRBeuNT48xVnP_vCdg,299018
347
+ ccxt/base/exchange.py,sha256=cxeon9dEn3pJ2D8KwFZ6isAoxEwQwLfhW7YVvn_5U3M,299018
348
348
  ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
349
349
  ccxt/base/types.py,sha256=M9-wX1o2UqZxMMuLZgTGuQ8J6LpiGQsen17QhKwDc0k,9634
350
- ccxt/pro/__init__.py,sha256=RqYWiGMbyRUvF4lY3Hp0p4FcemFyS8Aosg_gzWEI5iw,7710
350
+ ccxt/pro/__init__.py,sha256=pjjC6DRQjtebsJFqT4TfJwgNveRvwE5VX3sOZZJNA8c,7710
351
351
  ccxt/pro/alpaca.py,sha256=xh1yg1Ok-Zh_Mfx-MBjNrfJDs6MUU0exFfEj3GuQPC4,27631
352
352
  ccxt/pro/ascendex.py,sha256=QueLgISoIxgGSOta2W7En4pwAsEXbTP5q5ef4UjpTQQ,37524
353
353
  ccxt/pro/bequant.py,sha256=33OEUWBi4D9-2w8CmkwN3aF1qS-AlLqX3pxrWwNbXPY,1552
@@ -650,8 +650,8 @@ ccxt/test/tests_async.py,sha256=Hfdxrjw3nP7lGyjYs35ZgTBM7pF6UIJrkZWz-ycceRw,8457
650
650
  ccxt/test/tests_helpers.py,sha256=xhOILoZ_x3RSfQjtKt6AQlkp9DkOtpTQe8GAUUZoM6s,10069
651
651
  ccxt/test/tests_init.py,sha256=eVwwUHujX9t4rjgo4TqEeg7DDhR1Hb_e2SJN8NVGyl0,998
652
652
  ccxt/test/tests_sync.py,sha256=tQNiZZi3ulprLY513aSadwieBCuNyzyRLE8nSTZIUvw,83641
653
- ccxt-4.4.11.dist-info/LICENSE.txt,sha256=EIb9221AhMHV7xF1_55STFdKTFsnJVJYkRpY2Lnvo5w,1068
654
- ccxt-4.4.11.dist-info/METADATA,sha256=TVO9IKasFQ23Jim4DhfCIJtNJzvEcemjYwW_S5k3rFY,114994
655
- ccxt-4.4.11.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
656
- ccxt-4.4.11.dist-info/top_level.txt,sha256=CkQDuCTDKNcImPV60t36G6MdYfxsAPNiSaEwifVoVMo,5
657
- ccxt-4.4.11.dist-info/RECORD,,
653
+ ccxt-4.4.12.dist-info/LICENSE.txt,sha256=EIb9221AhMHV7xF1_55STFdKTFsnJVJYkRpY2Lnvo5w,1068
654
+ ccxt-4.4.12.dist-info/METADATA,sha256=7H8eh-k0vP5GqGzjnjBpycbOsBOH5Oc0G31nPCORoUM,114994
655
+ ccxt-4.4.12.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
656
+ ccxt-4.4.12.dist-info/top_level.txt,sha256=CkQDuCTDKNcImPV60t36G6MdYfxsAPNiSaEwifVoVMo,5
657
+ ccxt-4.4.12.dist-info/RECORD,,
File without changes