個股新聞
curl --request GET \
--url https://api.tickdb.ai/v1/fundamentals/news \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/fundamentals/news"
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', 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",
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"
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")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/fundamentals/news")
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": {
"symbol": "<string>",
"limit": 123,
"news": [
{
"news_id": "<string>",
"title": "<string>",
"description": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"has_body": true
}
]
}
}{
"code": 123,
"message": "<string>",
"error": "<string>",
"data": {}
}市場資訊
個股新聞
獲取個股新聞列表、發布時間和正文可用狀態。
GET
/
v1
/
fundamentals
/
news
個股新聞
curl --request GET \
--url https://api.tickdb.ai/v1/fundamentals/news \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/fundamentals/news"
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', 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",
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"
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")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/fundamentals/news")
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": {
"symbol": "<string>",
"limit": 123,
"news": [
{
"news_id": "<string>",
"title": "<string>",
"description": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"has_body": true
}
]
}
}{
"code": 123,
"message": "<string>",
"error": "<string>",
"data": {}
}套餐權限
| 套餐 | 可用 |
|---|---|
| 免費版 | ❌ |
| 基礎版 | ❌ |
| 專業版 | ✅ |
| 全量套餐(A 股、港股、美股) | ✅ |
| 企業版 | ✅ |
注意事項
- 新聞列表不包含正文;使用
news_id查詢詳情。from和to必須同時提供或同時省略。
支持的市場
| 市場 | 示例 |
|---|---|
| 美股 | AAPL.US |
| 港股 | 700.HK |
| A股 | 600519.SH |
請求參數
| 參數 | 是否必須 | 說明 |
|---|---|---|
symbol | 是 | 股票代碼 |
type | 否 | 產品類型,當前支持 stock |
limit | 否 | 返回數量,默認 50,范圍 1–200 |
from | 否 | 起始日期,格式 YYYY-MM-DD |
to | 否 | 結束日期,格式 YYYY-MM-DD |
from 和 to 必須同時提供或同時省略。請求示例
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.tickdb.ai/v1/fundamentals/news?symbol=AAPL&type=stock&limit=20"
返回字段說明
以下列出data 中的字段;外層 code=0 表示成功。
| 字段 | 說明 |
|---|---|
| symbol | 股票代碼。 |
| limit | 本次請求的返回條數上限。 |
| news | 新聞列表。 |
| └─ news_id | 新聞 ID,可用於查詢詳情。 |
| └─ title | 新聞標題。 |
| └─ description | 新聞摘要。 |
| └─ published_at | 發布時間,RFC 3339 日期時間字符串(UTC)。 |
| └─ has_body | 是否有可用正文。 |
news_id、標題、摘要、發布時間和正文可用狀態,不直接內嵌正文。使用 news_id 查詢新聞詳情。授權
查詢參數
股票代碼
範例:
"AAPL"
"700"
"600519"
"AAPL.US"
"700.HK"
"600519.SH"
產品類型,當前支援 stock
可用選項:
stock 返回數量,默認 50,范圍 1–200
必填範圍:
1 <= x <= 200開始日期,格式 YYYY-MM-DD
範例:
"2024-01-01T00:00:00.000Z"
結束日期,格式 YYYY-MM-DD
範例:
"2026-12-31T00:00:00.000Z"
