A professional trading application for scalping and real-time PnL monitoring, built for the Neo API platform.
- Quick Order Execution: Fast BUY/EXIT buttons for scalping strategies
- Strike Price Controls: Easy up/down arrows to adjust strike prices
- CE/PE Toggle: Quick switch between Call and Put options
- Lot Size Selection: Predefined lot sizes (1, 2, 3, 5, 10)
- Symbol History: Remembers your last 3 traded symbols
- Auto-Login: Automatic authentication on startup
- Scrip Master Integration: Automatic token lookup for trading symbols
- Real-time Trade Tracking: Live monitoring of completed trades
- Comprehensive Statistics:
- Total trades count
- Win/Loss ratio and win rate percentage
- Gross PnL, Net PnL, and total charges
- Last 5 trades display
- Color-coded Display: Green for profits, red for losses
- Auto-refresh: Updates every 5 seconds
- CSV Export: Automatically saves trades to daily CSV files in
logs/directory
- Python 3.11+
- Conda/Miniforge environment manager
-
Clone the repository
git clone https://github.com/SriniArch/NeoApp.git cd NeoApp2 -
Create and activate the environment
conda create -n neo python=3.11 conda activate neo
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
Create a
.envfile in the project root with your Neo API credentials:CONSUMER_KEY=your_consumer_key MOBILE=your_mobile_number UCC=your_ucc MPIN=your_mpin TOTP_SECRET=your_totp_secret NIFTY_LOT_SIZE=75
-
Add scrip master CSV files
Place your scrip master files in the project root:
nse_fo.csv- NSE Futures & Options scrip masterbse_fo.csv- BSE Futures & Options scrip master
python run.pyThe application will:
- Auto-login using your credentials
- Load the scrip master data
- Display the Scalper & Monitor interface
- Select Symbol: Enter or select a trading symbol (e.g.,
SENSEX2610184900PE) - Adjust Strike: Use ▲/▼ buttons to change strike price
- Choose Option Type: Toggle between CE (Call) and PE (Put)
- Set Lot Size: Select from dropdown (1, 2, 3, 5, 10)
- Execute Trade:
- Click BUY to enter position
- Click EXIT to close position
- Monitor PnL: Watch real-time statistics in the right panel
Completed trades are automatically saved to:
logs/trades_YYYY-MM-DD.csv
CSV includes:
- Symbol, Date, Buy/Sell Times
- Quantity, Buy/Sell Prices
- Gross PnL, Charges, Net PnL
NeoApp2/
├── run.py # Main entry point
├── scalper/
│ ├── neoscalper.py # Main UI and trading logic
│ └── ltp.py # Live price fetching
├── monitor/
│ ├── neomonitor.py # Standalone monitor (legacy)
│ └── pnl_engine.py # PnL calculation engine
├── bot/
│ └── neobot.py # Automated trading bot
├── common/
│ ├── config.py # Configuration management
│ ├── neo_login.py # Authentication
│ ├── orders.py # Order execution
│ ├── scrip_master.py # Symbol lookup
│ └── utils.py # Utility functions
├── assets/
│ └── scalper2.png # App icon
├── logs/ # Log files and trade CSVs
└── .env # Environment variables (not in repo)
| Variable | Description | Required |
|---|---|---|
CONSUMER_KEY |
Neo API consumer key | Yes |
MOBILE |
Registered mobile number | Yes |
UCC |
Unique Client Code | Yes |
MPIN |
Mobile PIN | Yes |
TOTP_SECRET |
TOTP secret for 2FA | Yes |
NIFTY_LOT_SIZE |
Default lot size | No (default: 75) |
NSE_SCRIP_MASTER_PATH |
Path to NSE CSV | No (default: nse_fo.csv) |
BSE_SCRIP_MASTER_PATH |
Path to BSE CSV | No (default: bse_fo.csv) |
.env file or credentials to version control.
The .gitignore file is configured to exclude:
.envand.envrc*.csvfiles (scrip masters)- Log files
- Sensitive data
This is a debug message and can be safely ignored if the Monitor displays data correctly. The Neo API client may store the token internally.
- Ensure you have completed at least one trade
- Check that your API credentials are valid
- Verify network connectivity
- Ensure scrip master CSV files are present and up-to-date
- Check that the trading symbol format matches the scrip master
This project is for personal use only.
This software is provided as-is for educational and personal trading purposes. Use at your own risk. The authors are not responsible for any financial losses incurred through the use of this software.
Happy Trading! 📈