Skip to main content
Glama

get_token_circulating_supply

Retrieve token circulating and total supply data for cryptocurrency trading pairs to analyze market metrics and token distribution.

Instructions

Get token circulating supply and total supply information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesTrading pair symbol (required), format BTC -> BTCUSDT, ETH -> ETHUSDT

Implementation Reference

  • The core handler function that makes an HTTP GET request to the Desk3 API endpoint for token circulating supply data given a symbol.
    async def get_token_circulating_supply(symbol: str) -> dict[str, Any]: """ Get token circulating supply and total supply information. :param symbol: Trading pair symbol (required), format BTC -> BTCUSDT, ETH -> ETHUSDT :return: Token circulating supply and total supply information """ url = 'https://mcp.desk3.io/v1/market/circulating' params = {'symbol': symbol} try: return request_api('get', url, params=params) except Exception as e: raise RuntimeError(f"Failed to fetch token circulating supply data: {e}")
  • JSON Schema defining the input parameters for the tool, requiring a 'symbol' string matching the pattern for trading pairs.
    inputSchema={ "type": "object", "properties": { "symbol": { "type": "string", "description": "Trading pair symbol (required), format BTC -> BTCUSDT, ETH -> ETHUSDT", "examples": ["BTCUSDT", "ETHUSDT", "BNBUSDT"], "pattern": "^[A-Z0-9]+$" }, }, "required": ["symbol"], },
  • Registration of the tool in the MCP server's list_tools() handler, including name, description, and schema.
    types.Tool( name="get_token_circulating_supply", description="Get token circulating supply and total supply information", inputSchema={ "type": "object", "properties": { "symbol": { "type": "string", "description": "Trading pair symbol (required), format BTC -> BTCUSDT, ETH -> ETHUSDT", "examples": ["BTCUSDT", "ETHUSDT", "BNBUSDT"], "pattern": "^[A-Z0-9]+$" }, }, "required": ["symbol"], }, ),
  • Dispatch handler in MCP server's call_tool() that validates input, calls the core handler, formats response as JSON, and returns TextContent.
    case "get_token_circulating_supply": if not arguments or "symbol" not in arguments: raise ValueError("Missing required argument: symbol") symbol = arguments["symbol"] try: data = await get_token_circulating_supply(symbol=symbol) return [ types.TextContent( type="text", text=json.dumps(data, indent=2), ) ] except Exception as e: raise RuntimeError(f"Failed to fetch token circulating supply data: {e}")
  • Helper function used by the handler to make authenticated HTTP requests to the Desk3 API.
    def request_api(method: str, url: str, params: dict = None, data: dict = None) -> any: headers = { 'Accepts': 'application/json', 'X-DESK3_PRO_API_KEY': API_KEY, } try: logging.info(f"Requesting {method.upper()} {url} params={params} data={data}") if method.lower() == 'get': response = requests.get(url, headers=headers, params=params) elif method.lower() == 'post': response = requests.post(url, headers=headers, json=data) else: raise ValueError(f"Unsupported HTTP method: {method}") response.raise_for_status() logging.info(f"Response {response.status_code} for {url}") return json.loads(response.text) except Exception as e: logging.error(f"Error during {method.upper()} {url}: {e}") raise

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/desk3/cryptocurrency-mcp-server'

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