Skip to content

Commit b537c52

Browse files
Darcy-LindeDarcy Linde
and
Darcy Linde
authored
Update specs (#248)
* specs update * specs update * add optional Co-authored-by: Darcy Linde <{[email protected]}>
1 parent 0b47c36 commit b537c52

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.polygon/rest.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3999,6 +3999,15 @@
39993999
]
40004000
},
40014001
"example": "gainers"
4002+
},
4003+
{
4004+
"name": "include_otc",
4005+
"in": "query",
4006+
"description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
4007+
"required": false,
4008+
"schema": {
4009+
"type": "boolean"
4010+
}
40024011
}
40034012
],
40044013
"responses": {

polygon/rest/snapshot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def get_snapshot_all(
1717
tickers: Optional[Union[str, List[str]]] = None,
1818
params: Optional[Dict[str, Any]] = None,
1919
raw: bool = False,
20-
include_otc: bool = False,
20+
include_otc: Optional[bool] = False,
2121
) -> Union[List[TickerSnapshot], HTTPResponse]:
2222
"""
2323
Get the most up-to-date market data for all traded stock symbols.
@@ -26,6 +26,7 @@ def get_snapshot_all(
2626
2727
:param market_type: Which market to get a snapshot of.
2828
:param tickers: A comma separated list of tickers to get snapshots for.
29+
:param include_otc: Include OTC securities in the response. Default is false (don't include OTC securities).
2930
:return: List of Snapshots
3031
"""
3132
url = f"/v2/snapshot/locale/us/markets/{market_type}/tickers"
@@ -44,6 +45,7 @@ def get_snapshot_direction(
4445
market_type: Optional[Union[str, SnapshotMarketType]],
4546
direction: Union[str, Direction],
4647
params: Optional[Dict[str, Any]] = None,
48+
include_otc: Optional[bool] = False,
4749
raw: bool = False,
4850
) -> Union[List[TickerSnapshot], HTTPResponse]:
4951
"""
@@ -55,6 +57,7 @@ def get_snapshot_direction(
5557
5658
:param market_type: Which market to get a snapshot of.
5759
:param direction: The direction ("gainers" or "losers")
60+
:param include_otc: Include OTC securities in the response. Default is false (don't include OTC securities).
5861
:return: List of Snapshots
5962
"""
6063
url = f"/v2/snapshot/locale/us/markets/{market_type}/{direction}"

0 commit comments

Comments
 (0)