Skip to content

feat(statements): make FMP-omittable statement members optional - #393

Merged
benbenbang merged 1 commit into
mainfrom
feat/368-stmtb-nullable
Sep 30, 2026
Merged

benbenbang merged 1 commit into
mainfrom
feat/368-stmtb-nullable

Conversation

@benbenbang

Copy link
Copy Markdown
Member

Fields that FMP can send as null are now decoded as optional across the
Rust responses, the PyO3 models and stubs, and the Go SDK. This covers
IncomeStatement's filing_date, accepted_date and interest_income;
KeyMetrics and KeyMetricsTtm graham_number; FinancialScore's
altman_z_score; AsReportedFinancialStatement's reported_currency; and
FinancialEstimate's EBIT and EBITDA low/high/avg members.

Each nullable member deserializes null to None (Option / pointer /
Optional) and re-encodes back to null, while a missing key still fails
as a required member. Tests across libfmp, fmp-py and the Go SDK assert
the decode-as-none, reencode-as-null and still-required behaviour.

BREAKING CHANGE: IncomeStatement, KeyMetrics, KeyMetricsTtm, FinancialScore, AsReportedFinancialStatement and FinancialEstimate members FMP can omit are now optional (Option / pointer / Optional); handle None.

Fields that FMP can send as null are now decoded as optional across the
Rust responses, the PyO3 models and stubs, and the Go SDK. This covers
IncomeStatement's filing_date, accepted_date and interest_income;
KeyMetrics and KeyMetricsTtm graham_number; FinancialScore's
altman_z_score; AsReportedFinancialStatement's reported_currency; and
FinancialEstimate's EBIT and EBITDA low/high/avg members.

Each nullable member deserializes null to None (Option / pointer /
Optional) and re-encodes back to null, while a missing key still fails
as a required member. Tests across libfmp, fmp-py and the Go SDK assert
the decode-as-none, reencode-as-null and still-required behaviour.

BREAKING CHANGE: IncomeStatement, KeyMetrics, KeyMetricsTtm, FinancialScore, AsReportedFinancialStatement and FinancialEstimate members FMP can omit are now optional (Option / pointer / Optional); handle None.
@benbenbang
benbenbang enabled auto-merge (rebase) September 30, 2026 14:29
@github-actions github-actions Bot added the enhancement New feature or request label Sep 30, 2026
@benbenbang
benbenbang merged commit d4fde87 into main Sep 30, 2026
9 checks passed
@benbenbang
benbenbang deleted the feat/368-stmtb-nullable branch September 30, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant