TTM Financial Data
curl --request GET \
--url https://api.tickdb.ai/v1/fundamentals/financials/ttm \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/fundamentals/financials/ttm"
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/financials/ttm', 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/financials/ttm",
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/financials/ttm"
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/financials/ttm")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/fundamentals/financials/ttm")
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>",
"kind": "IS",
"rows": [
{
"kind": "IS",
"field_name": "<string>",
"indicator_title": "<string>",
"value": "<string>",
"fiscal_year": 123,
"fiscal_period": "<string>",
"period_type": "<string>",
"period_end": "2023-12-25",
"field_display": "<string>",
"currency": "<string>",
"is_percent": true,
"yoy": "<string>",
"ratio": "<string>"
}
]
}
}Financial Statements
TTM Financial Data
Retrieve trailing-12-month income statement or cash flow metrics aggregated from the latest four valid quarters.
GET
/
v1
/
fundamentals
/
financials
/
ttm
TTM Financial Data
curl --request GET \
--url https://api.tickdb.ai/v1/fundamentals/financials/ttm \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/fundamentals/financials/ttm"
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/financials/ttm', 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/financials/ttm",
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/financials/ttm"
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/financials/ttm")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/fundamentals/financials/ttm")
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>",
"kind": "IS",
"rows": [
{
"kind": "IS",
"field_name": "<string>",
"indicator_title": "<string>",
"value": "<string>",
"fiscal_year": 123,
"fiscal_period": "<string>",
"period_type": "<string>",
"period_end": "2023-12-25",
"field_display": "<string>",
"currency": "<string>",
"is_percent": true,
"yoy": "<string>",
"ratio": "<string>"
}
]
}
}Plan Access
| Plan | Available |
|---|---|
| Free | ❌ |
| Starter | ✅ |
| Professional | ✅ |
| Full-Market Plans (A-Shares, HK Stocks, US Stocks) | ✅ |
| Enterprise | ✅ |
Notes
- TTM means trailing 12 months and is aggregated from the latest four valid standalone quarters. Only the income statement (
IS) and cash flow statement (CF) are supported.
Supported Markets
| Market | Examples |
|---|---|
| US Stocks | AAPL.US |
| HK Stocks | 700.HK |
| A-Shares | 600519.SH |
Request Parameters
| Parameter | Required | Description |
|---|---|---|
symbol | Yes | Stock symbol |
type | No | Product type; currently supports stock |
kind | Yes | Statement type: IS income statement or CF cash flow statement |
TTM is defined only for the income statement (
IS) and cash flow statement (CF). Passing the balance sheet (BS) returns a parameter error.Request Example
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.tickdb.ai/v1/fundamentals/financials/ttm?symbol=AAPL&type=stock&kind=IS"
Response Fields
The table below lists fields indata; an outer code=0 indicates success.
| Field | Description |
|---|---|
| symbol | Stock symbol. |
| kind | Statement type: IS income statement or CF cash flow statement. |
| rows | Trailing-12-month financial metric records. |
| └─ kind | Row statement type: IS or CF. |
| └─ field_name | Financial field code; see the Financial Field Dictionary. |
| └─ field_display | Display name. |
| └─ indicator_title | Metric title. |
| └─ value | Aggregated trailing-12-month value returned as a string. |
| └─ currency | Currency. |
| └─ is_percent | Whether this is a percentage field. |
| └─ fiscal_year | Corresponding fiscal year. |
| └─ fiscal_period | Corresponding reporting period. |
| └─ period_type | ttm, indicating an aggregated trailing-12-month value. |
| └─ period_end | Period end date in YYYY-MM-DD format. |
| └─ yoy | Year-over-year change; may be null. |
| └─ ratio | Ratio; may be null. |
Authorizations
Query Parameters
Stock symbol
Examples:
"AAPL"
"700"
"600519"
"AAPL.US"
"700.HK"
"600519.SH"
Product type; currently supports stock
Available options:
stock Statement type: IS income statement or CF cash flow statement
Available options:
IS, CF 