# 7.8. Danh sách lệnh

* Cơ sở

```python
username_dnse = 'REPLACE_WITH_YOUR_DNSE_USERNAME'
password_dnse = 'REPLACE_WITH_YOUR_DNSE_PASSWORD'

client_order = client.FiinQuantConnector(
    broker='DNSE',
    username=username_dnse,
    password=password_dnse,
    smart_otp=True
).login()

orderbook = client_order.get_orderbook(
    account_id='0001009212',
    loan_id='13720'
)

order_list = orderbook.get_list_orders(from_date='2025-10-09', to_date='2025-10-16')

for i in order_list:
    print(i.summary())
```

**Tham số:**

| Tên tham số | Kiểu dữ liệu | Bắt buộc | Mô tả                                                                                                               |
| ----------- | ------------ | -------- | ------------------------------------------------------------------------------------------------------------------- |
| from\_date  | str          | Không    | Thời gian lọc ngày nhỏ nhất. Nếu không truyền, trả về tất cả các lệnh từ lệnh tạo từ ngày cũ nhất trong danh sách.  |
| to\_date    | str          | Không    | Thời gian lọc ngày lớn nhất. Nếu không truyền, trả về tất cả các lệnh từ lệnh tạo từ ngày mới nhất trong danh sách. |
| ticker      | str          | Không    | Lọc theo mã. Nếu không truyền, trả về tất cả các mã có trong các lệnh của danh sách.                                |
| status      | str          | Không    | Lọc theo trạng thái.  Nếu không truyền, trả về tất cả trạng thái hiện có trong danh sách                            |

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

```json
{
    'id': 191, 
    'ticker': 'HPG', 
    'side': 'Buy', 
    'order_type': 'LO', 
    'price': 26900.0, 
    'quantity': 1000, 
    'filled': 0, 
    'avg_price': 0.0, 
    'modified': '29/10/2025 11:23:54', 
    'created': '29/10/2025 11:23:54', 
    'status': 'New', 
    'error': None, 
    'status_code': 200
}
```

* Phái sinh

```python
username_dnse = 'REPLACE_WITH_YOUR_DNSE_USERNAME'
password_dnse = 'REPLACE_WITH_YOUR_DNSE_PASSWORD'

client_order = client.FiinQuantConnector(
    broker='DNSE',
    username=username_dnse,
    password=password_dnse,
    smart_otp=True
).login()

orderbook_der = client_order.get_derivative_orderbook(
    account_id='0001009212',
    loan_id='2278'
)

derivative_positions = orderbook_der.get_positions()
for i in derivative_positions:
    print(i.summary())
```

**Tham số:**

| Tên tham số | Kiểu dữ liệu | Bắt buộc | Mô tả                |
| ----------- | ------------ | -------- | -------------------- |
| from\_date  | str          | Không    | Thời gian lọc.       |
| to\_date    | str          | Không    | Thời gian lọc.       |
| ticker      | str          | Không    | Lọc theo mã.         |
| status      | str          | Không    | Lọc theo trạng thái. |


---

# 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/7.-ham-dat-lenh/7.8.-danh-sach-lenh.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.
