-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Eng 8702,eng 8703,eng 8704 #18072
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
GTFalcao
merged 37 commits into
PipedreamHQ:master
from
HarshGautam7101:ENG-8702,ENG-8703,ENG-8704
Aug 27, 2025
Merged
Eng 8702,eng 8703,eng 8704 #18072
Changes from 24 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
5227f82
added boiler plate code
HarshGautam7101 f847dd0
added price endpoint action
HarshGautam7101 5d78903
added hourly ohlcv action
HarshGautam7101 026e5c1
added daily ohlcv endpoint action
HarshGautam7101 256b743
added moonshot tokens endpoint action
HarshGautam7101 5a9ce83
added tm grades tokens endpoint action
HarshGautam7101 fe51956
added tm grades historical tokens endpoint action
HarshGautam7101 1254807
added fundamental grades tokens endpoint action
HarshGautam7101 43fa7ca
added fundamental grades historical tokens endpoint action
HarshGautam7101 7668376
added technology grades tokens endpoint action
HarshGautam7101 674f23f
added technology grades historical tokens endpoint action
HarshGautam7101 c032ddb
added market metrics tokens endpoint action
HarshGautam7101 40eb782
added ai reports tokens endpoint action
HarshGautam7101 d3ddaea
added crypto investors tokens endpoint action
HarshGautam7101 cd8b855
added top market cap tokens endpoint action
HarshGautam7101 068bf3b
added resistance and support tokens endpoint action
HarshGautam7101 34182b3
added hourly trading signals tokens endpoint action
HarshGautam7101 b79de6b
added quantmetrics tokens endpoint action
HarshGautam7101 0f5997a
added scenario analysis tokens endpoint action
HarshGautam7101 9868b59
added correlation tokens endpoint action
HarshGautam7101 8c25d8e
added indices tokens endpoint action
HarshGautam7101 e18265e
added indices holdings tokens endpoint action
HarshGautam7101 ce3e304
added indices performance tokens endpoint action
HarshGautam7101 005ef63
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
HarshGautam7101 9d51809
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
HarshGautam7101 b7b46b7
updated readme
HarshGautam7101 13a06c6
Merge branch 'ENG-8702,ENG-8703,ENG-8704' of https://github.com/Harsh…
HarshGautam7101 aa18f0e
Update README.md
HarshGautam7101 eb6853b
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
HarshGautam7101 e81299e
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
HarshGautam7101 7fdd3ab
feat: improve component documentation and validation
HarshGautam7101 5a2c7fe
feat: improve component documentation and validation
HarshGautam7101 333c3eb
chore: clean up token_metrics component and update dependencies
HarshGautam7101 56492ff
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
HarshGautam7101 b34dd5c
Update components/token_metrics/actions/get-market-metrics/get-market…
GTFalcao 330afc9
style: apply code formatting and linting fixes to token_metrics compo…
HarshGautam7101 7c8ef12
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
HarshGautam7101 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 |
|---|---|---|
| @@ -1,11 +1,36 @@ | ||
| # Overview | ||
|
|
||
| The Token Metrics API offers access to a trove of cryptocurrency data, including analytics, rankings, and predictions that leverage artificial intelligence and expert insights. With this API, you can automate investment strategies, integrate up-to-date crypto data into your applications, and stay informed with the latest market trends. When used on Pipedream, it allows you to build robust, serverless workflows that can react to various triggers and integrate with numerous services for a seamless data handling experience. | ||
| Token Metrics API on Pipedream allows you to access comprehensive cryptocurrency data and analytics. Integrate token metrics, market data, and analytics into your workflows to build powerful automation solutions for cryptocurrency trading, portfolio management, and market analysis. | ||
|
|
||
| # Example Use Cases | ||
|
|
||
| - **Crypto Alert System**: Build a workflow on Pipedream that monitors the Token Metrics API for significant changes in crypto ratings or predictions. When certain thresholds are met, use the integrated Twilio app to send SMS alerts, ensuring you or your audience stay up-to-date on important market movements. | ||
| - **Automated Portfolio Tracking**: Monitor your cryptocurrency portfolio by fetching token data and sending alerts when prices hit certain thresholds. Integrate with email services or Slack to receive real-time notifications. | ||
|
|
||
| - **Investment Tracker**: Create a Pipedream workflow that pulls daily investment insights and portfolio analytics from the Token Metrics API and logs them to a Google Sheets document. This allows for easy tracking and historical data analysis, helping to refine investment strategies over time. | ||
| - **Market Analysis Dashboard**: Collect token metrics data on a schedule and send it to Google Sheets or Airtable to create comprehensive market analysis dashboards with historical data tracking. | ||
|
|
||
| - **Market Dashboard Sync**: Use Pipedream to set up a workflow where market data and analytics from the Token Metrics API are fetched periodically and pushed to a real-time dashboard built with Geckoboard. This keeps your team or clients informed with the latest crypto market trends and forecasts. | ||
| - **Trading Signal Automation**: Use token analytics data to trigger automated trading signals, sending buy/sell recommendations via webhooks to trading platforms or notification services. | ||
|
|
||
| - **Research and Due Diligence**: Automatically fetch comprehensive token data for research purposes, combining it with other data sources to create detailed investment analysis reports. | ||
|
|
||
| # Authentication | ||
|
|
||
| To use the Token Metrics API, you'll need: | ||
|
|
||
| 1. A Token Metrics account | ||
| 2. An API key from your Token Metrics dashboard | ||
|
|
||
| The API uses Bearer token authentication. Your API key should be kept secure and not shared publicly. | ||
|
|
||
| # Available Actions | ||
|
|
||
| - **Get Tokens**: Retrieve a list of tokens with comprehensive metrics and analytics data | ||
| - **Get Token Details**: Fetch detailed information for a specific token | ||
| - **Search Tokens**: Search for tokens by name, symbol, or other criteria | ||
|
|
||
| # Rate Limits | ||
|
|
||
| Please refer to the Token Metrics API documentation for current rate limits and usage guidelines. | ||
|
|
||
| # Support | ||
|
|
||
| For issues related to the Token Metrics API itself, please contact Token Metrics support. For Pipedream-specific issues, please reach out via the Pipedream community. |
75 changes: 75 additions & 0 deletions
75
components/token_metrics/actions/get-ai-reports/get-ai-reports.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,75 @@ | ||
| import tokenMetrics from "../../token_metrics.app.mjs"; | ||
| import { ENDPOINTS, FILTER_DEFINITIONS } from "../../common/constants.mjs"; | ||
| import { buildParams, generateFilterSummary } from "../../common/utils.mjs"; | ||
|
|
||
| const endpoint = ENDPOINTS.AI_REPORTS; | ||
|
|
||
| export default { | ||
| key: "token_metrics-get-ai-reports", | ||
| name: "Get AI Reports", | ||
| description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/ai-reports)`, | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| tokenMetrics, | ||
| // Filter props based on endpoint configuration and API documentation | ||
| tokenId: { | ||
| ...FILTER_DEFINITIONS.token_id, | ||
| description: "Comma Separated Token IDs. Click here to access the list of token IDs. Example: 37493,3484", | ||
HarshGautam7101 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| symbol: { | ||
| ...FILTER_DEFINITIONS.symbol, | ||
| description: "Comma Separated Token Symbols. Click here to access the list of token symbols. Example: APX,PAAL", | ||
| }, | ||
| // Pagination props | ||
| limit: { | ||
| propDefinition: [ | ||
| tokenMetrics, | ||
| "limit", | ||
| ], | ||
| description: "Limit the number of items in response. Defaults to 50", | ||
| default: 50, | ||
| }, | ||
| page: { | ||
| propDefinition: [ | ||
| tokenMetrics, | ||
| "page", | ||
| ], | ||
| description: "Enables pagination and data retrieval control by skipping a specified number of items before fetching data. Page should be a non-negative integer, with 1 indicating the beginning of the dataset. Defaults to 1", | ||
| default: 1, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| // Build parameters using utility function | ||
| const params = buildParams(this, endpoint.filters); | ||
|
|
||
| try { | ||
| const response = await this.tokenMetrics.getAiReports({ | ||
| $, | ||
| params, | ||
| }); | ||
|
|
||
| // Generate summary using utility function | ||
| const filterSummary = generateFilterSummary(this, endpoint.filters); | ||
|
|
||
| // Use $ context for export | ||
| if ($ && $.export) { | ||
| const dataLength = response.data?.length || 0; | ||
| $.export("$summary", `Successfully retrieved AI reports for ${dataLength} tokens${filterSummary}`); | ||
| } | ||
HarshGautam7101 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| return response; | ||
| } catch (error) { | ||
| // Enhanced error handling | ||
HarshGautam7101 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| const errorMessage = error.response?.data?.message || error.message || "An error occurred"; | ||
| const statusCode = error.response?.status; | ||
|
|
||
| if ($ && $.export) { | ||
| $.export("$summary", `Error: ${errorMessage}`); | ||
| } | ||
|
|
||
| // Throw a more descriptive error | ||
| throw new Error(`Token Metrics API Error (${statusCode || 'Unknown'}): ${errorMessage}`); | ||
| } | ||
| }, | ||
| }; | ||
83 changes: 83 additions & 0 deletions
83
components/token_metrics/actions/get-correlation/get-correlation.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,83 @@ | ||
| import tokenMetrics from "../../token_metrics.app.mjs"; | ||
| import { ENDPOINTS, FILTER_DEFINITIONS } from "../../common/constants.mjs"; | ||
| import { buildParams, generateFilterSummary } from "../../common/utils.mjs"; | ||
|
|
||
| const endpoint = ENDPOINTS.CORRELATION; | ||
|
|
||
| export default { | ||
| key: "token_metrics-get-correlation", | ||
| name: "Get Correlation", | ||
| description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/correlation)`, | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| tokenMetrics, | ||
| // Filter props based on endpoint configuration and API documentation | ||
| tokenId: { | ||
| ...FILTER_DEFINITIONS.token_id, | ||
| description: "Comma Separated Token IDs. Click here to access the list of token IDs. Example: 3375,3306", | ||
| }, | ||
| symbol: { | ||
| ...FILTER_DEFINITIONS.symbol, | ||
| description: "Comma Separated Token Symbols. Click here to access the list of token symbols. Example: BTC,ETH", | ||
| }, | ||
| category: { | ||
| ...FILTER_DEFINITIONS.category, | ||
| description: "Comma separated category name. Click here to access the list of categories. Example: layer-1,nft", | ||
| }, | ||
| exchange: { | ||
| ...FILTER_DEFINITIONS.exchange, | ||
| description: "Comma separated exchange name. Click here to access the list of exchanges. Example: gate,binance", | ||
| }, | ||
| // Pagination props | ||
| limit: { | ||
| propDefinition: [ | ||
| tokenMetrics, | ||
| "limit", | ||
| ], | ||
| description: "Limit the number of items in response. Defaults to 50", | ||
| default: 50, | ||
| }, | ||
| page: { | ||
| propDefinition: [ | ||
| tokenMetrics, | ||
| "page", | ||
| ], | ||
| description: "Enables pagination and data retrieval control by skipping a specified number of items before fetching data. Page should be a non-negative integer, with 1 indicating the beginning of the dataset. Defaults to 1", | ||
| default: 1, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| // Build parameters using utility function | ||
| const params = buildParams(this, endpoint.filters); | ||
|
|
||
| try { | ||
| const response = await this.tokenMetrics.getCorrelation({ | ||
| $, | ||
| params, | ||
| }); | ||
|
|
||
| // Generate summary using utility function | ||
| const filterSummary = generateFilterSummary(this, endpoint.filters); | ||
|
|
||
| // Use $ context for export | ||
| if ($ && $.export) { | ||
| const dataLength = response.data?.length || 0; | ||
| $.export("$summary", `Successfully retrieved correlation data for ${dataLength} tokens${filterSummary}`); | ||
| } | ||
|
|
||
| return response; | ||
| } catch (error) { | ||
| // Enhanced error handling | ||
| const errorMessage = error.response?.data?.message || error.message || "An error occurred"; | ||
| const statusCode = error.response?.status; | ||
|
|
||
| if ($ && $.export) { | ||
| $.export("$summary", `Error: ${errorMessage}`); | ||
| } | ||
|
|
||
| // Throw a more descriptive error | ||
| throw new Error(`Token Metrics API Error (${statusCode || 'Unknown'}): ${errorMessage}`); | ||
| } | ||
| }, | ||
| }; |
66 changes: 66 additions & 0 deletions
66
components/token_metrics/actions/get-crypto-investors/get-crypto-investors.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,66 @@ | ||
| import tokenMetrics from "../../token_metrics.app.mjs"; | ||
| import { ENDPOINTS, FILTER_DEFINITIONS } from "../../common/constants.mjs"; | ||
| import { buildParams, generateFilterSummary } from "../../common/utils.mjs"; | ||
|
|
||
| const endpoint = ENDPOINTS.CRYPTO_INVESTORS; | ||
|
|
||
| export default { | ||
| key: "token_metrics-get-crypto-investors", | ||
| name: "Get Crypto Investors", | ||
| description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/crypto-investors)`, | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| tokenMetrics, | ||
| // Pagination props | ||
| limit: { | ||
| propDefinition: [ | ||
| tokenMetrics, | ||
| "limit", | ||
| ], | ||
| description: "Limit the number of items in response. Defaults to 50", | ||
| default: 50, | ||
| }, | ||
| page: { | ||
| propDefinition: [ | ||
| tokenMetrics, | ||
| "page", | ||
| ], | ||
| description: "Enables pagination and data retrieval control by skipping a specified number of items before fetching data. Page should be a non-negative integer, with 1 indicating the beginning of the dataset. Defaults to 1", | ||
| default: 1, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| // Build parameters using utility function | ||
| const params = buildParams(this, endpoint.filters); | ||
|
|
||
| try { | ||
| const response = await this.tokenMetrics.getCryptoInvestors({ | ||
| $, | ||
| params, | ||
| }); | ||
|
|
||
| // Generate summary using utility function | ||
| const filterSummary = generateFilterSummary(this, endpoint.filters); | ||
|
|
||
| // Use $ context for export | ||
| if ($ && $.export) { | ||
| const dataLength = response.data?.length || 0; | ||
| $.export("$summary", `Successfully retrieved ${dataLength} crypto investors${filterSummary}`); | ||
| } | ||
|
|
||
| return response; | ||
| } catch (error) { | ||
| // Enhanced error handling | ||
| const errorMessage = error.response?.data?.message || error.message || "An error occurred"; | ||
| const statusCode = error.response?.status; | ||
|
|
||
| if ($ && $.export) { | ||
| $.export("$summary", `Error: ${errorMessage}`); | ||
| } | ||
|
|
||
| // Throw a more descriptive error | ||
| throw new Error(`Token Metrics API Error (${statusCode || 'Unknown'}): ${errorMessage}`); | ||
| } | ||
| }, | ||
| }; |
87 changes: 87 additions & 0 deletions
87
components/token_metrics/actions/get-daily-ohlcv/get-daily-ohlcv.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,87 @@ | ||
| import tokenMetrics from "../../token_metrics.app.mjs"; | ||
| import { ENDPOINTS, FILTER_DEFINITIONS } from "../../common/constants.mjs"; | ||
| import { buildParams, generateFilterSummary } from "../../common/utils.mjs"; | ||
|
|
||
| const endpoint = ENDPOINTS.DAILY_OHLCV; | ||
|
|
||
| export default { | ||
| key: "token_metrics-get-daily-ohlcv", | ||
| name: "Get Daily OHLCV", | ||
| description: `${endpoint.description}. [See the documentation](https://developers.tokenmetrics.com/reference/daily-ohlcv)`, | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| tokenMetrics, | ||
| // Filter props based on endpoint configuration and screenshot | ||
| tokenId: { | ||
| ...FILTER_DEFINITIONS.token_id, | ||
| description: "Comma Separated Token IDs. Click here to access the list of token IDs. Example: 3375", | ||
| }, | ||
| symbol: { | ||
| ...FILTER_DEFINITIONS.symbol, | ||
| description: "Comma Separated Token Symbols. Click here to access the list of token symbols. Example: BTC", | ||
| }, | ||
| tokenName: { | ||
| ...FILTER_DEFINITIONS.token_name, | ||
| description: "Comma Separated Crypto Asset Names (e.g., Bitcoin, Ethereum). Click here to access the list of token names. Example: Bitcoin", | ||
| }, | ||
| startDate: { | ||
| ...FILTER_DEFINITIONS.start_date, | ||
| description: "Start Date accepts date as a string - YYYY-MM-DD format. Note: The Start Date cannot be earlier than the past 30 days from the current date. Example: 2025-01-01", | ||
HarshGautam7101 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| endDate: { | ||
| ...FILTER_DEFINITIONS.end_date, | ||
| description: "End Date accepts date as a string - YYYY-MM-DD format. Example: 2025-01-23", | ||
| }, | ||
| // Pagination props | ||
| limit: { | ||
| propDefinition: [ | ||
| tokenMetrics, | ||
| "limit", | ||
| ], | ||
| description: "Limit the number of items in response. Defaults to 50", | ||
| default: 50, | ||
| }, | ||
| page: { | ||
| propDefinition: [ | ||
| tokenMetrics, | ||
| "page", | ||
| ], | ||
| description: "Enables pagination and data retrieval control by skipping a specified number of items before fetching data. Page should be a non-negative integer, with 1 indicating the beginning of the dataset. Defaults to 1", | ||
| default: 1, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| // Build parameters using utility function | ||
| const params = buildParams(this, endpoint.filters); | ||
|
|
||
| try { | ||
| const response = await this.tokenMetrics.getDailyOhlcv({ | ||
| $, | ||
| params, | ||
| }); | ||
|
|
||
| // Generate summary using utility function | ||
| const filterSummary = generateFilterSummary(this, endpoint.filters); | ||
|
|
||
| // Use $ context for export | ||
| if ($ && $.export) { | ||
| const dataLength = response.data?.length || 0; | ||
| $.export("$summary", `Successfully retrieved ${dataLength} daily OHLCV records${filterSummary}`); | ||
| } | ||
|
|
||
| return response; | ||
| } catch (error) { | ||
| // Enhanced error handling | ||
| const errorMessage = error.response?.data?.message || error.message || "An error occurred"; | ||
| const statusCode = error.response?.status; | ||
|
|
||
| if ($ && $.export) { | ||
| $.export("$summary", `Error: ${errorMessage}`); | ||
| } | ||
|
|
||
| // Throw a more descriptive error | ||
| throw new Error(`Token Metrics API Error (${statusCode || 'Unknown'}): ${errorMessage}`); | ||
| } | ||
| }, | ||
| }; | ||
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.