PI scanner for buyer and seller

Can we write the code to check buyer is more than seller @ any point of time ? If yes what can be the code

It is not possible to scan or check buy and seller, you can check manually in market depth or market snap quote as of now.