Skip to main content
Glama
16Coffee

Yahoo Finance MCP Server

by 16Coffee

get_top_losers

Identify stocks with the largest daily price declines using the Yahoo Finance MCP Server's tool for tracking top market losers.

Instructions

获取今日跌幅最大的股票列表。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the logic for the 'get_top_losers' tool. It fetches the daily top losers from the Financial Modeling Prep API using the provided API key and returns the JSON data as a string.
    async def get_top_losers() -> 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/api/v3/stock_market/losers" 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 top losers: {e}" return json.dumps(data)
  • server.py:705-708 (registration)
    The registration of the 'get_top_losers' tool using the FastMCP decorator, specifying the tool name and description.
    @fmp_server.tool( name="get_top_losers", description="""获取今日跌幅最大的股票列表。""", )

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/16Coffee/finance-mcp'

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