strategies.strategy.Strategy.get_chain(self, chains, exchange='SMART')#

Returns option chain for a particular exchange.

Takes in a full set of chains for all the exchanges and returns on chain for a given exchange. The full chains are returned from get_chains method.

  • chains (dictionary of dictionaries) – The chains dictionary created by get_chains method.

  • exchange (str optional) – The exchange such as SMART, CBOE. Default is SMART


Format: - Multiplier (str) eg: 100 - ‘Chains’ - paired Expiration/Strke info to guarentee that the stikes are valid for the specific

expiration date. Format:

chains[‘Chains’][‘CALL’][exp_date] = [strike1, strike2, …]

Expiration Date Format: 2023-07-31

Return type:

dictionary of dictionary


>>> # Will return the option chains for SPY
>>> asset = "SPY"
>>> chain = self.get_chain(asset)