Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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: "Get EBITDA estimates for a company. [See the documentation](https://finnhub.io/docs/api/company-ebitda-estimates)",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
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",
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