个股新闻
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"
