Click here to Skip to main content
Licence CPOL
First Posted 17 Oct 2005
Views 81,934
Downloads 190
Bookmarked 69 times

Retrieve delayed Stock Quotes via Yahoo! Finance on your Pocket PC

By | 17 Oct 2005 | Article
Retrieving delayed stock quotes on your Pocket PC.

Sample Image

Introduction

Yahoo! Finance offers 15 minutes delayed Stock quotes packed in a neat .csv format. Using this service for my own on the Desktop PC for quite a while, I now decided to write a Pocket PC version. Using the classes of the System.NET namespace this proved to be a quite a simple task.

The Yahoo Finance Service

The URL we need to retrieve the requested data from the Yahoo Finance service consists of a valid ticker symbol (e.g. Microsoft Germany: MSF.DE) and some query parameters:

  • Basic URL: "http://quote.yahoo.com/d/quotes.csv"
  • "?s=MSF.de": the symbol used for the query
  • "f=sl1d1t1c1ohgvj1pp2owern&e": parameters for the requested information.

A great listing of all parameters for the Yahoo Finance service can be found here.

Using the code

The project consists of a main form and four classes:

  • cDetectInternet: Only checks for a valid internet connection by trying to reach yahoo.de.
  • cDownloadYahooData: This class actually does the downloading of the Yahoo stock data and the graphic stuff.
  • cSettings: Writes and reads the Yahoo URL, ticker symbol and graph URL to and from a simple text file.
  • cGradientListview: Creates this cool PPC 2003 style for the listview in the main form.

Problems encountered during development

I started testing the code on a PPC 2003 emulator where it din't run. Reading the data with a BinaryReader object always threw the error "Invalid chunk size". Searching all over the internet I couldn't find a solution. Amazingly the code proved to work without problems with the PPC 2003 SE emulator and a live PPC 2003 device.

Connecting your PPC Emulator to the Internet

You probably want to test the code with your PPC emulator. To do so you need a working internet connection. I've added some information on how to achieve this task with my download (ConnectPPC.txt).

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Mähr Stefan

Web Developer

Austria Austria

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralCopy to SIM Issue PinmemberSreekanth Muralidharan14:59 13 Jul '08  
GeneralHave a Problem in Mobile Development. PinmemberMember 403696216:50 15 Jan '08  
Generalversion 2005 codin.. [modified] Pinmembertupidboy21:21 6 May '07  
GeneralError tipps_download.ico Pinmemberjohaten5:39 13 Jul '06  
AnswerRe: Error tipps_download.ico Pinmembersk650710:35 22 Sep '06  
Generalsmartphone 2003 SE PinmemberAviram Solomon12:03 2 Dec '05  
QuestionRe: smartphone 2003 SE Pinmembervenugopal.10@indiatimes.com21:24 19 Jan '06  
GeneralProblem with the cool PPC 2003 style for the listview Pinmemberrhelena2:35 21 Oct '05  
GeneralRe: Problem with the cool PPC 2003 style for the listview PinmemberNostra19:58 23 Oct '05  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120528.1 | Last Updated 17 Oct 2005
Article Copyright 2005 by Mähr Stefan
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid