Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import app from "../../finnhub.app.mjs";

export default {
key: "finnhub-get-ebitda-estimate",
name: "Get EBITDA Estimate",
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,
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;
},
};
4 changes: 4 additions & 0 deletions components/finnhub/common/constants.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ export default {
"crypto",
"merger",
],
FREQUENCIES: [
"annual",
"quarterly",
],
EXCHANGES: [
{
label: "ADU DHABI SECURITIES EXCHANGE",
Expand Down
15 changes: 14 additions & 1 deletion components/finnhub/finnhub.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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. Use `annual` for yearly estimates or `quarterly` for quarterly estimates.",
options: constants.FREQUENCIES,
optional: true,
default: "annual",
},
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},
methods: {
_baseUrl() {
Expand Down Expand Up @@ -92,6 +100,11 @@ export default {
...args,
});
},

async getEbitdaEstimate(args = {}) {
return this._makeRequest({
path: "/stock/ebitda-estimate",
...args,
});
},
},
};
2 changes: 1 addition & 1 deletion components/finnhub/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/finnhub",
"version": "0.2.0",
"version": "0.3.0",
"description": "Pipedream Finnhub Components",
"main": "finnhub.app.mjs",
"keywords": [
Expand Down