开云体育

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

Re: No definition for SPX option using LocalSymbol


 

For SPX OPT you have to set up `Contract.TradingClass` as `SPX` for monthlies?and `SPXW` for daily/weekly?expiration. Do not define `LocalSymbol`. For naked SPX options, just do `Symbol`, `SecType`, `Exchange`, `Currency`, `TradingClass`, `Strike`, `Right` and `LastTradeDateOrContractMonth`.
Good luck,
Daniel.

On Thu, Dec 19, 2024 at 6:16?AM Andy Sanders via <arteinvolo=[email protected]> wrote:
Could somebody advise why I'm getting "No security definition" error for a contract with this local symbol : C SPX 20241218 5945 W
?
Security: SPX index
Strike: 5945
Side: Call?
Expiration: 2024-12-18?
Type: Weekly
?
Trying to send order to buy and sell SPX index options. When I set separate contract properties such as strike, symbol, expiration, currency, and exchange, place order request returns error "ambiguous definition" because API returns the same expiration date for monthly and weekly options.?
?
?
There are several ways to make contract definition for option unique, e.g. using TradingClass or LocalSymbol properties. When I try to use LocalSymbol I get error "No security definition found"
?
Example of local symbol that I used : C SPX 20241218 5945 W
Format mentioned in the docs : ?
?



--
Daniel

Join [email protected] to automatically receive all group messages.