etrade_get_option_expire_dates
Retrieve available option expiration dates for any stock symbol, filtering by weekly, monthly, quarterly, or all expirations to support options trading decisions.
Instructions
Get option expiration dates for a symbol.
Args: symbol: Underlying stock symbol (e.g., "AAPL") expiry_type: WEEKLY, MONTHLY, QUARTERLY, or ALL (optional)
Returns: List of available expiration dates for options
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| expiry_type | No |
Implementation Reference
- etrade_mcp/server.py:180-194 (handler)MCP tool handler function decorated with @mcp.tool(). Delegates to MarketClient.get_option_expire_dates after ensuring authentication.@mcp.tool() def etrade_get_option_expire_dates(symbol: str, expiry_type: Optional[str] = None) -> dict: """ Get option expiration dates for a symbol. Args: symbol: Underlying stock symbol (e.g., "AAPL") expiry_type: WEEKLY, MONTHLY, QUARTERLY, or ALL (optional) Returns: List of available expiration dates for options """ client = get_market_client() return client.get_option_expire_dates(symbol, expiry_type)
- etrade_mcp/market.py:127-147 (helper)Core implementation in MarketClient class that makes the authenticated HTTP GET request to E*TRADE's /v1/market/optionexpiredate.json endpoint with the symbol and optional expiry_type parameters.def get_option_expire_dates(self, symbol: str, expiry_type: Optional[str] = None) -> Dict[str, Any]: """ Get option expiration dates for a symbol Args: symbol: Underlying symbol expiry_type: Expiry type (WEEKLY, MONTHLY, QUARTERLY, ALL) Returns: Expiration dates response data """ url = f"{self.base_url}/v1/market/optionexpiredate.json" params = {"symbol": symbol} if expiry_type: params["expiryType"] = expiry_type response = self.session.get(url, params=params) response.raise_for_status() return response.json()