Skip to main content
Glama

zora_get_coin_swaps

Fetch recent buy and sell swap activity for any coin on the Zora Coins ecosystem to analyze trading patterns and market movements.

Instructions

Fetch recent buy/sell swap activity for a coin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes
chainIdNo
afterNo
firstNo

Implementation Reference

  • The handler function for the zora_get_coin_swaps tool. It takes input parameters, calls CoinsSDK.getCoinSwaps to fetch recent buy/sell swap activity for a coin, and returns the response as formatted JSON content.
    async ({ address, chainId, after, first }) => { // @ts-expect-error - TypeScript can't resolve barrel exports properly const resp = await CoinsSDK.getCoinSwaps({ address, chain: chainId, after, first, }); return { content: [{ type: "text", text: json(resp) }] }; }
  • Input schema using Zod for validating parameters: address (required string), chainId (optional number, defaults to Base chain), after (optional string for pagination), first (optional number 1-100 for limit).
    inputSchema: { address: z.string(), chainId: z.number().default(DEFAULT_CHAIN.id), after: z.string().optional(), first: z.number().int().min(1).max(100).optional(), },
  • src/index.ts:164-186 (registration)
    Registration of the zora_get_coin_swaps tool with the MCP server, including title, description, input schema, and handler function.
    server.registerTool( "zora_get_coin_swaps", { title: "Get coin swaps", description: "Fetch recent buy/sell swap activity for a coin.", inputSchema: { address: z.string(), chainId: z.number().default(DEFAULT_CHAIN.id), after: z.string().optional(), first: z.number().int().min(1).max(100).optional(), }, }, async ({ address, chainId, after, first }) => { // @ts-expect-error - TypeScript can't resolve barrel exports properly const resp = await CoinsSDK.getCoinSwaps({ address, chain: chainId, after, first, }); return { content: [{ type: "text", text: json(resp) }] }; } );

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/r4topunk/zora-coins-mcp-server'

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