@@ -210,6 +210,59 @@ def test_get_snapshot_option(self):
210210 )
211211 self .assertEqual (snapshots , expected )
212212
213+ def test_list_snapshot_options_chain (self ):
214+ snapshots = [s for s in self .c .list_snapshot_options_chain ("AAPL" )]
215+ expected = [
216+ OptionContractSnapshot (
217+ break_even_price = 179.075 ,
218+ day = DayOptionContractSnapshot (
219+ change = - 2.3999999999999986 ,
220+ change_percent = - 7.643312101910824 ,
221+ close = 29 ,
222+ high = 32.25 ,
223+ last_updated = 1651204800000000000 ,
224+ low = 29 ,
225+ open = 29.99 ,
226+ previous_close = 31.4 ,
227+ volume = 8 ,
228+ vwap = 30.7738 ,
229+ ),
230+ details = OptionDetails (
231+ contract_type = "call" ,
232+ exercise_style = "american" ,
233+ expiration_date = "2023-06-16" ,
234+ shares_per_contract = 100 ,
235+ strike_price = 150 ,
236+ ticker = "O:AAPL230616C00150000" ,
237+ ),
238+ greeks = Greeks (
239+ delta = 0.6436614934293701 ,
240+ gamma = 0.0061735291012820675 ,
241+ theta = - 0.028227189324641973 ,
242+ vega = 0.6381159723175714 ,
243+ ),
244+ implied_volatility = 0.3570277203465058 ,
245+ last_quote = LastQuoteOptionContractSnapshot (
246+ ask = 29.25 ,
247+ ask_size = 209 ,
248+ bid = 28.9 ,
249+ bid_size = 294 ,
250+ last_updated = 1651254260800059648 ,
251+ midpoint = 29.075 ,
252+ timeframe = "REAL-TIME" ,
253+ ),
254+ open_interest = 8133 ,
255+ underlying_asset = UnderlyingAsset (
256+ change_to_break_even = 19.11439999999999 ,
257+ last_updated = 1651254263172073152 ,
258+ price = 159.9606 ,
259+ ticker = "AAPL" ,
260+ timeframe = "REAL-TIME" ,
261+ ),
262+ )
263+ ]
264+ self .assertEqual (snapshots , expected )
265+
213266 def test_get_snapshot_crypto_book (self ):
214267 snapshots = self .c .get_snapshot_crypto_book ("X:BTCUSD" )
215268 expected = SnapshotTickerFullBook (
0 commit comments