Skip to content

Latest fact per consolidated series

POST
/api/b2b/facts/latest
curl --request POST \
--url https://api.stockalloy.com/api/b2b/facts/latest \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "ticker": "DECK", "metric_id": "us-gaap#RevenueFromContractWithCustomerExcludingAssessedTax" }'

Returns the most recent consolidated fact for every series of a company (one row per series). Ideal for “current snapshot” views. Pass metric_id to get a small, focused response — metric-scoped requests are never capped and never filtered. Unscoped requests (no metric_id) are a browse-everything export: dei# cover-page tags (auditor IDs, addresses, cover-date share counts) are excluded unless include_dei: true, and the response is capped at limit rows (default 100, max 500). When rows are dropped by the cap, the envelope carries truncated: true and total_available.

Media typeapplication/json
object
ticker

Stock ticker, e.g. DECK.

string
cik

Zero-padded 10-digit SEC CIK, e.g. 0000910521.

string
tickers

Company set (search endpoints only).

Array<string>
ciks

Company set (search endpoints only).

Array<string>
metric_id

Optional XBRL metric ID filter, e.g. us-gaap#Revenues. Facts endpoints require a single-company scope (ticker or cik).

string
include_dei

Unscoped requests only: include dei# cover-page tags (auditor IDs, addresses, cover-date share counts) in the browse-everything export. Excluded by default. Ignored when metric_id is provided — metric-scoped requests always return the requested metric, dei# or not.

boolean
limit

Unscoped requests only: maximum rows returned (default 100, max 500). When more series exist, the envelope sets truncated: true and total_available. Ignored when metric_id is provided — metric-scoped responses are never capped.

integer
default: 100 >= 1 <= 500
Example
{
"ticker": "DECK",
"metric_id": "us-gaap#RevenueFromContractWithCustomerExcludingAssessedTax"
}

Latest fact rows (one per series).

Media typeapplication/json
object
scope
required
string
Allowed value: company
ticker
string | null
cik
required
string
metric_id

Echoes the request filter.

string | null
count
required
integer
truncated

Present only on unscoped requests when the row cap dropped rows.

boolean
total_available

Uncapped row count (after the default dei# exclusion). Present only alongside truncated.

integer
rows
required
Array
object
fact_key

Stable public key for this fact (sha256 hex).

string
series_key

Stable public key for the series this fact belongs to (company × metric × dimension slice × unit).

string
cik
string
current_ticker
string | null
metric_id

XBRL concept ID, e.g. us-gaap#Revenues.

string
metric_label

Human-readable metric name.

string
period_key

duration:START..END for flows or instant:DATE for balances.

string
period_kind
string
Allowed values: instant duration
period_start
string | null format: date
period_end
string format: date
period_end_year
integer
period_end_quarter

Calendar quarter (1-4) in which the period ends.

integer
unit_signature

E.g. monetary:USD, shares, pure.

string
unit_class

E.g. monetary, shares, pure.

string
currency
string | null
value_num

Exact decimal value as a string (full units, not thousands). Equal to value_scaled_int × 10^scale.

string
value_scaled_int

Exact integer significand as a string.

string
scale

Power-of-ten exponent applied to value_scaled_int.

integer
source_accession

SEC accession number of the winning filing.

string
source_form_type

E.g. 10-K, 10-Q, 10-K/A.

string | null
source_is_amendment
boolean | null
source_is_current_filing_period

True when the fact’s period matches the filing’s own reporting period (as opposed to a restated prior period).

boolean | null
source_filed_at
string format: date
evidence_key
string | null
evidence_url

Opens the SEC filing with this figure highlighted (https://stockalloy.com/api/evidence/{id}/open?...).

string | null
is_consolidated
boolean
Example
{
"scope": "company",
"ticker": "DECK",
"cik": "0000910521",
"metric_id": "us-gaap#RevenueFromContractWithCustomerExcludingAssessedTax",
"count": 1,
"rows": [
{
"fact_key": "29123d4395a3…(64-char key)",
"series_key": "1662173f5414…(64-char key)",
"cik": "0000910521",
"current_ticker": "DECK",
"metric_id": "us-gaap#RevenueFromContractWithCustomerExcludingAssessedTax",
"metric_label": "Revenue",
"period_key": "duration:2024-04-01..2025-03-31",
"period_kind": "duration",
"period_start": "2024-04-01",
"period_end": "2025-03-31",
"period_end_year": 2025,
"period_end_quarter": 1,
"unit_signature": "monetary:USD",
"unit_class": "monetary",
"currency": "USD",
"value_num": "4985612000",
"value_scaled_int": "4985612",
"scale": 3,
"source_accession": "000091052125000017",
"source_form_type": "10-K",
"source_is_amendment": false,
"source_is_current_filing_period": true,
"source_filed_at": "2025-05-23",
"evidence_key": "35abfabdc97f…(evidence id)",
"evidence_url": "https://stockalloy.com/api/evidence/35abfabdc97f…/open?cik=0000910521&accession=000091052125000017",
"is_consolidated": true
}
]
}
X-RateLimit-Limit
integer

Requests allowed per minute for this key.

X-RateLimit-Remaining
integer

Requests remaining in the current minute window.

X-RateLimit-Reset
integer

Unix timestamp (seconds) when the window resets.

Invalid request — missing/invalid fields, malformed JSON, or an unsupported scope combination.

Media typeapplication/json
object
error
required

Human-readable error message.

string
Example
{
"error": "query is required"
}

Missing or invalid API key.

Media typeapplication/json
object
error
required

Human-readable error message.

string
Example
{
"error": "API key required"
}

Key revoked/disabled/expired, account disabled, key not entitled for this product, or cross-company search not enabled for this key.

Media typeapplication/json
object
error
required

Human-readable error message.

string
Example
{
"error": "API key has expired"
}

Company not found (unknown ticker or CIK).

Media typeapplication/json
object
error
required

Human-readable error message.

string
Example
{
"error": "Unknown ticker: ZZZZ"
}

Rate limit exceeded (per-minute) or quota exceeded (daily/monthly, account-level or per-key). Distinguish by body shape.

Media typeapplication/json
One of:
object
error
required
string
Allowed value: Rate limit exceeded
retryAfter
required

Seconds until the window resets.

integer
limit
required

Requests allowed per minute for this key.

integer
windowMs
required
integer
Allowed value: 60000
Examples

Per-minute rate limit

{
"error": "Rate limit exceeded",
"retryAfter": 31,
"limit": 60,
"windowMs": 60000
}
X-RateLimit-Limit
integer

Requests allowed per minute for this key.

X-RateLimit-Remaining
integer

Requests remaining in the current minute window.

X-RateLimit-Reset
integer

Unix timestamp (seconds) when the window resets.

Retry-After
integer

Seconds to wait before retrying (429 only).

Unexpected server error.

Media typeapplication/json
object
error
required

Human-readable error message.

string
Example
{
"error": "Facts lookup failed"
}

The verified-facts backend is temporarily unavailable. Transient — retry with backoff. This is an infrastructure condition, not a data gap.

Media typeapplication/json
object
error
required

Human-readable error message.

string
Example
{
"error": "Facts backend unavailable"
}