diff --git a/hts/HTS.py b/hts/HTS.py index 573be93..0bae5b8 100644 --- a/hts/HTS.py +++ b/hts/HTS.py @@ -543,7 +543,7 @@ class HTS: if jangoDic and len(jangoDic.keys()) > 0: for code in jangoDic: if jangoDic[code]['매도가능'] > 0: - if final_price > jangoDic[code]['장부가'] + 5: + if final_price >= jangoDic[code]['장부가'] + 5: return jangoDic[code]['매도가능'], final_price else: # 장부가 가격의 마지막 자리를 0으로 만든다. (2090 -> 2090, 2092 -> 2090, 2098 -> 2090) @@ -580,7 +580,7 @@ class HTS: second = datetime.now().strftime('%Y%m%d %H%M%S') - if datetime.strptime(given_day + " 090100", '%Y%m%d %H%M%S') < datetime.now() < datetime.strptime(given_day + " 151500", '%Y%m%d %H%M%S'): + if datetime.strptime(given_day + " 090100", '%Y%m%d %H%M%S') < datetime.now() < datetime.strptime(given_day + " 151000", '%Y%m%d %H%M%S'): if second in timecheck and not timecheck[second]: print("TIMECHECK", second) @@ -612,8 +612,8 @@ class HTS: timecheck[second] = True - if datetime.strptime(given_day + " 151500", '%Y%m%d %H%M%S') < datetime.now(): - # 15:15:00 이후라면 모든 미체결 취소 + if datetime.strptime(given_day + " 151000", '%Y%m%d %H%M%S') < datetime.now(): + # 15:10:00 이후라면 모든 미체결 취소 self.cancelOrderList() # 매도 가격을 가져온다. selling_count, selling_price = self.getSellingPrice(final_price)