> For the complete documentation index, see [llms.txt](https://hdsd2.entrade.com.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hdsd2.entrade.com.vn/entrade-api/tai-lieu-api-cu/4.-giao-dich-phai-sinh/4.14.-dat-lenh-cat-lo.md).

# 4.14. Đặt lệnh cắt lỗ

<table><thead><tr><th width="247">Type</th><th width="252">URL</th><th>Method</th></tr></thead><tbody><tr><td>Real</td><td><a href="https://services.entrade.com.vn/entrade-api/risk_configs/%3Cinvestor_account_id%3E">https://services.entrade.com.vn/entrade-api/risk_configs/%3Cinvestor_account_id%3E</a></td><td>PATCH</td></tr><tr><td>Demo</td><td><a href="https://services.entrade.com.vn/entrade-api/risk_configs/%3Cinvestor_account_id%3E">https://services.entrade.com.vn/papertrade-entrade-api/risk_configs/%3Cinvestor_account_id%3E</a></td><td>PATCH</td></tr></tbody></table>

#### Path parameters

| Field             | Type        | Description                 |
| ----------------- | ----------- | --------------------------- |
| investorAccountId | <p><br></p> | Mã tài khoản của khách hàng |

#### Request header

| Field         | Type        | Description                         |
| ------------- | ----------- | ----------------------------------- |
| Authorization | <p><br></p> | Bearer \<JWT Token>                 |
| Trading-Token | <p><br></p> | Token được cấp sau khi xác thực OTP |

#### Request Body

| Field             | Type        | Description                                      |
| ----------------- | ----------- | ------------------------------------------------ |
| cutLossRate       | <p><br></p> | Mức cắt lỗ muốn đặt (0.14 = 14%)                 |
| investorId        | String      | Mã khách hàng                                    |
| investorAccountId | Int         | Mã tài khoản                                     |
| trailingEnabled   | Bool        | Có bật lệnh ngay không (False sẽ không bật lệnh) |

#### Response Body

| Field             | Type        | Description                       |
| ----------------- | ----------- | --------------------------------- |
| investorId        | String      | Mã khách hàng                     |
| investorAccountId | Int         | Mã tài khoản                      |
| cutLossRate       | Double      | Mức cắt lỗ hiện tại               |
| trailingEnabled   | Bool        | Có đang bật lệnh cắt lỗ hay không |
| createdDate       | String      | <p><br></p>                       |
| modifiedDate      | String      | <p><br></p>                       |
| maxCutLossRate    | <p><br></p> | Mức cắt lỗ tối đa                 |
