---
title: "Individual Contracts"
description: "Request Future Options data in your algorithm to receive a feed of contract prices in the OnData method."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/future-options/requesting-data/individual-contracts
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/future-options/requesting-data/individual-contracts.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/03%20Securities/99%20Asset%20Classes/07%20Future%20Options/01%20Requesting%20Data/02%20Individual%20Contracts
modified: 2026-10-31
index: https://www.quantconnect.com/llms.txt
---

# Individual Contracts

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Securities > [Asset Classes](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes.md) > [Future Options](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/future-options.md) > [Requesting Data](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/future-options/requesting-data.md) > Individual Contracts

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

The `add_future_option_contract` method enables you to add an individual Option contract to your algorithm. To check which contracts are currently available to add to your algorithm, use the `option_chain` method. If you want to subscribe to a set of contracts instead of individual contracts one-by-one, see [Universes](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/future-options/requesting-data/universes.md).

## Create Subscriptions

Before you can subscribe to an Option contract, you must configure the underlying Future and get the contract `Symbol`.

```python
class BasicFutureOptionAlgorithm(QCAlgorithm):
    def initialize(self):
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        self._future = self.add_future(
            Futures.Indices.SP_500_E_MINI,
            extended_market_hours=True,
            data_mapping_mode=DataMappingMode.OPEN_INTEREST,
            data_normalization_mode=DataNormalizationMode.BACKWARDS_RATIO,
            contract_depth_offset=0
        )
        self._future.set_filter(0, 182)
        self._contract_symbol = None

    def on_data(self, data):
        if not self._contract_symbol:
            # Method 1: Add the desired option chain for the mapped contract
            self._contract_symbol = self._select_option_contract(self._future.mapped)
            self.add_future_option_contract(self._contract_symbol)

            # Method 2: Get all future contracts from the Future chain provider
            future_contract_symbol = list(self.futures_chain(self._future.symbol))[0].symbol
            symbol = self._select_option_contract(future_contract_symbol)
            self.add_future_option_contract(symbol)

            # Method 3: Iterate all Future chains to find the desired future options contracts
            for symbol, chain in data.future_chains.items():
                expiry = min([contract.expiry for contract in chain])
                future_contract = next(contract for contract in chain if contract.expiry == expiry)
                symbol = self._select_option_contract(future_contract.symbol)
                self.add_future_option_contract(symbol)

    def _select_option_contract(self, future_contract_symbol):
        chain = self.option_chain(future_contract_symbol, flatten=True).data_frame
        expiry = chain.expiry.min()
        return chain[
            (chain.expiry == expiry) & (chain.right == OptionRight.CALL)
        ].sort_values('strike').index[-1]
```

### Configure the Underlying Futures Contracts

In most cases, you should [subscribe to the underlying Futures contract](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/futures/requesting-data/individual-contracts.md#02-Create-Subscriptions) before you subscribe to a Futures Option contract.

```python
self._future = self.add_future(
    Futures.Indices.SP_500_E_MINI,
    extended_market_hours=True,
    data_mapping_mode=DataMappingMode.OPEN_INTEREST,
    data_normalization_mode=DataNormalizationMode.BACKWARDS_RATIO,
    contract_depth_offset=0
)
```

To get a `Symbol` of a specific Futures contract, use the `mapped` property of the `Future` object or the `symbol` property of the `FutureContract` objects in the `Slice.future_chains` collection.

### Get Contract Symbols

To subscribe to a Future Option contract, you need the contract `Symbol`. The preferred method to getting Option contract `Symbol` objects is to use the `option_chain` method. This method returns an `OptionChain` object, which represent an entire chain of Option contracts for a single underlying security. You can even format the chain data into a DataFrame where each row in the DataFrame represents a single contract. With the chain, sort and filter the data to find the specific contract(s) you want to trade.

```python
# Get the contracts available to trade (in DataFrame format).
chain = self.option_chain(future_contract_symbol, flatten=True).data_frame

# Select a contract.
expiry = chain.expiry.min()
self._contract_symbol = chain[
    # Select call contracts with the closest expiry.
    (chain.expiry == expiry) & (chain.right == OptionRight.CALL)
    # Select the contract with the lowest strike price.
].sort_values('strike').index[0]
```

Alternatively, you can create a Future Option contract `Symbol` object directly parsing its OSI ticker using the `SymbolRepresentation.parse_option_ticker_osi` method.

```python
# Create the contract Symbol for the Sept 2024 E-mini S&P 500 Call 7900 20 Sept 2024.
self._contract_symbol = SymbolRepresentation.parse_option_ticker_osi('ESU24 240920C07900000', SecurityType.FUTURE_OPTION, OptionStyle.AMERICAN, Market.CME)
# Create the contract Symbol using the 1-digit year format.
self._contract_symbol = SymbolRepresentation.parse_option_ticker_osi('ESU4 240920C07900000', SecurityType.FUTURE_OPTION, OptionStyle.AMERICAN, Market.CME)
```

### Subscribe to Contracts

To create a Future Option contract subscription, pass the contract `Symbol` to the `add_future_option_contract` method. Save a reference to the contract `symbol` so you can easily access the Option contract in the [OptionChain](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/equity-options/handling-data.md#04-Option-Chains) that LEAN passes to the `on_data` method. This method returns an `Option` object. To override the default [pricing model](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/options-models/pricing.md) of the Option, [set a pricing model](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/options-models/pricing.md#03-Set-Models).

```python
option = self.add_future_option_contract(self._contract_symbol)
option.price_model = OptionPriceModels.binomial_cox_ross_rubinstein()
```

### Warm Up Contract Prices

If you subscribe to a Future Option contract with `add_future_option_contract`, you'll need to wait until the next `Slice` to receive data and trade the contract. To trade the contract in the same time step you subscribe to the contract, set the current price of the contract in a [security initializer](https://www.quantconnect.com/docs/v2/writing-algorithms/initialization.md#07-Set-Security-Initializer).

```python
self.settings.seed_initial_prices = True
```

### Supported Assets

To view the supported assets in the US Future Options dataset, see the [Supported Assets](https://www.quantconnect.com/datasets/algoseek-us-future-options).

## Resolutions

The following table shows the available resolutions and data formats for Future Option contract subscriptions:

| Resolution | TradeBar | QuoteBar | Trade Tick | Quote Tick |
| --- | --- | --- | --- | --- |
| `TICK` | Not supported | Not supported | Not supported | Not supported |
| `SECOND` | Not supported | Not supported | Not supported | Not supported |
| `MINUTE` | Supported✓ | Supported✓ | Not supported | Not supported |
| `HOUR` | Supported✓ | Supported✓ | Not supported | Not supported |
| `DAILY` | Supported✓ | Supported✓ | Not supported | Not supported |

There is only one resolution option, so you don't need to pass a `resolution` argument to the `add_future_option_contract` method.

```python
self.add_future_option_contract(self._option_contract_symbol, Resolution.MINUTE)
```

To create custom resolution periods, see [Consolidating Data](https://www.quantconnect.com/docs/v2/writing-algorithms/consolidating-data/getting-started.md).

## Supported Markets

The following `Market` enumeration members are available for Future Options:

*Members of `QuantConnect.Market` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.Market&language=python*

Fields: `CBOT`, `COMEX`, `NYSELIFFE`

You don't need to pass a `Market` argument to the `add_future_option_contract` method because the contract `Symbol` already contains the market.

## Fill Forward

Fill forward means if there is no data point for the current [slice](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/time-modeling/timeslices.md), LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get [stale fills](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/trade-fills/key-concepts.md#06-Stale-Fills) or you may see trade volume as zero.

To disable fill forward for a security, set the `fill_forward` argument to false when you create the security subscription.

```python
self.add_future_option_contract(self._option_contract_symbol, fill_forward=False)
```

## Margin and Leverage

LEAN models buying power and margin calls to ensure your algorithm stays within the margin requirements. Future Options are already leveraged products, so you can't change their leverage.

## Extended Market Hours

By default, your security subscriptions only cover regular trading hours. To subscribe to pre and post-market trading hours for a specific asset, enable the `extended_market_hours` argument when you create the security subscription.

```python
self.add_future_option_contract(self._option_contract_symbol, extended_market_hours=True)
```

You only receive extended market hours data if you create the subscription with minute, second, or tick resolution. If you create the subscription with daily or hourly resolution, the bars only reflect the regular trading hours.

To view the schedule of regular and extended market hours, see [Market Hours](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/future-options/market-hours.md).

## Data Normalization

The data normalization mode doesn't affect the data that LEAN passes to `on_data` or the data from [history request](https://www.quantconnect.com/docs/v2/writing-algorithms/historical-data/history-requests.md). If you change the data normalization mode, it won't change the outcome.

## Remove Subscriptions

To remove a contract subscription that you created with `add_future_option_contract`, call the `remove_option_contract` method. This method is an alias for `remove_security`.

```python
self.remove_option_contract(self._option_contract_symbol)
```

The `remove_option_contract` method cancels your open orders for the contract and liquidates your holdings.

## Properties

The `add_future_option_contract` method returns an `Option` object, which have the following properties:

*Members of `QuantConnect.Securities.Option.Option` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.Securities.Option.Option&language=python*

## Helper Methods

The `Option` object provides methods you can use for basic calculations. These methods require the underlying price. To get the `Option` object and the `Security` object for its underlying in any function, use the Option `symbol` to access the value in the `securities` object.

```python
option = self.securities[self._option_contract_symbol]
underlying = self.securities[self._option_contract_symbol.underlying]
underlying_price = underlying.price
```

To get the Option [payoff](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/glossary.md#23-payoff), call the `get_pay_off` method.

```python
pay_off = option.get_pay_off(underlying_price)
```

To get the Option [intrinsic value](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/glossary.md#17-intrinsic-value), call the `get_intrinsic_value` method.

```python
intrinsic_value = option.get_intrinsic_value(underlying_price)
```

To get the Option [out-of-the-money amount](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/glossary.md#22-out-of-the-money-amount), call the `out_of_the_money_amount` method.

```python
otm_amount = option.out_of_the_money_amount(underlying_price)
```

To check whether the Option can be automatic exercised, call the `is_auto_exercised` method.

```python
is_auto_exercised = option.is_auto_exercised(underlying_price)
```
