Historical Valuation
curl --request GET \
--url https://api.tickdb.ai/v1/fundamentals/valuation/ts \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/fundamentals/valuation/ts"
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/valuation/ts', 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/valuation/ts",
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/valuation/ts"
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/valuation/ts")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/fundamentals/valuation/ts")
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>",
"metric": "PE",
"granularity": "daily",
"from": "2023-12-25",
"to": "2023-12-25",
"points": [
[
"2023-11-07T05:31:56Z",
"<string>"
]
]
}
}Valuation and Industries
Historical Valuation
Retrieve daily or monthly historical price-to-earnings (PE) values.
GET
/
v1
/
fundamentals
/
valuation
/
ts
Historical Valuation
curl --request GET \
--url https://api.tickdb.ai/v1/fundamentals/valuation/ts \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/fundamentals/valuation/ts"
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/valuation/ts', 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/valuation/ts",
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/valuation/ts"
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/valuation/ts")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/fundamentals/valuation/ts")
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>",
"metric": "PE",
"granularity": "daily",
"from": "2023-12-25",
"to": "2023-12-25",
"points": [
[
"2023-11-07T05:31:56Z",
"<string>"
]
]
}
}Plan Access
| Plan | Available |
|---|---|
| Free | ❌ |
| Starter | ❌ |
| Professional | ✅ |
| Full-Market Plans (A-Shares, HK Stocks, US Stocks) | ✅ |
| Enterprise | ✅ |
Notes
- Each element in
pointsis[time, metric value], not an object with named fields. The time is an RFC 3339 string with a time-zone offset. - Without a date range,
dailydefaults to the past year andmonthlyto the past five years. If no records match, the endpoint returns HTTP 404 with code40405, not a successful empty array.
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 |
granularity | No | daily or monthly; default daily |
from | No | Start date in YYYY-MM-DD format |
to | No | End date in YYYY-MM-DD format |
Request Example
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.tickdb.ai/v1/fundamentals/valuation/ts?symbol=AAPL&type=stock&granularity=monthly"
Response Fields
The table below lists fields indata; an outer code=0 indicates success.
| Field | Description |
|---|---|
| symbol | Stock symbol. |
| metric | Valuation metric; currently PE (price-to-earnings ratio). |
| granularity | Daily or monthly time granularity. |
| from | Query range start date in YYYY-MM-DD format. |
| to | Query range end date in YYYY-MM-DD format. |
| points | Historical valuation records, each represented as [time, metric value]. |
| └─ [0] | RFC 3339 date-time string with a time-zone offset. |
| └─ [1] | Metric value as a string, number, or null. |
PE values over the queried date range.Authorizations
Query Parameters
Stock symbol
Examples:
"AAPL"
"700"
"600519"
"AAPL.US"
"700.HK"
"600519.SH"
Product type; currently supports stock
Available options:
stock daily or monthly; default daily
Available options:
daily, monthly Start date in YYYY-MM-DD format
End date in YYYY-MM-DD format
