Skip to content

Commit 37d931f

Browse files
Update options-snapshots_options_chain.py (#433)
* Update options-snapshots_options_chain.py Updated with better example using additional filters in the params. This was a customer request off the public slack. * Update options-snapshots_options_chain.py Update syntax to fix linting.
1 parent 567815d commit 37d931f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/rest/options-snapshots_options_chain.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
client = RESTClient() # POLYGON_API_KEY environment variable is used
99

1010
options_chain = []
11-
for o in client.list_snapshot_options_chain("HCP"):
11+
for o in client.list_snapshot_options_chain(
12+
"HCP",
13+
params={
14+
"expiration_date.gte": "2024-03-16",
15+
"strike_price.gte": 20,
16+
},
17+
):
1218
options_chain.append(o)
1319
print(options_chain)

0 commit comments

Comments
 (0)