optionsview
This library downloads option chain data for a given symbol from yahoo finance.
The library retrieves call and put data for all expiration dates and strikes available through yfinance.
There are two formats provided:
-
Straddle view: Call and Put data for the same expiration and strike is side by side.
-
Stacked view: Call and Put data is stacked together.
Installation
The library requires Python 3.7 or later.
To install, type the following command on the python terminal:
pip install optionsview
Implementation
Here is a basic example of how to download options straddle view data:
from optionsview.data import download_options_view
download_options_view('TSLA')
The following is an example of downloading the Call and Put data in a stacked format.
from optionsview.data import download_options_view, View
folder = r"C:\Users\work\Documents"
download_options_view('TSLA', View.STACKED, folder)
To read the data into dataframes (and not create files) you can do the following:
from optionsview.data import get_options_view
result = get_options_view('TSLA')
if result is not None:
print(result.straddle.head())
print(result.stacked.head())
Examples
The folder 'samples' in this repository, has some examples of the output from the library.
Contributions
Contributions are welcome, all modifications should come with appropriate tests.
All tests can be run by doing the following:
from testing.tests import run_all_tests
run_all_tests()
These tests download live data and delete existing files in testing/exports before running.
Acknowledgements
This project makes use of the yfinance library.
Metadata
Release files for optionsview 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| optionsview-0.0.6.tar.gz | 22.6 kB | Without provenance | Details for optionsview-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| optionsview-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for optionsview-0.0.6-py3-none-any.whl |
Total release size: 45.8 kB
Release files / optionsview-0.0.6.tar.gz
| Download URL | optionsview-0.0.6.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6c8d0926fa8e70af8923b6957434d86b52a46a25822307a2f3d1c00aba2b089
|
|
BLAKE2b-256 checksum How to use checksums |
60353a806c609dd3f494e5d76ccadc08c0968ba14cc9bdba97fc324f280affec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.4
|
Release files / optionsview-0.0.6-py3-none-any.whl
| Download URL | optionsview-0.0.6-py3-none-any.whl |
|---|---|
| Size | 23.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31b71df9c1a164ae05f29315b1541898737ac0460b2ef5a34f3d447ec1bc6aa5
|
|
BLAKE2b-256 checksum How to use checksums |
5d7aabec337c84a5d4fb55dc9917206d16417ee3d9d04acb6bc09a4a2030afa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.4
|
Security for optionsview 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.