Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ df = cot.cot_all(cot_report_type='legacy_fut')
# cot_all() downloads the historical bulk file and all remaining single year files of the specified report type. Returns the data as dataframe.
```

- ***set_session(session)*** pass-through your own session for `cot_reports` to use instead of `requests`:
```python
import cot_reports as cot
import requests_cache
cot.set_session(requests_cache.CachedSession("cot_reports.cache"))
df = cot.cot_hist(...)
```

## Introduction to the COT reports

To promote its goals of integrity, resilience and vibrancy of the U.S. derivatives markets through regulation, the U.S. Commodity Futures Trading Commission (CFTC) relies on collected data to conduct its functions. The CFTC's functions:
Expand Down Expand Up @@ -277,4 +285,4 @@ This project is licensed under the [MIT License](https://github.com/NDelventhal/

## Contact

- The author: Niall Delventhal - ni.delventhal@gmail.com
- The author: Niall Delventhal - ni.delventhal@gmail.com
2 changes: 1 addition & 1 deletion cot_reports/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .cot_reports import cot_hist, cot_year, cot_all, cot_all_reports
from .cot_reports import cot_hist, cot_year, cot_all, cot_all_reports, set_session

__version__ = '0.1.3'
__author__ = 'Niall Delventhal'
Loading