Click here to Skip to main content
Click here to Skip to main content

Currency Convertor

, 30 May 2005 GPL3
Rate this:
Please Sign up or sign in to vote.
Converts one currency into another using Yahoo finance exchange rates.

Sample Image - CurrencyConvert.jpg

Introduction

This is a simple tool, that checks the yahoo website for the latest currency rates and converts the given currency into another. It downloads the required exchange rate only when needed and save it for further calculations. So, it saves round way trip again and again to the yahoo website. You can also clear all the downloaded exchange rates. It also shows the latest stock market report. It also automatically checks for any new version available at http://www.priyank.in/ for download, and reports user about the same.

How it works

Actually its internal working is very complex, we have to download the page from yahoo website using HttpWebRequest and HttpWebResponse and apply regular expression to the data, fetch the currency rates, using Regex class' Match function. See, how hard it is, download the page with URL like:

<A href="http://finance.yahoo.com/currency/convert?amt=1&from=USD&to=INR&submit=Convert">
http://finance.yahoo.com/currency/convert?amt=1&from=USD&to=INR&submit=Convert</A>

Replace USD and INR with your currency symbols used by yahoo website and apply a regular expression like:

</td><td\sclass=\"yfnc_tabledata1\">.*?</td><td\sclass=\"yfnc_tabledata1\">
       (.*?)</td><td\sclass=\"yfnc_tabledata1\">

to fetch the data out of the web page. Now, you are able to find out how hard was that.

Sites used for getting exchange rates

Sites used for getting stock market report

.NET Framework

The .NET Framework can be downloaded from the Microsoft website

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

Share

About the Author

Priyank Bolia
Software Developer (Senior)
India India
No Biography provided

Comments and Discussions

 
QuestionTry this link https://www.igolder.com/exchangerate.ashx?from=EUR&to=CAD PinmemberJcmorin21-Sep-11 7:04 
GeneralCode...... PinmemberMember 453129811-Jan-10 1:24 
GeneralRe: Code...... PinmemberPriyank Bolia11-Jan-10 1:31 
GeneralRe: Code...... PinmemberMember 453129811-Jan-10 1:33 
GeneralDidnt work for me :( Pinmemberadk_amit7-Mar-09 23:59 
GeneralRe: Didnt work for me :( PinmemberPriyank Bolia8-Mar-09 2:11 
GeneralSource available from Priyank.co.in PinmemberPriyank Bolia5-Nov-06 19:09 
QuestionSource code would help!! PinmemberS P S18-Oct-06 9:08 
QuestionWhere is the code? Pinmemberemadns30-May-05 20:15 
AnswerRe: Where is the code? PinsussAli I.31-May-05 0:19 
GeneralRe: Where is the code? PinmemberCugel200528-May-06 14:53 
GeneralRe: Where is the code? Pinmemberpwesson4-Sep-06 2:59 
GeneralRe: Where is the code? Pinmembergkettani23-Aug-10 13:09 
GeneralVery UseFul! PinmemberThatsAlok30-May-05 19:25 
GeneralRe: Very UseFul! PinmemberPriyank Bolia30-May-05 19:36 
GeneralMore than the tool.... PinmemberVictor Boctor30-May-05 13:23 
GeneralNice! PinmemberRavi Bhavnani30-May-05 7:56 
GeneralRe: Nice! PinmemberPriyank Bolia30-May-05 21:19 
GeneralRe: Nice! PinmemberRavi Bhavnani31-May-05 2:33 
GeneralRe: Nice! PinmemberPriyank Bolia31-May-05 3:49 
GeneralRe: Nice! PinmemberRavi Bhavnani31-May-05 5:44 
GeneralRe: Nice! PinmemberPriyank Bolia31-May-05 19:20 
GeneralRe: Nice! PinmemberRavi Bhavnani1-Jun-05 3:32 
GeneralRe: Nice! PinmemberPriyank Bolia1-Jun-05 5:06 
GeneralVERY USEFUL PinmemberBobbyQSoft30-May-05 7:41 
GeneralRe: VERY USEFUL PinmemberPriyank Bolia30-May-05 19:26 

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
Web01 | 2.8.141216.1 | Last Updated 30 May 2005
Article Copyright 2005 by Priyank Bolia
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid