# 1.	Giới thiệu chung

DNSE cung cấp các API theo chuẩn Restful API với format JSON để phục vụ cho việc giao dịch chứng khoán. Để truy cập được các API này, khách hàng cần phải đăng nhập và sử dụng token sau đăng nhập để gọi API giao dịch. DNSE cung cấp cơ chế bảo mật 2 lớp gồm:

·        Lớp 1: sử dụng tài khoản và mật khẩu

·        Lớp 2: Sử dụng mã OTP

&#x20;Sau khi đăng nhập lớp 1, khách hàng được cấp một jwt-token. Tuy nhiên để có thể đặt lệnh thì cần thêm xác thực OTP lớp 2: kết quả ở bước này, khách hàng sẽ nhận được trading-token và dùng thêm token này để giao dịch.

·        Với các API lấy thông tin, khi gọi lên server cần truyền theo header Authorization: "Bearer < jwt-token>" trong đó jwt-token là giá trị token trả về lúc đăng nhập thành công lớp 1 (Mục 2.a)

·        Với các API làm thay đổi dữ liệu: ví dụ: đặt, huỷ lệnh, cần gửi thêm thông tin trên header có jwt-token cùng với trading-token lấy ở lớp 2 (Mục 2.2)


---

# 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://hdsd.dnse.com.vn/san-pham-dich-vu/lightspeed-api-truoc-krx/ii.-trading-api/1.-gioi-thieu-chung.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.
