Skip to main content
Glama
financial-datasets

Financial Datasets MCP Server

Official

get_available_crypto_tickers

Retrieve all available cryptocurrency ticker symbols for accessing market data through the Financial Datasets MCP Server.

Instructions

Gets all available crypto tickers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_available_crypto_tickers' tool. It is registered via the @mcp.tool() decorator. Fetches available crypto tickers from the Financial Datasets API endpoint and returns them as a JSON string.
    @mcp.tool() async def get_available_crypto_tickers() -> str: """ Gets all available crypto tickers. """ # Fetch data from the API url = f"{FINANCIAL_DATASETS_API_BASE}/crypto/prices/tickers" data = await make_request(url) # Check if data is found if not data: return "Unable to fetch available crypto tickers or no available crypto tickers found." # Extract the available crypto tickers tickers = data.get("tickers", []) # Stringify the available crypto tickers return json.dumps(tickers, indent=2)
  • Helper function used by the tool to make authenticated API requests to the Financial Datasets API.
    async def make_request(url: str) -> dict[str, any] | None: """Make a request to the Financial Datasets API with proper error handling.""" # Load environment variables from .env file load_dotenv() headers = {} if api_key := os.environ.get("FINANCIAL_DATASETS_API_KEY"): headers["X-API-KEY"] = api_key async with httpx.AsyncClient() as client: try: response = await client.get(url, headers=headers, timeout=30.0) response.raise_for_status() return response.json() except Exception as e: return {"Error": str(e)}
  • server.py:225-225 (registration)
    The @mcp.tool() decorator registers the get_available_crypto_tickers function as an MCP tool.
    @mcp.tool()

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/financial-datasets/mcp-server'

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