新闻详情
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 属于外部内容,展示时应继续执行安全过滤。