From b529d4a2614ca60e12d0673fe6d7776f6aa69231 Mon Sep 17 00:00:00 2001 From: dosangyoon Date: Thu, 23 Sep 2021 03:49:17 +0900 Subject: [PATCH] init --- hts/HTS.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hts/HTS.py b/hts/HTS.py index d7a128f..90d3548 100644 --- a/hts/HTS.py +++ b/hts/HTS.py @@ -506,9 +506,9 @@ class HTS: while datetime.strptime(given_day + " 085900", '%Y%m%d %H%M%S') < datetime.now() < datetime.strptime(given_day + " 151500", '%Y%m%d %H%M%S'): second = datetime.now().strftime('%Y%m%d %H%M%S') - print(second) if second in timecheck and not timecheck[second]: + print("TIMECHECK", second) # 데이터를 가지고 온다. self.getRealTime(stock_code, given_day, result) @@ -524,7 +524,7 @@ class HTS: # 매수신청과 5원 높여서 매도신청 if price > 0: - print(second, price) + print("BUY", second, price) count = 1 self.orderToBuy(stock_code, count, price) @@ -534,6 +534,8 @@ class HTS: self.write(given_day, result) timecheck[second] = True + else: + print("NONE", second) time.sleep(0.5) @@ -572,8 +574,6 @@ if __name__ == "__main__": hts.simulate(stock_code, given_day) """ - given_day = '20210917' - #hts.simulate(stock_code, given_day) hts.buyRealTime(stock_code, given_day) print ("done...")