資金流向
curl --request GET \
--url https://api.tickdb.ai/v1/market/capital-flow \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/market/capital-flow"
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/market/capital-flow', 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/market/capital-flow",
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/market/capital-flow"
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/market/capital-flow")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/market/capital-flow")
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,
"message": "success",
"data": {
"symbol": "700.HK",
"timestamp": 1773306211,
"intraday_flow": [
{
"timestamp": 1773279000,
"inflow": "-12199.34"
},
{
"timestamp": 1773279060,
"inflow": "-15137.59"
}
],
"distribution": {
"timestamp": 1773303000,
"capital_in": {
"large": "173056.31",
"medium": "164958.55",
"small": "83945.69"
},
"capital_out": {
"large": "179434.39",
"medium": "176045.91",
"small": "92979.74"
}
}
}
}個股行情與指標
資金流向
獲取股票的資金流向數據,包括主力資金、大單、中單、小單的流入流出情況。
GET
/
v1
/
market
/
capital-flow
資金流向
curl --request GET \
--url https://api.tickdb.ai/v1/market/capital-flow \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/market/capital-flow"
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/market/capital-flow', 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/market/capital-flow",
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/market/capital-flow"
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/market/capital-flow")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/market/capital-flow")
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,
"message": "success",
"data": {
"symbol": "700.HK",
"timestamp": 1773306211,
"intraday_flow": [
{
"timestamp": 1773279000,
"inflow": "-12199.34"
},
{
"timestamp": 1773279060,
"inflow": "-15137.59"
}
],
"distribution": {
"timestamp": 1773303000,
"capital_in": {
"large": "173056.31",
"medium": "164958.55",
"small": "83945.69"
},
"capital_out": {
"large": "179434.39",
"medium": "176045.91",
"small": "92979.74"
}
}
}
}套餐權限
| 套餐 | 可用 |
|---|---|
| 免費版 | ❌ |
| 基礎版 | ✅ |
| 專業版 | ✅ |
| 全量套餐(A 股、港股、美股) | ✅ |
| 企業版 | ✅ |
注意事項
- 資金流向數據基于成交量和價格變化計算
- 數據更新頻率取決于市場交易活躍度
支持的市場
| 市場 | 示例 |
|---|---|
| 美股 | AAPL.US, TSLA.US, MSFT.US |
| 港股 | 700.HK, 9988.HK, 3690.HK |
| A股 | 600519.SH, 000001.SZ |
請求參數
| 參數名 | 是否必須 | 描述 |
|---|---|---|
| symbol | 是 | 股票代碼 |
| type | 否 | 產品類型,可選。代碼無歧義時無需傳遞;若返回 AMBIGUOUS_SYMBOL 錯誤,按提示傳入對應值即可。可選值:stock、indices、crypto、forex |
返回字段說明
| 字段名 | 描述 |
|---|---|
| symbol | 交易產品 |
| timestamp | 數據更新時間,Unix 時間戳,單位為秒 |
| intraday_flow | 資金流向數據 |
| └─ timestamp | 分鐘開始時間,Unix 時間戳,單位為秒 |
| └─ inflow | 凈流入 |
| distribution | 資金分布 |
| └─ timestamp | 數據更新時間,Unix 時間戳,單位為秒 |
| └─ capital_in | 流入資金 |
| └─ large | 大單 |
| └─ medium | 中單 |
| └─ small | 小單 |
| └─ capital_out | 流出資金 |
| └─ large | 大單 |
| └─ medium | 中單 |
| └─ small | 小單 |
授權
查詢參數
股票代碼
範例:
"700.HK"
產品類型,可選。代碼無歧義時無需傳遞;若返回 AMBIGUOUS_SYMBOL 錯誤,按提示傳入對應值即可。可選值:stock、indices、crypto、forex
可用選項:
stock, indices, crypto, forex 範例:
"stock"
回應
200 - application/json
請求成功。
範例:
0
範例:
"success"
Show child attributes
Show child attributes
範例:
{ "symbol": "700.HK", "timestamp": 1773306211, "intraday_flow": [ { "timestamp": 1773279000, "inflow": "-12199.34" }, { "timestamp": 1773279060, "inflow": "-15137.59" } ], "distribution": { "timestamp": 1773303000, "capital_in": { "large": "173056.31", "medium": "164958.55", "small": "83945.69" }, "capital_out": { "large": "179434.39", "medium": "176045.91", "small": "92979.74" } } }
