新聞詳情
curl --request GET \
--url https://api.tickdb.ai/v1/fundamentals/news/{news_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/fundamentals/news/{news_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.tickdb.ai/v1/fundamentals/news/{news_id}', 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.tickdb.ai/v1/fundamentals/news/{news_id}",
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: <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://api.tickdb.ai/v1/fundamentals/news/{news_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://api.tickdb.ai/v1/fundamentals/news/{news_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/fundamentals/news/{news_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": 0,
"data": {
"news_id": "<string>",
"title": "<string>",
"description": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"detail_status": "pending",
"content_scope": "full",
"body_text": "<string>",
"body_html": "<string>"
}
}{
"code": 123,
"message": "<string>",
"error": "<string>",
"data": {}
}{
"code": 123,
"message": "<string>",
"error": "<string>",
"data": {}
}{
"code": 123,
"message": "<string>",
"error": "<string>",
"data": {}
}市場資訊
新聞詳情
根據新聞 ID 查詢新聞正文或可用摘要。
GET
/
v1
/
fundamentals
/
news
/
{news_id}
新聞詳情
curl --request GET \
--url https://api.tickdb.ai/v1/fundamentals/news/{news_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/fundamentals/news/{news_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.tickdb.ai/v1/fundamentals/news/{news_id}', 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.tickdb.ai/v1/fundamentals/news/{news_id}",
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: <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://api.tickdb.ai/v1/fundamentals/news/{news_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://api.tickdb.ai/v1/fundamentals/news/{news_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/fundamentals/news/{news_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": 0,
"data": {
"news_id": "<string>",
"title": "<string>",
"description": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"detail_status": "pending",
"content_scope": "full",
"body_text": "<string>",
"body_html": "<string>"
}
}{
"code": 123,
"message": "<string>",
"error": "<string>",
"data": {}
}{
"code": 123,
"message": "<string>",
"error": "<string>",
"data": {}
}{
"code": 123,
"message": "<string>",
"error": "<string>",
"data": {}
}套餐權限
| 套餐 | 可用 |
|---|---|
| 免費版 | ❌ |
| 基礎版 | ❌ |
| 專業版 | ✅ |
| 全量套餐(A 股、港股、美股) | ✅ |
| 企業版 | ✅ |
注意事項
- 使用新聞列表返回的
news_id查詢詳情。若detail_status為pending、blocked或failed,body_text和body_html可能為null;展示body_html前應安全過濾。
支持的市場
| 市場 | 示例 |
|---|---|
| 美股 | US |
| 港股 | HK |
| A股 | CN |
請求參數
| 參數 | 位置 | 是否必須 | 說明 |
|---|---|---|---|
news_id | path | 是 | 新聞列表返回的不透明文章 ID,按字符串傳遞 |
請求示例
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.tickdb.ai/v1/fundamentals/news/6288041"
返回字段說明
以下列出data 中的字段;外層 code=0 表示成功。
| 字段 | 說明 |
|---|---|
| news_id | 新聞 ID。 |
| title | 新聞標題。 |
| description | 新聞摘要。 |
| published_at | 發布時間,RFC 3339 日期時間字符串(UTC)。 |
| detail_status | 正文詳情獲取狀態。 |
| content_scope | 可提供的內容范圍;excerpt 表示節選。 |
| body_text | 純文本正文;不可用時可能為 null。 |
| body_html | HTML 正文;不可用時可能為 null。 |
content_scope=excerpt 表示摘要或節選,不代表完整全文。body_html 屬于外部內容,展示時應繼續執行安全過濾。