Skip to content

Commit e61a15c

Browse files
clickingbuttonsclickingbuttons
authored andcommitted
readme raw response example
1 parent 17020e4 commit e61a15c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,11 @@ for t in client.list_trades("AAA", timestamp="2022-04-20", limit=5, sort=Sort.AS
3333
```
3434

3535
### Getting raw response
36-
To handle the raw [urllib3 response](https://urllib3.readthedocs.io/en/stable/reference/urllib3.response.html?highlight=response#response) yourself, pass `raw=True`.
36+
To handle the raw [urllib3 response](https://urllib3.readthedocs.io/en/stable/reference/urllib3.response.html?highlight=response#response) yourself, pass `raw=True`:
37+
38+
```python
39+
from polygon import RESTClient
40+
41+
client = RESTClient() # Uses POLYGON_API_KEY env var. Can optionally supply your key as first parameter.
42+
response = client.get_aggs("AAPL", 1, "day", "2005-04-01", "2005-04-04", raw=True)
43+
```

0 commit comments

Comments
 (0)