This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.2.0 instead.
sahiapi
The official Python client library for the Sahi APIs: orders, portfolio, funds, market data and live streams.
Early development. The public interface is not yet stable.
Install
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:
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
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.
Metadata
Release files for sahiapi 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 | |
|---|---|---|---|---|
| sahiapi-0.1.0.tar.gz | 48.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sahiapi-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 105.9 kB
Release files / sahiapi-0.1.0.tar.gz
| Download URL | sahiapi-0.1.0.tar.gz |
|---|---|
| Size | 48.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac5961e3ba12878188d248b34d97731445f5a135559514b31556d3503a08b995
|
|
BLAKE2b-256 checksum How to use checksums |
f44383fe9dce640f0ab1aff03a4478440fca19fa1389d622cbed3826c6758172
|
| 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 22, 2026.
Transparency logRelease files / sahiapi-0.1.0-py3-none-any.whl
| Download URL | sahiapi-0.1.0-py3-none-any.whl |
|---|---|
| Size | 57.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b92fe408a7e52fe53ce7d6ce80f57b55e520e6a023cb048b80648818ded7b4ad
|
|
BLAKE2b-256 checksum How to use checksums |
1c649993563f66afb7e979ad4f53157b3d6f2fb9f65cdc58c5544c25939c4b5e
|
| 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 22, 2026.
Transparency logSecurity for sahiapi 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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for sahiapi-0.1.0.tar.gz
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 22, 2026.
Transparency logA 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.