This commit is contained in:
dsyoon
2021-10-18 18:48:53 +09:00
parent 3d874553e8
commit 79314b9a82
3 changed files with 391 additions and 8 deletions

View File

@@ -547,7 +547,7 @@ class HTS_252670:
def buyRealTime(self, stock_code, GIVEN_DAY):
orderChecker = OrderChecker(stock_code)
BASE_COUNT = 100
BASE_COUNT = 50
timecheckList = pd.read_csv("timecheck.csv").values.tolist()
timecheck = {GIVEN_DAY + " " + str(second).zfill(6):False for second, check in timecheckList}
@@ -580,7 +580,8 @@ class HTS_252670:
if bs_buy_price > 0:
# 기본 100 주에 가중치를 추가해서 매수한다.
BUY_COUNT = int(BASE_COUNT * bs_weight)
#BUY_COUNT = int(BASE_COUNT * bs_weight)
BUY_COUNT = int(BASE_COUNT * 1)
# 매수를 주문한다.
orderNum = self.requestOrder(OrderType.buy, stock_code, BUY_COUNT , bs_buy_price)
@@ -652,7 +653,7 @@ if __name__ == "__main__":
stock_codes = ["252670"]
given_day = datetime.today().strftime('%Y%m%d')
#hts.writeStockData(stock_codes, "20211015")
hts.buyRealTime(stock_codes[0], given_day)
hts.writeStockData(stock_codes, "20211018")
#hts.buyRealTime(stock_codes[0], given_day)
print ("done...")