Skip to main content
Glama
token-metrics

Token Metrics MCP Server

Official

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
NameRequiredDescriptionDefault
categoryNoComma Separated category name. Example: yield farming,defi
endDateNoEnd Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-10
exchangeNoComma Separated exchange name. Example: binance,gate
fdvNoMinimum fully diluted valuation in $ (USD) of the token. Example: 100
limitNoLimit the number of results returned. Default is 50. Maximum is 100.
marketcapNoMinimum MarketCap in $ (USD) of the token. Example: 100
pageNoEnables 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.
signalNoThe current signal value of the strategy of the token, between bullish (1), bearish (-1) or no signal (0). Example: 1
startDateNoStart Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-01
symbolNoComma-separated string of token symbols (e.g., 'BTC,ETH,ADA')
token_idNoComma-separated string of token IDs (e.g., '1,2,3')
volumeNoMinimum 24h trading volume in $ (USD) of the token. Example: 100

Implementation Reference

  • 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; }
  • 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; }
  • 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";
  • 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; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/token-metrics/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server