curl --request GET \
--url https://openapi-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId} \
--header 'X-API-Key: <x-api-key>' \
--header 'X-Aux-Date: <x-aux-date>' \
--header 'X-Signature: <x-signature>'import requests
url = "https://openapi-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId}"
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-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId}', 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-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId}",
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-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId}"
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-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId}")
.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-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId}")
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{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"loanPackageId": 5757,
"orderCategory": "NORMAL",
"orderStatus": "PartiallyFilled",
"fillQuantity": 200,
"lastQuantity": 100,
"lastPrice": 24250,
"averagePrice": 24250,
"transDate": "2026-07-13",
"taxRate": 0,
"exchangeFeeRate": 0.00027,
"feeRate": 0.00027,
"leaveQuantity": 300,
"canceledQuantity": 0,
"error": "",
"marketType": "STOCK",
"priceSecure": 24250,
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:59.052768Z",
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":4.0}",
"reports": [
{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"orderStatus": "PartiallyFilled",
"fillQuantity": 100,
"lastQuantity": 100,
"lastPrice": 24250,
"averagePrice": 24250,
"transDate": "2026-07-13",
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:51.613222Z",
"taxRate": 0,
"exchangeFeeRate": 0,
"feeRate": 0.00027,
"leaveQuantity": 400,
"canceledQuantity": 0,
"error": "",
"priceSecure": 24250,
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":3}",
"loanPackageId": 5757
},
{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"orderStatus": "PartiallyFilled",
"fillQuantity": 100,
"lastQuantity": 100,
"lastPrice": 24250,
"averagePrice": 24250,
"transDate": "2026-07-13",
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:51.613222Z",
"taxRate": 0,
"exchangeFeeRate": 0,
"feeRate": 0.00027,
"leaveQuantity": 400,
"canceledQuantity": 0,
"error": "",
"priceSecure": 24250,
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":3}",
"loanPackageId": 5757
},
{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"orderStatus": "PendingNew",
"fillQuantity": 0,
"lastQuantity": 0,
"lastPrice": 0,
"averagePrice": 0,
"transDate": "2026-07-13",
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:36.532743Z",
"taxRate": 0,
"exchangeFeeRate": 0,
"feeRate": 0.00027,
"leaveQuantity": 500,
"canceledQuantity": 0,
"error": "<no value>",
"priceSecure": 24250,
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":1}",
"loanPackageId": 5757
},
{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"orderStatus": "New",
"fillQuantity": 0,
"lastQuantity": 0,
"lastPrice": 0,
"averagePrice": 0,
"transDate": "2026-07-13",
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:36.545128Z",
"taxRate": 0,
"exchangeFeeRate": 0,
"feeRate": 0.00027,
"leaveQuantity": 500,
"canceledQuantity": 0,
"error": "",
"priceSecure": 24250,
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":2}",
"loanPackageId": 5757
},
{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"orderStatus": "PartiallyFilled",
"fillQuantity": 200,
"lastQuantity": 100,
"lastPrice": 24250,
"averagePrice": 24250,
"transDate": "2026-07-13",
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:59.052768Z",
"taxRate": 0,
"exchangeFeeRate": 0,
"feeRate": 0.00027,
"leaveQuantity": 300,
"canceledQuantity": 0,
"error": "",
"priceSecure": 24250,
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":4}",
"loanPackageId": 5757
}
]
}{
"code": "OA-003",
"message": "Thông tin nhập không hợp lệ",
"status": 400
}{
"code": "OA-009",
"message": "Lỗi hệ thống",
"status": 500
}Chi tiết trạng thái lệnh
Lấy lịch sử các lần cập nhật trạng thái hay khớp từng phần của một lệnh giao dịch theo orderId , chỉ áp dụng cho lệnh phái sinh.
curl --request GET \
--url https://openapi-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId} \
--header 'X-API-Key: <x-api-key>' \
--header 'X-Aux-Date: <x-aux-date>' \
--header 'X-Signature: <x-signature>'import requests
url = "https://openapi-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId}"
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-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId}', 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-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId}",
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-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId}"
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-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId}")
.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-uat.dnse.com.vn/accounts/{accountNo}/executions/{orderId}")
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{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"loanPackageId": 5757,
"orderCategory": "NORMAL",
"orderStatus": "PartiallyFilled",
"fillQuantity": 200,
"lastQuantity": 100,
"lastPrice": 24250,
"averagePrice": 24250,
"transDate": "2026-07-13",
"taxRate": 0,
"exchangeFeeRate": 0.00027,
"feeRate": 0.00027,
"leaveQuantity": 300,
"canceledQuantity": 0,
"error": "",
"marketType": "STOCK",
"priceSecure": 24250,
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:59.052768Z",
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":4.0}",
"reports": [
{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"orderStatus": "PartiallyFilled",
"fillQuantity": 100,
"lastQuantity": 100,
"lastPrice": 24250,
"averagePrice": 24250,
"transDate": "2026-07-13",
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:51.613222Z",
"taxRate": 0,
"exchangeFeeRate": 0,
"feeRate": 0.00027,
"leaveQuantity": 400,
"canceledQuantity": 0,
"error": "",
"priceSecure": 24250,
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":3}",
"loanPackageId": 5757
},
{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"orderStatus": "PartiallyFilled",
"fillQuantity": 100,
"lastQuantity": 100,
"lastPrice": 24250,
"averagePrice": 24250,
"transDate": "2026-07-13",
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:51.613222Z",
"taxRate": 0,
"exchangeFeeRate": 0,
"feeRate": 0.00027,
"leaveQuantity": 400,
"canceledQuantity": 0,
"error": "",
"priceSecure": 24250,
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":3}",
"loanPackageId": 5757
},
{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"orderStatus": "PendingNew",
"fillQuantity": 0,
"lastQuantity": 0,
"lastPrice": 0,
"averagePrice": 0,
"transDate": "2026-07-13",
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:36.532743Z",
"taxRate": 0,
"exchangeFeeRate": 0,
"feeRate": 0.00027,
"leaveQuantity": 500,
"canceledQuantity": 0,
"error": "<no value>",
"priceSecure": 24250,
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":1}",
"loanPackageId": 5757
},
{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"orderStatus": "New",
"fillQuantity": 0,
"lastQuantity": 0,
"lastPrice": 0,
"averagePrice": 0,
"transDate": "2026-07-13",
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:36.545128Z",
"taxRate": 0,
"exchangeFeeRate": 0,
"feeRate": 0.00027,
"leaveQuantity": 500,
"canceledQuantity": 0,
"error": "",
"priceSecure": 24250,
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":2}",
"loanPackageId": 5757
},
{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"orderStatus": "PartiallyFilled",
"fillQuantity": 200,
"lastQuantity": 100,
"lastPrice": 24250,
"averagePrice": 24250,
"transDate": "2026-07-13",
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:59.052768Z",
"taxRate": 0,
"exchangeFeeRate": 0,
"feeRate": 0.00027,
"leaveQuantity": 300,
"canceledQuantity": 0,
"error": "",
"priceSecure": 24250,
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":4}",
"loanPackageId": 5757
}
]
}{
"code": "OA-003",
"message": "Thông tin nhập không hợp lệ",
"status": 400
}{
"code": "OA-009",
"message": "Lỗi hệ thống",
"status": 500
}Tiêu đề
API Key được cấp khi đăng ký dịch vụ
Thời gian thực hiện yêu cầu
Chữ ký xác thực yêu cầu
Phiên bản API
Tham số truy vấn
Loại thị trường
- STOCK: Lệnh cơ sở
- DERIVATIVE: Lệnh phái sinh
Phân loại lệnh thường (mặc định NORMAL)
Phản hồi
OK
ID lệnh
1651
Chiều giao dịch
- NB: Mua
- NS: Bán
"NB"
Số tiểu khoản
"0001179019"
Mã chứng khoán
"HPG"
Giá đặt lệnh
24250
Khối lượng đặt lệnh
500
Loại lệnh
- LO: Lệnh giới hạn
- MOK/MAK/MTL: Lệnh thị trường
- ATO/ATC: Lệnh phiên định kỳ mở cửa/đóng cửa
- PLO: Lệnh khớp lệnh sau giờ
"LO"
Mã gói vay
5757
Phân loại lệnh (mặc định NORMAL)
"NORMAL"
Trạng thái lệnh
- Pending/PendingNew: Chờ gửi
- New: Chờ khớp
- PartiallyFilled: Khớp một phần
- Filled: Khớp toàn bộ
- Rejected: Bị từ chối
- Expired: Hết hạn trong phiên
- DoneForDay: Lệnh được giải tỏa do không khớp trong phiên
"PartiallyFilled"
Khối lượng đã khớp
200
Khối lượng khớp gần nhất
100
Giá khớp gần nhất
24250
Giá khớp trung bình
24250
Ngày giao dịch
"2026-07-13"
Tỷ lệ thuế
0
Tỷ lệ phí trả Sở giao dịch
0.00027
Tổng tỷ lệ phí của lệnh
0.00027
Khối lượng còn lại chưa khớp
300
Khối lượng đã hủy
0
Mã lỗi nếu lệnh bị từ chối
""
Loại thị trường
- STOCK: Lệnh cơ sở
- DERIVATIVE: Lệnh phái sinh
"STOCK"
Giá dùng để kiểm tra sức mua/đặt lệnh
24250
Thời điểm tạo lệnh
"2026-07-13T06:50:36.532741Z"
Thời điểm cập nhật lệnh
"2026-07-13T06:50:59.052768Z"
Thông tin bổ sung của lệnh
"{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":4.0}"
Danh sách trạng thái lệnh theo từng lần cập nhật
Show child attributes
Show child attributes
[
{
"id": 1651,
"side": "NB",
"accountNo": "0001179019",
"symbol": "HPG",
"price": 24250,
"quantity": 500,
"orderType": "LO",
"orderStatus": "PartiallyFilled",
"fillQuantity": 100,
"lastQuantity": 100,
"lastPrice": 24250,
"averagePrice": 24250,
"transDate": "2026-07-13",
"createdDate": "2026-07-13T06:50:36.532741Z",
"modifiedDate": "2026-07-13T06:50:51.613222Z",
"taxRate": 0,
"exchangeFeeRate": 0,
"feeRate": 0.00027,
"leaveQuantity": 400,
"canceledQuantity": 0,
"error": "",
"priceSecure": 24250,
"metadata": "{\"orderSession\":\"OPEN\",\"ip\":\"202.60.110.58\",\"maker\":\"1000005917\",\"isForeigner\":false,\"reqId\":\"24534\",\"probType\":\"CUSTOMER_8000\",\"eventNo\":3}",
"loanPackageId": 5757
}
]