# Market data

Prices, market capitalisation, live quotes and FX rates for the companies
of the register. Companies are named as everywhere else (`cmp_…`, `isin:`,
`lei:`, `ticker:MIC:SYMBOL`, `us_cik:` …), errors are the usual ones (404
`company_not_found`, 422, 503 `source_unavailable` with `Retry-After`), and
every value names its source and time. Calls are metered as `company`;
an answer served without asking a source is `cached`.

## Price history

```
GET /v1/companies/isin:CH0038863350/prices?from=2005-01-01&to=2026-10-27&interval=1d
```

Open, high, low, close, adjusted close (splits and dividends) and volume
per trading day of the company's **primary listing**, as far back as the
source has it (decades for most large listings; `first_available` says
where it starts once known). `interval=1w` and `1mo` give weekly and
monthly bars dated by their last trading day. `listing=XSWX:NESN` picks
another listing of the company.

Every answer has `traded_value_30d`: the average volume and the average
traded value (close × volume) of the last 30 trading days up to `to`, in
the listing's currency.

A listing's history is retrieved once and kept; later calls are answered
from Cormorant, and the newest days are refreshed after 12 hours (`max_age`
sets another limit in seconds).

`GET /v1/companies/{ref}/market-cap?from=&to=` gives the daily market
capitalisation the same way.

`POST /v1/prices/batch` takes up to 100 refs with the same `from`, `to` and
`interval` and answers each in order; a ref that fails has `error`
instead of failing the call:

```json
{"refs": ["isin:CH0038863350", "isin:US5949181045", "isin:JP3633400001"],
 "from": "2026-09-01", "interval": "1d"}
```

## Live quotes

```json
POST /v1/quotes
{"refs": ["isin:CH0038863350", "isin:US5949181045"],
 "listings": ["XTKS:7203", "XCSE:NOVO-B"]}
```

Up to 200 refs and listings in one call. Each quote has price, change and
change in percent, volume, open, day range, previous close, 52-week range,
currency, exchange, the exchange `timestamp`, `delay_min` (0 for US
venues, at most 15 elsewhere) and `age_s`. Quotes up to `max_age` seconds
old (default 60) are reused; older ones are fetched again, all in one
round trip.

## FX rates

```
GET /v1/fx?base=USD&symbols=CHF,EUR,JPY,DKK
GET /v1/fx/history?base=EUR&symbol=CHF&from=2016-01-01
```

`/v1/fx` gives the intraday market rate of each currency (`source:
market_data`, with its `timestamp`), or the latest ECB reference rate where
there is none (`source: ecb`, with its `date`); `kind=reference` asks for
the reference rates only. `/v1/fx/history` gives one rate per day: the
ECB's euro reference rates since 1999 for the about 30 currencies the ECB
quotes (other pairs are crossed through the euro), else the market-data
source's daily closes of the pair. The ECB reference rates are published
around 16:00 CET on working days; reuse them with the ECB named as the
source.

## Screener and movers

```json
POST /v1/screener
{"country": ["CH", "DE"], "sector": ["Healthcare"],
 "market_cap_min": 1e10, "currency": "CHF", "sort": "-market_cap"}
GET /v1/market/movers?kind=gainers&country=CH
```

The screener searches the register's listed companies by country, kind
(operating companies by default), sector, industry, exchange, market
capitalisation, revenue of the latest fiscal year and employees. Bounds are
in `currency` and compared in euros at the ECB's latest rates; the figures
are those of the records (`as_of`), and the screener is rebuilt every 15
minutes. Movers quote the 500 largest listed companies (of a country) and
rank them by the day's change (`gainers`, `losers`) or traded value
(`actives`).

## Long statements and the trailing twelve months

```
GET /v1/companies/isin:US5949181045/financials?period=annual&limit=30
GET /v1/companies/isin:US5949181045/financials?period=quarter&limit=40
GET /v1/companies/isin:US5949181045/financials?period=ttm&limit=4
```

`period` returns one period type, newest first: up to 30 fiscal years or
40 quarters, and `ttm`, the trailing twelve months at each quarter end that
closes four consecutive quarters (flows summed, the balance sheet of the
last quarter). Every period names its `reporting_currency` and
`fiscal_year_end`.
