Skip to main content
Glama
jjmerri

E*TRADE MCP Server

by jjmerri

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
NameRequiredDescriptionDefault
symbolYes
expiry_typeNo

Implementation Reference

  • 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)
  • 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()

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/jjmerri/etrade-mcp'

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