Skip to main content
Glama
PaulieB14

Limitless MCP

get_trader_profile

Retrieve a trader's complete profile from on-chain data, including trade count, volume, fees, PnL, and activity timestamps across both simple and negrisk markets.

Instructions

Get a trader's profile across both simple and negrisk markets. Shows trade count, volume, fees, PnL, and first/last trade timestamps from on-chain data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesTrader wallet address

Implementation Reference

  • The get_trader_profile tool is registered and implemented directly in mcp-server/src/index.ts. It queries both simple and negrisk market subgraphs using a provided user address and combines the results.
    server.registerTool(
      "get_trader_profile",
      {
        description:
          "Get a trader's profile across both simple and negrisk markets. Shows trade count, volume, fees, PnL, and first/last trade timestamps from on-chain data.",
        inputSchema: {
          address: z.string().describe("Trader wallet address"),
        },
      },
      async ({ address }) => {
        try {
          const addr = address.toLowerCase();
          const userQuery = `{
            user(id: "${addr}") {
              id tradesCount totalVolumeUSD totalFeesUSD realizedPnlUSD
              firstTradeAt lastTradeAt
            }
          }`;
    
          const { simple, negrisk } = await queryBoth(userQuery, userQuery);
          const s = simple.user;
          const n = negrisk.user;
    
          if (!s && !n) {
            return textResult({ found: false, message: "No trading activity found for this address" });
          }
    
          const combined = {
            address: addr,
            tradesCount:
              parseInt(s?.tradesCount || "0") + parseInt(n?.tradesCount || "0"),
            totalVolumeUSD:
              parseFloat(s?.totalVolumeUSD || "0") + parseFloat(n?.totalVolumeUSD || "0"),
            totalFeesUSD:
              parseFloat(s?.totalFeesUSD || "0") + parseFloat(n?.totalFeesUSD || "0"),
            realizedPnlUSD:
              parseFloat(s?.realizedPnlUSD || "0") + parseFloat(n?.realizedPnlUSD || "0"),
            firstTradeAt: [s?.firstTradeAt, n?.firstTradeAt]
              .filter(Boolean)
              .sort()[0] || null,
            lastTradeAt: [s?.lastTradeAt, n?.lastTradeAt]
              .filter(Boolean)
              .sort()
              .reverse()[0] || null,
          };
    
          return textResult({
            combined,
            simpleMarkets: s || null,
            negriskMarkets: n || null,
          });
        } 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