# Data model

Arche organizes public-company fundamentals into a hierarchy that supports both current-state and point-in-time retrieval.

## Hierarchy

Company -> Filing -> Statement -> Facts

## Company

Represents a public issuer, keyed by `cik`. Two routes return a company and they
return different fields, so pick by what you need rather than by name.

`/v1/edgar/companies:resolve` answers identity only — which CIK a ticker meant
on a date:

- `cik`
- `ticker`
- `exchange`
- `as_of`

`/v1/edgar/companies/{cik}` is the profile, and is where the descriptive fields
live:

- `cik`
- `entity_name`
- `tickers` — an array, because an issuer can carry several
- `exchanges` — an array, for the same reason: each exchange the issuer's
  current tickers list on, once
- `sic`, `sic_description`
- `state_of_incorporation`
- `fiscal_year_end` — `MMDD`, the filer's own annual close
- `last_updated_at`, `source`

There is no `entity_name` on the resolve route and no singular `ticker` on the
profile. Resolve first, then fetch the profile if you need the name.

An exchange is named by its ISO 10383 market identifier code (MIC): `XNAS` for
Nasdaq, `XNYS` for the New York Stock Exchange, `XASE` for NYSE American,
`ARCX` for NYSE Arca, `XCHI` for NYSE Texas, `BATS` for Cboe BZX and `OTCM` for
over-the-counter. A security listed on more than one exchange resolves to the
one it listed on first. `exchange` is `null` when neither the company's filings
nor EDGAR name one.

## Filing

Represents an SEC filing such as:

- 10-K
- 10-Q
- 8-K

Key fields:

- `accession_id`
- `form_type`
- `accepted_at`

## Statement

Normalized financial statement extracted from a filing.

Examples:

- income statement
- balance sheet
- cash flow statement

It holds the figures one filing reported for one period, and each filing
appears once.

Key fields:

- `cik`, `statement_type`, `fiscal_year`, `fiscal_period` and `accession_id`,
  which together identify it
- `accepted_at`
- `is_restated`
- `accounting_standard`

A later filing that restates the same period is a separate statement with its
own `accession_id`; the earlier one is not changed.

### Accounting standard

`accounting_standard` reports the standard a filing was prepared under, derived
from the taxonomy the filer actually tagged. It is `US_GAAP` for domestic
filers and `IFRS` for foreign private issuers filing on 20-F or 40-F, which tag
`ifrs-full` concepts.

Judge it per filing rather than per company. A filer can change standard, so a
company's history can contain both, and comparing a company's lifetime against
a single standard will misreport it.

### Fiscal identity

A statement's `fiscal_year` and `fiscal_period` follow the filer's own annual
close and its own name for the year, not the calendar. A company whose fiscal
year ends in September reports a September period as `FY`; a retailer whose
year closes on 1 February 2025 and calls it fiscal 2024 is served as
`fiscal_year=2024`.

Rows sharing one fiscal identity can carry different period ends, because a
quarter is sometimes labelled `FY`. Keep `statement_date` alongside the fiscal
identity when a specific period end matters.

### Currency

A statement's `values` are always in the currency the filing reports in, named
by `currency`, with each value's unit under `units`. A foreign private issuer
filing in euros is served in euros.

Pass `include_usd=true` to also receive the money values in US dollars. Five
routes accept it:

- `/v1/edgar/companies/{cik}/statements`
- `/v1/edgar/companies/{cik}/filings/{accession_id}/statements`
- `/v1/edgar/as-of/{date}/financials/{cik}`
- `/v1/edgar/as-of/{date}/financials/{cik}/page`
- `/v1/fundamentals/normalized-statements`

Each statement then carries a `usd` object beside `values`, which do not change:

- `values`: each money value in US dollars, keyed by the same metric code. A
  share count has no entry.
- `usd_per_unit`: US dollars per unit of the filing's currency.
- `rate_basis`: `PERIOD_AVERAGE` for an income or cash-flow statement, the mean
  of the daily rates from `rate_start` to `rate_end`; `PERIOD_END` for a
  balance sheet, the rate on `rate_end`, the last on or before the balance
  date; `AS_FILED` for a statement filed in US dollars.
- `rate_start`, `rate_end`: the dates of the rates used.
- `source`: `Federal Reserve Board H.10`, the Board's daily exchange rates.

With `detail=true`, each money fact also carries its own `usd` with the same
fields.

Eni's FY2025 income statement, filed in euros, with `include_usd=true`:

```json
{
  "currency": "EUR",
  "values": {
    "REVENUE": "82151000000",
    "NET_INCOME": "2608000000",
    "DILUTED_EPS": "0.78"
  },
  "usd": {
    "values": {
      "REVENUE": "92881695061.60",
      "NET_INCOME": "2948661132.80",
      "DILUTED_EPS": "0.88"
    },
    "usd_per_unit": "1.1306216",
    "rate_basis": "PERIOD_AVERAGE",
    "rate_start": "2025-01-02",
    "rate_end": "2025-12-31",
    "source": "Federal Reserve Board H.10"
  }
}
```

`usd` is absent when no rate covers the statement's period. H.10 publishes
rates for 22 currencies: AUD, BRL, CAD, CHF, CNY, DKK, EUR, GBP, HKD, INR, JPY,
KRW, LKR, MXN, MYR, NOK, NZD, SEK, SGD, THB, TWD and ZAR. A statement in any
other currency is served as filed only.

An as-of request converts with only the rates published by its date. The Board
publishes each week's daily rates the following Monday, or Tuesday after a
Monday holiday, so a rate counts from the Tuesday after its week. A conversion
as of a date never uses a rate that was not yet public on that date.

> **Tip:** If you only keep a company identifier and a reporting period, you may lose
> reproducibility. For auditability, preserve the filing's
> `accession_id` whenever you materialize data downstream.

## Next steps

- [Concepts](https://docs.arche.fi/concepts): Understand point-in-time retrieval, restatements, and deterministic datasets.
- [Versioning](https://docs.arche.fi/versioning): Work with latest, version history, and as_of semantics without historical drift.
- [Request & response conventions](https://docs.arche.fi/request-response-conventions): Response envelopes, timestamps, nullability, ordering, and field conventions.
