# 📊 Zerodha Brokerage Calculator
[](https://choosealicense.com/licenses/mit/)
[](https://www.python.org/)
[](https://badge.fury.io/py/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:
```bash
pip install zerodha-brokerage-calculator
```
## 🚀 Quick Start
Here's a quick example to calculate equity intraday charges:
```python
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:
```python
{
'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](LICENSE) file for details.
## 📫 Contact & Support
<div align="center">
[](https://hjlabs.in/)
[](https://wa.me/917016525813)
[](mailto:hemangjoshi37a@gmail.com)
[](https://www.linkedin.com/in/hemang-joshi-046746aa)
[](https://twitter.com/HemangJ81509525)
[](https://stackoverflow.com/users/8090050/hemang-joshi)
</div>
---
<div align="center">
<sub>Built with ❤️ by Hemang Joshi</sub>
</div>
Raw data
{
"_id": null,
"home_page": "https://github.com/hemangjoshi37a/Zerodha-Brokerage-Calculator",
"name": "zerodha-brokerage-calculator",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Hemang Joshi",
"author_email": "hemangjoshi37a@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b7/3f/dd1c49a5c37784439817a1acd2fec334c72d109d820c356f0872e3576bef/zerodha_brokerage_calculator-0.2.0.tar.gz",
"platform": null,
"description": "# \ud83d\udcca Zerodha Brokerage Calculator\n\n[](https://choosealicense.com/licenses/mit/)\n[](https://www.python.org/)\n[](https://badge.fury.io/py/zerodha-brokerage-calculator)\n\nA 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.\n\n\n\n\n\n## \ud83c\udf1f Features\n\n- \u2728 **Comprehensive Coverage**: Support for multiple trading segments\n- \ud83d\ude80 **Easy Integration**: Simple API for quick implementation\n- \ud83d\udcaf **Accurate Calculations**: Precise brokerage and charges computation\n- \ud83d\udd04 **Real-time Updates**: Always current with latest Zerodha charges\n\n## \ud83d\udce6 Installation\n\nGet started with a simple pip install:\n\n```bash\npip install zerodha-brokerage-calculator\n```\n\n## \ud83d\ude80 Quick Start\n\nHere's a quick example to calculate equity intraday charges:\n\n```python\nfrom zerodha_brokerage_calculator import calculate_equity_intraday\n\n# Calculate charges for an intraday equity trade\nresult = calculate_equity_intraday(\n buy_price=1000,\n sell_price=1100,\n quantity=400,\n exchange='NSE'\n)\n\nprint(f\"Net Profit: \u20b9{result['net_profit']:,.2f}\")\nprint(f\"Total Charges: \u20b9{result['total_charges']:,.2f}\")\n```\n\n## \ud83d\udcd8 Available Functions\n\n### \ud83d\udcc8 Equity Trading\n| Function | Description |\n|----------|-------------|\n| `calculate_equity_intraday()` | Calculate intraday trading charges |\n| `calculate_equity_delivery()` | Calculate delivery trading charges |\n| `calculate_equity_futures()` | Calculate futures trading charges |\n| `calculate_equity_options()` | Calculate options trading charges |\n\n### \ud83d\udcb1 Currency Trading\n| Function | Description |\n|----------|-------------|\n| `calculate_currency_futures()` | Calculate currency futures charges |\n| `calculate_currency_options()` | Calculate currency options charges |\n\n### \ud83c\udfed Commodities Trading\n| Function | Description |\n|----------|-------------|\n| `calculate_commodity_futures()` | Calculate commodity futures charges |\n| `calculate_commodity_options()` | Calculate commodity options charges |\n\n## \ud83d\udcca Function Parameters\n\n| Parameter | Description | Type |\n|-----------|-------------|------|\n| `buy_price` | Purchase price of the asset | float |\n| `sell_price` | Selling price of the asset | float |\n| `quantity` | Number of units traded | int |\n| `exchange` | Trading exchange (NSE/BSE/MCX) | str |\n| `multiplier` | Contract size multiplier (for commodities) | float |\n\n## \ud83d\udccb Return Values\n\nEach function returns a comprehensive dictionary containing:\n\n```python\n{\n 'turnover': float, # Total transaction value\n 'brokerage': float, # Brokerage charges\n 'stt': float, # Securities Transaction Tax\n 'exchange_txn_charges': float, # Exchange transaction charges\n 'sebi_charges': float, # SEBI charges\n 'gst': float, # Goods and Services Tax\n 'stamp_duty': float, # Stamp duty charges\n 'total_charges': float, # Sum of all charges\n 'gross_profit': float, # Profit before charges\n 'net_profit': float, # Profit after charges\n 'points_to_breakeven': float # Required points for breakeven\n}\n```\n\n## \ud83d\udcc1 Package Structure\n\n```\nzerodha_brokerage_calculator/\n\u251c\u2500\u2500 zerodha_brokerage_calculator/\n\u2502 \u251c\u2500\u2500 __init__.py\n\u2502 \u2514\u2500\u2500 calculator.py\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 setup.py\n\u2514\u2500\u2500 LICENSE\n```\n\n## \ud83d\udcdd License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\udceb Contact & Support\n\n<div align=\"center\">\n \n[](https://hjlabs.in/)\n[](https://wa.me/917016525813)\n[](mailto:hemangjoshi37a@gmail.com)\n[](https://www.linkedin.com/in/hemang-joshi-046746aa)\n[](https://twitter.com/HemangJ81509525)\n[](https://stackoverflow.com/users/8090050/hemang-joshi)\n\n</div>\n\n---\n\n<div align=\"center\">\n <sub>Built with \u2764\ufe0f by Hemang Joshi</sub>\n</div>\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python package to calculate Zerodha brokerage charges for various trading segments",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/hemangjoshi37a/Zerodha-Brokerage-Calculator"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "035e64d8d78b4117ad46a658fead55343be74d1546d22bf306c954aee34fff34",
"md5": "b672a684db657b24120ac84aac94c896",
"sha256": "c4caf9c47406a3667959c592bdb788e4f4d9d09c0a358d724792ce5e0f959432"
},
"downloads": -1,
"filename": "zerodha_brokerage_calculator-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b672a684db657b24120ac84aac94c896",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5521,
"upload_time": "2024-10-26T14:33:31",
"upload_time_iso_8601": "2024-10-26T14:33:31.525118Z",
"url": "https://files.pythonhosted.org/packages/03/5e/64d8d78b4117ad46a658fead55343be74d1546d22bf306c954aee34fff34/zerodha_brokerage_calculator-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b73fdd1c49a5c37784439817a1acd2fec334c72d109d820c356f0872e3576bef",
"md5": "5482d1676e943cc5b1db12d87e8b9bed",
"sha256": "a5f7e53fef4dae79f563ce3816302d230710869dc973c937c9595e9d7c3ee68b"
},
"downloads": -1,
"filename": "zerodha_brokerage_calculator-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "5482d1676e943cc5b1db12d87e8b9bed",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 6426,
"upload_time": "2024-10-26T14:33:32",
"upload_time_iso_8601": "2024-10-26T14:33:32.865542Z",
"url": "https://files.pythonhosted.org/packages/b7/3f/dd1c49a5c37784439817a1acd2fec334c72d109d820c356f0872e3576bef/zerodha_brokerage_calculator-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-26 14:33:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hemangjoshi37a",
"github_project": "Zerodha-Brokerage-Calculator",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "zerodha-brokerage-calculator"
}