Skip to main content
Glama
PaulieB14

Limitless MCP

get_market_daily_snapshots

Retrieve daily trading data including volume, trades, and fees for a specific market over a defined period to analyze market performance trends.

Instructions

Get daily volume, trades, and fees for a specific market over time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conditionIdYesMarket conditionId
daysNo

Implementation Reference

  • Tool registration for get_market_daily_snapshots
    server.registerTool(
      "get_market_daily_snapshots",
      {
        description:
          "Get daily volume, trades, and fees for a specific market over time.",
        inputSchema: {
          conditionId: z.string().describe("Market conditionId"),
          days: z.number().default(30),
        },
      },
  • The handler logic for get_market_daily_snapshots, which queries market daily snapshots from both simple and negrisk sources.
    async ({ conditionId, days }) => {
      try {
        const snapshotQuery = `{
          marketDailySnapshots(
            where: { market: "${conditionId}" }
            first: ${days}
            orderBy: dayId
            orderDirection: desc
          ) {
            dayId date tradesCount volumeUSD buyVolumeUSD sellVolumeUSD feesUSD
          }
        }`;
    
        const [simpleData, negriskData, name] = await Promise.all([
          querySimple(snapshotQuery).catch(() => ({ marketDailySnapshots: [] })),
          queryNegRisk(snapshotQuery).catch(() => ({ marketDailySnapshots: [] })),
          getMarketName(conditionId),
        ]);
    
        const snapshots =
          simpleData.marketDailySnapshots?.length > 0
            ? simpleData.marketDailySnapshots
            : negriskData.marketDailySnapshots || [];
    
        return textResult({ market: name, conditionId, snapshots });
      } catch (e) {
        return errorResult(e);
      }

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/PaulieB14/limitless-subgraphs'

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