Skip to main content
Glama

x402_sentiment

Analyze cryptocurrency sentiment using social media, news, and market data to generate sentiment scores and confidence levels for specific coins.

Instructions

Get real-time crypto sentiment analysis for a specific coin. Price: $0.01 USDC per query.

Analyzes social media, news, and market data to produce sentiment scores. Without X402_PRIVATE_KEY, only the free test endpoint is available.

Returns: sentiment score (-1 to 1), confidence, sources, and analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesCryptocurrency ticker symbol (e.g., 'BTC', 'ETH', 'SOL')

Implementation Reference

  • The handler implementation for the x402_sentiment tool, which fetches sentiment data from either a paid or free endpoint based on the availability of a private key.
    async (params) => {
      const base = APIS.sentiment.baseUrl;
    
      try {
        const usePaid = !!PRIVATE_KEY;
        const endpoint = usePaid
          ? `/sentiment/${params.coin.toLowerCase()}`
          : `/test/sentiment/${params.coin.toLowerCase()}`;
    
        const data = await apiGet(base, endpoint, usePaid);
        return textResult({
          mode: usePaid ? "paid" : "free_test",
          cost: usePaid ? "$0.01" : "free",
          coin: params.coin.toUpperCase(),
          ...data,
        });
  • src/index.ts:358-374 (registration)
    Registration of the x402_sentiment tool, including its description and input schema using Zod.
    server.tool(
      "x402_sentiment",
      `Get real-time crypto sentiment analysis for a specific coin.
    Price: $0.01 USDC per query.
    
    Analyzes social media, news, and market data to produce sentiment scores.
    Without X402_PRIVATE_KEY, only the free test endpoint is available.
    
    Returns: sentiment score (-1 to 1), confidence, sources, and analysis.`,
      {
        coin: z
          .string()
          .regex(/^[A-Z0-9]{1,10}$/i)
          .describe(
            "Cryptocurrency ticker symbol (e.g., 'BTC', 'ETH', 'SOL')"
          ),
      },

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/jameswilliamwisdom/x402-mcp-server'

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