From e074fd253840bd9c86439eff6f21a1de3ef15a9e Mon Sep 17 00:00:00 2001 From: Aldebaran638 <2023191113@email.szu.edu.cn> Date: Wed, 10 Jun 2026 17:52:51 +0800 Subject: [PATCH 1/2] feat(finnhub): add Get EBITDA Estimate action (#21071) Co-Authored-By: Claude Opus 4.8 --- .../get-ebitda-estimate.mjs | 40 +++++++++++++++++++ components/finnhub/common/constants.mjs | 4 ++ components/finnhub/finnhub.app.mjs | 15 ++++++- components/finnhub/package.json | 2 +- 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 components/finnhub/actions/get-ebitda-estimate/get-ebitda-estimate.mjs diff --git a/components/finnhub/actions/get-ebitda-estimate/get-ebitda-estimate.mjs b/components/finnhub/actions/get-ebitda-estimate/get-ebitda-estimate.mjs new file mode 100644 index 0000000000000..b43cdac4fa99a --- /dev/null +++ b/components/finnhub/actions/get-ebitda-estimate/get-ebitda-estimate.mjs @@ -0,0 +1,40 @@ +import app from "../../finnhub.app.mjs"; + +export default { + key: "finnhub-get-ebitda-estimate", + name: "Get EBITDA Estimate", + description: "Get EBITDA estimates for a company. [See the documentation](https://finnhub.io/docs/api/company-ebitda-estimates)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + app, + symbol: { + propDefinition: [ + app, + "symbol", + ], + }, + freq: { + propDefinition: [ + app, + "freq", + ], + }, + }, + async run({ $ }) { + const response = await this.app.getEbitdaEstimate({ + $, + params: { + symbol: this.symbol, + freq: this.freq, + }, + }); + $.export("$summary", `Successfully retrieved EBITDA estimates for ${this.symbol}`); + return response; + }, +}; diff --git a/components/finnhub/common/constants.mjs b/components/finnhub/common/constants.mjs index 86481b1834d2e..15411c3d3cb84 100644 --- a/components/finnhub/common/constants.mjs +++ b/components/finnhub/common/constants.mjs @@ -5,6 +5,10 @@ export default { "crypto", "merger", ], + FREQUENCIES: [ + "annual", + "quarterly", + ], EXCHANGES: [ { label: "ADU DHABI SECURITIES EXCHANGE", diff --git a/components/finnhub/finnhub.app.mjs b/components/finnhub/finnhub.app.mjs index 1df131eb1954e..52556734757a9 100644 --- a/components/finnhub/finnhub.app.mjs +++ b/components/finnhub/finnhub.app.mjs @@ -46,6 +46,14 @@ export default { description: "Filter by MIC code, i.e.: `XNGS`", optional: true, }, + freq: { + type: "string", + label: "Frequency", + description: "Frequency of the estimates", + options: constants.FREQUENCIES, + optional: true, + default: "annual", + }, }, methods: { _baseUrl() { @@ -92,6 +100,11 @@ export default { ...args, }); }, - + async getEbitdaEstimate(args = {}) { + return this._makeRequest({ + path: "/stock/ebitda-estimate", + ...args, + }); + }, }, }; diff --git a/components/finnhub/package.json b/components/finnhub/package.json index 656eeb6c912c3..61c04b9e86a5b 100644 --- a/components/finnhub/package.json +++ b/components/finnhub/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/finnhub", - "version": "0.2.0", + "version": "0.3.0", "description": "Pipedream Finnhub Components", "main": "finnhub.app.mjs", "keywords": [ From 76ab4c00655ea9f3191a9a76ba700ab8c0309370 Mon Sep 17 00:00:00 2001 From: Aldebaran638 <2023191113@email.szu.edu.cn> Date: Thu, 11 Jun 2026 09:10:25 +0800 Subject: [PATCH 2/2] refactor(finnhub): enhance action and prop descriptions per CodeRabbit review - Expand EBITDA action description with detailed context and premium requirement note - Clarify freq prop with explicit allowed values (annual/quarterly) Co-Authored-By: Claude Sonnet 4.6 --- .../finnhub/actions/get-ebitda-estimate/get-ebitda-estimate.mjs | 2 +- components/finnhub/finnhub.app.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/finnhub/actions/get-ebitda-estimate/get-ebitda-estimate.mjs b/components/finnhub/actions/get-ebitda-estimate/get-ebitda-estimate.mjs index b43cdac4fa99a..52fd5380a106b 100644 --- a/components/finnhub/actions/get-ebitda-estimate/get-ebitda-estimate.mjs +++ b/components/finnhub/actions/get-ebitda-estimate/get-ebitda-estimate.mjs @@ -3,7 +3,7 @@ import app from "../../finnhub.app.mjs"; export default { key: "finnhub-get-ebitda-estimate", name: "Get EBITDA Estimate", - description: "Get EBITDA estimates for a company. [See the documentation](https://finnhub.io/docs/api/company-ebitda-estimates)", + description: "Retrieves EBITDA (Earnings Before Interest, Taxes, Depreciation, and Amortization) estimates for a specified company. Returns analyst consensus estimates including average, high, and low values for annual or quarterly periods. Requires a premium Finnhub API subscription. [See the documentation](https://finnhub.io/docs/api/company-ebitda-estimates)", version: "0.0.1", annotations: { destructiveHint: false, diff --git a/components/finnhub/finnhub.app.mjs b/components/finnhub/finnhub.app.mjs index 52556734757a9..a5d57547a4772 100644 --- a/components/finnhub/finnhub.app.mjs +++ b/components/finnhub/finnhub.app.mjs @@ -49,7 +49,7 @@ export default { freq: { type: "string", label: "Frequency", - description: "Frequency of the estimates", + description: "Frequency of the estimates. Use `annual` for yearly estimates or `quarterly` for quarterly estimates.", options: constants.FREQUENCIES, optional: true, default: "annual",