Skip to main content
Glama
nadavgb-atom

ib-async-mcp

by nadavgb-atom

get_historical_news

Retrieve historical news headlines for specific financial instruments using Interactive Brokers data. Specify contract ID and provider codes to access past market news.

Instructions

Get historical news headlines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
con_idYesContract ID
provider_codesYesComma-separated provider codes
total_resultsNo

Implementation Reference

  • The handler function that executes 'get_historical_news' using ib.reqHistoricalNewsAsync.
    if name == "get_historical_news":
        news = await ib.reqHistoricalNewsAsync(
            args["con_id"],
            args["provider_codes"],
            "",
            "",
            args.get("total_results", 10),
        )
        if news:
            return {
                "time": news.time.isoformat() if news.time else None,
                "provider_code": news.providerCode,
                "article_id": news.articleId,
                "headline": news.headline,
            }
        return {"error": "No news found"}
  • The registration of 'get_historical_news' as a tool in the MCP server list_tools.
        name="get_historical_news",
        description="Get historical news headlines.",
        inputSchema={
            "type": "object",
            "properties": {
                "con_id": {"type": "integer", "description": "Contract ID"},
                "provider_codes": {"type": "string", "description": "Comma-separated provider codes"},
                "total_results": {"type": "integer", "default": 10},
            },
            "required": ["con_id", "provider_codes"],
        },
    ),

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/nadavgb-atom/ib-async-mcp'

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