feat: add ClientV2.get_fin_earnings_date() for /fins/earnings-date - #121
Merged
Merged
Conversation
J-Quants released a new all-issue earnings-announcement-date API on 2026-08-03 (https://jpx-jquants.com/ja/spec/fin-earnings-date), distinct from the existing get_eq_earnings_cal() (/equities/earnings-calendar, limited to March/September fiscal-year-end companies, now renamed). The new endpoint covers every listed issuer (including REITs) and tracks schedule-change history by publication date. Adds FinEarningsDateApiV2 (jquantsapi/apis/v2/fins.py) following the FinDividendApiV2 pattern (uses the shared _get_paginated helper; no cursor differential-fetch, matching the endpoint's spec which only documents pagination_key), FIN_EARNINGS_DATE_COLUMNS_V2 in constants.py, and ClientV2.get_fin_earnings_date(code, date_yyyymmdd, scheduled_date). Verified against the live API with the patched client (code="86970" and date="20260803" both return the documented PubDate/SchDate/FQName/ FYE/Code/CoName/CoNameEn fields). Tests cover parameter passthrough, DataFrame shape/dtypes, the empty-SchDate-becomes-NaT case (an undetermined schedule per the spec), and the empty-result case.
s-meitoma
approved these changes
Aug 7, 2026
s-meitoma
left a comment
Collaborator
There was a problem hiding this comment.
こちらにつきましてもありがとうございます。LGTMでしたので、マージさせていただきます。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #120
概要
2026-08-03 に追加された決算発表予定日API(
/fins/earnings-date、仕様)に対応するClientV2.get_fin_earnings_date()を追加します。既存の
get_eq_earnings_cal()(/equities/earnings-calendar、3・9月期決算会社限定・現在の表示名は「決算発表予定日(3・9月期決算会社のみ)」)とは別のエンドポイントです。新APIは決算期によらず全上場銘柄(REIT等含む)が対象で、予定日の変更・未定の履歴も公表日単位で追跡できます。実装
FinEarningsDateApiV2(jquantsapi/apis/v2/fins.py)をFinDividendApiV2と同じ構成で追加(共通ヘルパー_get_paginatedを使用。仕様上pagination_keyのみでcursor差分取得の記載が無いため、FinSummaryApiV2型のcursor対応は行っていません)FIN_EARNINGS_DATE_COLUMNS_V2(jquantsapi/constants.py)ClientV2.get_fin_earnings_date(code, date_yyyymmdd, scheduled_date)code/date_yyyymmdd/scheduled_dateは仕様上いずれか1つの指定必須(同時指定はAPI側で400エラー)ですが、クライアント側では他の既存メソッド(get_fin_summary等)と同様、渡された値をそのまま転送するだけで排他性の検証はAPI側に委ねています。検証
code="86970"・date="20260803"いずれも仕様通りのフィールドが返る)black/isort/flake8/mypy全てクリーン🤖 Generated with Claude Code