Jump to content

⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

Recommended Posts

  • 2 weeks later...
Posted

It appears that it is not possible to load options chain data daily via the Schwab API. Schwab doesn’t support that. Main question is which expires does it support?

Posted
58 minutes ago, Predict said:

It appears that it is not possible to load options chain data daily via the Schwab API. Schwab doesn’t support that. Main question is which expires does it support?

so for ES I call as I found that if I passed everything it worked out better. 
 

            resp = client.get_option_chain(
                $SPX,
                contract_type=client.Options.ContractType.ALL,  # both calls and puts
                strike_count=50,  #if I make it bigger, I get a 501 error
                include_underlying_quote=True,                   # returns underlyingPrice for spot
                strategy=client.Options.Strategy.SINGLE,        # single-leg only, no spreads
            )
 
 
Posted

Also, to add on to this, if you look at the description of the option being returned.  You can check and see if it SPXW or just SPX.  to get the weekly / daily options.

desc      = opt.get('description', '')
                                sym_field = opt.get('symbol', '')
                                is_weekly = 'SPXW' in desc or 'SPXW' in sym_field

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

×
×
  • Create New...