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"
}
}
}
}股票市場接口
資金流向
獲取股票的資金流向數據,包括主力資金、大單、中單、小單的流入流出情況。
GET
/
v1
/
market
/
capital-flow
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股:000001.SH、000001.SZ
請求參數
| 參數名 | 是否必須 | 描述 |
|---|---|---|
| symbol | 是 | 股票代碼 |
| type | 否 | 產品類型,可選。代碼無歧義時無需傳遞;若返回 AMBIGUOUS_SYMBOL 錯誤,按提示傳入對應值即可。可選值:stock、indices、crypto、forex |
授權
查詢參數
Stock symbol
範例:
"700.HK"
Symbol type, optional. Not required when the symbol is unambiguous; if the API returns an AMBIGUOUS_SYMBOL error, pass the value as indicated
可用選項:
stock, indices, crypto, forex 範例:
"stock"
回應
200 - application/json
Successful response
範例:
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" } } }
⌘I
