This commit is contained in:
dsyoon
2023-01-27 10:43:07 +09:00
parent 1baa3aff1e
commit 9fe73b1479
2 changed files with 2 additions and 1 deletions

View File

@@ -128,7 +128,7 @@ class HTS_DAILY (HTS):
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_weight) / 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)

View File

@@ -45,6 +45,7 @@ class OrderChecker:
order_df = self.read(ymd)
# 새로운 주문을 추가한다.
order_df = order_df.append({"stock_code": int(stock_code), "type": int(type), "orderNum": int(orderNum), "count": int(count), "price": int(price), "datetime": datetime.now()}, ignore_index=True)
order_df = order_df.astype({"stock_code": int, "type": int, "orderNum": int, "count": int, "price": int})