开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

futures options data via API


Souq Mate
 

Here's a roadmap for fighting your way through IB's jungle of options on US futures (FOP).

FOP historical data are not available for expired contracts (if s.o. has recorded older data, I'd be glad to trade).
Weekly options are always European-style; they exist for forex (AUD CAD CHF EUR JPY), rates (ZT ZF ZN ZB), indices (ES NQ SPX).
Forex: have monthly American/European options: 6A/XA 6B/XB 6C/XD 6E/XT 6J/XJ 6S/XS? (actually: no XA; IB forgot?).
NG: have classes ON/LNE for monthly American/European options (but no feed nor hist data for LNE - though 4* more liquid).
ES: have weeklies (EW1 EW2 EW4), monthlies (ES in place of EW3) and EoM (EW, expire on last day of month).
NQ: have weeklies (QN1 QN2 QN4), monthlies (NQ), and EoM (QNE).
SPX (fut): have weeklies (EV1 EV2 EV4), monthlies (SP), and EoM (EV).
ZC ZS (not ZW): have usual monthlies (OZC OZS) and also monthlies whose underlying expires in Dec (OCD OSD), both American-style.
Eurodollar options (GE@Globex): GE GE0 GE2 GE3 GE4 (Globex), ED E0 E2 E3 E4 (CME).? Have no weeklies, only monthlies.? All underlying futures have (quaterly) expiries in same year (GE) or next years (GE0 GE2 GE3 GE4); all American-style.? Dunno why GE0 is not rather called GE1.?
Expiry date for GE can differ from that of GE0...GE4 for Dec month, eg 20131216 vs 20131213.

minTick can depend on expiry, eg: on 20131011, GE has minTick=0.005 for 201406 and 0.0025 for 201403.
strikeIncrement can depend on expiry, eg ZM: first expiry has increments of 5, the second of 10.
strikeIncrement can be smaller atm and bigger away: GF has strikeIncrement=0.5 close to atm and 1 away from atm; ED has strikeIncrement=0.125 close to atm and 0.25 away from atm.
SI: actual strikeIncrement is 0.05 around the money, but only 0.25 seems used.

ZC ZL ZS ZW GF LE HE (but not ZM): have factor 1/100 in strikes; only in API, not in TWS; IB won't change that.
No FOP at IB for NKD PA PL VIX.
localSymbol has no standardised syntax, eg: "6AZ3 P1075" for AUD@GLOBEX, but "C OYM? SEP 14? 11600" for YM@ECBOT.

Three ways to specify contracts in queries for reqMktData or reqHistoricalData:
----------------------------------
symbol = GBP
secType = FOP
expiry = 20131108
strike = 1.55
right = P
tradingClass = 6B
exchange = GLOBEX
-------------------------------------
currency = USD
conId = 132707825
exchange = GLOBEX
-------------------------------------
localSymbol = 6BX3 P1550
secType = FOP
exchange = GLOBEX
-------------------------------------
These work for API 9.69 or higher (since Jul 2013), where tradingClass has been pulled from ContractDetails to Contract.
For API 9.68 or earlier: only the first of these queries works; specifying conId is redundant, as strike,expiry,right are compulsory; hence for NG, forex and GE options: need to specify localSymbol when querying hist data for monthlies, to disambiguate between American/European styles (forex, NG) or midcurve options (GE0 GE2 GE3 GE4); conId is again useless here, and so are tradingClass and marketName.?
Annoying localSymbol syntax: have always 4 digits at end of localSymbol for forex? ("6SH4 P0950") or GE ("GEV3 C0112"), but 3 or 4 digits for NG ("ONX3 C900" or "ONX3 C1000"); the number is 1000*strike for forex & NG, but 1e5*strike for JPY.? For GE, have "GEV3 C9987" for strike=99.875, but "GEV3 C0112" for strike=101.125; so do printf("%04d\n",100*strike %1e4).?
However, since API 9.69, we can use tradingClass or conId instead of localSymbol to disambiguate.

Daily trade volume in IB files is ca. half of CME volume in ftp://ftp.cmegroup.com/pub/settle/stl*
I suppose the rest comes from the pit.
Happy FOP,
souqMate


 

Thanks for sharing this, this will be helpful to me too.

For those who want options historical data, IQFeed has minutes historical option data back to 2010/03, just you have to find out the symbols. I discovered them by permuting the strike, expiration, type and underlying, and probing them with IQFeed.?

Zsolt


On Tue, Oct 22, 2013 at 6:40 PM, Souq Mate <souqmate@...> wrote:
?

Here's a roadmap for fighting your way through IB's jungle of options on US futures (FOP).

FOP historical data are not available for expired contracts (if s.o. has recorded older data, I'd be glad to trade).
Weekly options are always European-style; they exist for forex (AUD CAD CHF EUR JPY), rates (ZT ZF ZN ZB), indices (ES NQ SPX).
Forex: have monthly American/European options: 6A/XA 6B/XB 6C/XD 6E/XT 6J/XJ 6S/XS? (actually: no XA; IB forgot?).
NG: have classes ON/LNE for monthly American/European options (but no feed nor hist data for LNE - though 4* more liquid).
ES: have weeklies (EW1 EW2 EW4), monthlies (ES in place of EW3) and EoM (EW, expire on last day of month).
NQ: have weeklies (QN1 QN2 QN4), monthlies (NQ), and EoM (QNE).
SPX (fut): have weeklies (EV1 EV2 EV4), monthlies (SP), and EoM (EV).
ZC ZS (not ZW): have usual monthlies (OZC OZS) and also monthlies whose underlying expires in Dec (OCD OSD), both American-style.
Eurodollar options (GE@Globex): GE GE0 GE2 GE3 GE4 (Globex), ED E0 E2 E3 E4 (CME).? Have no weeklies, only monthlies.? All underlying futures have (quaterly) expiries in same year (GE) or next years (GE0 GE2 GE3 GE4); all American-style.? Dunno why GE0 is not rather called GE1.?
Expiry date for GE can differ from that of GE0...GE4 for Dec month, eg 20131216 vs 20131213.

minTick can depend on expiry, eg: on 20131011, GE has minTick=0.005 for 201406 and 0.0025 for 201403.
strikeIncrement can depend on expiry, eg ZM: first expiry has increments of 5, the second of 10.
strikeIncrement can be smaller atm and bigger away: GF has strikeIncrement=0.5 close to atm and 1 away from atm; ED has strikeIncrement=0.125 close to atm and 0.25 away from atm.
SI: actual strikeIncrement is 0.05 around the money, but only 0.25 seems used.

ZC ZL ZS ZW GF LE HE (but not ZM): have factor 1/100 in strikes; only in API, not in TWS; IB won't change that.
No FOP at IB for NKD PA PL VIX.
localSymbol has no standardised syntax, eg: "6AZ3 P1075" for AUD@GLOBEX, but "C OYM? SEP 14? 11600" for YM@ECBOT.

Three ways to specify contracts in queries for reqMktData or reqHistoricalData:
----------------------------------
symbol = GBP
secType = FOP
expiry = 20131108
strike = 1.55
right = P
tradingClass = 6B
exchange = GLOBEX
-------------------------------------
currency = USD
conId = 132707825
exchange = GLOBEX
-------------------------------------
localSymbol = 6BX3 P1550
secType = FOP
exchange = GLOBEX
-------------------------------------
These work for API 9.69 or higher (since Jul 2013), where tradingClass has been pulled from ContractDetails to Contract.
For API 9.68 or earlier: only the first of these queries works; specifying conId is redundant, as strike,expiry,right are compulsory; hence for NG, forex and GE options: need to specify localSymbol when querying hist data for monthlies, to disambiguate between American/European styles (forex, NG) or midcurve options (GE0 GE2 GE3 GE4); conId is again useless here, and so are tradingClass and marketName.?
Annoying localSymbol syntax: have always 4 digits at end of localSymbol for forex? ("6SH4 P0950") or GE ("GEV3 C0112"), but 3 or 4 digits for NG ("ONX3 C900" or "ONX3 C1000"); the number is 1000*strike for forex & NG, but 1e5*strike for JPY.? For GE, have "GEV3 C9987" for strike=99.875, but "GEV3 C0112" for strike=101.125; so do printf("%04d\n",100*strike %1e4).?
However, since API 9.69, we can use tradingClass or conId instead of localSymbol to disambiguate.

Daily trade volume in IB files is ca. half of CME volume in ftp://ftp.cmegroup.com/pub/settle/stl*
I suppose the rest comes from the pit.
Happy FOP,
souqMate




--
?dv,
soci


 

Hi,
I am looking for help in getting my reqMktData to work in getting me market data. I was hoping you may be able to help.
For options on Dow Jones. This gives no error (wether it is working is another question :)
symbol="YM"
secType="FOP"
currency="USD"
exchange="ECBOT"
localSymbol="C OYM SEP 21 35650"

But for DAX the following gives me security definition not found
symbol="DAX"
secType="OPT"
currency="EUR"
exchange="DTB"
localSymbol="P ODX1 SEP 21 15800"

any ideas/help/documentation?

Much appreciated


 

开云体育

You need to use OPT rather than FOP for DAX futures options.

?

I think, though I don't know for sure, that this applies to European futures options in general.

?

?

From: [email protected] <[email protected]> On Behalf Of Sadr-Hashemi
Sent: 01 September 2021 12:06
To: [email protected]
Subject: Re: [TWS API] futures options data via API

?

Hi,
I am looking for help in getting my reqMktData to work in getting me market data. I was hoping you may be able to help.
For options on Dow Jones. This gives no error (wether it is working is another question :)
symbol="YM"
secType="FOP"
currency="USD"
exchange="ECBOT"
localSymbol="C OYM SEP 21 35650"

But for DAX the following gives me security definition not found
symbol="DAX"
secType="OPT"
currency="EUR"
exchange="DTB"
localSymbol="P ODX1 SEP 21 15800"

any ideas/help/documentation?

Much appreciated