Topic: More automatic currency sources

Definitely need more options than the ECB for currency sources, or an option to add other currency sources. For example central bank web sites, yahoo, google, etc easily.

Re: More automatic currency sources

If other sources have the option to deliver exchange rates via some kind of service (xml) and with more currency rates to deliver than ECB it will certainly be of interest for us. Will you check this for us, please?

/Joe

Re: More automatic currency sources

Personally multiple options is likely the best way to go, as that way we are dependent on the changes of any one third-party service.

There is a bunch of scripts out there for handling Google and Yahoo currencies in php.

Modifications on this might be possible for Google.
http://rochakchauhan.com/blog/2009/01/27/google-currency-converter-convert-currency-amounts-using-google-searches/

This is GPL joomla module that would likly be the easiest to modify or as template for the purposes to get Google currencies:
http://extensions.joomla.org/extensions/financial/currency-a-exchange/5795


My favorite is xe.com, but that is a paid for service unless you post an advertising. Honestly with the quality of their live rates, I would not mind putting up with a banner advertising of some sort.
http://www.xe.com/ucc/customize.php

Perhaps even more down the wish list would be to have some sort of easy API to add whatever external currency service the administrator likes.

Re: More automatic currency sources

Yahoo finance conversions with code example:
http://www.chazzuka.com/blog/?p=106

Re: More automatic currency sources

The conversion code is not a problem, as it is implemented in FA for long time. The problem is which institutions are acceptable as source of daily rate for FA users, and it depends somewhat on user's location. Currency rates in Malaysia are not especially valuable for FA users in Europe. Currently only ECB page is supported.
Janusz

Re: More automatic currency sources

How about all of Latin America?

I for example need at least Chilean Pesos, and if software can handle multiple languages it makes sense that it should handle a corresponding diversity in currency. ECB has very limited coverage, and I am not terribly enthusiastic about their currency rates. There are lots of different ways to calculate currency (real time, observed, so on).

I also have an inflation indexed sudo-currency to deal with for long term contracts. It would be nice to come up with an easy way to pull the daily rate off the central bank website as I do believe it is provided in XML or at least some sort of curl call. 

So it would be nice to have more of a swiss army knife type currency interface to deal with the million ways currency can be retrieved, and handled.  Another example, is that I don't give whole sale currency rates to my clients. I charge 2% less for the risk of handling foreign currencies.

Re: More automatic currency sources

Hello cenc,

We still use ECB as our stable exchange rates provider, however, we are avare of that the coverage is not good for South America, Africa and Asia, so we have implemented it so that it is possible to swap provider.
In CVS Main, a file called /gl/includes/db/gl_db_rates.inc has been updated so it is possible to use YAHOO or GOOGLE instead of ECB.
Both YAHOO and GOOGLE have almost all currency rates in the world. These changes are going to release 2.2.2, but if you want this to be available in your 2.2 you will have to download this file from the CVS repository.

And you will have to create the following locale.inc file and place it in the /lang/xx_YY folder, where xx is the language and YY is the country. F.i. en_US.

<?php

class Hooks {
    function retrieve_exrate($curr, $date)
    {
        return get_extern_rate($curr, 'YAHOO', $date);
        //return get_extern_rate($curr, 'GOOGLE', $date);
    }
}

?>

This will use YAHOO instead of ECB. Comment the YAHOO line and uncomment the GOOGLE line if you want to use GOOGLE instead.
We do not guarantee that the currency rates are provided correctly, but I guess this is better than nothing for countries not served by ECB.

/Joe

Re: More automatic currency sources

cool