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.

Media typeapplication/json
object
ticker

Stock ticker, e.g. DECK.

string
cik

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

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
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
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",
"rows": [
{
"period_kind": "instant",
"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"
}