> For the complete documentation index, see [llms.txt](https://hdsd.dnse.com.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hdsd.dnse.com.vn/san-pham-dich-vu/lightspeed-api-truoc-krx/iii.-market-data/2.-dac-ta-thong-tin-cac-message/2.1.-moi-truong.md).

# 2.1. Môi trường

Với các topic public không cần authentication:

<table data-header-hidden><thead><tr><th width="164"></th><th></th></tr></thead><tbody><tr><td><strong>Host</strong></td><td>wss://datafeed-lts.dnse.com.vn</td></tr><tr><td><strong>Port</strong></td><td>443</td></tr><tr><td><strong>Path</strong></td><td>/wss</td></tr><tr><td><strong>ClientID</strong></td><td>&#x3C;dnse-price-json-mqtt-ws-sub>-&#x3C;username>-&#x3C;random_sequence></td></tr><tr><td><strong>Username</strong></td><td>Lấy từ trường investorId trong phần 2.1.b</td></tr><tr><td><strong>Password</strong></td><td>Lấy từ trường token trong phần 2.1.a</td></tr></tbody></table>

## a. Đăng nhập

<table><thead><tr><th width="493">URL</th><th>METHOD</th></tr></thead><tbody><tr><td><a href="https://services.entrade.com.vn/dnse-user-service/api/auth">https://services.entrade.com.vn/dnse-user-service/api/auth</a></td><td>POST</td></tr></tbody></table>

### **Resquest Header**

| Field | Type | Description |
| ----- | ---- | ----------- |
| N/A   |      |             |

### **Resquest Body**

| Field    | Type   | Description                                           |
| -------- | ------ | ----------------------------------------------------- |
| username | String | ID đăng nhập: Email hoặc Số điện thoại hoặc Số lưu ký |
| password | String | Mật khẩu                                              |

### **Response Body**

| Field | Type   | Description                          |
| ----- | ------ | ------------------------------------ |
| token | String | JWT token (có hiệu lực trong 8 tiếng |

## **b. Thông tin tài khoản**

<table><thead><tr><th width="518">URL</th><th>METHOD</th></tr></thead><tbody><tr><td><a href="https://services.entrade.com.vn/dnse-user-service/api/me">https://services.entrade.com.vn/dnse-user-service/api/me</a></td><td>GET</td></tr></tbody></table>

### **Resquest Header**

<table><thead><tr><th width="209">Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Authorization</td><td>Bearer Bearer &#x3C;JWT token></td><td>Bearer &#x3C;JWT token> -> lấy JWT token từ mục 2.1.a</td></tr></tbody></table>

### **Resquest Body**

<table><thead><tr><th width="212">Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>N/A</td><td></td><td>OK</td></tr></tbody></table>

### **Response** B**ody**

<table><thead><tr><th width="212">Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>investorId</td><td>String</td><td>Mã khách hàng</td></tr><tr><td>name</td><td>String</td><td>Họ và tên</td></tr><tr><td>custodyCode</td><td>String</td><td>Số lưu ký</td></tr><tr><td>mobile</td><td>String</td><td>Số điện thoại</td></tr><tr><td>email</td><td>String</td><td>Email</td></tr><tr><td>&#x3C;others></td><td></td><td></td></tr></tbody></table>
