Pulling stock data in openFrameworks application

Hi there, I am thinking to create an openFrameworks application that uses stock data from Google Finance(or any other finance sites). Is there an addon that might help me achieve this goal? Any ideas are appreciated!

If the site you want to scrape data from has an XML feed, using ofXml or one of the other XML addons would probably be the easiest. You may need an HTTP get to pull the XML source down and you may want to thread that so that you can periodically update that data in the background. Haven’t gotten around to doing this in oF, but done the same thing in Processing a ton and the process should be pretty straightforward 1) Pull data (HTTP request) 2) Parse XML 3) Pull out the data of interest to you and do something with it.

Hi @bunnyHat,

Google’s Finance API looks like its been shutdown.

What you can do is use https://www.kimonolabs.com/. To make your own API, based on the finance web page.

Format it either as @jollyrogerjones states a xml,csv,json file.

Make a HTTP Request for the custom url from kimono. Then Parse the data.

Best

Hi @bunnyHat

Here is a quick example. You need to sign up / login to Kimono get your API key and add it the the link below

https://www.kimonolabs.com/api/7uv8xd44?apikey=

{
  "collection1": [
    {
      "increase": "+83.13",
      "currentvalue": "4,529.42",
      "percentage": "(1.87%)",
      "location": "Shanghai"
    },
    {
      "increase": "-1.98",
      "currentvalue": "2,125.85",
      "percentage": "(-0.09%)",
      "location": "S&P 500"
    }
]
}

This is the result

Hope it helps