IPhone Objective-C The easiest way to get a stock quote

I am wondering what is the easiest way to get the current stock price from yahoo finance (or similar) in objective-C for the iPhone SDK.

A simple key, I am looking for the current price and movement of days.

I was not lucky to find an example iPhone code or library.

considers

+5
source share
5 answers

Use the object NSURLRequestto retrieve data at this address:

http://download.finance.yahoo.com/d/quotes.csv?s=AAPL&f=sl1d1t1c1ohgv&e=.csv

[NSString stringWithFormat:] AAPL , . CSV, , . , [NSString componentsSeparatedByString: @","], , .

+5

, , :

NSLog(@"%@", [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://download.finance.yahoo.com/d/quotes.csv?s=BP.L&f=sl1d1t1c1ohgv&e=.csv"]]);

BP .

+4

, AAPLot . --, .

+2
+1

Quandl Stock API Yahoo Google. CSV, , JSON XML. , CSV:

https://www.quandl.com/api/v1/datasets/WIKI/AAPL.csv

JSON:

https://www.quandl.com/api/v1/datasets/WIKI/AAPL.json

API, API 5000 .

, API .

+1

All Articles