@@ -31,6 +31,49 @@ def from_dict(d):
31
31
)
32
32
33
33
34
+ @modelclass
35
+ class IndicesSession :
36
+ "Contains data for the most recent daily bar in an options contract."
37
+ change : Optional [float ] = None
38
+ change_percent : Optional [float ] = None
39
+ close : Optional [float ] = None
40
+ high : Optional [float ] = None
41
+ low : Optional [float ] = None
42
+ open : Optional [float ] = None
43
+ previous_close : Optional [float ] = None
44
+
45
+ @staticmethod
46
+ def from_dict (d ):
47
+ return IndicesSession (** d )
48
+
49
+
50
+ @modelclass
51
+ class IndicesSnapshot :
52
+ value : Optional [float ] = None
53
+ name : Optional [str ] = None
54
+ type : Optional [str ] = None
55
+ ticker : Optional [str ] = None
56
+ market_status : Optional [str ] = None
57
+ session : Optional [IndicesSession ] = None
58
+ error : Optional [str ] = None
59
+ message : Optional [str ] = None
60
+
61
+ @staticmethod
62
+ def from_dict (d ):
63
+ return IndicesSnapshot (
64
+ value = d .get ("value" , None ),
65
+ name = d .get ("name" , None ),
66
+ type = d .get ("type" , None ),
67
+ ticker = d .get ("ticker" , None ),
68
+ market_status = d .get ("market_status" , None ),
69
+ session = None
70
+ if "session" not in d
71
+ else IndicesSession .from_dict (d ["session" ]),
72
+ error = d .get ("error" , None ),
73
+ message = d .get ("message" , None ),
74
+ )
75
+
76
+
34
77
@modelclass
35
78
class TickerSnapshot :
36
79
"Contains the most up-to-date market data for all traded ticker symbols."
@@ -132,6 +175,7 @@ class UnderlyingAsset:
132
175
change_to_break_even : Optional [float ] = None
133
176
last_updated : Optional [int ] = None
134
177
price : Optional [float ] = None
178
+ value : Optional [float ] = None
135
179
ticker : Optional [str ] = None
136
180
timeframe : Optional [str ] = None
137
181
0 commit comments