init
This commit is contained in:
@@ -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...")
|
||||
|
||||
Reference in New Issue
Block a user