This commit is contained in:
dsyoon
2021-09-24 15:55:13 +09:00
parent 63223d4d4d
commit f5eaeb76f9
2 changed files with 388 additions and 4 deletions

View File

@@ -237,7 +237,8 @@ class HTS:
return False
cnt = objRq.GetHeaderValue(7)
#print(cnt)
if cnt > 10:
return jangoDic
for i in range(cnt):
item = {}
@@ -261,14 +262,15 @@ class HTS:
key = code
jangoDic[key] = item
if len(jangoDic) >= 200: # 최대 200 종목만,
if len(jangoDic) >= 10: # 최대 200 종목만,
break
if len(jangoDic) >= 200:
if len(jangoDic) >= 10:
break
if (objRq.Continue == False):
break
return jangoDic
# 예약 주문 내역 조회 및 미체결 리스트 구하기
@@ -683,7 +685,7 @@ class HTS:
else:
self.requestOrder("1", stock_code, jangoDic[code]['잔고수량'], jangoDic[code]['장부가'] + 5)
"""
time.sleep(0.5)
time.sleep(0.9)
logFp.close()
return