Click here to Skip to main content
11,707,470 members (76,708 online)
Click here to Skip to main content

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

, 17 Oct 2005 CPOL 90K 367 72
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

Mähr Stefan
Web Developer
Austria Austria
No Biography provided

You may also be interested in...

Comments and Discussions

 
GeneralList of all symbols Pin
Sapan Patibandha22-May-13 22:32
memberSapan Patibandha22-May-13 22:32 
GeneralCopy to SIM Issue Pin
Sreekanth Muralidharan13-Jul-08 14:59
memberSreekanth Muralidharan13-Jul-08 14:59 
GeneralHave a Problem in Mobile Development. Pin
Member 403696215-Jan-08 16:50
memberMember 403696215-Jan-08 16:50 
Generalversion 2005 codin.. [modified] Pin
tupidboy6-May-07 21:21
membertupidboy6-May-07 21:21 
GeneralError tipps_download.ico Pin
johaten13-Jul-06 5:39
memberjohaten13-Jul-06 5:39 
AnswerRe: Error tipps_download.ico Pin
sk650722-Sep-06 10:35
membersk650722-Sep-06 10:35 
Generalsmartphone 2003 SE Pin
Aviram Solomon2-Dec-05 12:03
memberAviram Solomon2-Dec-05 12:03 
QuestionRe: smartphone 2003 SE Pin
venugopal.10@indiatimes.com19-Jan-06 21:24
membervenugopal.10@indiatimes.com19-Jan-06 21:24 
GeneralProblem with the cool PPC 2003 style for the listview Pin
rhelena21-Oct-05 2:35
memberrhelena21-Oct-05 2:35 
GeneralRe: Problem with the cool PPC 2003 style for the listview Pin
Nostra23-Oct-05 19:58
memberNostra23-Oct-05 19:58 

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.

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