From 396bee8e5f15fb4714464260cdc1572768890fed Mon Sep 17 00:00:00 2001 From: dsyoon Date: Mon, 27 Feb 2023 08:46:35 +0900 Subject: [PATCH] init --- HTS_etf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HTS_etf.py b/HTS_etf.py index 0b57616..6a7ccb8 100644 --- a/HTS_etf.py +++ b/HTS_etf.py @@ -63,7 +63,8 @@ class HTS_etf (HTS): continue else: if jangoDic[code]['매도가능'] > 0: - if 2 < jangoDic[code]['평가손익']: + if 3 < jangoDic[code]['평가손익']: + # 3% 이상 시 수익 매도 currentStock = self.currentStock(code[1:]) self.requestOrder(OrderType.sell, code[1:], jangoDic[code]['매도가능'], currentStock['close']) self.slackBot.post_to_slack(code, jangoDic[code]['종목명'], "SELL", currentStock['close'], jangoDic[code]['매도가능'])