Danh sách gói vay
curl --request GET \
--url https://openapi-uat.dnse.com.vn/accounts/{accountNo}/loan-packages \
--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}/loan-packages"
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}/loan-packages', 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}/loan-packages",
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}/loan-packages"
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}/loan-packages")
.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}/loan-packages")
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{
"symbolType": "VN30F1M",
"marketType": "DERIVATIVE",
"loanPackages": [
{
"id": 2279,
"name": "Gói giao dịch 02",
"initialRate": 0.1848,
"maintenanceRate": 0.1735,
"liquidRate": 0.1731,
"tradingFee": {
"id": 2404,
"name": "2000/HĐ",
"scope": "PRODUCT",
"channel": "ALL",
"schemaType": "FIXED",
"createdDate": "2022-12-13T08:22:12.530837Z",
"modifiedDate": "2022-12-13T08:22:12.530837Z",
"fixedTradingFee": 2000,
"fixedDailyCloseTradingFee": 2000
}
},
{
"id": 5058,
"name": "Test Phái sinh 1212",
"initialRate": 0.1,
"maintenanceRate": 0.03,
"liquidRate": 0.02,
"tradingFee": {
"id": 5057,
"name": "1500/HĐ",
"scope": "PRODUCT",
"channel": "ALL",
"schemaType": "FIXED",
"createdDate": "2023-12-12T03:55:37.22881Z",
"modifiedDate": "2023-12-12T03:55:37.22881Z",
"fixedTradingFee": 1500,
"fixedDailyCloseTradingFee": 1500
}
},
{
"id": 2278,
"name": "Gói giao dịch 01",
"initialRate": 0.2065,
"maintenanceRate": 0.1979,
"liquidRate": 0.1938,
"tradingFee": {
"id": 2436,
"name": "Miễn phí",
"scope": "PRODUCT",
"channel": "ALL",
"schemaType": "FIXED",
"createdDate": "2023-02-02T04:22:56.199278Z",
"modifiedDate": "2023-02-02T04:22:56.199278Z",
"fixedTradingFee": 2000,
"fixedDailyCloseTradingFee": 2000
}
},
{
"id": 9990,
"name": "Linhpham test",
"initialRate": 0.2065,
"maintenanceRate": 0.1979,
"liquidRate": 0.1938,
"tradingFee": {
"id": 9989,
"name": "fdfhv",
"scope": "PRODUCT",
"channel": "ALL",
"schemaType": "PROGRESSIVE",
"createdDate": "2026-01-16T09:09:15.556640382Z",
"modifiedDate": "2026-01-16T09:09:15.556640382Z",
"progressTradingFee": [
{
"fromQuantity": 1,
"toQuantity": 2000,
"fee": 1500
}
],
"progressDailyCloseTradingFee": [
{
"fromQuantity": 2001,
"toQuantity": 3000,
"fee": 2196
}
]
}
}
]
}{
"status": 400,
"code": "INVALID_INPUT",
"message": "marketType is invalid"
}{
"code": "OA-009",
"message": "Lỗi hệ thống",
"status": 500
}account
Danh sách gói vay
Truy vấn danh sách gói vay để đặt lệnh theo từng mã chứng khoán.
Với giao dịch cơ sở, trả về tối đa 2 gói vay bao gồm:
-
Gói tiền mặt: Tỷ lệ ký quỹ tiền mặt 100%, không sử dụng tiền vay margin (
initialRate= 1) -
Gói vay ký quỹ (margin): Tỷ lệ ký quỹ dưới 100%, có sử dụng đòn bẩy tiền vay margin (
initialRate≠ 1)
Với giao dịch phái sinh, tài khoản thường chỉ áp dụng một gói vay duy nhất cho tất cả các mã, với bộ tỷ lệ ký quỹ và phí cố định.
GET
/
accounts
/
{accountNo}
/
loan-packages
Danh sách gói vay
curl --request GET \
--url https://openapi-uat.dnse.com.vn/accounts/{accountNo}/loan-packages \
--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}/loan-packages"
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}/loan-packages', 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}/loan-packages",
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}/loan-packages"
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}/loan-packages")
.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}/loan-packages")
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{
"symbolType": "VN30F1M",
"marketType": "DERIVATIVE",
"loanPackages": [
{
"id": 2279,
"name": "Gói giao dịch 02",
"initialRate": 0.1848,
"maintenanceRate": 0.1735,
"liquidRate": 0.1731,
"tradingFee": {
"id": 2404,
"name": "2000/HĐ",
"scope": "PRODUCT",
"channel": "ALL",
"schemaType": "FIXED",
"createdDate": "2022-12-13T08:22:12.530837Z",
"modifiedDate": "2022-12-13T08:22:12.530837Z",
"fixedTradingFee": 2000,
"fixedDailyCloseTradingFee": 2000
}
},
{
"id": 5058,
"name": "Test Phái sinh 1212",
"initialRate": 0.1,
"maintenanceRate": 0.03,
"liquidRate": 0.02,
"tradingFee": {
"id": 5057,
"name": "1500/HĐ",
"scope": "PRODUCT",
"channel": "ALL",
"schemaType": "FIXED",
"createdDate": "2023-12-12T03:55:37.22881Z",
"modifiedDate": "2023-12-12T03:55:37.22881Z",
"fixedTradingFee": 1500,
"fixedDailyCloseTradingFee": 1500
}
},
{
"id": 2278,
"name": "Gói giao dịch 01",
"initialRate": 0.2065,
"maintenanceRate": 0.1979,
"liquidRate": 0.1938,
"tradingFee": {
"id": 2436,
"name": "Miễn phí",
"scope": "PRODUCT",
"channel": "ALL",
"schemaType": "FIXED",
"createdDate": "2023-02-02T04:22:56.199278Z",
"modifiedDate": "2023-02-02T04:22:56.199278Z",
"fixedTradingFee": 2000,
"fixedDailyCloseTradingFee": 2000
}
},
{
"id": 9990,
"name": "Linhpham test",
"initialRate": 0.2065,
"maintenanceRate": 0.1979,
"liquidRate": 0.1938,
"tradingFee": {
"id": 9989,
"name": "fdfhv",
"scope": "PRODUCT",
"channel": "ALL",
"schemaType": "PROGRESSIVE",
"createdDate": "2026-01-16T09:09:15.556640382Z",
"modifiedDate": "2026-01-16T09:09:15.556640382Z",
"progressTradingFee": [
{
"fromQuantity": 1,
"toQuantity": 2000,
"fee": 1500
}
],
"progressDailyCloseTradingFee": [
{
"fromQuantity": 2001,
"toQuantity": 3000,
"fee": 2196
}
]
}
}
]
}{
"status": 400,
"code": "INVALID_INPUT",
"message": "marketType is invalid"
}{
"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
Mã chứng khoán
Phản hồi
OK
Phân loại mã hợp đồng phái sinh theo thời gian đáo hạn (áp dụng cho DERIVATIVE)
- VN30F1M: HĐTL chỉ số VN30 1 tháng
- VN30F2M: HĐTL chỉ số VN30 2 tháng
- VN30F1Q: HĐTL chỉ số VN30 1 quý
- VN30F2Q: HĐTL chỉ số VN30 2 quý
Ví dụ:
"VN30F1M"
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ụ:
"DERIVATIVE"
Danh sách gói vay
Show child attributes
Show child attributes