# 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)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fiinquant.vn/ham-va-cong-thuc/1.-danh-muc-and-thong-tin-co-ban/1.1.-danh-sach-ma-theo-index.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
