curl --request GET \
--url https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history \
--header 'X-Api-Key: <x-api-key>' \
--header 'X-Aux-Date: <x-aux-date>' \
--header 'X-Signature: <x-signature>'import requests
url = "https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history"
headers = {
"X-Api-Key": "<x-api-key>",
"X-Aux-Date": "<x-aux-date>",
"X-Signature": "<x-signature>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Api-Key': '<x-api-key>',
'X-Aux-Date': '<x-aux-date>',
'X-Signature': '<x-signature>'
}
};
fetch('https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <x-api-key>",
"X-Aux-Date: <x-aux-date>",
"X-Signature: <x-signature>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("X-Aux-Date", "<x-aux-date>")
req.Header.Add("X-Signature", "<x-signature>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history")
.header("X-Api-Key", "<x-api-key>")
.header("X-Aux-Date", "<x-aux-date>")
.header("X-Signature", "<x-signature>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["X-Aux-Date"] = '<x-aux-date>'
request["X-Signature"] = '<x-signature>'
response = http.request(request)
puts response.read_body{
"accountNo": "0001179019",
"fillQuantity": 0,
"total": 8,
"start": 0,
"end": 8,
"marketType": "STOCK",
"data": [
{
"id": "20260312_241",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Expired",
"price": 27200,
"quantity": 200,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 200,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T06:44:18.813804Z",
"modifiedDate": "2026-03-18T15:28:24.44026Z"
},
{
"id": "20260312_201",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Canceled",
"price": 27200,
"quantity": 100,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 100,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T04:38:39.589764Z",
"modifiedDate": "2026-03-17T06:44:18.80718Z"
},
{
"id": "20260312_191",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Canceled",
"price": 27000,
"quantity": 100,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 100,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T04:37:55.076343Z",
"modifiedDate": "2026-03-17T04:38:39.58558Z"
},
{
"id": "20260312_171",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Rejected",
"price": 27200,
"quantity": 300,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 300,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T04:27:07.160028Z",
"modifiedDate": "2026-03-17T04:27:07.16518Z"
},
{
"id": "20260312_161",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Canceled",
"price": 27200,
"quantity": 200,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 200,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T04:26:29.007723Z",
"modifiedDate": "2026-03-17T04:27:07.156301Z"
},
{
"id": "20260312_151",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Canceled",
"price": 27100,
"quantity": 100,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 100,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T04:22:19.045725Z",
"modifiedDate": "2026-03-17T04:26:28.9999Z"
},
{
"id": "20260305_61",
"symbol": "ACB",
"side": "NB",
"orderType": "LO",
"orderStatus": "Expired",
"price": 23200,
"quantity": 100,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 100,
"averagePrice": 0,
"loanPackageId": 5757,
"transDate": "2026-03-05",
"createdDate": "2026-03-11T08:32:01.401474Z",
"modifiedDate": "2026-03-11T14:35:53.763802Z"
},
{
"id": "20260224_181",
"symbol": "FPT",
"side": "NB",
"orderType": "LO",
"orderStatus": "Expired",
"price": 95000,
"quantity": 100,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 100,
"averagePrice": 0,
"loanPackageId": 1372,
"transDate": "2026-02-24",
"createdDate": "2026-02-26T08:25:18.060101Z",
"modifiedDate": "2026-02-26T14:41:52.221586Z"
}
]
}{
"status": 400,
"code": "OA-003",
"message": "Thông tin nhập không hợp lệ"
}{
"status": 500,
"code": "OA-009",
"message": "Lỗi hệ thống"
}Lịch sử lệnh
curl --request GET \
--url https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history \
--header 'X-Api-Key: <x-api-key>' \
--header 'X-Aux-Date: <x-aux-date>' \
--header 'X-Signature: <x-signature>'import requests
url = "https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history"
headers = {
"X-Api-Key": "<x-api-key>",
"X-Aux-Date": "<x-aux-date>",
"X-Signature": "<x-signature>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Api-Key': '<x-api-key>',
'X-Aux-Date': '<x-aux-date>',
'X-Signature': '<x-signature>'
}
};
fetch('https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <x-api-key>",
"X-Aux-Date: <x-aux-date>",
"X-Signature: <x-signature>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("X-Aux-Date", "<x-aux-date>")
req.Header.Add("X-Signature", "<x-signature>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history")
.header("X-Api-Key", "<x-api-key>")
.header("X-Aux-Date", "<x-aux-date>")
.header("X-Signature", "<x-signature>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.dnse.com.vn/accounts/{accountNo}/orders/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["X-Aux-Date"] = '<x-aux-date>'
request["X-Signature"] = '<x-signature>'
response = http.request(request)
puts response.read_body{
"accountNo": "0001179019",
"fillQuantity": 0,
"total": 8,
"start": 0,
"end": 8,
"marketType": "STOCK",
"data": [
{
"id": "20260312_241",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Expired",
"price": 27200,
"quantity": 200,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 200,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T06:44:18.813804Z",
"modifiedDate": "2026-03-18T15:28:24.44026Z"
},
{
"id": "20260312_201",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Canceled",
"price": 27200,
"quantity": 100,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 100,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T04:38:39.589764Z",
"modifiedDate": "2026-03-17T06:44:18.80718Z"
},
{
"id": "20260312_191",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Canceled",
"price": 27000,
"quantity": 100,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 100,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T04:37:55.076343Z",
"modifiedDate": "2026-03-17T04:38:39.58558Z"
},
{
"id": "20260312_171",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Rejected",
"price": 27200,
"quantity": 300,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 300,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T04:27:07.160028Z",
"modifiedDate": "2026-03-17T04:27:07.16518Z"
},
{
"id": "20260312_161",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Canceled",
"price": 27200,
"quantity": 200,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 200,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T04:26:29.007723Z",
"modifiedDate": "2026-03-17T04:27:07.156301Z"
},
{
"id": "20260312_151",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Canceled",
"price": 27100,
"quantity": 100,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 100,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T04:22:19.045725Z",
"modifiedDate": "2026-03-17T04:26:28.9999Z"
},
{
"id": "20260305_61",
"symbol": "ACB",
"side": "NB",
"orderType": "LO",
"orderStatus": "Expired",
"price": 23200,
"quantity": 100,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 100,
"averagePrice": 0,
"loanPackageId": 5757,
"transDate": "2026-03-05",
"createdDate": "2026-03-11T08:32:01.401474Z",
"modifiedDate": "2026-03-11T14:35:53.763802Z"
},
{
"id": "20260224_181",
"symbol": "FPT",
"side": "NB",
"orderType": "LO",
"orderStatus": "Expired",
"price": 95000,
"quantity": 100,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 100,
"averagePrice": 0,
"loanPackageId": 1372,
"transDate": "2026-02-24",
"createdDate": "2026-02-26T08:25:18.060101Z",
"modifiedDate": "2026-02-26T14:41:52.221586Z"
}
]
}{
"status": 400,
"code": "OA-003",
"message": "Thông tin nhập không hợp lệ"
}{
"status": 500,
"code": "OA-009",
"message": "Lỗi hệ thống"
}Tiêu đề
API key được cấp khi đăng ký dịch vụ DNSE OpenAPI.
Ví dụ: b3JnOmRuc2UgaWQ6MjdlZTc1MzcxZGFkNTY0NmYzYTM2NDk1ZGE3OGNiOGQgaDptdXJtdXIxMjg=
Thời gian thực hiện request, dùng trong cơ chế ký request của DNSE.
Ví dụ: Sat, 01 May 2026 14:24:23 +0000
Chữ ký xác thực request được tạo từ API key secret và X-Aux-Date.
Ví dụ: Signature keyId="b3JnOmRuc2UgaWQ6MjdlZTc1MzcxZGFkNTY0NmYzYTM2NDk1ZGE3OGNiOGQgaDptdXJtdXIxMjg=",algorithm="hmac-sha256",headers="(request-target) x-aux-date",signature="rfbVXHDUi%2B%2FsOkLXle7O17Qm%2F05cbISSR%2BDcFrBHfqQ%3D",nonce="4add8c3264e4492b9f8ecde0cf26b523"
Tham số đường dẫn
Số tiểu khoản
Tham số truy vấn
Loại thị trường
-
STOCK: Gói vay giao dịch cơ sở
-
DERIVATIVE: Gói vay giao dịch phái sinh
-
BOND: Giao dịch trái phiếu Loại thị trường.
-
STOCK: Giao dịch cơ sở -
DERIVATIVE: Giao dịch phái sinh -
BOND: Giao dịch trái phiếu
STOCK, DERIVATIVE, BOND "STOCK"
Ngày bắt đầu (yyyy-mm-dd)
- Thời gian tra cứu tối đa trong 1 năm tính từ ngày hiện tại
Ngày kết thúc (yyyy-mm-dd)
- Lớn hơn hoặc bằng ngày bắt đầu và không vượt quá ngày hiện tại
Phản hồi
OK
Số tiểu khoản
"0001179019"
Tổng khối lượng đã khớp
0
Tổng số bản ghi
8
Vị trí bắt đầu của tập bản ghi được trả về
0
Vị trí kết thúc của tập bản ghi được trả về
8
Loại thị trường
- STOCK: Gói vay giao dịch cơ sở
- DERIVATIVE: Gói vay giao dịch phái sinh
STOCK, DERIVATIVE, BOND "STOCK"
Danh sách lệnh giao dịch
Show child attributes
Show child attributes
[
{
"id": "20260312_241",
"symbol": "HPG",
"side": "NB",
"orderType": "LO",
"orderStatus": "Expired",
"price": 27200,
"quantity": 200,
"fillQuantity": 0,
"leaveQuantity": 0,
"canceledQuantity": 200,
"averagePrice": 0,
"loanPackageId": 5765,
"transDate": "2026-03-12",
"createdDate": "2026-03-17T06:44:18.813804Z",
"modifiedDate": "2026-03-18T15:28:24.44026Z"
}
]