This script computes the volume for Nifty 50 index. I am using top 20 stocks here that constitute about 75% of the Nifty 50. I had used the script created by shijithlal as a base for this. He has used all 45-50 stocks in his script. You can look that up if you want a more accurate volume.