Lịch sử lệnh
curl --request GET \
--url https://openapi-uat.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-uat.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-uat.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-uat.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-uat.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-uat.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-uat.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": "INVALID_INPUT",
"message": "invalid from > to"
}{
"code": "OA-009",
"message": "Lỗi hệ thống",
"status": 500
}account
Lịch sử lệnh
Lấy danh sách lệnh đã đặt trong một khoảng thời gian nhất định. Thời gian tra cứu tối đa trong vòng 1 năm kể từ ngày hiện tại.
GET
/
accounts
/
{accountNo}
/
orders
/
history
Lịch sử lệnh
curl --request GET \
--url https://openapi-uat.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-uat.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-uat.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-uat.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-uat.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-uat.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-uat.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": "INVALID_INPUT",
"message": "invalid from > to"
}{
"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ố đườ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
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
Ví dụ:
"0001179019"
Tổng khối lượng đã khớp
Ví dụ:
0
Tổng số bản ghi
Ví dụ:
8
Vị trí bắt đầu của tập bản ghi được trả về
Ví dụ:
0
Vị trí kết thúc của tập bản ghi được trả về
Ví dụ:
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
Ví dụ:
"STOCK"
Danh sách lệnh giao dịch
Show child attributes
Show child attributes
Ví dụ:
[
{
"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"
}
]