Skip to main content
Glama
nadavgb-atom

ib-async-mcp

by nadavgb-atom

qualify_contracts

Fill missing contract fields like conId by qualifying Interactive Brokers trading contracts using symbol and contract type.

Instructions

Qualify contracts to fill in missing fields like conId.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contract_typeYes
symbolYes
exchangeNoSMART
currencyNoUSD

Implementation Reference

  • The handler for the qualify_contracts tool, which creates a contract object and then uses ib_async's qualifyContractsAsync method to qualify it.
    if name == "qualify_contracts":
        contract = create_contract(
            args["contract_type"],
            symbol=args["symbol"],
            exchange=args.get("exchange", "SMART"),
            currency=args.get("currency", "USD"),
        )
        qualified = await ib.qualifyContractsAsync(contract)
        return [serialize_object(c) for c in qualified]
  • The registration of the qualify_contracts tool, including its name, description, and input schema.
    Tool(
        name="qualify_contracts",
        description="Qualify contracts to fill in missing fields like conId.",
        inputSchema={
            "type": "object",
            "properties": {
                "contract_type": {"type": "string"},
                "symbol": {"type": "string"},
                "exchange": {"type": "string", "default": "SMART"},
                "currency": {"type": "string", "default": "USD"},
            },
            "required": ["contract_type", "symbol"],
        },
    ),

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