Is there a way to import Exchange rates automatically?

Hi
I want to show product prices in many currencies
Is there a way to import Exchange rates automatically?
Thanks
Erez

If you can find a web service that has the data you need, you can
import it to your application easily.

Since exchange rates is something that changes daily, importing once
will not work as expected, it has to be something that will allow you
to update it frequently (daily probably).

On Apr 18, 11:33 pm, “[email protected][email protected]

Thanks felipekk
This is a web service I want to conect to:
http://www.bankisrael.gov.il/heb.shearim/currency.php?curr=01
how do i do it?
Erez

On Apr 19, 2008, at 3:26 PM, [email protected] wrote:

Thanks felipekk
This is a web service I want to conect to:
http://www.bankisrael.gov.il/heb.shearim/currency.php?curr=01
how do i do it?

What do you have so far? Where are you getting stuck?

Hi George
My app is about Real Estate
I show assets prices is NIS
and I want to show prices in Dollars also

<%=h number_to_currency(@asset.price_shekel, :unit => "₪") %>
<%=h number_to_currency(@asset.price_shekel.to_f / @dolar.to_f) %>

@dolar = 3.425

I need to import (automatically) the Dollar rate once a day and store
it in my app DB
3.425

i am sure this is simple how ever I am new to programing

Thanks

Erez

More about this here:
http://www.sitepoint.com/forums/showthread.php?t=544298

Erez

On Apr 20, 2008, at 9:01 AM, [email protected] wrote:

@dolar = 3.425

I need to import (automatically) the Dollar rate once a day and store
it in my app DB
3.425

i am sure this is simple how ever I am new to programing

When programming, the way to solve a large problem is to break it down
into smaller pieces, and then solve those smaller problems.
Right now you want to “import exchange rates.”

You should break that up into something like:

  • connect to the server
  • log in
  • send request
  • receive reply
  • parse reply
  • store reply

It may be that even some of those smaller problems should be broken
into even smaller pieces.
The code you posted above is only the presentation of the data. Before
you can present it you’ve got to do all those other things, and
probably a few more that I didn’t list.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs