公司行动
curl --request GET \
--url https://api.tickdb.ai/v1/fundamentals/corp-actions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/fundamentals/corp-actions"
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/corp-actions', 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/corp-actions",
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/corp-actions"
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/corp-actions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/fundamentals/corp-actions")
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>",
"events": [
{
"event_id": "<string>",
"event_date": "2023-12-25",
"date_type": "<string>",
"date_zone": "<string>",
"act_type": "<string>",
"act_desc": "<string>",
"action_code": "<string>",
"is_recent": true
}
]
}
}
分红与公司行动
公司行动
查询拆股、并股、配股、代码变更等公司行动事件。
GET
/
v1
/
fundamentals
/
corp-actions
公司行动
curl --request GET \
--url https://api.tickdb.ai/v1/fundamentals/corp-actions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/fundamentals/corp-actions"
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/corp-actions', 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/corp-actions",
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/corp-actions"
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/corp-actions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/fundamentals/corp-actions")
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>",
"events": [
{
"event_id": "<string>",
"event_date": "2023-12-25",
"date_type": "<string>",
"date_zone": "<string>",
"act_type": "<string>",
"act_desc": "<string>",
"action_code": "<string>",
"is_recent": true
}
]
}
}
套餐权限
| 套餐 | 可用 |
|---|---|
| 免费版 | ❌ |
| 基础版 | ✅ |
| 专业版 | ✅ |
| 全量套餐(A 股、港股、美股) | ✅ |
| 企业版 | ✅ |
注意事项
- 公司行动事件可跨多个历史日期;
is_recent标记近期事件,不代表事件一定发生在查询当天。
支持的市场
| 市场 | 示例 |
|---|---|
| 美股 | AAPL.US |
| 港股 | 700.HK |
| A股 | 600519.SH |
请求参数
| 参数 | 是否必须 | 说明 |
|---|---|---|
symbol | 是 | 股票代码 |
type | 否 | 产品类型,当前支持 stock |
from | 否 | 起始日期,格式 YYYY-MM-DD |
to | 否 | 结束日期,格式 YYYY-MM-DD |
请求示例
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.tickdb.ai/v1/fundamentals/corp-actions?symbol=AAPL&type=stock"
返回字段说明
以下列出data 中的字段;外层 code=0 表示成功。
| 字段 | 说明 |
|---|---|
| symbol | 股票代码。 |
| events | 公司行动事件列表。 |
| └─ event_id | 事件 ID。 |
| └─ action_code | 行动代码。 |
| └─ act_type | 行动类型。 |
| └─ act_desc | 行动说明。 |
| └─ event_date | 事件日期,格式 YYYY-MM-DD。 |
| └─ date_type | 日期类型。 |
| └─ date_zone | 时区。 |
| └─ is_recent | 是否为近期事件。 |
授权
查询参数
股票代码
示例:
"AAPL"
"700"
"600519"
"AAPL.US"
"700.HK"
"600519.SH"
产品类型,当前支持 stock
可用选项:
stock 起始日期,格式 YYYY-MM-DD
示例:
"2024-01-01T00:00:00.000Z"
结束日期,格式 YYYY-MM-DD
示例:
"2026-12-31T00:00:00.000Z"
