Skip to content
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5227f82
added boiler plate code
HarshGautam7101 Aug 14, 2025
f847dd0
added price endpoint action
HarshGautam7101 Aug 14, 2025
5d78903
added hourly ohlcv action
HarshGautam7101 Aug 14, 2025
026e5c1
added daily ohlcv endpoint action
HarshGautam7101 Aug 14, 2025
256b743
added moonshot tokens endpoint action
HarshGautam7101 Aug 14, 2025
5a9ce83
added tm grades tokens endpoint action
HarshGautam7101 Aug 14, 2025
fe51956
added tm grades historical tokens endpoint action
HarshGautam7101 Aug 14, 2025
1254807
added fundamental grades tokens endpoint action
HarshGautam7101 Aug 14, 2025
43fa7ca
added fundamental grades historical tokens endpoint action
HarshGautam7101 Aug 14, 2025
7668376
added technology grades tokens endpoint action
HarshGautam7101 Aug 14, 2025
674f23f
added technology grades historical tokens endpoint action
HarshGautam7101 Aug 14, 2025
c032ddb
added market metrics tokens endpoint action
HarshGautam7101 Aug 14, 2025
40eb782
added ai reports tokens endpoint action
HarshGautam7101 Aug 14, 2025
d3ddaea
added crypto investors tokens endpoint action
HarshGautam7101 Aug 14, 2025
cd8b855
added top market cap tokens endpoint action
HarshGautam7101 Aug 14, 2025
068bf3b
added resistance and support tokens endpoint action
HarshGautam7101 Aug 14, 2025
34182b3
added hourly trading signals tokens endpoint action
HarshGautam7101 Aug 14, 2025
b79de6b
added quantmetrics tokens endpoint action
HarshGautam7101 Aug 14, 2025
0f5997a
added scenario analysis tokens endpoint action
HarshGautam7101 Aug 14, 2025
9868b59
added correlation tokens endpoint action
HarshGautam7101 Aug 14, 2025
8c25d8e
added indices tokens endpoint action
HarshGautam7101 Aug 14, 2025
e18265e
added indices holdings tokens endpoint action
HarshGautam7101 Aug 14, 2025
ce3e304
added indices performance tokens endpoint action
HarshGautam7101 Aug 14, 2025
005ef63
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
HarshGautam7101 Aug 15, 2025
9d51809
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
HarshGautam7101 Aug 19, 2025
b7b46b7
updated readme
HarshGautam7101 Aug 19, 2025
13a06c6
Merge branch 'ENG-8702,ENG-8703,ENG-8704' of https://github.com/Harsh…
HarshGautam7101 Aug 19, 2025
aa18f0e
Update README.md
HarshGautam7101 Aug 19, 2025
eb6853b
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
HarshGautam7101 Aug 19, 2025
e81299e
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
HarshGautam7101 Aug 21, 2025
7fdd3ab
feat: improve component documentation and validation
HarshGautam7101 Aug 22, 2025
5a2c7fe
feat: improve component documentation and validation
HarshGautam7101 Aug 22, 2025
333c3eb
chore: clean up token_metrics component and update dependencies
HarshGautam7101 Aug 25, 2025
56492ff
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
HarshGautam7101 Aug 25, 2025
b34dd5c
Update components/token_metrics/actions/get-market-metrics/get-market…
GTFalcao Aug 26, 2025
330afc9
style: apply code formatting and linting fixes to token_metrics compo…
HarshGautam7101 Aug 27, 2025
7c8ef12
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
HarshGautam7101 Aug 27, 2025
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
175 changes: 171 additions & 4 deletions components/token_metrics/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,178 @@
# 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.
The Token Metrics API integration for Pipedream provides comprehensive access to cryptocurrency data, analytics, and AI-powered insights. This component enables seamless integration of advanced token metrics, market analysis, and trading intelligence into your automated workflows.

Token Metrics delivers institutional-grade cryptocurrency analytics, including AI-generated reports, trading signals, fundamental and technical analysis, market metrics, and performance data across thousands of digital assets.

# Key Features

- **Comprehensive Token Data**: Access detailed information for thousands of cryptocurrencies including prices, market metrics, and historical data
- **AI-Powered Analytics**: Leverage AI-generated reports, trading signals, and investment analysis
- **Advanced Grading Systems**: Access TM Grades, Fundamental Grades, and Technology Grades for informed decision-making
- **Market Intelligence**: Get market metrics, correlation analysis, and scenario-based price predictions
- **Professional Indices**: Access crypto indices with holdings and performance data
- **OHLCV Data**: Retrieve hourly and daily Open, High, Low, Close, Volume data
- **Quantitative Metrics**: Advanced quantitative analysis and resistance/support levels

# Authentication

To use the Token Metrics API component, you'll need:

1. A Token Metrics account with API access
2. An API key from your Token Metrics dashboard

The API uses API key authentication via the `x-api-key` header. Your API key should be kept secure and not shared publicly.

## Setup Instructions

1. Sign up for a Token Metrics account at https://www.tokenmetrics.com/api
2. Navigate to your [api keys dashboard](https://app.tokenmetrics.com/en/api?tab=keys) and generate an API key
3. In Pipedream, connect the Token Metrics app using your API key
4. The API key will be automatically included in all requests via the `x-api-key` header

# Available Actions

## Core Data Actions
- **Get Tokens**: Retrieve comprehensive token listings with metadata and analytics
- **Get Price**: Fetch current token prices for specified assets
- **Get Top Market Cap Tokens**: Access tokens ranked by market capitalization

## Trading & Signals
- **Get Trading Signals**: AI-generated long/short trading signals for all tokens
- **Get Hourly Trading Signals**: Real-time hourly trading signals
- **Get Moonshot Tokens**: AI-curated high-potential token picks

## Market Analysis
- **Get Market Metrics**: Comprehensive crypto market analytics and sentiment indicators
- **Get Correlation**: Token correlation analysis with top 100 market cap assets
- **Get Scenario Analysis**: Price predictions based on different market scenarios
- **Get Resistance Support**: Historical resistance and support levels

## OHLCV Data
- **Get Hourly OHLCV**: Hourly Open, High, Low, Close, Volume data
- **Get Daily OHLCV**: Daily OHLCV data for historical analysis

## Grading Systems
- **Get TM Grades**: Latest Token Metrics grades with trader and quant scores
- **Get TM Grades Historical**: Historical TM Grade data over time
- **Get Fundamental Grades**: Fundamental analysis scores (community, exchange, VC, tokenomics)
- **Get Fundamental Grades Historical**: Historical fundamental grade data
- **Get Technology Grades**: Technology assessment scores (activity, security, repository)
- **Get Technology Grades Historical**: Historical technology grade data

## Advanced Analytics
- **Get AI Reports**: Comprehensive AI-generated token analysis reports
- **Get Quantmetrics**: Advanced quantitative metrics and analysis
- **Get Crypto Investors**: Latest crypto investor data and scores

## Indices & Performance
- **Get Indices**: Access active and passive crypto indices
- **Get Indices Holdings**: Current holdings and weightings for specific indices
- **Get Indices Performance**: Historical performance data for crypto indices

# 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 Trading Systems
```javascript
// Monitor trading signals and execute automated trades
const signals = await steps.token_metrics.getTradingSignals({
symbol: "BTC,ETH",
signal: "1" // Bullish signals only
});

// Process signals and trigger trading actions
```

## Portfolio Management Dashboard
```javascript
// Create comprehensive portfolio tracking
const tokens = await steps.token_metrics.getTokens({
category: "defi,layer-1",
limit: 100
});

const grades = await steps.token_metrics.getTmGrades({
token_id: tokens.data.map(t => t.token_id).join(",")
});

// Combine data for portfolio analysis
```

## Market Research Automation
```javascript
// Generate detailed investment research
const aiReports = await steps.token_metrics.getAiReports({
symbol: "SOL,AVAX"
});

const fundamentals = await steps.token_metrics.getFundamentalGrades({
symbol: "SOL,AVAX"
});

// Create comprehensive research reports
```

## Risk Management System
```javascript
// Monitor market conditions and correlations
const marketMetrics = await steps.token_metrics.getMarketMetrics({
start_date: "2025-07-01",
end_date: "2025-07-10"
});

const correlations = await steps.token_metrics.getCorrelation({
symbol: "BTC"
});

// Implement risk management strategies
```

# API Endpoint

Base URL: `https://api.tokenmetrics.com/v2`

All requests require the `x-api-key` header for authentication.

# Rate Limits & Usage

Please refer to the [Token Metrics API documentation](https://developers.tokenmetrics.com/) for current rate limits, usage guidelines, and pricing information.

# Data Filtering & Pagination

Most actions support comprehensive filtering options:

- **Token Identification**: Filter by `token_id`, `symbol`, or `token_name`
- **Market Filters**: Filter by `category`, `exchange`, `market_cap`, `volume`, `fdv`
- **Date Ranges**: Use `start_date` and `end_date` for historical data
- **Pagination**: Control results with `limit` (default: 50) and `page` (default: 1) parameters

# Error Handling

The component includes comprehensive error handling for common scenarios:

- **401 Unauthorized**: Invalid or expired API key
- **403 Forbidden**: Insufficient API key permissions
- **429 Rate Limited**: API rate limit exceeded
- **5xx Server Errors**: Token Metrics API server issues

# Support & Resources

## Official Token Metrics Resources

- **API Dashboard**: [app.tokenmetrics.com/en/api](https://app.tokenmetrics.com/en/api) - Manage your API keys and access
- **API Pricing Plans**: [app.tokenmetrics.com/en/api-plans](https://app.tokenmetrics.com/en/api-plans) - View pricing and plan details
- **Token Metrics API Documentation**: [developers.tokenmetrics.com](https://developers.tokenmetrics.com/) - Complete API reference
- **API Support (Telegram)**: [t.me/tokenmetricsapi](https://t.me/tokenmetricsapi) - Developer community and support
- **Contact Us**: [tokenmetrics.com/contact-us](https://www.tokenmetrics.com/contact-us) - General support and inquiries

## Community & Support

- **Pipedream Community**: For integration and workflow assistance
- **Component Issues**: Report bugs or request features via the Pipedream platform
- **Email Support**: [email protected] for API-related issues

# Version

- **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.
Current version: 0.0.1

- **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.
Built with Pipedream Platform v3.0.3
75 changes: 75 additions & 0 deletions components/token_metrics/actions/get-ai-reports/get-ai-reports.mjs
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",
},
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}`);
}

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}`);
}
},
};
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}`);
}
},
};
Loading
Loading