How to get market price per share

How do you fetch market price per share programmatically?