This commit is contained in:
dsyoon
2023-12-13 00:07:07 +09:00
parent d91fa4f0ef
commit 37808f73f8
6 changed files with 16 additions and 6 deletions

View File

@@ -649,7 +649,17 @@ class HTS:
# 주식 현재가 조회
def getRealTime(self, stock_code, today, LAST_DATA=None):
if LAST_DATA is not None:
result = copy.deepcopy(LAST_DATA)
#result = copy.deepcopy(LAST_DATA)
result = {"check": set(), "ymd": [], "open": [], "close": [], "high": [], "low": [], "volume": [], "label": []}
for i in range(len(LAST_DATA['ymd'])):
result["ymd"].append(LAST_DATA['ymd'][i])
result["open"].append(LAST_DATA['open'][i])
result["close"].append(LAST_DATA['close'][i])
result["high"].append(LAST_DATA['high'][i])
result["low"].append(LAST_DATA['low'][i])
result["volume"].append(LAST_DATA['volume'][i])
result["label"].append(LAST_DATA['label'][i])
else:
result = {"check": set(), "ymd": [], "open": [], "close": [], "high": [], "low": [], "volume": [], "label": []}