# 4.1. Lấy dữ liệu về độ rộng thị trường (số mã sàn, số mã trần, số mã tăng/giảm/tham chiếu)

Mô tả cách sử dụng thư viện sau khi người dùng đã đăng nhập. Các ví dụ chi tiết được nêu ra ở cuối chương này.

```python
data = client.MarketBreadth().get(
    tickers=tickers
)
```

**Tham số:**

| Tên tham số | Mô tả                              | Kiểu dữ liệu  | Mặc định               | Bắt buộc |
| ----------- | ---------------------------------- | ------------- | ---------------------- | -------- |
| tickers     | Danh sách chỉ số được viết in hoa. | str hoặc list | Tất cả các nhóm chỉ số | Không    |

Toàn bộ nhóm chỉ số gồm có: **'VNINDEX', 'VN30', 'HNXIndex', 'HNX30', 'UpcomIndex', 'VNXALL', 'FLEADTRI', 'HNX30TRI', 'VN100', 'VN100TRI', 'VN30TRI', 'VNALL', 'VNALLTRI', 'VNCOND', 'VNCONS', 'VNDIAMOND', 'VNDTRI', 'VNENE', 'VNFIN', 'VNFINLEAD', 'VNFINSELECT', 'VNFSTRI', 'VNHEAL', 'VNIND', 'VNIT', 'VNMAT', 'VNMID', 'VNMIDCAPTRI', 'VNREAL', 'VNSI', 'VNSMALLTRI', 'VNSML', 'VNUTI', 'VNX50'**

Class nhận dữ liệu là MarketBreadth và có phương thức nhận dữ liệu là get()

```python
data = client.MarketBreadth().get()
print(data)
```

Dữ liệu có các thuộc tính:

| Tên thuộc tính          | Mô tả                  | Kiểu dữ liệu |
| ----------------------- | ---------------------- | ------------ |
| comGroupCode            | Tên nhóm chỉ số        | str          |
| tradingDate             | Thời gian giao dịch    | str          |
| totalStockUpPrice       | Số cổ phiếu tăng       | int          |
| totalStockDownPrice     | Số cổ phiếu giảm       | int          |
| totalStockNoChangePrice | Số cổ phiếu tham chiếu | int          |
| totalStockUnderFloor    | Số mã sàn              | int          |
| totalStockOverCeiling   | Số mã trần             | int          |


---

# 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/4.-thong-ke-thi-truong/4.1.-lay-du-lieu-ve-do-rong-thi-truong-so-ma-san-so-ma-tran-so-ma-tang-giam-tham-chieu.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.
