# 1.6. Lấy dữ liệu Freefloat

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.PriceStatistics().get_freefloat(
    tickers=tickers,
    from_date=from_date,
    to_date=to_date
).get_data()
```

**Tham số:**

| Tên tham số | Mô tả                               | Kiểu dữ liệu  | Mặc định | Bắt buộc |
| ----------- | ----------------------------------- | ------------- | -------- | -------- |
| tickers     | Danh sách mã được viết in hoa.      | str hoặc list |          | Có       |
| from\_date  | Mốc thời gian lấy dữ liệu xa nhất.  | str           |          | Có       |
| to\_date    | Mốc thời gian lấy dữ liệu gần nhất. | str           |          | Có       |

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

```python
data = client.PriceStatistics().get_freefloat(
    tickers=tickers,
    from_date="2025-08-20",
    to_date="2025-08-27"
)
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 |
| -------------- | ------------------------------------ | ------------ |
| ticker         | Tên mã.                              | str          |
| timestamp      | Thời gian giao dịch                  | str          |
| freefloat      | Giá trị cổ phiếu chuyển nhượng tự do | int          |

Ví dụ:

```python
from FiinQuantX import FiinSession

username = 'REPLACE_WITH_YOUR_USER_NAME'
password = 'REPLACE_WITH_YOUR_PASS_WORD'

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

tickers = ["HPG", "MWG"]

data = client.PriceStatistics().get_freefloat(
    tickers=tickers,
    from_date="2025-08-20",
    to_date="2025-08-27"
)
print(data)
```
