Get free API key
Docs menuexpand_more
travel_exploreTry in the API Viewer

Guides

Endpoints

search
appsAll APIs
functionHow metrics are calculated

Cookbook

Compute trailing twelve-month (TTM) revenue

Japanese companies report quarterly results cumulatively from the start of the fiscal year. Trailing twelve-month (TTM) revenue therefore comes from last year's full year and two year-to-date figures.

Key points

  • check_circleTTM = last full year + this year's year-to-date − last year's year-to-date for the same quarter.
  • check_circleCalling /stable/income-statement without period returns quarterly and full-year rows, newest first.
  • check_circleTTM EPS, ROE, ROA and EBITDA are already computed in /stable/key-metrics.

Endpoints to use

Code

Replace YOUR_API_KEY with a key issued in your dashboard. Switch languages with the tabs.

Code example
# All periods (Q1, Q2, Q3, FY), newest first. Quarterly figures are cumulative from the start of the fiscal year
curl -sG "https://api.zenithcode.net/stable/income-statement" \
  --data-urlencode "symbol=7203" \
  --data-urlencode "limit=10" \
  -H "x-api-key: YOUR_API_KEY"

How the code works

  1. 1Call with symbol and no period. limit=10 covers a little over two years.
  2. 2The first row is the latest period. If its period is FY, its revenue is the TTM.
  3. 3Otherwise, find the last FY row and the same quarter one year earlier (match by fiscalPeriod minus one year).
  4. 4Add last year's full year to this year's year-to-date and subtract last year's year-to-date.

Things to note

  • errorfiscalPeriod is the quarter-end month (YYYY-MM). For example, Q1 of the fiscal year ending March 2027 is 2026-06.
  • errorCompanies that changed their fiscal year end may have a previous year that is not 12 months. Check fiscalPeriodDays in income-statement.
  • errorWithout the rows needed (for a recent listing, for example), TTM cannot be computed.

FAQ for investors and developers

Why not just add four quarters?expand_more

Japanese earnings summaries report quarterly income cumulatively from the start of the year. A single quarter is the difference between two cumulative figures.

Do I compute TTM EPS the same way?expand_more

/stable/key-metrics already provides it as epsTtm.

FAQ for AI builders and researchers

Can I see which rows went into the TTM?expand_more

Each row's fiscalPeriod, period and provenance (source) show it.

What unit are the figures in?expand_more

Revenue is in yen, not thousands or millions.

gavel

Disclaimer

This page explains how to use a Japanese equity data API and how its data is defined. It is not a solicitation to invest or a recommendation to buy or sell any security. The content reflects information at the time of writing and is not guaranteed to be accurate or complete. Investment decisions are your own responsibility.

What you may show or provide to third parties depends on your plan and Article 8 of the Terms. Exchange data such as stock prices may not be shown to third parties on any plan. Terms, Article 8 · Data sources and terms of use