Hello,
Am trying to built an algo based on few indicators, volume is one of them. Now for backtesting when am using the historical data API am getting the volume info for 1 min candle which am aggregating into different timeframes for backtesting. Now when am using the market feed api (marketfeed.DhanFeed(client_id, access_token, instruments, version)) to get the livefeed in real time, for full data am getting the feed like this : “Data received: {‘type’: ‘Full Data’, ‘exchange_segment’: 2, ‘security_id’: 54445, ‘LTP’: ‘48798.10’, ‘LTQ’: 30, ‘LTT’: ‘14:00:03’, ‘avg_price’: ‘48738.27’, ‘volume’: 142020, ‘total_sell_quantity’: 25950, ‘total_buy_quantity’: 24360, ‘OI’: 490320, ‘oi_day_high’: 490350, ‘oi_day_low’: 403980, ‘open’: ‘48500.50’, ‘close’: ‘48719.45’, ‘high’: ‘48918.30’, ‘low’: ‘48435.80’, ‘depth’: [{‘bid_quantity’: 150, ‘ask_quantity’: 120, ‘bid_orders’: 1, ‘ask_orders’: 1, ‘bid_price’: ‘48793.65’, ‘ask_price’: ‘48804.45’}, {‘bid_quantity’: 30, ‘ask_quantity’: 90, ‘bid_orders’: 1, ‘ask_orders’: 2, ‘bid_price’: ‘48791.30’, ‘ask_price’: ‘48804.50’}, {‘bid_quantity’: 150, ‘ask_quantity’: 30, ‘bid_orders’: 1, ‘ask_orders’: 1, ‘bid_price’: ‘48790.75’, ‘ask_price’: ‘48804.95’}, {‘bid_quantity’: 60, ‘ask_quantity’: 30, ‘bid_orders’: 1, ‘ask_orders’: 1, ‘bid_price’: ‘48790.00’, ‘ask_price’: ‘48805.25’}, {‘bid_quantity’: 60, ‘ask_quantity’: 30, ‘bid_orders’: 1, ‘ask_orders’: 1, ‘bid_price’: ‘48786.20’, ‘ask_price’: ‘48806.65’}]}”… want to know about the data being passed for “Volume”? Is it total volume of the instrument right from the beginning of the session till that time / only the volume being trade in that particular tick or something else?? My objective is to get the volume data and accumulate it say for 5min/ 10min / 15min candles. Problem am facing currently is that when am doing the accumulation with the real time data its not matching with the historical data which am getting next day. So either I am doing something wrong in dada manipulation or there might be some issue with the API data which I think is very unlikely. Kindly help please.
Hello @Subhro_B
Welcome to MadeForTrade community!
Volume over here is volume is for the entire day. It is not served on per minute or tick basis. You can look at Intraday Minute data for this.
@Hardik thank you very much. I have been under the impression that the intraday API could be used only for historical data and will not get current data, as I have been using it to get past data. This will help me a lot as have been struggling bad to get the volume info min wise. Thanks Again.
Hello @Subhro_B
Intraday minute API provides you data for the current day as well as nth minute as well. You can use this to get volumes on minute basis.
1 Like
@Hardik this is exactly what I have been looking for.
1 Like