Metadata-Version: 2.5
Name: sahiapi
Version: 0.1.0
Summary: The official Python client library for the Sahi APIs.
Project-URL: Homepage, https://docs.sahi.com/
Project-URL: Documentation, https://docs.sahi.com/
Project-URL: Repository, https://github.com/aarityatech/sahi-python
Author: Aaritya Technologies
License: Copyright (c) 2026 Aaritya Technologies Private Limited. All rights reserved.
        
        This software and its source code are proprietary and confidential. Until an
        open-source license is applied by the copyright holder, no permission is granted
        to copy, use, modify, or distribute this software outside Aaritya Technologies.
        
        An open-source license will replace this file when the project is published.
License-File: LICENSE
Keywords: bse,market-data,nse,options,sahi,stocks,trading
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: httpx>=0.27
Requires-Dist: protobuf>=4.25
Requires-Dist: websocket-client>=1.7
Provides-Extra: dev
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# sahiapi

The official Python client library for the [Sahi APIs](https://docs.sahi.com/):
orders, portfolio, funds, market data and live streams.

> Early development. The public interface is not yet stable.

## Install

```bash
pip install sahiapi
```

Requires Python 3.9 or newer.

## Quickstart

Create an API key in your Sahi account and approve it for the trading day, then:

```python
import os
from sahiapi import SahiAPI

api = SahiAPI.from_credentials(
    key_id=os.environ["SAHI_KEY_ID"],
    secret=os.environ["SAHI_SECRET"],
)
print(api.get_profile())
print(api.get_funds())
```

Tokens expire at 06:00 IST, so mint a fresh one each trading day.

## Documentation

Guides, the full API reference and examples are at **https://docs.sahi.com/**.

The SDK returns the API's JSON exactly as documented there: money is integer
paise, timestamps are epoch milliseconds, and field names are unchanged.

## Development

```bash
uv sync --extra dev
uv run pytest
uv run ruff check .
uv run mypy
```

The tick-stream protobuf bindings are generated and committed; regenerate them
with `tools/regen_proto.sh` after editing the `.proto`. Releases are cut with
`tools/release.sh`; see `.github/workflows/release.yml`.

## License

Proprietary during development; an open-source license will be applied before
public release. See [LICENSE](LICENSE).
