Tag Archive for 'API'

Realtime Stock Quotes API [xml] — Open For Beta Testing

As with most great ideas (not saying this one is great, but just follow me here), they are generally thought up and developed out of necessity. Ruby on Rails was developed by 37signals for internal use, but was released to the general public and has caused a massive “Happy Coder” movement.

With that said, my idea probably won’t start a movement, but it will allow more web services to take advantage of real-time stock quotes by providing a simple xml api (+ JSON very soon). For now, the beta API only includes access to the actual stock prices + monetary and percentage change. My private API, I guess it would be the beta’s beta, includes access to more analytical data. These features should be released within the coming weeks [2, max].

The API is one of my first attempts at RESTful API design, and, although simple, this realtime stock quote API is technically RESTful. As it begins to incorporate more features, the RESTful design will become more evident, as in GET, POST, DELETE, and UPDATE http requests. As of now, the API simply includes one URL:
http://judstephenson.com/api/Quotes/Realtime/Symbol
Examples of which include:
http://judstephenson.com/api/Quotes/Realtime/aapl
http://judstephenson.com/api/Quotes/Realtime/amagx
http://judstephenson.com/api/Quotes/Realtime/xoho

I am working on offering a JSON option for the data output (with a callback of course), but as of right now, only XML output is supported, but it isn’t that complicated to parse. Since this API is a simple one-liner, the documentation for it is sparse [read: non-existant], but you should be able to get the hang of it.

Now for the disclaimer: This API is released to the public without any warranty, expressed or implied. I am not responsible for any damage you do with it (if thats possible) and I can not guarantee its 100% uptime (although it shouldn’t ever go down). You are free to use this API in an suitable manner, although, if the traffic to the API becomes too much of a strain on the server, I may limit the number of requests/hr. Other than that, have fun hacking away.

Update: The realtime stock quotes api has been updated! New features include json output with the ability to have a user-definable callback function.