Skip to main content
Glama

get_unique_traders_by_collection

Retrieve unique buyer and seller counts for NFT collections to analyze trading activity and market participation.

Instructions

Retrieve count of unique buyers and sellers for NFT collections.

Args:
    limit (int, optional): Maximum number of rows to fetch from the query. Defaults to 1000.

Returns:
    str: Markdown table of unique traders by collection, or error message if the query fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Implementation Reference

  • main.py:105-121 (handler)
    The handler function decorated with @mcp.tool() that implements the logic for get_unique_traders_by_collection. It fetches the latest results from Dune query ID 5140464, processes the data into a pandas DataFrame, and returns it as a Markdown table.
    @mcp.tool()
    def get_unique_traders_by_collection(limit: int = 1000) -> str:
        """
        Retrieve count of unique buyers and sellers for NFT collections.
    
        Args:
            limit (int, optional): Maximum number of rows to fetch from the query. Defaults to 1000.
    
        Returns:
            str: Markdown table of unique traders by collection, or error message if the query fails.
        """
        try:
            data = get_latest_result(5140464, limit=limit)
            df = pd.DataFrame(data)
            return df.to_markdown()
        except Exception as e:
            return str(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/kukapay/nft-analytics-mcp'

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