etrade_lookup_product
Search for stocks, mutual funds, and options using symbols or company names to retrieve detailed product information from E*TRADE market data.
Instructions
Look up products by symbol or company name.
Args: search: Full or partial symbol name to search for company: Full or partial company name (optional) type: Security type - EQ (equity), MF (mutual fund), OPTN (option) (optional)
Returns: List of matching products with details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | Yes | ||
| company | No | ||
| type | No |
Implementation Reference
- etrade_mcp/server.py:128-144 (handler)The main etrade_lookup_product tool handler function, registered via @mcp.tool() decorator in FastMCP. It authenticates via get_market_client() and delegates the lookup to MarketClient.look_up_product() method.@mcp.tool() def etrade_lookup_product(search: str, company: Optional[str] = None, type: Optional[str] = None) -> dict: """ Look up products by symbol or company name. Args: search: Full or partial symbol name to search for company: Full or partial company name (optional) type: Security type - EQ (equity), MF (mutual fund), OPTN (option) (optional) Returns: List of matching products with details """ client = get_market_client() return client.look_up_product(search, company, type)
- etrade_mcp/market.py:46-70 (helper)The core helper method in MarketClient class that performs the actual E*TRADE API request to /v1/market/lookup/{search}.json with optional company and type parameters, handling the HTTP GET and response parsing.def look_up_product(self, search: str, company: Optional[str] = None, type: Optional[str] = None) -> Dict[str, Any]: """ Look up products (stocks, options, mutual funds) Args: search: Full or partial symbol name company: Full or partial company name type: Security type (e.g., EQ for equity, MF for mutual fund, OPTN for option) Returns: Product lookup response data """ url = f"{self.base_url}/v1/market/lookup/{search}.json" params = {} if company: params["company"] = company if type: params["type"] = type response = self.session.get(url, params=params) response.raise_for_status() return response.json()