openfund-taker 2.1.7__tar.gz → 2.1.8__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openfund-taker
3
- Version: 2.1.7
3
+ Version: 2.1.8
4
4
  Summary: Openfund-taker
5
5
  Requires-Python: >=3.9,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "openfund-taker"
3
- version = "2.1.7"
3
+ version = "2.1.8"
4
4
  description = "Openfund-taker"
5
5
  authors = []
6
6
  readme = "README.md"
@@ -364,7 +364,7 @@ class SMCSLAndTPTaker(TrailingSLTaker):
364
364
 
365
365
  # sl_price = self.global_symbol_stop_loss_price.get(symbol, float(position['markPrice']))
366
366
  entry_price = float(position['entryPrice'])
367
- sl_price = self.calculate_sl_price_by_pct(symbol, position['side'], stop_loss_pct)
367
+ sl_price = self.calculate_sl_price_by_pct(symbol, position, stop_loss_pct)
368
368
  threshold = 0.0
369
369
  if is_buy and sl_price > 0 :
370
370
  threshold = float(self.round_price_to_tick(symbol, (entry_price - sl_price ) * tp_sl_ratio + entry_price))
@@ -414,7 +414,7 @@ class SMCSLAndTPTaker(TrailingSLTaker):
414
414
  """
415
415
  # 如果已经触发过全局止盈,则跳过
416
416
  if self.global_symbol_take_profit_flag.get(symbol, False):
417
- self.logger.info(f"{symbol}: 已经设置过全局止盈 tp_price={self.global_symbol_take_profit_price[symbol]}")
417
+ self.logger.info(f"{symbol} : 已经设置过全局止盈 tp_price={self.global_symbol_take_profit_price[symbol]}")
418
418
  return
419
419
 
420
420
  smc_strategy = pair_config.get('smc_strategy',{})
File without changes