Skip to content

Commit e5b965a

Browse files
authored
Merging pull request #18129
* General API and Stocks API components * Options API components * Calendar Events API components * Technical Indicator API components & constants file * Crypto API components * pnpm-lock.yaml * updates
1 parent e56c1e0 commit e5b965a

File tree

49 files changed

+2524
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2524
-6
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import mboum from "../../mboum.app.mjs";
2+
3+
export default {
4+
key: "mboum-get-ad",
5+
name: "Get Accumulation/Distribution Line (AD)",
6+
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)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
mboum,
11+
ticker: {
12+
propDefinition: [
13+
mboum,
14+
"ticker",
15+
],
16+
},
17+
interval: {
18+
propDefinition: [
19+
mboum,
20+
"interval",
21+
],
22+
},
23+
limit: {
24+
propDefinition: [
25+
mboum,
26+
"limit",
27+
],
28+
},
29+
},
30+
async run({ $ }) {
31+
const response = await this.mboum.getAD({
32+
$,
33+
params: {
34+
ticker: this.ticker,
35+
interval: this.interval,
36+
limit: this.limit,
37+
},
38+
});
39+
40+
$.export("$summary", `Successfully calculated A/D Line for ${this.ticker} on ${this.interval} intervals`);
41+
return response;
42+
},
43+
};
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import mboum from "../../mboum.app.mjs";
2+
3+
export default {
4+
key: "mboum-get-adosc",
5+
name: "Get Accumulation/Distribution Oscillator (ADOSC)",
6+
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)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
mboum,
11+
ticker: {
12+
propDefinition: [
13+
mboum,
14+
"ticker",
15+
],
16+
},
17+
interval: {
18+
propDefinition: [
19+
mboum,
20+
"interval",
21+
],
22+
},
23+
seriesType: {
24+
propDefinition: [
25+
mboum,
26+
"seriesType",
27+
],
28+
},
29+
fastPeriod: {
30+
type: "integer",
31+
label: "Fast Period",
32+
description: "Fast period for ADOSC calculation",
33+
optional: true,
34+
},
35+
slowPeriod: {
36+
type: "integer",
37+
label: "Slow Period",
38+
description: "Slow period for ADOSC calculation",
39+
optional: true,
40+
},
41+
limit: {
42+
propDefinition: [
43+
mboum,
44+
"limit",
45+
],
46+
},
47+
},
48+
async run({ $ }) {
49+
const response = await this.mboum.getADOSC({
50+
$,
51+
params: {
52+
ticker: this.ticker,
53+
interval: this.interval,
54+
series_type: this.seriesType,
55+
fast_period: this.fastPeriod,
56+
slow_period: this.slowPeriod,
57+
limit: this.limit,
58+
},
59+
});
60+
61+
$.export("$summary", `Successfully calculated ADOSC(${this.fastPeriod},${this.slowPeriod}) for ${this.ticker} on ${this.interval} intervals`);
62+
return response;
63+
},
64+
};
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import mboum from "../../mboum.app.mjs";
2+
3+
export default {
4+
key: "mboum-get-adx",
5+
name: "Get Average Directional Index (ADX)",
6+
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)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
mboum,
11+
ticker: {
12+
propDefinition: [
13+
mboum,
14+
"ticker",
15+
],
16+
},
17+
interval: {
18+
propDefinition: [
19+
mboum,
20+
"interval",
21+
],
22+
},
23+
seriesType: {
24+
propDefinition: [
25+
mboum,
26+
"seriesType",
27+
],
28+
},
29+
timePeriod: {
30+
type: "integer",
31+
label: "Time Period",
32+
description: "Number of periods for ADX calculation",
33+
optional: true,
34+
},
35+
limit: {
36+
propDefinition: [
37+
mboum,
38+
"limit",
39+
],
40+
},
41+
},
42+
async run({ $ }) {
43+
const response = await this.mboum.getADX({
44+
$,
45+
params: {
46+
ticker: this.ticker,
47+
interval: this.interval,
48+
series_type: this.seriesType,
49+
time_period: this.timePeriod,
50+
limit: this.limit,
51+
},
52+
});
53+
54+
$.export("$summary", `Successfully calculated ADX(${this.timePeriod}) for ${this.ticker} on ${this.interval} intervals`);
55+
return response;
56+
},
57+
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import mboum from "../../mboum.app.mjs";
2+
3+
export default {
4+
key: "mboum-get-analyst-ratings",
5+
name: "Get Analyst Ratings",
6+
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)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
mboum,
11+
ticker: {
12+
propDefinition: [
13+
mboum,
14+
"ticker",
15+
],
16+
},
17+
page: {
18+
propDefinition: [
19+
mboum,
20+
"page",
21+
],
22+
},
23+
},
24+
async run({ $ }) {
25+
const response = await this.mboum.getAnalystRatings({
26+
$,
27+
params: {
28+
ticker: this.ticker,
29+
page: this.page,
30+
},
31+
});
32+
33+
$.export("$summary", `Successfully retrieved analyst ratings for ${this.ticker}`);
34+
return response;
35+
},
36+
};
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import mboum from "../../mboum.app.mjs";
2+
3+
export default {
4+
key: "mboum-get-cci",
5+
name: "Get Commodity Channel Index (CCI)",
6+
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)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
mboum,
11+
ticker: {
12+
propDefinition: [
13+
mboum,
14+
"ticker",
15+
],
16+
},
17+
interval: {
18+
propDefinition: [
19+
mboum,
20+
"interval",
21+
],
22+
},
23+
seriesType: {
24+
propDefinition: [
25+
mboum,
26+
"seriesType",
27+
],
28+
},
29+
timePeriod: {
30+
type: "integer",
31+
label: "Time Period",
32+
description: "Number of periods for CCI calculation",
33+
optional: true,
34+
},
35+
limit: {
36+
propDefinition: [
37+
mboum,
38+
"limit",
39+
],
40+
},
41+
},
42+
async run({ $ }) {
43+
const response = await this.mboum.getCCI({
44+
$,
45+
params: {
46+
ticker: this.ticker,
47+
interval: this.interval,
48+
series_type: this.seriesType,
49+
time_period: this.timePeriod,
50+
limit: this.limit,
51+
},
52+
});
53+
54+
$.export("$summary", `Successfully calculated CCI(${this.timePeriod}) for ${this.ticker} on ${this.interval} intervals`);
55+
return response;
56+
},
57+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import mboum from "../../mboum.app.mjs";
2+
3+
export default {
4+
key: "mboum-get-crypto-currencies",
5+
name: "Get Crypto Currencies",
6+
description: "Get crypto currencies. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-coins)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
mboum,
11+
page: {
12+
type: "integer",
13+
label: "Page",
14+
description: "The page number to fetch",
15+
optional: true,
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.mboum.getCryptoCurrencies({
20+
$,
21+
params: {
22+
page: this.page,
23+
},
24+
});
25+
26+
$.export("$summary", "Successfully fetched crypto currencies");
27+
28+
return response.data;
29+
},
30+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import mboum from "../../mboum.app.mjs";
2+
3+
export default {
4+
key: "mboum-get-crypto-holders",
5+
name: "Get Crypto Holders",
6+
description: "Get crypto holders. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-holders)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
mboum,
11+
key: {
12+
type: "string",
13+
label: "Key",
14+
description: "Provide the crypto ID. Example: `bitcoin`",
15+
},
16+
},
17+
async run({ $ }) {
18+
const response = await this.mboum.getCryptoHolders({
19+
$,
20+
params: {
21+
key: this.key,
22+
},
23+
});
24+
25+
$.export("$summary", `Successfully fetched crypto holders for ${this.key}`);
26+
27+
return response.data;
28+
},
29+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import mboum from "../../mboum.app.mjs";
2+
import constants from "../../common/constants.mjs";
3+
4+
export default {
5+
key: "mboum-get-crypto-modules",
6+
name: "Get Crypto Modules",
7+
description: "Get crypto modules. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-modules)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
mboum,
12+
module: {
13+
type: "string",
14+
label: "Module",
15+
description: "The module to fetch",
16+
options: constants.CRYPTO_MODULES,
17+
},
18+
},
19+
async run({ $ }) {
20+
const response = await this.mboum.getCryptoModules({
21+
$,
22+
params: {
23+
module: this.module,
24+
},
25+
});
26+
27+
$.export("$summary", "Successfully fetched crypto modules");
28+
29+
return response;
30+
},
31+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import mboum from "../../mboum.app.mjs";
2+
3+
export default {
4+
key: "mboum-get-crypto-profile",
5+
name: "Get Crypto Profile",
6+
description: "Get crypto profile. [See the documentation](https://docs.mboum.com/#crypto-GETapi-v1-crypto-profile)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
mboum,
11+
key: {
12+
type: "string",
13+
label: "Key",
14+
description: "Provide the crypto ID. Example: `bitcoin`",
15+
},
16+
},
17+
async run({ $ }) {
18+
const response = await this.mboum.getCryptoProfile({
19+
$,
20+
params: {
21+
key: this.key,
22+
},
23+
});
24+
25+
$.export("$summary", `Successfully fetched crypto profile for ${this.key}`);
26+
27+
return response.data;
28+
},
29+
};

0 commit comments

Comments
 (0)