This commit is contained in:
dsyoon
2023-01-27 12:30:55 +09:00
parent ae978a6f24
commit 4482c77497
2 changed files with 4 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ class OrderChecker:
return False
return True
def add(self, ymd, stock_code, type, orderNum, count, price):
def add(self, ymd, stock_code, type, count, price, orderNum=None):
if self.exist(ymd, stock_code):
return False
@@ -47,7 +47,7 @@ class OrderChecker:
# 새로운 주문을 추가한다.
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.append({"stock_code": int(stock_code), "type": int(type), "orderNum": int(0), "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})
# 파일로 기록한다.