Skip to main content
Glama
nadavgb-atom

ib-async-mcp

by nadavgb-atom

get_contract_details

Retrieve detailed contract specifications for trading instruments, including symbol, exchange, and currency information, to support market analysis and trade execution.

Instructions

Get detailed contract information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contract_typeYes
symbolYes
exchangeNoSMART
currencyNoUSD

Implementation Reference

  • The handler logic for 'get_contract_details' that creates a contract object and calls `ib.reqContractDetailsAsync`.
    if name == "get_contract_details":
        contract = create_contract(
            args["contract_type"],
            symbol=args["symbol"],
            exchange=args.get("exchange", "SMART"),
            currency=args.get("currency", "USD"),
        )
        details = await ib.reqContractDetailsAsync(contract)
        return [serialize_object(d) for d in details]
  • The tool definition and schema for 'get_contract_details'.
    Tool(
        name="get_contract_details",
        description="Get detailed contract information.",
        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