curl -H "X-FH-APIKEY: $FINHAY_API_KEY" \
"https://open-api.fhsc.com.vn/market/v2/financial-statement/statement?symbol=VNM&type=cash-flow&period=quarterly&limit=5"import requests
url = "https://open-api.fhsc.com.vn/market/v2/financial-statement/statement"
headers = {"X-FH-APIKEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-FH-APIKEY': '<api-key>'}};
fetch('https://open-api.fhsc.com.vn/market/v2/financial-statement/statement', 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://open-api.fhsc.com.vn/market/v2/financial-statement/statement",
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-FH-APIKEY: <api-key>"
],
]);
$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://open-api.fhsc.com.vn/market/v2/financial-statement/statement"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-FH-APIKEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://open-api.fhsc.com.vn/market/v2/financial-statement/statement")
.header("X-FH-APIKEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://open-api.fhsc.com.vn/market/v2/financial-statement/statement")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-FH-APIKEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error_code": "0",
"message": "success",
"data": [
{
"year": 2025,
"quarter": 4,
"loinhuanlotruocthue": 3476999882086,
"khauhaotaisancodinh": 541738993017,
"chiphilaivay": 89980184766,
"loinhuanlotuhoatdongkinhdoanhtruocthaydoivonluudong": 3875782613126,
"tanggiamhangtonkho": -696279778126,
"thuethunhapdoanhnghiepdanop": -367025679910,
"luuchuyentienthuantuhoatdongkinhdoanh": 1738942804862,
"tienchidemuasamxaydungtaisancodinh": -345651260618,
"luuchuyentienthuantuhoatdongdautu": -273822901641,
"tienvaynganhandaihannhanduoc": 6403017072055,
"tienchitranogocvay": -5218255024631,
"cotucloinhuandatrachochusohuu": -6007520145910,
"luuchuyentienthuantusudungvaohoatdongtaichinh": -4822758098486,
"luuchuyentienthuantrongnam": -3357638195265,
"tienvatuongduongtiendaunam": 5154466367051,
"anhhuongcuathaydoitygiahoidoaiquydoingoaite": -1948452915,
"tienvatuongduongtiencuoinam": 1794879718871
}
]
}{
"error_code": "400",
"message": "Invalid parameter"
}{
"error_code": "401",
"message": "Invalid signature"
}{
"error_code": "429",
"message": "Too many requests"
}{
"error_code": "500",
"message": "Internal server error"
}Báo cáo tài chính
Báo cáo kết quả kinh doanh / bảng cân đối kế toán / lưu chuyển tiền tệ
của 1 mã stock, theo format wide — mỗi row là 1 kỳ báo cáo, các
metric code nằm theo cột. year luôn có; quarter chỉ có khi
period=quarterly (giá trị 1–4).
Bộ metric code (tên romanized tiếng Việt như
luuchuyentienthuantuhoatdongkinhdoanh, loinhuanlotruocthue,
tienvatuongduongtiendaunam) phụ thuộc vào type — income-statement,
balance-sheet, cash-flow đều có bộ key khác nhau. Nhiều code có thể
null khi dữ liệu nguồn thiếu. Example bên dưới là subset đại diện của
cash-flow — tham chiếu additionalProperties trong schema là nguồn
chuẩn.
curl -H "X-FH-APIKEY: $FINHAY_API_KEY" \
"https://open-api.fhsc.com.vn/market/v2/financial-statement/statement?symbol=VNM&type=cash-flow&period=quarterly&limit=5"import requests
url = "https://open-api.fhsc.com.vn/market/v2/financial-statement/statement"
headers = {"X-FH-APIKEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-FH-APIKEY': '<api-key>'}};
fetch('https://open-api.fhsc.com.vn/market/v2/financial-statement/statement', 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://open-api.fhsc.com.vn/market/v2/financial-statement/statement",
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-FH-APIKEY: <api-key>"
],
]);
$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://open-api.fhsc.com.vn/market/v2/financial-statement/statement"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-FH-APIKEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://open-api.fhsc.com.vn/market/v2/financial-statement/statement")
.header("X-FH-APIKEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://open-api.fhsc.com.vn/market/v2/financial-statement/statement")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-FH-APIKEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error_code": "0",
"message": "success",
"data": [
{
"year": 2025,
"quarter": 4,
"loinhuanlotruocthue": 3476999882086,
"khauhaotaisancodinh": 541738993017,
"chiphilaivay": 89980184766,
"loinhuanlotuhoatdongkinhdoanhtruocthaydoivonluudong": 3875782613126,
"tanggiamhangtonkho": -696279778126,
"thuethunhapdoanhnghiepdanop": -367025679910,
"luuchuyentienthuantuhoatdongkinhdoanh": 1738942804862,
"tienchidemuasamxaydungtaisancodinh": -345651260618,
"luuchuyentienthuantuhoatdongdautu": -273822901641,
"tienvaynganhandaihannhanduoc": 6403017072055,
"tienchitranogocvay": -5218255024631,
"cotucloinhuandatrachochusohuu": -6007520145910,
"luuchuyentienthuantusudungvaohoatdongtaichinh": -4822758098486,
"luuchuyentienthuantrongnam": -3357638195265,
"tienvatuongduongtiendaunam": 5154466367051,
"anhhuongcuathaydoitygiahoidoaiquydoingoaite": -1948452915,
"tienvatuongduongtiencuoinam": 1794879718871
}
]
}{
"error_code": "400",
"message": "Invalid parameter"
}{
"error_code": "401",
"message": "Invalid signature"
}{
"error_code": "429",
"message": "Too many requests"
}{
"error_code": "500",
"message": "Internal server error"
}Authorizations
API key dài hạn của client. Cấu hình 1 lần lúc khởi tạo; có thể wire thẳng
vào static setter của SDK tự-gen. Đi kèm với FINHAY_API_SECRET — secret
này chỉ dùng ở phía client để tính X-FH-SIGNATURE, không bao giờ
gửi qua mạng.
Query Parameters
Mã stock (chữ hoa, chữ số).
"VNM"
Loại báo cáo.
Loại báo cáo dùng cho /market/v2/financial-statement/statement.
| Giá trị | Ý nghĩa |
|---|---|
income-statement | Báo cáo kết quả kinh doanh |
balance-sheet | Bảng cân đối kế toán |
cash-flow | Báo cáo lưu chuyển tiền tệ |
income-statement, balance-sheet, cash-flow Kỳ báo cáo. Kỳ báo cáo cho truy vấn tài chính doanh nghiệp.
| Giá trị | Ý nghĩa |
|---|---|
annual | Theo năm |
quarterly | Theo quý |
annual, quarterly Số kỳ cần lấy (1–5, mặc định 5).
1 <= x <= 55
Trang cần lấy, tính theo kỳ báo cáo (mỗi trang limit kỳ). Mặc định 1; trang 1 là các kỳ gần nhất, trang sau lùi về quá khứ. Hết dữ liệu khi trả về ít kỳ hơn kích thước trang.
x >= 12
Chỉ lấy kỳ của năm này: period=annual trả 1 row, period=quarterly trả các quý của năm (quý mới nhất trước).
x >= 12023
Response
Trả về data mảng các kỳ báo cáo theo format wide — mỗi row là 1 kỳ; metric code khác nhau giữa income-statement / balance-sheet / cash-flow.
Các field chung của envelope trong mọi response của Finhay API.
error_codelà"0"(string) khi thành công, mã khác"0"khi lỗi.messagelà thông điệp ngắn từ server.