get_tokens_trading_signal
Generate AI-driven trading signals for cryptocurrencies, identifying long and short positions based on token IDs, symbols, dates, market conditions, and technical indicators. Access actionable insights for informed crypto trading decisions.
Instructions
Fetch token(s) AI generated trading signals for long and short positions for a specific date or date range from Token Metrics API.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Comma Separated category name. Example: yield farming,defi | |
| endDate | No | End Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-10 | |
| exchange | No | Comma Separated exchange name. Example: binance,gate | |
| fdv | No | Minimum fully diluted valuation in $ (USD) of the token. Example: 100 | |
| limit | No | Limit the number of results returned. Default is 50. Maximum is 100. | |
| marketcap | No | Minimum MarketCap in $ (USD) of the token. Example: 100 | |
| page | No | 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. | |
| signal | No | The current signal value of the strategy of the token, between bullish (1), bearish (-1) or no signal (0). Example: 1 | |
| startDate | No | Start Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-01 | |
| symbol | No | Comma-separated string of token symbols (e.g., 'BTC,ETH,ADA') | |
| token_id | No | Comma-separated string of token IDs (e.g., '1,2,3') | |
| volume | No | Minimum 24h trading volume in $ (USD) of the token. Example: 100 |
Implementation Reference
- src/tools/trading-signal.ts:107-117 (handler)The performApiRequest method, which is the core handler logic specific to this tool. It validates the API key, builds query parameters from input, and makes an API request to the '/trading-signals' endpoint.protected async performApiRequest( input: TokenTradingSignalInput, ): Promise<TokenMetricsResponse> { this.validateApiKey(); const params = this.buildParams(input); return (await this.makeApiRequest( "/trading-signals", params, )) as TokenMetricsResponse; }
- src/tools/trading-signal.ts:35-105 (schema)The getToolDefinition method that provides the tool's name, description, and input schema for validation.getToolDefinition(): Tool { return { name: "get_tokens_trading_signal", description: "Fetch token(s) AI generated trading signals for long and short positions for a specific date or date range from Token Metrics API.", inputSchema: { type: "object", properties: { token_id: { type: "string", description: "Comma-separated string of token IDs (e.g., '1,2,3')", }, startDate: { type: "string", description: "Start Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-01", }, endDate: { type: "string", description: "End Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-10", }, symbol: { type: "string", description: "Comma-separated string of token symbols (e.g., 'BTC,ETH,ADA')", }, category: { type: "string", description: "Comma Separated category name. Example: yield farming,defi", }, exchange: { type: "string", description: "Comma Separated exchange name. Example: binance,gate", }, marketcap: { type: "string", description: "Minimum MarketCap in $ (USD) of the token. Example: 100", }, fdv: { type: "string", description: "Minimum fully diluted valuation in $ (USD) of the token. Example: 100", }, volume: { type: "string", description: "Minimum 24h trading volume in $ (USD) of the token. Example: 100", }, signal: { type: "string", description: "The current signal value of the strategy of the token, between bullish (1), bearish (-1) or no signal (0). Example: 1", }, limit: { type: "number", description: "Limit the number of results returned. Default is 50. Maximum is 100.", }, page: { type: "number", 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.", }, }, required: [], }, } as Tool; }
- src/tools/index.ts:36-36 (registration)Instantiation of the TokenTradingSignalTool class within the AVAILABLE_TOOLS array, registering it for use in the MCP server.new TokenTradingSignalTool(),
- src/tools/index.ts:8-8 (registration)Import of the TokenTradingSignalTool class necessary for its registration.import { TokenTradingSignalTool } from "./trading-signal.js";
- src/tools/trading-signal.ts:34-118 (helper)The main class implementing the tool, extending BaseApiTool and providing specific overrides.export class TokenTradingSignalTool extends BaseApiTool { getToolDefinition(): Tool { return { name: "get_tokens_trading_signal", description: "Fetch token(s) AI generated trading signals for long and short positions for a specific date or date range from Token Metrics API.", inputSchema: { type: "object", properties: { token_id: { type: "string", description: "Comma-separated string of token IDs (e.g., '1,2,3')", }, startDate: { type: "string", description: "Start Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-01", }, endDate: { type: "string", description: "End Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-10", }, symbol: { type: "string", description: "Comma-separated string of token symbols (e.g., 'BTC,ETH,ADA')", }, category: { type: "string", description: "Comma Separated category name. Example: yield farming,defi", }, exchange: { type: "string", description: "Comma Separated exchange name. Example: binance,gate", }, marketcap: { type: "string", description: "Minimum MarketCap in $ (USD) of the token. Example: 100", }, fdv: { type: "string", description: "Minimum fully diluted valuation in $ (USD) of the token. Example: 100", }, volume: { type: "string", description: "Minimum 24h trading volume in $ (USD) of the token. Example: 100", }, signal: { type: "string", description: "The current signal value of the strategy of the token, between bullish (1), bearish (-1) or no signal (0). Example: 1", }, limit: { type: "number", description: "Limit the number of results returned. Default is 50. Maximum is 100.", }, page: { type: "number", 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.", }, }, required: [], }, } as Tool; } protected async performApiRequest( input: TokenTradingSignalInput, ): Promise<TokenMetricsResponse> { this.validateApiKey(); const params = this.buildParams(input); return (await this.makeApiRequest( "/trading-signals", params, )) as TokenMetricsResponse; } }