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{
"symbol": "ACB",
"marketType": "STOCK",
"loanPackages": [
{
"id": 1775,
"name": "GD Tiền mặt",
"initialRate": 1,
"interestRate": 0.125,
"liquidRate": 0.3,
"maintenanceRate": 0.4,
"type": "M",
"brokerFirmBuyingFeeRate": 0,
"brokerFirmSellingFeeRate": 0
},
{
"id": 1769,
"name": "RocketX",
"initialRate": 0.5,
"interestRate": 0.125,
"liquidRate": 0.3,
"maintenanceRate": 0.4,
"type": "M",
"brokerFirmBuyingFeeRate": 0.00045,
"brokerFirmSellingFeeRate": 0.00045
}
]
}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{
"symbol": "ACB",
"marketType": "STOCK",
"loanPackages": [
{
"id": 1775,
"name": "GD Tiền mặt",
"initialRate": 1,
"interestRate": 0.125,
"liquidRate": 0.3,
"maintenanceRate": 0.4,
"type": "M",
"brokerFirmBuyingFeeRate": 0,
"brokerFirmSellingFeeRate": 0
},
{
"id": 1769,
"name": "RocketX",
"initialRate": 0.5,
"interestRate": 0.125,
"liquidRate": 0.3,
"maintenanceRate": 0.4,
"type": "M",
"brokerFirmBuyingFeeRate": 0.00045,
"brokerFirmSellingFeeRate": 0.00045
}
]
}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: Gói vay giao dịch cơ sở
- DERIVATIVE: Gói vay giao dịch phái sinh
- BOND: Gói vay giao dịch trái phiếu
Mã chứng khoán
Phản hồi
STOCK
Mã chứng khoán
Ví dụ:
"ACB"
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"
Show child attributes
Show child attributes
Ví dụ:
[
{
"id": 1775,
"name": "GD Tiền mặt",
"initialRate": 1,
"interestRate": 0.125,
"liquidRate": 0.3,
"maintenanceRate": 0.4,
"type": "M",
"brokerFirmBuyingFeeRate": 0,
"brokerFirmSellingFeeRate": 0
}
]