From 4f2966991d2841e8700e24d860722ccf9c5e88db Mon Sep 17 00:00:00 2001 From: dsyoon Date: Sat, 28 Jan 2023 22:32:23 +0900 Subject: [PATCH] init --- HTS_daily.py => HTS_stocks.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) rename HTS_daily.py => HTS_stocks.py (95%) diff --git a/HTS_daily.py b/HTS_stocks.py similarity index 95% rename from HTS_daily.py rename to HTS_stocks.py index 8f2db78..cd1785b 100644 --- a/HTS_daily.py +++ b/HTS_stocks.py @@ -11,7 +11,7 @@ from hts.BuySellChecker import BuySellChecker from hts.OrderChecker import OrderChecker from stock.util.SlackBot import SlackBot -class HTS_DAILY (HTS): +class HTS_Stocks (HTS): RESOURCE_PATH = None orderChecker = None @@ -127,10 +127,7 @@ class HTS_DAILY (HTS): if bsLine['buy'][last_index] > 0: bs_buy_price = bsLine['buy'][last_index] bs_buy_weight = bsLine['buy_weight'][last_index] - if stock_code == "252670" or stock_code == "122630": - buy_count = int(5000000 / bs_buy_price) - else: - buy_count = int(self.MAX_BUY_PRICE / bs_buy_price) + buy_count = int(self.MAX_BUY_PRICE / bs_buy_price) # 매수를 주문한다. orderNum = self.requestOrder(OrderType.buy, stock_code, buy_count, bs_buy_price) @@ -170,7 +167,7 @@ if __name__ == "__main__": PROJECT_HOME = os.getcwd() RESOURCE_PATH = os.path.join(PROJECT_HOME, "resources") - hts = HTS_DAILY(RESOURCE_PATH) + hts = HTS_Stocks(RESOURCE_PATH) today_str = today.strftime('%Y%m%d') hts.buyRealTime(today_str)