This commit is contained in:
dsyoon
2022-01-23 13:30:55 +09:00
parent 3d73089c0f
commit 02c7ae73e9
7 changed files with 395 additions and 675 deletions

View File

@@ -4,11 +4,11 @@ import os
from datetime import datetime
import pandas as pd
from OrderType import OrderType
from OrderItem import OrderItem
from hts.OrderType import OrderType
from hts.OrderItem import OrderItem
from BuySellChecker import BuySellChecker
from OrderChecker import OrderChecker
from hts.BuySellChecker import BuySellChecker
from hts.OrderChecker import OrderChecker
class HTS_252670:
@@ -549,7 +549,7 @@ class HTS_252670:
def buyRealTime(self, GIVEN_DAY):
orderChecker = OrderChecker(self.stock_code)
BASE_COUNT = 200
BASE_COUNT = 150
timecheckList = pd.read_csv("timecheck.csv").values.tolist()
timecheck = {GIVEN_DAY + " " + str(second).zfill(6):False for second, check in timecheckList}
@@ -562,7 +562,6 @@ class HTS_252670:
"low": [],
"vol": []}
final_price = 0
print ("START...")
THIS_TIME = datetime.now()
while datetime.strptime(GIVEN_DAY + " 070000", '%Y%m%d %H%M%S') < THIS_TIME < datetime.strptime(GIVEN_DAY + " 15200", '%Y%m%d %H%M%S'):
@@ -657,7 +656,7 @@ if __name__ == "__main__":
hts = HTS_252670(stock_code)
given_day = datetime.today().strftime('%Y%m%d')
#hts.writeStockData(stock_code, "20211026")
#hts.writeStockData(stock_code, "20220121")
hts.buyRealTime(given_day)
print ("done...")