Tài sản, vị thế mở
curl --request GET \
--url https://openapi.tcbs.com.vn/khronos/v1/account/portfolio/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://openapi.tcbs.com.vn/khronos/v1/account/portfolio/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://openapi.tcbs.com.vn/khronos/v1/account/portfolio/status', 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.tcbs.com.vn/khronos/v1/account/portfolio/status",
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>"
],
]);
$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.tcbs.com.vn/khronos/v1/account/portfolio/status"
req, _ := http.NewRequest("GET", url, nil)
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://openapi.tcbs.com.vn/khronos/v1/account/portfolio/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.tcbs.com.vn/khronos/v1/account/portfolio/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cmd": "Web.Portfolio.PositionClose",
"rc": "1",
"data": [
{
"symbol": "TOTAL",
"side": "",
"openPrice": 0,
"closePrice": 0,
"closePosition": "0",
"fee": 11400,
"tax": 15275,
"closeVM": 500000,
"unrealize": 500000,
"closePC": 0,
"time": ""
},
{
"symbol": "VN30F2103",
"side": "S",
"openPrice": 1180,
"closePrice": 1175,
"closePosition": "1/1",
"fee": 5700,
"tax": 7637.5,
"closeVM": 500000,
"unrealize": 0,
"closePC": 3.26,
"time": "11:56:24"
}
]
}Tài khoản
Tài sản, vị thế mở
Tra cứu vị thế mở phái sinh.
GET
/
khronos
/
v1
/
account
/
portfolio
/
status
Tài sản, vị thế mở
curl --request GET \
--url https://openapi.tcbs.com.vn/khronos/v1/account/portfolio/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://openapi.tcbs.com.vn/khronos/v1/account/portfolio/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://openapi.tcbs.com.vn/khronos/v1/account/portfolio/status', 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.tcbs.com.vn/khronos/v1/account/portfolio/status",
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>"
],
]);
$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.tcbs.com.vn/khronos/v1/account/portfolio/status"
req, _ := http.NewRequest("GET", url, nil)
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://openapi.tcbs.com.vn/khronos/v1/account/portfolio/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.tcbs.com.vn/khronos/v1/account/portfolio/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cmd": "Web.Portfolio.PositionClose",
"rc": "1",
"data": [
{
"symbol": "TOTAL",
"side": "",
"openPrice": 0,
"closePrice": 0,
"closePosition": "0",
"fee": 11400,
"tax": 15275,
"closeVM": 500000,
"unrealize": 500000,
"closePC": 0,
"time": ""
},
{
"symbol": "VN30F2103",
"side": "S",
"openPrice": 1180,
"closePrice": 1175,
"closePosition": "1/1",
"fee": 5700,
"tax": 7637.5,
"closeVM": 500000,
"unrealize": 0,
"closePC": 3.26,
"time": "11:56:24"
}
]
}Ủy quyền
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Tham số truy vấn
Số tài khoản lưu ký.
Tiểu khoản phái sinh.