Introduction
This package is written to be used as a tradion API Client in Python. With the correct API credentials, User can access tradion interactive & market data.
Installation
install
pip install tradion_api_client
Reference
- This is a python client package for Tradion Api. Tradion is a product from Tradion. The original documentation for tradion client is click here
Package Structure
- For better understanding the package, the user should have a clear understanding of the architecture of the package.
Here is the folder structure of the project:
└───tradion_api_client
├─── core
│ ├─── __init__.py
│ ├─── interactive.py
│ └─── market_data.py
├─── utils
│ ├─── __init__.py
│ ├─── http_client.py
│ └─── logger.py
├─── __init__.py
├─── config.py
├─── exceptions.py
Features
- Authentication: Login with password and OTP
- Order Management: Place, modify, and cancel orders
- Portfolio: View positions and holdings
- Funds: Check available margins
- Market Data: Real-time streaming via WebSocket
- Contract Master: Download contract files and search for instrument tokens by trading symbol
Usage
from tradion_api_client import InteractiveClient
from tradion_api_client import MarketDataClient
Contract Master
Download contract master files and search for instrument tokens:
import asyncio
from tradion_api_client import InteractiveClient
async def main():
client = InteractiveClient()
# Download contract master file
nse_file = await client.download_contract_master("NSE")
print(f"Downloaded: {nse_file}")
# Get token by trading symbol (use correct format for eg. -EQ suffix)
token_info = await client.get_token_by_symbol("RELIANCE-EQ", "NSE")
if token_info:
print(f"Token: {token_info['token']}")
print(f"Lot Size: {token_info['lot_size']}")
# Get symbol of indices by using this method
indices_token_info_nse = await client.get_token_by_symbol("NIFTY 50", "NSE", "INDICES.json")
indices_token_info_bse = await client.get_token_by_symbol("SENSEX", "BSE", "INDICES.json")
indices_token_info_mcx = await client.get_token_by_symbol("MCXAGRI", "MCX", "INDICES.json")
await client.close()
asyncio.run(main())
For more details, see Contract Master Documentation
Metadata
Release files for tradion_api_client 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 | |
|---|---|---|---|
| tradion_api_client-0.2.0.tar.gz | 13.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tradion_api_client-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.0 kB
Release files / tradion_api_client-0.2.0.tar.gz
| Download URL | tradion_api_client-0.2.0.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78c40bf7881227c414544960c4160aba82bf5fbaa8cff99df5668a217a8f3aea
|
|
BLAKE2b-256 checksum How to use checksums |
d6bd3c273f06ca46e8ee71b441c1c45dddbec0d53e85260721a3e4749e7d2f92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Release files / tradion_api_client-0.2.0-py3-none-any.whl
| Download URL | tradion_api_client-0.2.0-py3-none-any.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f9afad84ae9b057132dec898f444d880cc383312aa329c439df9275400f55081
|
|
BLAKE2b-256 checksum How to use checksums |
f7ad525afd3a31a6825170640cbec0a89445356fbcbce6dfeb341e718d76b9c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|