IntroductionCopy Location
Copy Location
Interactive Brokers models Event Contract instruments on options (for ForecastEx products) and futures options (for CME Group products).
Event Contracts can generally be treated as options products in the Web API, and most existing features and workflows will serve these instruments unaltered.
This guide will frequently make analogies to conventional index options for both ForecastEx and CME Group products.
IB’s Event Contract instrument records use the following fields inherited from the options model:
- An underlying reference index, which may or may not be artificial:
- For CME products, a tradable Event Contract will have the relevant CME index as its underlier.
- For ForecastEx products, IB has generated an artificial underlying index which serves as a container for related Event Contracts in the same product class. These artificial indices do not have any associated reference values and are purely an artifact of the option instrument model used to represent these Event Contracts. However, these artificial underlying indices can be used to search for groups of related Event Contracts, just as with index options.
- A Symbol value which matches the symbol of the underlying index and which reflects the issuer’s product code for the instrument and points to the underlying index that
- A Trading Class which reflects the issuer’s product code for the instrument and serves as human-readable identifier for a group of related Event Contracts.
- Note that many CME Group Event Contracts, which resolve against CME Group indices, have product codes prefixed with “EC” and followed by the symbol of the relevant exchange, to avoid naming collisions with other derivatives on the same index.
- A Put or Call (Right) value, where Call = Yes and Put = No.
- Note that ForecastEx instruments do not permit Sell orders. Instead, ForecastEx positions are flattened or reduced by buying the opposing contract. CME Group Event Contracts permit both buying and selling.
- An artificial Contract Month value, again used primarily for searching and filtering available instruments. Most Event Contract products do not follow monthly series as is common with index or equity options, so these Contract Month values are typically not a meaningful attribute of the instrument. Rather, they permit filtering of instruments by calendar month.
- A Last Trade Date, Time, and Millisecond values, which together indicate precisely when trading in an Event Contract will cease, just as with index options.
- A Strike value, which is the numerical value on which the event resolution hinges. Though numerical, this value need not represent a price.
- An instrument description (or “local symbol”) in the form
"PRODUCT EXPIRATION STRIKE RIGHT", where:PRODUCTis the issuer’s product identifierEXPIRATIONis the date of the instrument’s resolution in the formMmmDD'YY, e.g., “Sep26’24”STRIKEis the numerical value that determines the contract’s moneyness at expirationRIGHTis a value YES or NO
Instrument DiscoveryCopy Location
Copy Location
The Web API requires the use of IB’s contract ID (“conid”) to uniquely specify instruments. Knowledge of a particular instrument’s conid is required to retrieve intrument trading rules and market data, and also to submit orders.
Due to the novelty and variety of these instruments, the process of resolving Event Contract symbols and attributes into IB’s conids requires the most attention and is the primary focus of this guide. Once conids are obtained, other functionality operates as expected.
Note that IB conids are persistent for the life of an instrument. Therefore, we recommend retrieving conids and storing them locally prior to trading. Similarly, Event Contracts’ underlying indices possess their own conids which persist indefinitely. Once these underlier conids are captured, they can be used to retrieve a current set of tradable Event Contracts in that product class.
The Web API’s existing derivative discovery workflow can be used to find Event Contracts offered by both CME Group and ForecastEx, though the workflow differs slightly for each issuer, owing to the modeling of their products as futures options and (index) options, respectively.
In both cases, instrument discovery begins by selecting a product code of interest.
Event Contract product codes can be obtained from IB’s ForecastTrader, or directly from the exchange websites:
- IB ForecastTrader: https://forecasttrader.interactivebrokers.com/eventtrader/#/markets
- CME Group: https://www.cmegroup.com/activetrader/event-contracts.html
- ForecastEx: https://forecastex.com/markets/
CME Group Discovery WorkflowCopy Location
Copy Location
CME Group’s Event Contract products are listed on the CME venues where their underlying indices reside.
For example, Event Contracts related to the closing price of Gold are listed on COMEX, while NQ-related Event Contracts are listed on CME.
Suppose we’d like to find CME’s NQ Event Contracts.
CME Request #1 -- Obtaining Index Conid and Contract MonthsCopy Location
Copy Location
First, we’ll want to capture the conid of the underlying NQ index, along with a list of valid Contract Months for which tradable Event Contracts exist.
GET https://api.ibkr.com/v1/api/iserver/secdef/search?symbol=NQ&secType=IND
200 OK
[
{
"conid": "11004958",
"companyName": "E-mini NASDAQ 100 ",
"symbol": "NQ",
"description": "CME",
...,
"sections": [
{
"secType": "IND",
"exchange": "CME;"
},
...,
{
"secType": "FOP",
"months": "AUG24;SEP24;OCT24;NOV24;DEC24;MAR25;JUN25;DEC25;DEC26;DEC27;DEC28",
"exchange": "CME"
},
...,
{
"secType": "EC"
}
]
}
]The index conid can be stored, and it is possible to skip this query in the future once this conid is obtained, as the Contract Month values can simply be incremented. The index conid can be reused in the future to fetch tradable Event Contracts as needed.
The response will deliver instrument records matching the provided symbol and instrument type, and results may not be unique.
You’ll want to filter the returned list for the index record of interest.
This can be done by looking at the array of JSON objects in the “sections” field, which should contain (among others) three objects:
- One reflecting an index on the correct exchange:
{"secType":"IND","exchange":"CME"} - Another reflecting futures options on that index:
{"secType":"FOP",...} - A third object indicating the existence of Event Contract products on that index:
{"secType":"EC"}
Together, these elements confirm we’ve found the necessary NQ index record.
From this response we should capture two new values:
- The index’s conid:
"conid":"11004958" - From the “FOP” object, the semicolon-separated list of futures options Contract Months:
"months":"AUG24;SEP24;OCT24;NOV24;DEC24;MAR25;JUN25;DEC25;DEC26;DEC27;DEC28"
Note that this response will deliver other values related to derivative products which have been omitted above and can be ignored for the purposes of this workflow.
CME Request #2 -- Obtaining Event Contract ConidsCopy Location
Copy Location
Endpoint: /iserver/secdef/info
Next, we’ll want to search for records for tradable Event Contract instruments, using the newly obtained values from the first request.
This will consist of a series of requests, stepping through the Contract Month values obtained via the first request.
Importantly, this query will return records for both futures options proper and Event Contracts, so we’ll filter the response.
The following query take four parameters:
- Conid of underlying index:
conid=11004958for NQ - Name of the exchange:
exchange=CME - Security Type of the instruments we’re seeking,
sectype=FOP, recalling that CME Event Contracts are modeled as futures options - Contract Month of interest, which restricts the scope of the query,
AUG24in this example
The final parameter, Contract Month, is inherited from the futures options model, and valid values are obtained in the first request.
Note however that this list of Contract Months is also shared by both futures options proper and Event Contracts, so some of the more distant Contract Month values may not return any tradable Event Contract instruments, and instead will fetch only true futures options.
The response will likely be quite large, including both futures options and Event Contracts. The example to the right is abridged to show only one example of a futures option and one Event Contract.
For CME Event Contract products, we can use the “EC” prefix discussed above to identify Event Contract instruments by their Trading Class and filter out futures options from this response.
As we are looking for NQ Event Contracts, we will filter for records with "tradingClass":"ECNQ" and obtain a set of NQ Event Contract records for the month of August 2024. We can now capture their conids and other associated attributes, and then proceed to make a request for the next Contract Month, SEP24, repeating the process for as many months as desired.
GET https://api.ibkr.com/v1/api/iserver/secdef/info?conid=11004958&exchange=CME§ype=FOP&month=AUG24
200 OK
[
{
"conid": 722021819,
"symbol": "NQ",
"secType": "FOP",
"exchange": "CME",
"listingExchange": null,
"right": "P",
"strike": 18200.0,
"currency": "USD",
"cusip": null,
"coupon": "No Coupon",
"desc1": "NQ",
"desc2": "(Q4A) Aug26'24 18200 Put Fut.Option(20) @CME",
"maturityDate": "20240826",
"multiplier": "20",
"tradingClass": "Q4A",
"validExchanges": "CME"
},
...,
{
"conid": 724307144,
"symbol": "NQ",
"secType": "FOP",
"exchange": "CME",
"listingExchange": null,
"right": "P",
"strike": 19800.0,
"currency": "USD",
"cusip": null,
"coupon": "No Coupon",
"desc1": "NQ",
"desc2": "(ECNQ) Aug20'24 19800 Put Fut.Option @CME",
"maturityDate": "20240820",
"multiplier": "1",
"tradingClass": "ECNQ",
"validExchanges": "CME"
},
...
] ForecastEx Discovery WorkflowCopy Location
Copy Location
ForecastEx products, modeled as index options, require a slightly different discovery workflow.
Suppose we’d like to find ForecastEx’s “US Fed Funds Target Rate” (FF) Event Contracts.
ForecastEx Request #1 -- Obtaining Index Conid and Contract MonthsCopy Location
Copy Location
Endpoint: /iserver/secdef/search
First, we’ll want to capture the conid of the underlying artificial FF index.
Note that we’ve received more than one matching result, and will need to filter for the desired ForecastEx FF index record.
From this response we should capture two new values:
1. The FF index’s conid (“conid”:”658663572″)
2. The semicolon-separated list of options expiries (“opt”: “20240917;20241106;…”)
Before proceeding, we must convert the expiration dates to MMMYY format, as this presentation is used for future requests.
For example, “20240917” becomes “SEP24”.
GET https://api.ibkr.com/v1/api/iserver/secdef/search?symbol=FF
200 OK
[
{
“conid”: “658663572”,
“companyHeader”: “US Fed Funds Target Rate – FORECASTX”,
“companyName”: “US Fed Funds Target Rate”,
“symbol”: “FF”,
“description”: “FORECASTX”,
“restricted”: null,
“fop”: null,
“opt”: “20240917;20241106;20241217;20250128;20250129;20250318;20250506;20250617;20250729;20250916;20251028;20251209;20260127;20260317;20260428;20260616;20260728;20260915;20261027;20261208;20270126”,
“war”: null,
“sections”: [
{ “secType”: “IND”, “exchange”: “FORECASTX;” },
{ “secType”: “EC” }
]
},
{
“conid”: “52298132”,
“companyHeader”: “FUTUREFUEL CORP – NYSE”,
“companyName”: “FUTUREFUEL CORP”,
“symbol”: “FF”,
“description”: “NYSE”,
“restricted”: null,
“fop”: null,
“opt”: “20240920;20241018;20241115;20241220;20250221”,
“war”: null,
“sections”: [
{ “secType”: “STK” },
{
“secType”: “OPT”,
“months”: “SEP24;OCT24;NOV24;DEC24;FEB25”,
“exchange”: “SMART;AMEX;BATS;BOX;CBOE;EDGX;EMERALD;IBUSOPT;ISE;MERCURY;MIAX;NASDAQOM;PEARL;PHLX”
},
{ “secType”: “IOPT” },
{ “secType”: “BAG” }
]
},
]
ForecastEx Request #2 -- Obtaining Valid Strike ValuesCopy Location
Copy Location
Endpoint: /iserver/secdef/strikes
Next, we need to query for valid strike values.
Though separate lists are always returned for Calls (Yes contracts) and Puts (No contracts), we do not need treat them as distinct. All events have matching Yes and No contracts at all strikes.
Therefore, we obtain a list of valid Strike values: 3.125, 4.875, 5.125, 5.375
GET https://api.ibkr.com/v1/api/iserver/secdef/strikes?conid=658663572&exchange=FORECASTX§ype=OPT&month=SEP24
200 OK
{
“call”: [ 3.125, 4.875, 5.125, 5.375 ],
“put”: [ 3.125, 4.875, 5.125, 5.375 ]
}
ForecastEx Request #3 -- Obtaining Event Contract ConidsCopy Location
Copy Location
Endpoint: /iserver/secdef/info
Finally, we’ll make a series of queries for records for tradable Event Contract instruments.
To obtain all possible conids, we must make one request for each combination of Contract Month and Strike value.
Note that it is possible that a given Strike value has no tradable Event Contracts in a given Contract Month, in which case the response will be empty.
To make the request, we supply the following parameters:
- The underlying FF index conid:
conid=658663572 - The relevant exchange:
exchange=FORECASTX - The relevent security type, recalling that ForecastEx instruments are modeled as options:
sectype=OPT - A Contract Month value:
month=SEP24 - A Strike value:
strike=3.125
Each request returns a pair of instrument records: a Call (Yes) contract record, and a Put (No) contract record.
GET https://api.ibkr.com/v1/api/iserver/secdef/info?conid=658663572&exchange=FORECASTX§ype=OPT&month=SEP24&strike=3.125
200 OK
[
{
“conid”: 713921696,
“symbol”: “FF”,
“secType”: “OPT”,
“exchange”: “FORECASTX”,
“listingExchange”: null,
“right”: “C”,
“strike”: 3.125,
“currency”: “USD”,
“cusip”: null,
“coupon”: “No Coupon”,
“desc1”: “FF”,
“desc2”: “SEP 17 ’24 3.13 Call @FORECASTX (AM)”,
“maturityDate”: “20240917”,
“multiplier”: “1”,
“tradingClass”: “FF”,
“validExchanges”: “FORECASTX”
},
{
“conid”: 713921701,
“symbol”: “FF”,
“secType”: “OPT”,
“exchange”: “FORECASTX”,
“listingExchange”: null,
“right”: “P”,
“strike”: 3.125,
“currency”: “USD”,
“cusip”: null,
“coupon”: “No Coupon”,
“desc1”: “FF”,
“desc2”: “SEP 17 ’24 3.13 Put @FORECASTX (AM)”,
“maturityDate”: “20240917”,
“multiplier”: “1”,
“tradingClass”: “FF”,
“validExchanges”: “FORECASTX”
}
]
Order SubmissionCopy Location
Copy Location
Submission of orders for Event Contracts via the Web API functions like orders for any other instrument.
However, it is important to note the differing mechanics between CME Group products and ForecastEx instruments:
- CME Group instruments can be bought and sold and function as normal futures options.
- ForecastEx instruments cannot be sold, only bought. To exit or reduce a position, one must buy the opposing Event Contract, and IB will net the opposing positions together automatically.
In both cases, no short selling is permitted.
Market DataCopy Location
Copy Location
Retrieval of market data, both live and historical, also functions the same for Event Contracts as for other instruments.
Like other options instruments, historical data for Event Contracts is available only while the instrument is trading and not yet expired.
Other FunctionalityCopy Location
Copy Location
Instrument rules, portfolio positions, and other instrument-specific features of the Web API function for Event Contracts as they do for options in general.
Note however that Market Scanners are not currently available for Event Contracts.