From b17561f9d53234266b80bd83602293ef917b4040 Mon Sep 17 00:00:00 2001 From: dosangyoon Date: Sun, 28 Aug 2022 21:07:34 +0900 Subject: [PATCH] init --- HTS_252670.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/HTS_252670.py b/HTS_252670.py index 2c8a4ee..cf4174b 100644 --- a/HTS_252670.py +++ b/HTS_252670.py @@ -62,15 +62,15 @@ class HTS_252670 (HTS): if datetime.strptime(today + " 090000", '%Y%m%d %H%M%S') < THIS_TIME < datetime.strptime(today + " 151500", '%Y%m%d %H%M%S'): # 3시 까지만 매수를 시도한다. - """ - if THIS_TIME.strftime('%S') in ("06", "16", "26", "36", "46", "56"): - # 데이터를 가지고 온다. - result = self.getRealTime(self.stock_code, today, LAST_DATA) - final_price = result["close"][len(result["close"])-1] + if THIS_TIME < datetime.strptime(today + " 145000", '%Y%m%d %H%M%S'): + if THIS_TIME.strftime('%S') in ("06", "16", "26", "36", "46", "56"): + # 데이터를 가지고 온다. + result = self.getRealTime(self.stock_code, today, LAST_DATA) + final_price = result["close"][len(result["close"])-1] + + # 10초마다 체크하여 체결된 내역이 있으면 50원 높게 매도를 주문한다. + self.getSellingPrice(THIS_TIME, self.stock_code, final_price) - # 10초마다 체크하여 체결된 내역이 있으면 60원 높게 매도를 주문한다. - self.getDefaultSell(THIS_TIME, self.stock_code, final_price) - """ if THIS_TIME.strftime('%S') == "03": # 매분 3초마다 실행한다.