> 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.16.-dong-deal.md).

# 4.16. Đóng Deal

<table><thead><tr><th width="249">Type</th><th width="249">URL</th><th>Method</th></tr></thead><tbody><tr><td>Real</td><td><a href="https://services.entrade.com.vn/entrade-api/derivative/deals/%7Bdeal_id%7D/_close_deal">https://services.entrade.com.vn/entrade-api/derivative/deals/{deal_id}/_close_deal</a></td><td>POST</td></tr><tr><td>Demo</td><td><a href="https://services.entrade.com.vn/entrade-api/derivative/deals/%7Bdeal_id%7D/_close_deal">https://services.entrade.com.vn/papertrade-entrade-api/derivative/deals/{deal_id}/_close_deal</a></td><td>POST</td></tr></tbody></table>

#### Path parameters

| Field    | Type        | Description  |
| -------- | ----------- | ------------ |
| deal\_id | <p><br></p> | Số hiệu deal |

#### 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             |
| ----------- | ----------- | ----------------------- |
| orderType   | <p><br></p> | Truyền vào “LO”         |
| triggeredBy | <p><br></p> | Truyền vào “close-deal” |

#### Response Body

| Field             | Type        | Description   |
| ----------------- | ----------- | ------------- |
| id                | <p><br></p> | Số hiệu deal  |
| investorId        | String      | Mã khách hàng |
| investorAccountId | Int         | Mã tài khoản  |
| …                 | <p><br></p> | <p><br></p>   |
