with api.connect(ip, port):
__data = api.to_df(api.get_security_quotes([(market_code, code)]))
data = __data[["code", "open", "high", "low", "price"]]
data = data.rename(columns={"price": "close"}, inplace=True)
return data
def QA_fetch_get_index_day(code, start_date, end_date, ip="119.147.212.81", port=7709):
After Change
__data=pd.DataFrame()
with api.connect(ip, port):
code=[code] if type(code) is str else code
for id_ in range(int(len(code)/80)+1):
__data = __data.append(api.to_df(api.get_security_quotes(
[(__select_market_code(x),x) for x in code[80*id_:80*(id_+1)]])))
__data["datetime"]=datetime.datetime.now()