This commit is contained in:
dsyoon
2023-01-30 09:49:11 +09:00
parent 41fe45c4eb
commit 7f052708dd
3 changed files with 71 additions and 75 deletions

View File

@@ -134,7 +134,7 @@ class HTS_Stocks (HTS):
orderNum = self.requestOrder(OrderType.buy, stock_code, buy_count, bs_buy_price)
# slackbot에 메시지를 보냄
self.slackBot.post_to_slack(stock_code, stock_name, "BUY", bsLine['buy'][len(bsLine['buy']) - 1], buy_count)
self.orderChecker.add(today, stock_code, 1, buy_count, bs_buy_price, orderNum)
self.orderChecker.buy(today, stock_code, buy_count, bs_buy_price, orderNum)
# 로그 출력
print("BUY", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, stock_code, stock_name, bs_buy_price, buy_count)
@@ -147,7 +147,7 @@ class HTS_Stocks (HTS):
orderNum = self.getSellingPrice(THIS_TIME, stock_code, bs_sell_price)
# slackbot에 메시지를 보냄
self.slackBot.post_to_slack(stock_code, stock_name, "SELL", bsLine['sell'][len(bsLine['sell']) - 1], -1)
self.orderChecker.delete(today, stock_code)
self.orderChecker.sell(today, stock_code)
# 로그 출력
print("SELL", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, stock_code, stock_name, bs_sell_price)