get_alert_stocks#
- pyqqq.data.domestic.get_alert_stocks(alert_type: str, date: date = None) DataFrame | None [source]#
시장 경보 종목을 조회합니다.
2024년 3월 25일 데이터 부터 조회 가능합니다.
- Parameters:
alert_type (str) – 경보종류. caution:투자주의종목 warning:투자경고종목 risk:투자위험종목
date (dtm.date, optional) – 조회할 날짜. 기본값은 None (가장 최근 데이터)
- Returns:
경보 종목 리스트. 해당일에 저장된 데이터가 없으면 None, 저장되었지만 지정 종목이 없으면 빈 DataFrame이 반환됩니다.
code (str, index): 종목코드
name (str): 종목명
current_price (int): 현재가
change (int): 전일대비가격
change_rate (float): 전일대비등락율
volume (int): 거래량
bid_price (int): 매수호가
ask_price (int): 매도호가
per (float): PER
- Return type:
pd.DataFrame|None
Examples
>>> df = get_alert_stocks('caution') >>> print(df.head()) name current_price change change_rate volume bid_price ask_price per code 402340 SK스퀘어 77600 2400 -3.00 303590 77000 76900 -8.49 053950 경남제약 1570 1 0.06 4857452 1569 1568 -4.91 012320 경동인베스트 113100 11800 11.65 994188 118800 118700 22.05 002720 국제약품 6820 310 -4.35 5559738 6900 6890 -17.14 219420 링크제니시스 9100 160 1.79 1720993 9120 9100 83.49