> 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.15.-dat-lenh-chot-loi.md).

# 4.15. Đặt lệnh chốt lời

<table><thead><tr><th width="247">Type</th><th width="251">URL</th><th>Method</th></tr></thead><tbody><tr><td>Real</td><td><a href="https://services.entrade.com.vn/entrade-api/deal_risks">https://services.entrade.com.vn/entrade-api/deal_risks</a></td><td>POST</td></tr><tr><td>Demo</td><td><a href="https://services.entrade.com.vn/entrade-api/deal_risks">https://services.entrade.com.vn/papertrade-entrade-api/deal_risks</a></td><td>POST</td></tr></tbody></table>

#### 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           |
| --------------- | ----------- | --------------------- |
| id              | <p><br></p> | Số hiệu deal          |
| takeProfitPrice | <p><br></p> | Giá chốt lời muốn đặt |

#### Response Body

| Field             | Type        | Description                       |
| ----------------- | ----------- | --------------------------------- |
| id                | <p><br></p> | Số hiệu deal                      |
| status            | <p><br></p> | “ACTIVE” nghĩa là deal đang mở    |
| cutLossRate       | Double      | Mức cắt lỗ hiện tại               |
| takeProfitRate    | <p><br></p> | <p><br></p>                       |
| investorId        | String      | Mã khách hàng                     |
| investorAccountId | Int         | Mã tài khoản                      |
| 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                 |
