Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

11
Question on SPX / SPXW option chain using the Schwab (formerly TDA) API
Post Flair (click to view more posts with a particular flair)
Post Body

My algo trades options on SPX, which involves requesting the option chain for "$SPX".

Usually that returns the chain for SPXW (the daily expiration, which stops trading at ~4:15pm) but requesting the "$SPX" option chain for this friday/tomorrow returns the chain for SPX (not SPXW) which is the monthly and it stops trading sometime in the AM.

(background comment on SPX vs. SPXW https://old.reddit.com/r/thetagang/comments/1buelyh/0dte_spx_expiration_time_4pm_or_1159pm/kxvd3t9/ )

If I use ThinkOrSwim https://trade.thinkorswim.com/trade?symbol=SPX to look at the option chain tomorrow has "October 18th 2024 AM" AND "October 18th 2024" (the PM version).

I want to get the second one in my code (the one that doesn't expire in the AM)

I tried requesting tomorrow's option chain for "SPXW" and "$SPXW", but both error with 'invalid ticker'.

I am asking the Schwab team but I'm not expecting a quick response, so I thought I'd see if anyone here had experience / suggestions for this.

SOLVED

When getting the option chain, Schwab returns an array of strike prices, and each strike price has an array of quotes - first element is for SPX, second element is for SPXW. Every other expiration of the month returns the standard single element array (of just SPXW) for each strike.

Author
Account Strength
100%
Account Age
13 years
Verified Email
Yes
Verified Flair
Yes
Total Karma
274,406
Link Karma
9,961
Comment Karma
251,709
Profile updated: 5 days ago
Posts updated: 1 month ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 months ago