get_all_crypto_quotes
Retrieve bulk cryptocurrency quotes in a single request using Yahoo Finance MCP Server. Simplify access to comprehensive crypto market data for analysis and decision-making.
Instructions
获取全部加密货币的批量行情。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:1167-1181 (handler)The asynchronous handler function for the 'get_all_crypto_quotes' tool. It retrieves batch cryptocurrency quotes from the Financial Modeling Prep API using the FMP_API_KEY environment variable and returns the data as a JSON string.async def get_all_crypto_quotes() -> str: """批量获取加密货币行情""" api_key = os.environ.get("FMP_API_KEY") if not api_key: return "Error: FMP_API_KEY environment variable not set." url = "https://financialmodelingprep.com/stable/batch-crypto-quotes" try: resp = requests.get(url, params={"apikey": api_key}, timeout=10) resp.raise_for_status() data = resp.json() except Exception as e: return f"Error: getting batch crypto quotes: {e}" return json.dumps(data)
- server.py:1163-1166 (registration)The decorator that registers the 'get_all_crypto_quotes' tool with the MCP server, specifying its name and description.@fmp_server.tool( name="get_all_crypto_quotes", description="""获取全部加密货币的批量行情。""", )