This commit is contained in:
dosangyoon
2021-10-15 03:09:59 +09:00
parent f3dcf2aeda
commit 6fea4e3453

View File

@@ -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)