> For the complete documentation index, see [llms.txt](https://docs.fiinquant.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fiinquant.vn/ham-va-cong-thuc/1.-danh-muc-and-thong-tin-co-ban/1.1.-danh-sach-ma-theo-index.md).

# 1.1. Danh sách mã theo index

Bằng cách nhập vào tên INDEX (Ví dụ: VN30, VN100, VNINDEX, HNXINDEX, v.v.) hàm sẽ trả ra 1 danh sách các mã thuộc INDEX đó, điều này sẽ thuận tiện cho người dùng muốn gọi dữ liệu lịch sử của các mã thuộc cùng 1 rổ INDEX.

Code mẫu:

```python
from FiinQuantX import FiinSession

username = "REPLACE_WITH_YOUR_USERNAME"
password = "REPLACE_WITH_YOUR_PASSWORD"

client = FiinSession(username=username, password=password).login()

tickers = client.TickerList(ticker="VN30")
print(tickers)
```

Kết quả trả ra:

\['ACB', 'BID', 'BCM', 'BVH', 'CTG', 'FPT', 'GAS', 'HDB', 'HPG', 'LPB', 'MBB', 'MSN', 'MWG', 'VHM', 'PLX', 'SAB', 'SSB', 'SHB', 'SSI', 'STB', 'TCB', 'TPB', 'VCB', 'VIB', 'VIC', 'VJC', 'VNM', 'GVR', 'VPB', 'VRE']

Ví dụ về việc lấy dữ liệu OHLCV lịch sử của các mã thuộc rổ VN30:

```python
from FiinQuantX import FiinSession

username = "REPLACE_WITH_YOUR_USERNAME"
password = "REPLACE_WITH_YOUR_PASSWORD"

client = FiinSession(username=username, password=password).login()

tickers = client.TickerList(ticker="VN30")

data = client.Fetch_Trading_Data(
    realtime=False,
    tickers=tickers,
    fields=["open","high","low","close","volume"],
    adjusted=True,
    by="1d",
    from_date="2025-06-18"
).get_data()

print(data)
```
