📊 Zerodha Brokerage Calculator
A powerful Python package that simplifies the calculation of Zerodha brokerage charges across various trading segments including equities, commodities, and currencies. Built with precision and ease of use in mind.
🌟 Features
- ✨ Comprehensive Coverage: Support for multiple trading segments
- 🚀 Easy Integration: Simple API for quick implementation
- 💯 Accurate Calculations: Precise brokerage and charges computation
- 🔄 Real-time Updates: Always current with latest Zerodha charges
📦 Installation
Get started with a simple pip install:
pip install zerodha-brokerage-calculator
🚀 Quick Start
Here's a quick example to calculate equity intraday charges:
from zerodha_brokerage_calculator import calculate_equity_intraday
# Calculate charges for an intraday equity trade
result = calculate_equity_intraday(
buy_price=1000,
sell_price=1100,
quantity=400,
exchange='NSE'
)
print(f"Net Profit: ₹{result['net_profit']:,.2f}")
print(f"Total Charges: ₹{result['total_charges']:,.2f}")
📘 Available Functions
📈 Equity Trading
| Function | Description |
|---|---|
calculate_equity_intraday() |
Calculate intraday trading charges |
calculate_equity_delivery() |
Calculate delivery trading charges |
calculate_equity_futures() |
Calculate futures trading charges |
calculate_equity_options() |
Calculate options trading charges |
💱 Currency Trading
| Function | Description |
|---|---|
calculate_currency_futures() |
Calculate currency futures charges |
calculate_currency_options() |
Calculate currency options charges |
🏭 Commodities Trading
| Function | Description |
|---|---|
calculate_commodity_futures() |
Calculate commodity futures charges |
calculate_commodity_options() |
Calculate commodity options charges |
📊 Function Parameters
| Parameter | Description | Type |
|---|---|---|
buy_price |
Purchase price of the asset | float |
sell_price |
Selling price of the asset | float |
quantity |
Number of units traded | int |
exchange |
Trading exchange (NSE/BSE/MCX) | str |
multiplier |
Contract size multiplier (for commodities) | float |
📋 Return Values
Each function returns a comprehensive dictionary containing:
{
'turnover': float, # Total transaction value
'brokerage': float, # Brokerage charges
'stt': float, # Securities Transaction Tax
'exchange_txn_charges': float, # Exchange transaction charges
'sebi_charges': float, # SEBI charges
'gst': float, # Goods and Services Tax
'stamp_duty': float, # Stamp duty charges
'total_charges': float, # Sum of all charges
'gross_profit': float, # Profit before charges
'net_profit': float, # Profit after charges
'points_to_breakeven': float # Required points for breakeven
}
📁 Package Structure
zerodha_brokerage_calculator/
├── zerodha_brokerage_calculator/
│ ├── __init__.py
│ └── calculator.py
├── README.md
├── setup.py
└── LICENSE
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
📫 Contact & Support
Metadata
Release files for zerodha-brokerage-calculator 0.2.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 |
|---|---|---|---|---|
| zerodha_brokerage_calculator-0.2.0.tar.gz | 6.4 kB | Without provenance | Details for zerodha_brokerage_calculator-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zerodha_brokerage_calculator-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for zerodha_brokerage_calculator-0.2.0-py3-none-any.whl |
Total release size: 11.9 kB
Release files / zerodha_brokerage_calculator-0.2.0.tar.gz
| Download URL | zerodha_brokerage_calculator-0.2.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5f7e53fef4dae79f563ce3816302d230710869dc973c937c9595e9d7c3ee68b
|
|
BLAKE2b-256 checksum How to use checksums |
b73fdd1c49a5c37784439817a1acd2fec334c72d109d820c356f0872e3576bef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / zerodha_brokerage_calculator-0.2.0-py3-none-any.whl
| Download URL | zerodha_brokerage_calculator-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c4caf9c47406a3667959c592bdb788e4f4d9d09c0a358d724792ce5e0f959432
|
|
BLAKE2b-256 checksum How to use checksums |
035e64d8d78b4117ad46a658fead55343be74d1546d22bf306c954aee34fff34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for zerodha-brokerage-calculator 0.2.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.