A python script to automatically journal NSE stock trades by leveraging Interactive Broker email notifications for the buy/sell trades.
- Journal provides insights like Stock type (largecap/midcap....etc.), Sector, Industry for a given stock ticker
- Auto update latest price and percentage change for ongoing trades
- Display current loss/gain and realised loss/gain for a particular trade
- Provides holding time period for each trade in Days
- Classify trades to different categories based on percentage of loss/gain and holding period
- Manage edge cases like partial buy/sell trades notifications
pip3 install requests nsetools yfinance
35 15 * * 1-5
A cron job running at 15:35 on every day-of-week from Monday through Friday, will gather all the buy/sell trades emails and journal them post market-closing.
P.S. In case, you wants to keep the current price updated for the ongoing trades, just grab the relevant section from the main.py and set a recurring cron job during the market hours.