Get support from Xavier Media
It is currently Sun Dec 08, 2013 12:00 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Xavier Finance - Currency exchange rate API
PostPosted: Sat Oct 11, 2008 10:33 am 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Please visit developers.xaviermedia.com for our new developers web site.



The exchange rate API from Xavier Finance allows you to retrieve historical exchange rates and graphs for 38 currencies. Supported currencies are so far EUR, USD, JPY, CYP, CZK, DKK, EEK, GBP, HUF, LTL, LVL, MTL, PLN, SEK, SIT, SKK, CHF, ISK, NOK, BGN, HRK, ROL, RON, RUB, TRL, TRY, AUD, CAD, CNY, HKD, IDR, KRW, MYR, NZD, PHP, SGD, THB, ZAR. For some currencies we don't have data since the start (4th of January 1999) which means that 0.0000 will be returned as exchange rate in some cases.

This API doesn't require any API key, but we ask you to be nice to our servers and not send too many requests. In case this service is abused we may have to request that users register for API keys, and we may also limit the access to this service.

Since this is a free service we require a text link to http://finance.xaviermedia.com/ if you use any graphs or data:
Code:
<a href="http://finance.xaviermedia.com/">Currency converter</a>


Graphs

To create graphs based on the data returned by this API, please consult the article Xavier Finance - Graphs based on the exchange rate API.

Accessing historical exchange rates

To access historical exchange rates in the API, you simply just send a request to the API server in the following format:
Code:
http://api.finance.xaviermedia.com/api/[year]/[month]/[day].[format]

[year] = The year in 4 digits like 1999
[month] = The month in 2 digits like 01 for January
[day] = The day of the month in 2 digits like 08 for the 8th of January
[format] = Format of the response like xml for an XML file (so far XML is the only supported format)

At the moment we only have rates since 4th of January 1999, all other dates will return a 404 error (see below).

A successful query will result in the following response:
Code:
<xavierresponse responsecode="200">
  <fx_date>1999-01-08</fx_date>
  <title>Xavier Finance - Exchange rates for 1999-01-08</title>
  <link>http://finance.xaviermedia.com/</link>
  <exchange_rates>
    <basecurrency>EUR</basecurrency>
    <fx_date>1999-01-08</fx_date>
    <fx basecurrency="EUR">
   <currency_code>EUR</currency_code>
   <rate>1.0</rate>
    </fx>
    <fx basecurrency="EUR">
   <currency_code>USD</currency_code>
   <rate>1.165900</rate>
    </fx>
    <fx basecurrency="EUR">
   <currency_code>JPY</currency_code>
   <rate>130.089996</rate>
    </fx>
  </exchange_rates>
</xavierresponse>


Exchange rates for today

To access todays exchange rates in the API, you simply just send a request to the API server in the following format:
Code:
http://api.finance.xaviermedia.com/api/latest.[format]

[format] = Format of the response like xml for an XML file (so far XML is the only supported format)
Please note that you don't need to send any dates since the rates returned are the latest available in the API. The exchange rates are updated daily so you don't have to query more then once per day!

A successful query will result in the following response:
Code:
<xavierresponse responsecode="200">
  <fx_date>1999-01-08</fx_date>
  <title>Xavier Finance - Exchange rates for 1999-01-08</title>
  <link>http://finance.xaviermedia.com/</link>
  <exchange_rates>
    <basecurrency>EUR</basecurrency>
    <fx_date>1999-01-08</fx_date>
    <fx basecurrency="EUR">
   <currency_code>EUR</currency_code>
   <rate>1.0</rate>
    </fx>
    <fx basecurrency="EUR">
   <currency_code>USD</currency_code>
   <rate>1.165900</rate>
    </fx>
    <fx basecurrency="EUR">
   <currency_code>JPY</currency_code>
   <rate>130.089996</rate>
    </fx>
  </exchange_rates>
</xavierresponse>


Invalid requests

In case you send an invalid request to the API server you will get a 404 Page Not Found error:
Code:
<xavierresponse responsecode="404">
  <title>Page not found - Please check the documentation for help</title>
  <link>http://api.finance.xaviermedia.com/</link>
</xavierresponse>

You will also get this error message if you send dates before 4th of January 1999. If you're too early (i.e. we haven't updated the rates yet) you will also get the latest exchange rates available in the 404 message. For an example try http://api.finance.xaviermedia.com/api/2999/01/01.xml.

At the moment we don't require any API key to get access to our service, but if you should get a 403 Access Denied error in the future it means that we've been forced to limit the access to our service due to abuse :( . In that case check out the information provided in the <link></link> tags for more information.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Wed Nov 12, 2008 4:26 pm 
Offline

Joined: Wed Nov 12, 2008 4:22 pm
Posts: 0
Points: 0
I recently tried the following:

http://api.finance.xaviermedia.com/api/latest.xml

but I noticed that the rate for the British Pound (GBP) was missing.


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Thu Nov 13, 2008 4:54 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Sorry for that :oops: . Now it's included :D

/Andreas

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Tue Dec 02, 2008 10:54 am 
Offline

Joined: Tue Dec 02, 2008 10:52 am
Posts: 0
Points: 0
Hey,

Can you change the base currency? If so how would the URL look?

Thanks


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Tue Dec 02, 2008 4:18 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
No, not in this version but in next we may add that feature.

/Andreas

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Wed Dec 17, 2008 10:59 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Wed Dec 17, 2008 10:58 am
Posts: 1
Points: 0
Can you add the rates of INR (Indian Rupee) to the list please?


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Wed Dec 17, 2008 4:25 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
waveking wrote:
Can you add the rates of INR (Indian Rupee) to the list please?

To be able to do that we need to get data from somewhere and at the moment the European Central Bank (ECB) is unfortunately not trading in Indian Rupee.

/Andreas

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Sat Dec 20, 2008 12:13 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Sat Dec 20, 2008 12:09 am
Posts: 1
Points: 0
Hello, thank you very much for this free service. Is it possible to add LVL and RUR into API response? Thank you!


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Sat Dec 20, 2008 6:32 am 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
kuzmeech wrote:
Hello, thank you very much for this free service. Is it possible to add LVL and RUR into API response? Thank you!

Same as above. We're of course interested in adding all currencies, but as said abov it's not always possible.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Sun May 03, 2009 5:48 pm 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Sun May 03, 2009 5:44 pm
Posts: 1
Points: 0
Hi there,

First of all, thanks a lot for the api :)

Second: I've been using it for a while without problems, however, the following dates don't seem to work:
http://api.finance.xaviermedia.com/api/2008/12/09.xml (all zero's)
http://api.finance.xaviermedia.com/api/2008/12/16.xml (404)
+ in december 2008: 18,19,23

Any idea what this may be? This seem to be the only dates causing this :s

Thanks!


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Tue May 05, 2009 4:33 am 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
That's because we don't have any exchange rates for those dates.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Sun May 10, 2009 11:20 pm 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Sun May 10, 2009 11:12 pm
Posts: 1
Points: 0
Excellent API thanks for that - I will have to start using on our site. In looking at the xml I noticed two slight errors though:

GBP has its basecurrency field as GBP rather than EUR:

Code:
    <fx basecurrency="GBP">
   <currency_code>GBP</currency_code>
   <rate>0.890700</rate>
    </fx>


The rate for CYP is zero:

Code:
    <fx basecurrency="EUR">
   <currency_code>CYP</currency_code>
   <rate>0.000000</rate>
    </fx>


This error occurred on both the latest and the archived data.


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Mon May 11, 2009 4:34 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
I will look into the GBP thing.

All zeros for CPY is because we're not provided any data any more for CPY.

/Andreas

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Mon Nov 02, 2009 5:25 pm 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Mon Nov 02, 2009 5:22 pm
Posts: 1
Points: 0
Rails Gem available for your API, to anyone who needs it.

simply install the gem. You'll need gemcutter prior to doing this step, as this is where it's hosted.

Code:
sudo gem install active_exchange


I'll update this post when i add more documentation and a blog post on how to use it.. but for now enjoy.


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Xavier Finance - Currency exchange rate API
PostPosted: Tue Dec 08, 2009 12:43 pm 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Tue Dec 08, 2009 12:35 pm
Posts: 1
Points: 0
Hi,

Thanks for the great API. Just one small question - at what point during the day is the latest feed updated? I have been trying to work it out myself by querying at different times however can't work out when. For example, now is 12:40 GMT and when I query it, it still shows the rates for yesterday (2009-12-07). I really need to know when this updates so I can have our system query at the right time so we always get the most up to date rates you have.

And, just on the same point, why doesn't it update at midnight or first thing in the morning?

Many thanks,
Mark


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Registered users: No registered users


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]