This is a sample code to fetch market data from yahoo finance.
Output :-
Unsorted : Ask => 117.25 Bid => 116.25 Change => -3.60 Trade Date => - 52-week Low => 111.20 Change From 52-week Low => +5.05 Percebt Change From 52-week High => -48.28% Open => 120.65 Change in Percent => "-3.00%" Ex-Dividend Date => "14-Sep-11" Day's Low => 115.55 52-week High => 224.75 Percent Change From 52-week Low => +4.54% Last Trade Size => 1 Previous Close => 119.85 Symbol => "HINDALCO.NS" Last Trade Time => "6:29am" Last Trade Date => "4/26/2012" Day's High => 121.15 Change From 52-week High => -108.50 Last Trade (Price Only) => 116.25 Volume => 10257747 Stock Exchange => "NSE"