Skip to main content
Glama
nadavgb-atom

ib-async-mcp

by nadavgb-atom

calculate_option_price

Calculate option prices using volatility inputs to determine fair market value for trading decisions.

Instructions

Calculate option price from volatility.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
expiryYes
strikeYes
rightYes
volatilityYes
underlying_priceYes

Implementation Reference

  • The handler function for 'calculate_option_price' which qualifies the contract and calls ib.calculateOptionPriceAsync.
    if name == "calculate_option_price":
        contract = Option(
            args["symbol"],
            args["expiry"],
            args["strike"],
            args["right"],
            "SMART",
        )
        await ib.qualifyContractsAsync(contract)
        result = await ib.calculateOptionPriceAsync(
            contract,
            args["volatility"],
            args["underlying_price"],
        )
        return serialize_object(result)
  • Registration of the 'calculate_option_price' tool, including its input schema definition.
    Tool(
        name="calculate_option_price",
        description="Calculate option price from volatility.",
        inputSchema={
            "type": "object",
            "properties": {
                "symbol": {"type": "string"},
                "expiry": {"type": "string"},
                "strike": {"type": "number"},
                "right": {"type": "string"},
                "volatility": {"type": "number"},
                "underlying_price": {"type": "number"},
            },
            "required": ["symbol", "expiry", "strike", "right", "volatility", "underlying_price"],
        },

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