PP/MMR tài khoản
curl --request GET \
--url https://api.ssi.com.vn/api/v3/trading/ppmmrAccount \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.ssi.com.vn/api/v3/trading/ppmmrAccount"
headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'}
};
fetch('https://api.ssi.com.vn/api/v3/trading/ppmmrAccount', 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://api.ssi.com.vn/api/v3/trading/ppmmrAccount",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>"
],
]);
$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://api.ssi.com.vn/api/v3/trading/ppmmrAccount"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ssi.com.vn/api/v3/trading/ppmmrAccount")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ssi.com.vn/api/v3/trading/ppmmrAccount")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"equity": {
"accountNo": "F987654",
"dividend": "0",
"loanValue": "3200",
"totalDebt": "0",
"debt": "0",
"liability": "0",
"liabilitySSI": "0",
"netLiability": "0",
"fees": "0",
"interestSSI": "0",
"interestSPV": "0",
"withdrawable": "12345000",
"ee": "12358839",
"ee50": "24717678",
"ee60": "20598065",
"ee70": "17655484",
"ee80": "15448549",
"ee90": "13732043",
"action": "Normal",
"actionSSI": "Normal",
"equity": "12363039",
"equitySSI": "12363039",
"eeCash": "12345000",
"holdSubscription": "0",
"bankBalance": "0",
"onHoldCash": "0",
"doverdue": "0",
"doverdue_ssi": null,
"accountBalance": "12345000",
"d": "0",
"dspv": "0",
"dssi": "0",
"cia": "0",
"collateralAsset": "12363039",
"collateralAssetSSI": "12363039",
"totalAssets": "12363039",
"totalEquity": "12363039",
"totalEquitySSI": "12363039",
"callLMV": "0",
"forceLMV": "0",
"callLMVSSI": "0",
"forceLMVSSI": "0",
"lmv": "8400",
"lmvMargin": "8400",
"lmvMarginSSI": "8400",
"lmvNonMarginable": "0",
"lmvNonMarginableSSI": "0",
"preLoan": "0",
"marginRatio": "1",
"marginRatioSSI": "1",
"purchasingPower": "24717678",
"eeOrigin": "12358839",
"buyUnmatched": "0",
"sellUnmatched": "0",
"buyT0": "0",
"sellT0": "5432",
"sellT1": "0",
"sellT2": "0",
"buyT1": "0",
"buyT2": "0",
"creditLimit": "0",
"marginCallLMVSold": "0",
"marginCallLMVSoldSSI": "0",
"marginCall": "0",
"marginCallSSI": "0",
"collateralA": "0",
"collateralNon": "0",
"collateralASSI": "0",
"collateralNonSSI": "0",
"callMargin": "2940",
"callForcesell": "2100",
"callMarginSSI": "2940",
"callForcesellSSI": "2100",
"ar": "5432"
},
"derivative": null
}Giao dịch
PP/MMR tài khoản
Lấy thông tin PP/MMR của tài khoản.
GET
/
api
/
v3
/
trading
/
ppmmrAccount
PP/MMR tài khoản
curl --request GET \
--url https://api.ssi.com.vn/api/v3/trading/ppmmrAccount \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.ssi.com.vn/api/v3/trading/ppmmrAccount"
headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'}
};
fetch('https://api.ssi.com.vn/api/v3/trading/ppmmrAccount', 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://api.ssi.com.vn/api/v3/trading/ppmmrAccount",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>"
],
]);
$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://api.ssi.com.vn/api/v3/trading/ppmmrAccount"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ssi.com.vn/api/v3/trading/ppmmrAccount")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ssi.com.vn/api/v3/trading/ppmmrAccount")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"equity": {
"accountNo": "F987654",
"dividend": "0",
"loanValue": "3200",
"totalDebt": "0",
"debt": "0",
"liability": "0",
"liabilitySSI": "0",
"netLiability": "0",
"fees": "0",
"interestSSI": "0",
"interestSPV": "0",
"withdrawable": "12345000",
"ee": "12358839",
"ee50": "24717678",
"ee60": "20598065",
"ee70": "17655484",
"ee80": "15448549",
"ee90": "13732043",
"action": "Normal",
"actionSSI": "Normal",
"equity": "12363039",
"equitySSI": "12363039",
"eeCash": "12345000",
"holdSubscription": "0",
"bankBalance": "0",
"onHoldCash": "0",
"doverdue": "0",
"doverdue_ssi": null,
"accountBalance": "12345000",
"d": "0",
"dspv": "0",
"dssi": "0",
"cia": "0",
"collateralAsset": "12363039",
"collateralAssetSSI": "12363039",
"totalAssets": "12363039",
"totalEquity": "12363039",
"totalEquitySSI": "12363039",
"callLMV": "0",
"forceLMV": "0",
"callLMVSSI": "0",
"forceLMVSSI": "0",
"lmv": "8400",
"lmvMargin": "8400",
"lmvMarginSSI": "8400",
"lmvNonMarginable": "0",
"lmvNonMarginableSSI": "0",
"preLoan": "0",
"marginRatio": "1",
"marginRatioSSI": "1",
"purchasingPower": "24717678",
"eeOrigin": "12358839",
"buyUnmatched": "0",
"sellUnmatched": "0",
"buyT0": "0",
"sellT0": "5432",
"sellT1": "0",
"sellT2": "0",
"buyT1": "0",
"buyT2": "0",
"creditLimit": "0",
"marginCallLMVSold": "0",
"marginCallLMVSoldSSI": "0",
"marginCall": "0",
"marginCallSSI": "0",
"collateralA": "0",
"collateralNon": "0",
"collateralASSI": "0",
"collateralNonSSI": "0",
"callMargin": "2940",
"callForcesell": "2100",
"callMarginSSI": "2940",
"callForcesellSSI": "2100",
"ar": "5432"
},
"derivative": null
}Ủy quyền
Access token lấy từ endpoint /api/v3/auth/token hoặc /api/v3/auth/refresh.
Tiêu đề
Định dạng nội dung request body. Chủ yếu là application/json.
Thông tin client gửi request.
Ngôn ngữ phản hồi mong muốn. Nếu không có header này, hệ thống sẽ mặc định là en
Tham số truy vấn
Tài khoản 6 số định danh khách hàng tại SSI. Nếu số tài khoản là 003C123888 thì clientId = 123888
Tài khoản giao dịch cần lấy thông tin PP/MMR.