Zerodha Wrapper
A Python wrapper for the Zerodha API that simplifies interaction with Zerodha's trading platform.
Features
- Easy authentication with Zerodha
- Automated login with TOTP support
- Simplified order placement and position management
- Functions for retrieving market data
- Support for futures and options trading
- Historical data retrieval
- Margin checking utilities
Installation
pip install zerodhawrapper
Configuration
- Create a
key.jsonfile with your API credentials:
{
"api_key": "your_api_key",
"api_secret": "your_api_secret"
}
- Create a
credentials.jsonfile with your login credentials:
{
"username": "your_zerodha_username",
"password": "your_zerodha_password",
"totp": "your_totp_secret"
}
Usage
from zerodhawrapper import initialize_kite, send_order, retrieve_positions
# Initialize the Kite connection
kite = initialize_kite()
# Place an order
order_id = send_order(
kite=kite,
symbol="INFY",
quantity=1,
transaction_type="BUY",
order_type="MARKET",
product="CNC"
)
# Get positions
positions = retrieve_positions(kite)
Available Functions
login(): Authenticate with Zerodhainitialize_kite(): Initialize KiteConnect clientget_quote(symbol): Get quote for a symbolsend_order(...): Place trading ordersretrieve_positions(kite): Get current positionsget_nifty50_futures_symbols(kite): Get Nifty50 futures symbolsget_nearest_nifty_fut_price(kite): Get nearest Nifty futures pricecheck_available_margin(kite): Check available trading marginget_fno_underlyings(): Get F&O underlying symbolsget_historical(...): Get historical data- And many more...
Development
To contribute to this project:
- Clone the repository
- Install development dependencies:
pip install -e . - Make your changes
- Submit a pull request
License
MIT License
Metadata
Release files for zerodhawrapper 1.3
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 |
|---|---|---|---|---|
| zerodhawrapper-1.3.tar.gz | 8.7 kB | Without provenance | Details for zerodhawrapper-1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zerodhawrapper-1.3-py3-none-any.whl | Python 3 | none | any | Details for zerodhawrapper-1.3-py3-none-any.whl |
Total release size: 16.8 kB
Release files / zerodhawrapper-1.3.tar.gz
| Download URL | zerodhawrapper-1.3.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9293a9bb5027ebb33445ff32e34ae587c4dec774fa7b26be1db95902a03eb3a8
|
|
BLAKE2b-256 checksum How to use checksums |
95b805afe6d6cd3e66ad7c253dccb26f143439fd27d89c4d807c2839c261b2ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|
Release files / zerodhawrapper-1.3-py3-none-any.whl
| Download URL | zerodhawrapper-1.3-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be84109b5ffab90bd634687760014ad238c80b5e8576b5f2d6a480c8f1879dc8
|
|
BLAKE2b-256 checksum How to use checksums |
fc55525fc547372bc2adeb3eace716c9aaaf53bbdb4984eef8b1b027392f3317
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|
Security for zerodhawrapper 1.3
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.