[Cybos plus] 종목코드로 현재가, per, eps, 최근분기년월 가져오기
#code의 [현재가,per,eps,최근분기년월] 리턴 def per_eps_lastym(code): # Create Object instMarketEye = win32com.client.Dispatch("CpSysDib.MarketEye") # SetInputValue instMarketEye.SetInputValue(0, (4, 67, 70, 111)) instMarketEye.SetInputValue(1, code) # BlockRequest instMarketEye.BlockRequest() #현재가 price_now = instMarketEye.GetDataValue(0, 0) per = instMarketEye.GetDataValue(1, 0) eps=instMarketEye.GetDataVa..
최근 n일의 시/고/저/종, 거래량
import win32com.client #최근 10일간 code(str)종목의 시/고/저/종가, 거래량을 가져옵니다 #가장최근날짜부터 def sigojujonggu(n_day,code): # Create object instStockChart = win32com.client.Dispatch("CpSysDib.StockChart") # SetInputValue instStockChart.SetInputValue(0, code) instStockChart.SetInputValue(1, ord('2')) instStockChart.SetInputValue(4, n_day) instStockChart.SetInputValue(5, (0, 2, 3, 4, 5, 8)) instStockChart.SetInputV..