Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
43 changes: 43 additions & 0 deletions components/mboum/actions/get-ad/get-ad.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import mboum from "../../mboum.app.mjs";

export default {
key: "mboum-get-ad",
name: "Get Accumulation/Distribution Line (AD)",
description: "Calculate Accumulation/Distribution Line technical indicator to measure volume flow and confirm price trends. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-indicators-ad)",
version: "0.0.1",
type: "action",
props: {
mboum,
ticker: {
propDefinition: [
mboum,
"ticker",
],
},
interval: {
propDefinition: [
mboum,
"interval",
],
},
limit: {
propDefinition: [
mboum,
"limit",
],
},
},
async run({ $ }) {
const response = await this.mboum.getAD({
$,
params: {
ticker: this.ticker,
interval: this.interval,
limit: this.limit,
},
});

$.export("$summary", `Successfully calculated A/D Line for ${this.ticker} on ${this.interval} intervals`);
return response;
},
};
64 changes: 64 additions & 0 deletions components/mboum/actions/get-adosc/get-adosc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import mboum from "../../mboum.app.mjs";

export default {
key: "mboum-get-adosc",
name: "Get Accumulation/Distribution Oscillator (ADOSC)",
description: "Calculate Accumulation/Distribution Oscillator technical indicator to measure the momentum of volume flow. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-indicators-adosc)",
version: "0.0.1",
type: "action",
props: {
mboum,
ticker: {
propDefinition: [
mboum,
"ticker",
],
},
interval: {
propDefinition: [
mboum,
"interval",
],
},
seriesType: {
propDefinition: [
mboum,
"seriesType",
],
},
fastPeriod: {
type: "integer",
label: "Fast Period",
description: "Fast period for ADOSC calculation",
optional: true,
},
slowPeriod: {
type: "integer",
label: "Slow Period",
description: "Slow period for ADOSC calculation",
optional: true,
},
limit: {
propDefinition: [
mboum,
"limit",
],
},
},
async run({ $ }) {
const response = await this.mboum.getADOSC({
$,
params: {
ticker: this.ticker,
interval: this.interval,
series_type: this.seriesType,
fast_period: this.fastPeriod,
slow_period: this.slowPeriod,
limit: this.limit,
},
});

$.export("$summary", `Successfully calculated ADOSC(${this.fastPeriod},${this.slowPeriod}) for ${this.ticker} on ${this.interval} intervals`);
return response;
},
};
57 changes: 57 additions & 0 deletions components/mboum/actions/get-adx/get-adx.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import mboum from "../../mboum.app.mjs";

export default {
key: "mboum-get-adx",
name: "Get Average Directional Index (ADX)",
description: "Calculate Average Directional Index technical indicator to measure trend strength and direction. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-indicators-adx)",
version: "0.0.1",
type: "action",
props: {
mboum,
ticker: {
propDefinition: [
mboum,
"ticker",
],
},
interval: {
propDefinition: [
mboum,
"interval",
],
},
seriesType: {
propDefinition: [
mboum,
"seriesType",
],
},
timePeriod: {
type: "integer",
label: "Time Period",
description: "Number of periods for ADX calculation",
optional: true,
},
limit: {
propDefinition: [
mboum,
"limit",
],
},
},
async run({ $ }) {
const response = await this.mboum.getADX({
$,
params: {
ticker: this.ticker,
interval: this.interval,
series_type: this.seriesType,
time_period: this.timePeriod,
limit: this.limit,
},
});

$.export("$summary", `Successfully calculated ADX(${this.timePeriod}) for ${this.ticker} on ${this.interval} intervals`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import mboum from "../../mboum.app.mjs";

export default {
key: "mboum-get-analyst-ratings",
name: "Get Analyst Ratings",
description: "Get analyst ratings and recommendations for a stock including buy/sell/hold ratings. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-stock-analyst-ratings)",
version: "0.0.1",
type: "action",
props: {
mboum,
ticker: {
propDefinition: [
mboum,
"ticker",
],
},
page: {
propDefinition: [
mboum,
"page",
],
},
},
async run({ $ }) {
const response = await this.mboum.getAnalystRatings({
$,
params: {
ticker: this.ticker,
page: this.page,
},
});

$.export("$summary", `Successfully retrieved analyst ratings for ${this.ticker}`);
return response;
},
};
57 changes: 57 additions & 0 deletions components/mboum/actions/get-cci/get-cci.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import mboum from "../../mboum.app.mjs";

export default {
key: "mboum-get-cci",
name: "Get Commodity Channel Index (CCI)",
description: "Calculate Commodity Channel Index technical indicator to identify cyclical trends and overbought/oversold conditions. [See the documentation](https://docs.mboum.com/#stocks-options-small-stylecolor-f8f2f2background-fa256fpadding-1px-4pxborder-radius-3pxhotsmall-GETapi-v1-markets-indicators-cci)",
version: "0.0.1",
type: "action",
props: {
mboum,
ticker: {
propDefinition: [
mboum,
"ticker",
],
},
interval: {
propDefinition: [
mboum,
"interval",
],
},
seriesType: {
propDefinition: [
mboum,
"seriesType",
],
},
timePeriod: {
type: "integer",
label: "Time Period",
description: "Number of periods for CCI calculation",
optional: true,
},
limit: {
propDefinition: [
mboum,
"limit",
],
},
},
async run({ $ }) {
const response = await this.mboum.getCCI({
$,
params: {
ticker: this.ticker,
interval: this.interval,
series_type: this.seriesType,
time_period: this.timePeriod,
limit: this.limit,
},
});

$.export("$summary", `Successfully calculated CCI(${this.timePeriod}) for ${this.ticker} on ${this.interval} intervals`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import mboum from "../../mboum.app.mjs";

export default {
key: "mboum-get-crypto-currencies",
name: "Get Crypto Currencies",
description: "Get crypto currencies. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-coins)",
version: "0.0.1",
type: "action",
props: {
mboum,
page: {
type: "integer",
label: "Page",
description: "The page number to fetch",
optional: true,
},
},
async run({ $ }) {
const response = await this.mboum.getCryptoCurrencies({
$,
params: {
page: this.page,
},
});

$.export("$summary", "Successfully fetched crypto currencies");

return response.data;
},
};
29 changes: 29 additions & 0 deletions components/mboum/actions/get-crypto-holders/get-crypto-holders.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import mboum from "../../mboum.app.mjs";

export default {
key: "mboum-get-crypto-holders",
name: "Get Crypto Holders",
description: "Get crypto holders. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-holders)",
version: "0.0.1",
type: "action",
props: {
mboum,
key: {
type: "string",
label: "Key",
description: "Provide the crypto ID. Example: `bitcoin`",
},
},
async run({ $ }) {
const response = await this.mboum.getCryptoHolders({
$,
params: {
key: this.key,
},
});

$.export("$summary", `Successfully fetched crypto holders for ${this.key}`);

return response.data;
},
};
31 changes: 31 additions & 0 deletions components/mboum/actions/get-crypto-modules/get-crypto-modules.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import mboum from "../../mboum.app.mjs";
import constants from "../../common/constants.mjs";

export default {
key: "mboum-get-crypto-modules",
name: "Get Crypto Modules",
description: "Get crypto modules. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-modules)",
version: "0.0.1",
type: "action",
props: {
mboum,
module: {
type: "string",
label: "Module",
description: "The module to fetch",
options: constants.CRYPTO_MODULES,
},
},
async run({ $ }) {
const response = await this.mboum.getCryptoModules({
$,
params: {
module: this.module,
},
});

$.export("$summary", "Successfully fetched crypto modules");

return response;
},
};
29 changes: 29 additions & 0 deletions components/mboum/actions/get-crypto-profile/get-crypto-profile.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import mboum from "../../mboum.app.mjs";

export default {
key: "mboum-get-crypto-profile",
name: "Get Crypto Profile",
description: "Get crypto profile. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-profile)",
version: "0.0.1",
type: "action",
props: {
mboum,
key: {
type: "string",
label: "Key",
description: "Provide the crypto ID. Example: `bitcoin`",
},
},
async run({ $ }) {
const response = await this.mboum.getCryptoProfile({
$,
params: {
key: this.key,
},
});

$.export("$summary", `Successfully fetched crypto profile for ${this.key}`);

return response.data;
},
};
Loading
Loading