ezyquant.reader.SETDataReader.get_symbol_info#
- SETDataReader.get_symbol_info(symbol_list: List[str] | None = None, market: str | None = None, industry: str | None = None, sector: str | None = None, sec_type: str | None = None, native: str | None = None, start_has_price_date: str | None = None, end_has_price_date: str | None = None) DataFrame #
Data from table SECURITY. Symbol must exist in table DAILY_STOCK_TRADE.
- Parameters:
symbol_list (Optional[List[str]] = None) – N_SECURITY in symbol_list (must be unique).
market (Optional[str] = None) – I_MARKET e.g. ‘SET’, ‘mai’
industry (Optional[str] = None) – SECTOR.N_SYMBOL_FEED
sector (Optional[str] = None) – SECTOR.N_SYMBOL_FEED
sec_type (Optional[str] = None) –
- Security type
S: Common
F: Common Foreign
P: Preferred
Q: Preferred Foreign
U: Unit Trusts
T: Unit Trusts Foreign
W: Warrant
X: Depository Receipts
Y: Depository Receipts Foreign
L: ETFs
O: Index Options
D: Debenture
C: Convertible Debenture
I: Index Warrant
V: Derivatives Warrant
R: Transferable Subscription Right
G: Government Bond
J: Convertible Preferred
native (Optional[str] = None) –
- I_NATIVE
L: Local
F: Foreign
U: Thai Trust Fund
R: NVDR
start_has_price_date (Optional[str] = None) – start of D_TRADE in DAILY_STOCK_TRADE.
end_has_price_date (Optional[str] = None) – end of D_TRADE in DAILY_STOCK_TRADE.
- Returns:
- symbol info dataframe contain columns:
symbol_id: int - I_SECURITY
symbol: str - N_SECURITY
market: str - I_MARKET
industry: str - SECTOR.N_SYMBOL_FEED
sector: str - SECTOR.N_SYMBOL_FEED
sec_type: str - I_SEC_TYPE
native: str - I_NATIVE
- Return type:
pd.DataFrame
Examples
>>> from ezyquant import fields as fld >>> from ezyquant import SETDataReader >>> sdr = SETDataReader() >>> sdr.get_symbol_info(["BBL"]) symbol_id symbol market industry sector sec_type native 0 1 BBL SET FINCIAL BANK S L >>> sdr.get_symbol_info(sector=fld.SECTOR_MINE) symbol_id symbol market industry sector sec_type native 0 167 THL SET RESOURC MINE S L 1 168 THL-R SET RESOURC MINE S R 2 169 THL-U SET RESOURC MINE S U 3 2968 THL-F SET RESOURC MINE F F