init
This commit is contained in:
@@ -574,7 +574,7 @@ class HTS:
|
||||
|
||||
def getDBData(self, stock_code, day, result):
|
||||
|
||||
self.cursor.execute('SELECT ymd, hms, open, high, low, close, volume, label FROM hts WHERE CODE=? and ymd=? order by ymd, hms', (stock_code, day, ))
|
||||
self.cursor.execute('SELECT ymd, hms, open, high, low, close, volume FROM hts WHERE CODE=? and ymd=? order by ymd, hms', (stock_code, day, ))
|
||||
db_result = self.cursor.fetchall()
|
||||
for rows in db_result:
|
||||
ymd = rows[0] # hts.날짜
|
||||
@@ -584,7 +584,6 @@ class HTS:
|
||||
low = rows[4] # hts.저가
|
||||
close = rows[5] # hts.종가
|
||||
volume = rows[6] # hts.거래량
|
||||
label = 0 if rows[7] is None else rows[7] # hts.매매구분
|
||||
|
||||
temp = datetime.strptime(str(ymd) + " " + str(hms).zfill(4) + "00", '%Y%m%d %H%M%S')
|
||||
|
||||
@@ -594,7 +593,6 @@ class HTS:
|
||||
result["high"].append(int(high))
|
||||
result["low"].append(int(low))
|
||||
result["volume"].append(int(volume))
|
||||
result["label"].append(int(label))
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user