From 649d0fa00211f185d40dafd4a7d812a5fe792fbe Mon Sep 17 00:00:00 2001 From: dsyoon Date: Fri, 15 Dec 2023 09:29:09 +0900 Subject: [PATCH] init --- HTS_etf.py | 6 +++--- hts/HTS.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/HTS_etf.py b/HTS_etf.py index a84d09a..357b95f 100644 --- a/HTS_etf.py +++ b/HTS_etf.py @@ -477,7 +477,7 @@ class HTS_etf(HTS): BUY_LIST[stock_code]['buy_avg'] = 0 BUY_LIST[stock_code]['buy_count'] = 0 BUY_LIST[stock_code]['buy_list'].clear() - self.bot.sendMsg( "Profit {:.2f}, {} ({})".format(profit, stock_code, stock_name)) + self.bot.sendMsg( "[SELL] Profit {:.2f}, {} ({})".format(profit, stock_code, stock_name)) if 'buy_price' in bsLine1: buy_price = bsLine1['buy_price'][-1] @@ -507,7 +507,7 @@ class HTS_etf(HTS): vm_item['idle'] = vm.available / vm.total * 100 self.bot.sendMsg("Alive... {} ({}) avg: {:.2f}, close: {:.2f}, mem: {:.1f}".format(stock_code, stock_name, buy_avg, data['close'][-1], vm_item['idle'])) - time.sleep(60) - THIS_TIME = datetime.now() + time.sleep(60) + THIS_TIME = datetime.now() return True \ No newline at end of file diff --git a/hts/HTS.py b/hts/HTS.py index 45037c2..f92efc3 100644 --- a/hts/HTS.py +++ b/hts/HTS.py @@ -208,12 +208,14 @@ class HTS: orderNum = objStockOrder.GetHeaderValue(0) + """ if (type == "1"): self.bot.post(stock_code, stock_code, "SELL", price, count, 0) print ("(SELL", count, price, ")") else: self.bot.post(stock_code, stock_code, "BUY", price, count, 0) print ("(BUY", count, price, ")") + """ return orderNum # 계좌 잔고 확인