-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New Components - mboum #18129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
New Components - mboum #18129
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
07e17b9
General API and Stocks API components
michelle0927 4a9a2b7
Options API components
michelle0927 d508bb8
Calendar Events API components
michelle0927 7a32524
Technical Indicator API components & constants file
michelle0927 eeb1f66
Crypto API components
michelle0927 004e431
pnpm-lock.yaml
michelle0927 866572a
updates
michelle0927 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}, | ||
}; |
36 changes: 36 additions & 0 deletions
36
components/mboum/actions/get-analyst-ratings/get-analyst-ratings.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}, | ||
}; |
30 changes: 30 additions & 0 deletions
30
components/mboum/actions/get-crypto-currencies/get-crypto-currencies.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
29
components/mboum/actions/get-crypto-holders/get-crypto-holders.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
31
components/mboum/actions/get-crypto-modules/get-crypto-modules.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}, | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
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
29
components/mboum/actions/get-crypto-profile/get-crypto-profile.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}, | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.