curl -H "X-FH-APIKEY: $FINHAY_API_KEY" \
"https://open-api.fhsc.com.vn/market/recommendation-reports/VNM"import requests
url = "https://open-api.fhsc.com.vn/market/recommendation-reports/{symbol}"
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/recommendation-reports/{symbol}', 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/recommendation-reports/{symbol}",
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/recommendation-reports/{symbol}"
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/recommendation-reports/{symbol}")
.header("X-FH-APIKEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://open-api.fhsc.com.vn/market/recommendation-reports/{symbol}")
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": {
"recommendation": "Mua — upside 15% tới giá mục tiêu 85.000đ.",
"recommendationReports": [
{
"stock": "VNM",
"title": "VNM — Update Q1 2024",
"source": "VietStock",
"recommendation_price": null,
"target_price": 85000,
"publish_date": "2024-04-10T09:00:00Z",
"description": "Mua — upside 15% tới giá mục tiêu 85.000đ.",
"download_url": "https://vietstock.vn/reports/vnm-q1-2024.pdf",
"created_at": "2024-04-10T09:00:00Z",
"updated_at": "2024-04-10T09:00:00Z"
}
]
}
}{
"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 khuyến nghị theo stock
Báo cáo khuyến nghị (research report) của các công ty chứng khoán cho 1
mã stock. Khi stock có báo cáo, data là object chứa recommendation
(khuyến nghị mới nhất, plain text) và recommendationReports[] (danh
sách báo cáo gốc kèm download URL). Khi stock không có báo cáo nào,
data là [].
Source: VietStock và một số nhà phân tích khác — xem field source của
mỗi report.
curl -H "X-FH-APIKEY: $FINHAY_API_KEY" \
"https://open-api.fhsc.com.vn/market/recommendation-reports/VNM"import requests
url = "https://open-api.fhsc.com.vn/market/recommendation-reports/{symbol}"
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/recommendation-reports/{symbol}', 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/recommendation-reports/{symbol}",
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/recommendation-reports/{symbol}"
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/recommendation-reports/{symbol}")
.header("X-FH-APIKEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://open-api.fhsc.com.vn/market/recommendation-reports/{symbol}")
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": {
"recommendation": "Mua — upside 15% tới giá mục tiêu 85.000đ.",
"recommendationReports": [
{
"stock": "VNM",
"title": "VNM — Update Q1 2024",
"source": "VietStock",
"recommendation_price": null,
"target_price": 85000,
"publish_date": "2024-04-10T09:00:00Z",
"description": "Mua — upside 15% tới giá mục tiêu 85.000đ.",
"download_url": "https://vietstock.vn/reports/vnm-q1-2024.pdf",
"created_at": "2024-04-10T09:00:00Z",
"updated_at": "2024-04-10T09:00:00Z"
}
]
}
}{
"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"
}Ủy quyền
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.
Tham số đường dẫn
Mã stock viết hoa (3–4 ký tự, ví dụ VNM, FPT, HPG). Yêu cầu khớp chính xác với mã niêm yết.
"VNM"
Phản hồi
Trả về data chứa recommendation (latest) và recommendationReports[] (full list); data: [] khi stock không có báo cáo.
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.