init
This commit is contained in:
@@ -543,7 +543,7 @@ class HTS:
|
|||||||
if jangoDic and len(jangoDic.keys()) > 0:
|
if jangoDic and len(jangoDic.keys()) > 0:
|
||||||
for code in jangoDic:
|
for code in jangoDic:
|
||||||
if jangoDic[code]['매도가능'] > 0:
|
if jangoDic[code]['매도가능'] > 0:
|
||||||
if final_price > jangoDic[code]['장부가'] + 5:
|
if final_price >= jangoDic[code]['장부가'] + 5:
|
||||||
return jangoDic[code]['매도가능'], final_price
|
return jangoDic[code]['매도가능'], final_price
|
||||||
else:
|
else:
|
||||||
# 장부가 가격의 마지막 자리를 0으로 만든다. (2090 -> 2090, 2092 -> 2090, 2098 -> 2090)
|
# 장부가 가격의 마지막 자리를 0으로 만든다. (2090 -> 2090, 2092 -> 2090, 2098 -> 2090)
|
||||||
@@ -580,7 +580,7 @@ class HTS:
|
|||||||
|
|
||||||
second = datetime.now().strftime('%Y%m%d %H%M%S')
|
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]:
|
if second in timecheck and not timecheck[second]:
|
||||||
print("TIMECHECK", second)
|
print("TIMECHECK", second)
|
||||||
|
|
||||||
@@ -612,8 +612,8 @@ class HTS:
|
|||||||
|
|
||||||
timecheck[second] = True
|
timecheck[second] = True
|
||||||
|
|
||||||
if datetime.strptime(given_day + " 151500", '%Y%m%d %H%M%S') < datetime.now():
|
if datetime.strptime(given_day + " 151000", '%Y%m%d %H%M%S') < datetime.now():
|
||||||
# 15:15:00 이후라면 모든 미체결 취소
|
# 15:10:00 이후라면 모든 미체결 취소
|
||||||
self.cancelOrderList()
|
self.cancelOrderList()
|
||||||
# 매도 가격을 가져온다.
|
# 매도 가격을 가져온다.
|
||||||
selling_count, selling_price = self.getSellingPrice(final_price)
|
selling_count, selling_price = self.getSellingPrice(final_price)
|
||||||
|
|||||||
Reference in New Issue
Block a user