Skip to main content
Glama
token-metrics

Token Metrics MCP Server

Official

get_tokens_hourly_ohlcv

Retrieve hourly OHLCV (Open, High, Low, Close, Volume) data for specific tokens by specifying token IDs, names, symbols, or date ranges using the Token Metrics API for comprehensive cryptocurrency market analysis.

Instructions

Fetch hourly OHLCV (Open, High, Low, Close, Volume) data for token(s) for a specific date or date range from Token Metrics API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endDateNoEnd Date accepts date as a string - YYYY-MM-DD format. Example: 2023-10-10
limitNoLimit the number of results returned. Default is 50. Maximum is 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.
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')
token_nameNoComma Separated Crypto Asset Names (e.g., Bitcoin, Ethereum)

Implementation Reference

  • The core handler logic for the 'get_tokens_hourly_ohlcv' tool. It validates the API key, builds query parameters from input, and makes an API request to the '/hourly-ohlcv' endpoint.
    protected async performApiRequest(
      input: HourlyOHLCVInput,
    ): Promise<TokenMetricsResponse> {
      this.validateApiKey();
      const params = this.buildParams(input);
    
      return (await this.makeApiRequest(
        "/hourly-ohlcv",
        params,
      )) as TokenMetricsResponse;
    }
  • The tool schema definition including name 'get_tokens_hourly_ohlcv', description, and input schema for parameters like token_id, symbol, dates, etc.
    getToolDefinition(): Tool {
      return {
        name: "get_tokens_hourly_ohlcv",
        description:
          "Fetch hourly OHLCV (Open, High, Low, Close, Volume) data for token(s) 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')",
            },
            token_name: {
              type: "string",
              description:
                "Comma Separated Crypto Asset Names (e.g., Bitcoin, Ethereum)",
            },
            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')",
            },
            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;
    }
  • Registration of the HourlyOHLCVTool instance (line 32) in the AVAILABLE_TOOLS array, which is used by the MCP server to list and execute tools.
    export const AVAILABLE_TOOLS: BaseTool[] = [
      new TokenDataTool(),
      new PriceTool(),
      new HourlyOHLCVTool(),
      new DailyOHLCVTool(),
      new TokenInvestorGradeTool(),
      new MarketMetricsTool(),
      new TokenTradingSignalTool(),
      new AiReportTool(),
      new CryptoInvestorTool(),
      new TopTokensTool(),
      new ResistanceSupportTool(),
      new SentimentTool(),
      new QuantMetricsTool(),
      new ScenarioAnalysisTool(),
      new CorrelationTool(),
      new IndicesTool(),
      new IndicesHoldingsTool(),
      new IndicesPerformanceTool(),
      new TokenHourlyTradingSignalTool(),
      new MoonshotTokensTool(),
      new TokenTmGradeTool(),
      new TokenTmGradeHistoricalTool(),
      new TokenTechnologyGradeTool(),
    ];
  • Type definition for the input parameters used in the tool handler.
    interface HourlyOHLCVInput {
      token_id?: string;
      symbol?: string;
      token_name?: string;
      startDate?: string;
      endDate?: string;
      limit?: number;
      page?: number;
    }

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