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"
}
}
}
}Stock Market APIs
Capital Flow
Retrieve capital flow data for stocks, including inflow and outflow of main funds, large orders, medium orders, and small orders.
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"
}
}
}
}Notes
- Capital flow data is calculated based on volume and price changes
- Update frequency depends on market trading activity
Supported Markets
US Stocks, HK Stocks, A-Shares Examples:- US Stocks: AAPL.US, TSLA.US, MSFT.US
- HK Stocks: 700.HK, 9988.HK, 3690.HK
- A-Shares: 000001.SH, 000001.SZ
Request Parameters
| Parameter | Required | Description |
|---|---|---|
| symbol | Yes | Stock symbol code |
| type | No | Symbol type, optional. Not required when the symbol is unambiguous; if the API returns an AMBIGUOUS_SYMBOL error, pass the value as indicated. Values: stock, indices, crypto, forex |
Response Fields
| Field Name | Description |
|---|---|
| symbol | Trading Symbol |
| timestamp | Data update timestamp |
| intraday_flow | Capital flow data |
| └─ timestamp | Minute start timestamp |
| └─ inflow | Net inflow |
| distribution | Capital distribution |
| └─ timestamp | Data update timestamp |
| └─ capital_in | Inflow capital |
| └─ large | Large orders |
| └─ medium | Medium orders |
| └─ small | Small orders |
| └─ capital_out | Outflow capital |
| └─ large | Large orders |
| └─ medium | Medium orders |
| └─ small | Small orders |
Authorizations
Query Parameters
Stock symbol
Example:
"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
Available options:
stock, indices, crypto, forex Example:
"stock"
Response
200 - application/json
Successful response
Example:
0
Example:
"success"
Show child attributes
Show child attributes
Example:
{
"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
