Metrics
Metrics snapshot
Discovery helper
scenario_id; returns tickers with metrics.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Valuation, margin, return, and leverage ratios, plus a market-wide snapshot.
GET /financial-metrics
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
scenario_id | string | Yes | - | The world to read from. |
ticker | string | Yes | - | Ticker symbol to query. |
period | string | No | ttm | ttm | quarterly | annual. |
limit | integer | No | 4 | Page size (max 500). |
offset | integer | No | 0 | Pagination offset. |
curl -s "https://api.davidhf.com/financial-metrics?scenario_id=<id>&ticker=AAPL&period=ttm&limit=4" \
-H "X-API-KEY: YOUR_API_KEY"
dd.financials.metrics("AAPL", scenario_id="<id>", period="ttm", limit=4)
{
"financial_metrics": [
{
"ticker": "AAPL",
"report_period": "2026-03-31",
"period": "ttm",
"currency": "USD",
"price_to_earnings_ratio": 28.4,
"price_to_sales_ratio": 7.1,
"gross_margin": 0.452,
"operating_margin": 0.312,
"net_margin": 0.271,
"return_on_equity": 0.51,
"debt_to_equity": 1.4,
"market_cap": 2950000000000
}
]
}
GET /financial-metrics/snapshot
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
scenario_id | string | Yes | - | The world to read from. |
ticker | string | No | all | Restrict to one ticker. |
as_of | date | No | latest | Price-snapshot cutoff. |
limit | integer | No | 100 | Tickers (max 5000). |
offset | integer | No | 0 | Pagination offset. |
curl -s "https://api.davidhf.com/financial-metrics/snapshot?scenario_id=<id>&as_of=2026-03-26&limit=50" \
-H "X-API-KEY: YOUR_API_KEY"
dd.financials.metrics_snapshot(scenario_id="<id>", as_of="2026-03-26", limit=50)
{ "financial_metrics": [ { "ticker": "AAPL", "price_to_earnings_ratio": 28.4, "market_cap": 2950000000000, "...": "..." } ] }
GET /financial-metrics/snapshot/tickers
scenario_id; returns tickers with metrics.
{ "tickers": ["AAPL", "MSFT", "..."] }