Skip to main content

sauda

NSE market data for Python. An async client for jugaad-rpc, the Rust gRPC server from the jugaad-rs monorepo. sauda only connects: you run the server (the wheel installs it as the jugaad-rpc command, or use the Docker image) and the client takes care of the connection.

pip install sauda

Start the server in its own terminal and leave it running. On macOS and Linux:

JUGAAD_RPC_ADDR=127.0.0.1:50051 jugaad-rpc

On Windows PowerShell:

$env:JUGAAD_RPC_ADDR = "127.0.0.1:50051"; jugaad-rpc

(Command Prompt and Docker are in the manual.)

Then connect from Python:

import asyncio
from sauda import Client

async def main():
    client = Client()
    await client.connect()                          # connects to 127.0.0.1:50051

    print((await client.stock_quote("SBIN"))["last_price"])
    rows = await client.stock_history("SBIN", "2026-01-01", "2026-01-31")
    async for q in client.watch_stock_quote("SBIN", interval=5):
        print(q["last_price"])
        break

    await client.disconnect()                       # the server keeps running

asyncio.run(main())

You decide when to connect and disconnect (in a notebook, connect in one cell and use the client in the cells after it). For a short script, async with Client() as c: does both for you. For a server at another address:

from sauda import Client, ConfigBuilder

config = ConfigBuilder().addr("127.0.0.1:50077").build()    # or ConfigBuilder().from_env()
client = Client()
await client.connect(config)
Method (all awaited except the watch) Returns
stock_quote(symbol) live quote with a 5-level order book
watch_stock_quote(symbol, interval=3) async iterator of live quotes
stock_history(symbol, from_date, to_date) daily OHLC, volume and delivery rows
index_history(name, from_date, to_date) daily index OHLC
index_snapshot() every NSE index, live
market_status() open/closed per market segment, holiday-aware
large_deals() bulk, short and block deals
option_chain(symbol, kind="index", expiry=None) option chain rows with call and put legs
option_expiries(symbol) available expiry dates
corporate_announcements(from_date, to_date, segment="equities", symbol=None) exchange disclosures
bhavcopy(date) whole-market cash bhavcopy for a day (NSE's CSV columns, all strings)
fo_bhavcopy(date) F&O bhavcopy for a day (streamed by the server; tens of thousands of rows)
derivatives_history(symbol, from_date, to_date, expiry, instrument, strike_price=None, option_type=None) daily history of one futures or options contract
stock_chart(symbol, period="1d") a stock's price chart, "1d" to "5y"
index_chart(name, period="1d") an index's price chart, "1d" to "5y"
market_movers() top gainers and losers across seven scopes
most_active_equities() most active equities by value and by volume
fifty_two_week() stocks at a new 52-week high or low
holiday_list() trading holidays for every market segment

Results are plain dicts and lists of dicts, so pandas.DataFrame(rows) works directly. Client.stub is the raw generated async gRPC stub for anything not wrapped above.

Full reference, running the server (including Docker), configuration, error handling and troubleshooting: the manual. Upgrading from 0.1.x? 0.2.0 is async only and no longer starts a server for you, so see the upgrade notes.

Wheels: Windows x64, Linux x86_64 (glibc 2.28+), macOS Apple Silicon. Other platforms build from the source distribution, which needs Rust 1.88+. Python 3.9+.

Development

pip install -r requirements-gen.txt maturin
python generate.py           # generate src/sauda/_proto from the shared .proto
maturin develop --release    # build the server + install in the current venv
python smoke_test.py         # offline end-to-end check

Metadata

Release files for sauda 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sauda 0.2.1
File Size Uploaded
sauda-0.2.1.tar.gz 324.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for sauda 0.2.1
File Interpreter ABI Platform
sauda-0.2.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
sauda-0.2.1-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
sauda-0.2.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 8.6 MB

Release files / sauda-0.2.1.tar.gz

Download URL sauda-0.2.1.tar.gz
Size 324.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f1eed6a67c889c944cd37e9f53aad391c3088db704161ca5c41671ad0dd9f5a1
BLAKE2b-256 checksum
How to use checksums
3983eeb4fe05ed6d0d7f3e145689dad9104e0437fd436bdaa3d883eb178377ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / sauda-0.2.1-py3-none-win_amd64.whl

Download URL sauda-0.2.1-py3-none-win_amd64.whl
Size 2.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
c701d0537ef2bc19d2dae3dcd6f5ab9bdcbe714f242a0f2f6f0e5f8c2d94c5c5
BLAKE2b-256 checksum
How to use checksums
4eea781e6379e9e32943ae3833fe0505d0c9a0c00b7b60222052be90de44d34d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / sauda-0.2.1-py3-none-manylinux_2_28_x86_64.whl

Download URL sauda-0.2.1-py3-none-manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
db6ae6cf4dba289e1061e8402615c34033fd8efe1f04bf311488e8c3c919f3ed
BLAKE2b-256 checksum
How to use checksums
fdf3e8b3cbe74b04f42afd8d20941c9d76d6bba9e193c3ae18fa8c638bbe3a7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / sauda-0.2.1-py3-none-macosx_11_0_arm64.whl

Download URL sauda-0.2.1-py3-none-macosx_11_0_arm64.whl
Size 2.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3ee7af663c19f078c20355a63ca8268b50e66dad4129821c6a41644eabde345c
BLAKE2b-256 checksum
How to use checksums
eecb03470b33265b74e1b7deeb3f663c4c32b029580c6c3c864597e07cf3eb40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

4 release files

0.2.0

4 release files

0.1.3

3 release files

0.1.2

3 release files

0.1.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page