strategies.strategy.Strategy.get_chains(self, asset)

Returns option chains.

Obtains option chain information for the asset (stock) from each of the exchanges the options trade on and returns a dictionary for each exchange.


asset (Asset object) – The stock whose option chain is being fetched. Represented as an asset object.


  • dictionary of dictionaries for each exchange. Each exchange

  • dictionary has

    • Underlying conId (int)

    • TradingClass (str) eg: FB

    • Multiplier (str) eg: 100

    • Expirations (set of str) eg: {20230616, …}

    • Strikes (set of floats)


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