Options wall proximity scanner built on top of the Nubra Python SDK.
Project description
nubra_oi_walls
nubra_oi_walls packages the options wall proximity scanner as a reusable Python library on top of the official Nubra Python SDK.
Install
python -m pip install nubra_oi_walls
For local development from this folder:
python -m pip install -e .
Usage
from nubra_python_sdk.marketdata.market_data import MarketData
from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_oi_walls import run_multi_wall_proximity_scan, run_wall_proximity_scan
nubra = InitNubraSdk(NubraEnv.UAT)
market_data = MarketData(nubra)
summary_df = run_wall_proximity_scan(
market_data=market_data,
stocks=["NIFTY", "BANKNIFTY", "RELIANCE", "HDFCBANK"],
normalize=False,
exchange="NSE",
)
print(summary_df)
For multi-wall output when top_n > 1:
multi_df = run_multi_wall_proximity_scan(
market_data=market_data,
stocks=["NIFTY", "BANKNIFTY", "RELIANCE", "HDFCBANK"],
normalize=False,
top_n=3,
exchange="NSE",
)
print(multi_df)
There is also a ready-to-run example in quickstart.py. That quickstart runs both DataFrame-returning functions.
Local test
Test the import:
python -c "from nubra_oi_walls import run_wall_proximity_scan, run_multi_wall_proximity_scan; print(run_wall_proximity_scan.__name__, run_multi_wall_proximity_scan.__name__)"
Run the quickstart example:
python examples/quickstart.py
Authentication and environment
The preferred integration is to pass your existing MarketData object from your main Nubra session into the scan functions.
The scanner defaults to the Nubra UAT environment only when it has to create its own internal client. To switch that fallback behavior to live usage, set:
$env:NUBRA_OI_WALLS_ENV = "PROD"
If you pass market_data, the package will reuse your existing Nubra session instead of creating a new one.
Import shape
from nubra_oi_walls import run_wall_proximity_scan, run_multi_wall_proximity_scan
Returned data
run_wall_proximity_scan(...) returns the classic single-wall summary as a pandas DataFrame.
run_multi_wall_proximity_scan(...) returns the expanded wall candidates as a pandas DataFrame.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nubra_oi_walls-0.1.0.tar.gz.
File metadata
- Download URL: nubra_oi_walls-0.1.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d82d477202fdf6a50947938633b6f011b539119b724fb7ff8a66b9843b160eb
|
|
| MD5 |
f1de2f349233c6543f27eed938c30ec8
|
|
| BLAKE2b-256 |
c23b33d4a2c96452898e165eb16c0d73cf5125840ec4a36708bf48e94acf9f5f
|
File details
Details for the file nubra_oi_walls-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nubra_oi_walls-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb57c3ee9a333c58b9f901b7cd2d43320263490cc9dc7e4af802c1c9353d63a4
|
|
| MD5 |
c3a7c9d88fea8b72901209a254f32759
|
|
| BLAKE2b-256 |
06edc754e98925d4cc22ad9020d666196e4a427b1e6286e9c6fac8417a76c532
|