Question

If I type:

 txt=urlread('http://download.finance.yahoo.com/d/quotes.csv', 'get',{'s', 'AAPL', 'f', 'sl1d1t1c1ohgv', '', '.csv'} )

in matlab, I get the output:

"AAPL",430.195,"7/16/2013","4:00pm",+2.755,426.43,430.71,424.17,7616916

However I want to get the name of the security, in addition to the ticker symbol. I believe 'n' is the way to signify this but I haven't been able to get it to work. Is this possible?

Was it helpful?

Solution

How about just adding 'n' to the 'f' parameter's value?:

txt=urlread('http://download.finance.yahoo.com/d/quotes.csv',...
            'get',{'s', 'AAPL', 'f', 'nsl1d1t1c1ohgv', 'e', '.csv'} )

which returns

txt = 

    "Apple Inc.","AAPL",430.195,"7/16/2013","4:00pm",+2.755,426.43,430.71,424.17,7624941

I found this page helpful. The list of all property names and their descriptions is here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top