openfund-taker 2.1.4__py3-none-any.whl → 2.1.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openfund-taker
3
- Version: 2.1.4
3
+ Version: 2.1.6
4
4
  Summary: Openfund-taker
5
5
  Requires-Python: >=3.9,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -2,7 +2,7 @@ taker/MultiAssetOldTradingBot.py,sha256=uBh_BxglvcbaHIsWHM7GI9Qa_QjzsxXaXJAAWEOM
2
2
  taker/SMCSLAndTPTaker.py,sha256=ad8C94XKiJOdQxZw1vj7RI4iZhjwJ-CWkcpTWx6tRPY,21055
3
3
  taker/ThreeLineTradingTaker.py,sha256=ElD9pKDO4nxw5VKNRrvXqyiU0gkV_1Mg_zk-hftfaPs,20553
4
4
  taker/TrailingSLAndTPTaker.py,sha256=OPD1ZNqyM8jZ7Im-bWm_6Cu4_qfwKmNZ30XpbP6-l00,2746
5
- taker/TrailingSLTaker.py,sha256=Z2rvkuwW2zigAL-KAN3tuhc-56WeCsXr3_UjRnkADpY,47345
5
+ taker/TrailingSLTaker.py,sha256=dvKZ9x-uIq3hWuV_K_gpeDhdtoA99gk15X6z2xaPmbQ,47386
6
6
  taker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  taker/chua_bitget.py,sha256=YY6XK5Bd-wlArsN5BnAfiqE0h1DPkti6i4TEB4F5zDA,12918
8
8
  taker/chua_bn.py,sha256=GnTePWlgDwdHgroBbEp1Ajcsf5_m_Vn_RV63SYzu2jI,10668
@@ -11,7 +11,7 @@ taker/chua_ok_all.py,sha256=2XnZM6QdB3juSE1pqQIJyh2x1XuhlTlnBKNA3owlJ9E,15267
11
11
  taker/chua_ok_bot.py,sha256=9SW0ujhi6PfN4yR1JZ9NaA37HtnXJ2QAWUfW52NG68w,13109
12
12
  taker/config.py,sha256=YPxghO5i0vgRg9Cja8kGj9O7pgSbbtzOgf3RexqXXwY,1188
13
13
  taker/main.py,sha256=Ulz22BV34Mp8ugh-Dior1mIS8n8si8bMi5RCBit2G4U,2774
14
- openfund_taker-2.1.4.dist-info/METADATA,sha256=ortCvUOjBfqURO-zixFq7xHO6pTRSGKQYqsvEXb7VFM,7527
15
- openfund_taker-2.1.4.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
16
- openfund_taker-2.1.4.dist-info/entry_points.txt,sha256=a7mG8F7aOA5-Gk2vPWuAR4537faxaHUgM_jwIDBZoEc,50
17
- openfund_taker-2.1.4.dist-info/RECORD,,
14
+ openfund_taker-2.1.6.dist-info/METADATA,sha256=wDw3ROeF31iYuSNfBfnsnOqXq7ijPdUvMeRnEMsvnZw,7527
15
+ openfund_taker-2.1.6.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
16
+ openfund_taker-2.1.6.dist-info/entry_points.txt,sha256=a7mG8F7aOA5-Gk2vPWuAR4537faxaHUgM_jwIDBZoEc,50
17
+ openfund_taker-2.1.6.dist-info/RECORD,,
taker/TrailingSLTaker.py CHANGED
@@ -504,7 +504,7 @@ class TrailingSLTaker:
504
504
 
505
505
 
506
506
  # 止损单逻辑
507
- adjusted_price = self.round_price_to_tick(symbol, take_profit_price)
507
+ adjusted_price = float(self.round_price_to_tick(symbol, take_profit_price))
508
508
 
509
509
  tp_params = {
510
510
 
@@ -593,7 +593,7 @@ class TrailingSLTaker:
593
593
  return
594
594
 
595
595
  # 止损单逻辑
596
- adjusted_price = self.round_price_to_tick(symbol, stop_loss_price)
596
+ adjusted_price = float(self.round_price_to_tick(symbol, stop_loss_price))
597
597
 
598
598
  # 默认市价止损,委托价格为-1时,执行市价止损。
599
599
  sl_params = {
@@ -761,6 +761,7 @@ class TrailingSLTaker:
761
761
  except Exception as e:
762
762
  error_msg = f"{symbol} : 设置止损时发生错误, {str(e)}"
763
763
  self.logger.error(error_msg)
764
+ traceback.print_exc()
764
765
  self.send_feishu_notification(error_msg)
765
766
 
766
767
  def calculate_take_profile_price(self, symbol, position, take_profile_pct, offset=1) -> float:
@@ -784,7 +785,7 @@ class TrailingSLTaker:
784
785
 
785
786
  # 计算回撤止盈价格
786
787
  def calculate_stop_loss_price(self, symbol, position, stop_loss_pct, offset=1) -> float:
787
- tick_size = float(self.get_tick_size(symbol))
788
+ tick_size = self.get_tick_size(symbol)
788
789
  market_price = position['markPrice']
789
790
  entry_price = position['entryPrice']
790
791
  side = position['side']