nubra_optionschain
Realtime option chain dashboard with strategy highlighting (Dash UI).
This library is a helper for your Nubra WebSocket code. It does not import the Nubra SDK.
Install
pip install -e .
Usage
from queue import Queue
from nubra_python_sdk.ticker import websocketdata
from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_optionschain import OptionChainDashboard
from nubra_optionschain.strategy import DEFAULT_TARGET_DELTAS
# Initialize the Nubra SDK client
nubra = InitNubraSdk(NubraEnv.UAT)
# Static list of instruments (also used in the dashboard dropdown)
SYMBOLS = [
"RELIANCE:20250626",
"NIFTY:20250626",
]
# Queue for passing websocket messages to the dashboard
updates: Queue = Queue()
def on_option_data(msg):
updates.put(msg)
def on_connect(msg):
print("[status]", msg)
def on_close(reason):
print(f"Closed: {reason}")
def on_error(err):
print(f"Error: {err}")
socket = websocketdata.NubraDataSocket(
client=nubra,
on_option_data=on_option_data,
on_connect=on_connect,
on_close=on_close,
on_error=on_error,
)
socket.connect()
socket.subscribe(SYMBOLS, data_type="option", exchange="NSE")
# Start the dashboard (Dash UI)
OptionChainDashboard(
updates=updates,
symbols=SYMBOLS,
strategies=["straddle", "strangle"],
target_deltas=DEFAULT_TARGET_DELTAS,
max_levels=10,
).run()
# Keep websocket running
socket.keep_running()
Notes
- Strategy leg highlighting uses unique colors per strategy.
- Target delta is the sum of call and put deltas.
- Option chain display shows strike, LTP, delta, and OI.
Metadata
Release files for nubra-optionschain 0.1.0
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 |
|---|---|---|---|---|
| nubra_optionschain-0.1.0.tar.gz | 11.9 kB | Without provenance | Details for nubra_optionschain-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nubra_optionschain-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for nubra_optionschain-0.1.0-py3-none-any.whl |
Total release size: 23.6 kB
Release files / nubra_optionschain-0.1.0.tar.gz
| Download URL | nubra_optionschain-0.1.0.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f3190116ac7b8885e806239e76ad7a4fcff00e98556b4bfd6b1fbaee6de7baf
|
|
BLAKE2b-256 checksum How to use checksums |
c6b9bd40f92825475f6262c71c71390c1b163c734f18b44e18be0b865fdc2d5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Release files / nubra_optionschain-0.1.0-py3-none-any.whl
| Download URL | nubra_optionschain-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d11b484af5d65a31d683140c092f6a9970873d5904452495cede18cabf8f71d
|
|
BLAKE2b-256 checksum How to use checksums |
72ccdb3cf60d174a68d39b77c1d49962546838d643ac4114fbecdd7cde411c8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Security for nubra-optionschain 0.1.0
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.