Post-market is data is removed at EOD.
So, historical post-market data is not available.
However,you can save each trading day's post-market data in your system before it's removed.
You can fetch intraday data after post-market closing but before the starting of EOD process (midnight), or you can use websocket during post-market ,calculate the volume and save in your database.
Hi @SRIJAN Thanks for the reply. Is it possible to calculate this volume indirectly. one method i have in mind is…
Take the day candle volume and subtract the sum of all 1min candle volumes. the difference should be sum of pre-open session volume and post market session volume. If we can remove the pre-open volume, we should be left with post market session volume.
As told above,you need to calculate post market volume before EOD because post market data is removed at EOD.
The difference between the day's volume and sum of volumes of all 5 minute candles is beacuse Zerodha doesn't get all the ticks,this is explained in detail here:
However,at EOD ,the daily candle data formed on Kite by the ticks received by Zerodha is replaced with the bhavcopy data from NSE,which is the correct data.
Hi Srijan, Thanks for you reply. I have clearly understood your method of collecting volume at 15:30 and 16:00 to get the difference which will be the post market volume. And i have been doing this for past couple of weeks. Thanks for taking the time to explain it again, appreciate it.
Currently I'm just trying to figure out if there is any way to get that post market volume for past dates. And it looks like there is no proper way to do this for historical data... I have tried some methods but there are no conclusive results. If you want to discuss in detail let me know.
So, historical post-market data is not available.
However,you can save each trading day's post-market data in your system before it's removed.
You can fetch intraday data after post-market closing but before the starting of EOD process (midnight), or you can use websocket during post-market ,calculate the volume and save in your database.
Is it possible to calculate this volume indirectly. one method i have in mind is…
Take the day candle volume and subtract the sum of all 1min candle volumes. the difference should be sum of pre-open session volume and post market session volume. If we can remove the pre-open volume, we should be left with post market session volume.
Is this possible?
Because, post-market data is included in the intraday historical data API response,but pre-market data is not included.
So, day volume will be equal to the sum of volumes of all minute candles before EOD.
The best way is to fetch intraday data from 15:40 to 16:00 and take the sum of volumes of all the candles.
post-market data is removed at EOD.
If you fetch before EOD process starts,you will get post-market candles for the day.
For NSE-INFY symbol on 2022-07-15
When requested full day volume , the volume is 5620018
for the same day requested 5 minute candles , the sum of candle volume is 5597554
difference is = 22464
the Pre-Open Market Volume from NSE website is = 21945
again the difference is = 519 ...
Can this 519 be considered as post-market session volume?
As told above,you need to calculate post market volume before EOD because post market data is removed at EOD.
The difference between the day's volume and sum of volumes of all 5 minute candles is beacuse Zerodha doesn't get all the ticks,this is explained in detail here:
https://tradingqna.com/t/why-does-the-same-technical-charts-for-the-same-stock-from-nse-tame-google-finance-yahoo-finance-amibroker-not-match/1688/3
However,at EOD ,the daily candle data formed on Kite by the ticks received by Zerodha is replaced with the bhavcopy data from NSE,which is the correct data.
First, just after the normal market closes at 3:30 ,but before 3:40,i.e the post-market session opening time.
Let's say the volume in the quote is x.
Second,fetch quote again at 4 PM ,after post-market closes.
Assume the volume now is y.
Now, subtract x from y.
This will give you the exact post -market volume.
I hope you understood properly.
I have clearly understood your method of collecting volume at 15:30 and 16:00 to get the difference which will be the post market volume.
And i have been doing this for past couple of weeks. Thanks for taking the time to explain it again, appreciate it.
Currently I'm just trying to figure out if there is any way to get that post market volume for past dates.
And it looks like there is no proper way to do this for historical data...
I have tried some methods but there are no conclusive results.
If you want to discuss in detail let me know.
Thanks again for you help.