GetIpoCalendar
Retrieve IPO calendar data to track past, current, and upcoming initial public offerings by exchange, country, or date range for market analysis.
Instructions
This endpoint returns past, today, or upcoming IPOs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Implementation Reference
- The main handler logic executed for the GetIpoCalendar tool. It adds the apikey to params, resolves any path params, makes an HTTP GET request to the Twelve Data API at the specific endpoint path (/ipo_calendar for this tool), handles errors, and parses the response using the tool-specific response model.async def _call_endpoint( endpoint: str, params: P, response_model: Type[R], ctx: Context ) -> R: params.apikey = extract_twelve_data_apikey( twelve_data_apikey=twelve_data_apikey, transport=transport, ctx=ctx ) params_dict = params.model_dump(exclude_none=True) resolved_endpoint = resolve_path_params(endpoint, params_dict) async with httpx.AsyncClient( trust_env=False, headers={ "accept": "application/json", "user-agent": "python-httpx/0.24.0" }, ) as client: resp = await client.get( f"{api_base}/{resolved_endpoint}", params=params_dict ) resp.raise_for_status() resp_json = resp.json() if isinstance(resp_json, dict): status = resp_json.get("status") if status == "error": code = resp_json.get('code') raise HTTPException( status_code=code, detail=f"Failed to perform request," f" code = {code}, message = {resp_json.get('message')}" ) return response_model.model_validate(resp_json)
- src/mcp_server_twelve_data/server.py:88-89 (registration)Registers all the individual endpoint tools (including GetIpoCalendar) before registering the u-tool that routes to them.register_all_tools(server=server, _call_endpoint=_call_endpoint) u_tool = register_u_tool(
- Documents ipo_calendar as a supported endpoint in the fundamentals category, confirming the tool GetIpoCalendar corresponds to the /ipo_calendar API endpoint.balance_sheet, cash_flow, statistics, profile, ipo_calendar, analyst_ratings
- src/mcp_server_twelve_data/server.py:124-124 (registration)Alternative registration path when u-tool is not enabled, registers all tools including GetIpoCalendar and limits the number.register_all_tools(server=server, _call_endpoint=_call_endpoint)
- test/endpoint_pairs.py:100-100 (helper)Confirms the tool name 'GetIpoCalendar' used for IPO calendar queries.('Show me the IPO calendar for upcoming companies.', 'GetIpoCalendar'),