FrankK
FrankK

Reputation: 511

fetching online stock data from yahoo finance in xcode 5 for ios 7

I want to make an ios 7 application that fetches online stock data (such as % change), but i have no idea how i can actually fetch the data. i've been looking into json, but i don't know if that is the right thing to use.

http://finance.yahoo.com/q?s=SPY

i would like to know how i can fetch data from this site to use it in my project, so i can store a % change value in a number/integer to use it in an if-else statement.

any help is much appreciated!

Upvotes: 0

Views: 2414

Answers (1)

Shaunak
Shaunak

Reputation: 18028

Yes JSON is your answer except in this case you will have to go though something like YQL because there is no json api for yahoo finance (as far as I can tell from few mins of google search). However you can get that data in IOS using YQL and a YQL library for IOS:

These two links in sequence should help you piece a solution together:

yahoo finance stock quote api

https://github.com/guilhermechapiewski/yql-ios

Upvotes: 1

Related Questions