Sổ lệnh
curl --request GET \
--url https://openapi-uat.dnse.com.vn/accounts/{accountNo}/orders \
--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"
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', 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",
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"
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")
.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")
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{
"orders": [
{
"id": 141,
"side": "NB",
"accountNo": "0001179019",
"symbol": "BCM",
"price": 51200,
"priceSecure": 51200,
"averagePrice": 0,
"quantity": 300,
"fillQuantity": 0,
"canceledQuantity": 0,
"leaveQuantity": 300,
"orderType": "LO",
"orderCategory": "NORMAL",
"orderStatus": "New",
"loanPackageId": 7937,
"marketType": "STOCK",
"transDate": "2026-03-16",
"createdDate": "2026-03-24T03:15:22.226297778Z",
"modifiedDate": "2026-03-24T03:15:22.358568266Z"
}
],
"pageIndex": 0,
"pageSize": 10,
"totalPages": 1,
"totalRecords": 1
}
account
Sổ lệnh
Lấy sổ lệnh giao dịch theo từng loại lệnh tương ứng thị trường cơ sở, phái sinh hay trái phiếu, bao gồm trạng thái và thông tin xử lý của từng lệnh.
-
Cơ sở (STOCK): lệnh thường (NORMAL), lệnh dừng có điều kiện (STOP)
-
Phái sinh (DERIVATIVE): lệnh thường (NORMAL), lệnh dừng có điều kiện (STOP), lệnh OCO (OCO)
-
Trái phiếu (BOND): lệnh thường (NORMAL)
GET
/
accounts
/
{accountNo}
/
orders
Sổ lệnh
curl --request GET \
--url https://openapi-uat.dnse.com.vn/accounts/{accountNo}/orders \
--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"
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', 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",
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"
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")
.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")
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{
"orders": [
{
"id": 141,
"side": "NB",
"accountNo": "0001179019",
"symbol": "BCM",
"price": 51200,
"priceSecure": 51200,
"averagePrice": 0,
"quantity": 300,
"fillQuantity": 0,
"canceledQuantity": 0,
"leaveQuantity": 300,
"orderType": "LO",
"orderCategory": "NORMAL",
"orderStatus": "New",
"loanPackageId": 7937,
"marketType": "STOCK",
"transDate": "2026-03-16",
"createdDate": "2026-03-24T03:15:22.226297778Z",
"modifiedDate": "2026-03-24T03:15:22.358568266Z"
}
],
"pageIndex": 0,
"pageSize": 10,
"totalPages": 1,
"totalRecords": 1
}
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
API version (YYYY-MM-DD)
Tham số đường dẫn
Số tiểu khoản
Tham số truy vấn
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
Phân loại lệnh
- NORMAL: lệnh thường (cơ sở, phái sinh, trái phiếu)
- STOP: lệnh dừng có điều kiện (cơ sở, phái sinh)
- OCO: lệnh OCO (phái sinh)
Kích thước trang dữ liệu
Số bản ghi trên mỗi trang
Phản hồi
OK
Danh sách lệnh giao dịch
Show child attributes
Show child attributes
Ví dụ:
[ { "id": 141, "side": "NB", "accountNo": "0001179019", "symbol": "BCM", "price": 51200, "priceSecure": 51200, "averagePrice": 0, "quantity": 300, "fillQuantity": 0, "canceledQuantity": 0, "leaveQuantity": 300, "orderType": "LO", "orderCategory": "NORMAL", "orderStatus": "New", "loanPackageId": 7937, "marketType": "STOCK", "transDate": "2026-03-16", "createdDate": "2026-03-24T03:15:22.226297778Z", "modifiedDate": "2026-03-24T03:15:22.358568266Z" } ]