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
| Name | Required | Description | Default |
|---|---|---|---|
| contract_type | Yes | ||
| symbol | Yes | ||
| exchange | No | SMART | |
| currency | No | USD |
Implementation Reference
- src/ib_async_mcp/server.py:540-548 (handler)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] - src/ib_async_mcp/server.py:179-192 (schema)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"], }, ),