Aquiles Páez
Aquiles Páez

Reputation: 573

MATLAB: getting information from website currency converter (XE.com)

I want to get information about currency exchanges from XE.com, I thought about using the command:

createClassFromSDWL('http://www.xe.com/es/currencyconverter?WSDL');

Like someone else did here, in a similar question. But it didn't work out for this website. Searching and trying for other ways of reading web data into Matlab I tried the webread command and it was also unsuccessful... but looking into the char array it returned, I could see a line saying:

< !-- WARNING: Automated extraction of rates is prohibited under the Terms of Use. -- >

Has someone else tried getting currency exchange info from XE.com with Matlab and succeeded? And also, does that warning means I cannot use it within a Matlab script for personal use? I have a function that depends on currency rates and I'm sure you can imagine how tedious it is to search every exchange manually with the website.

Any hints will be appreciated.

Upvotes: 1

Views: 485

Answers (1)

khonegger
khonegger

Reputation: 198

Unfortunately that warning has nothing to do with Matlab. That message is the webpage server telling you that it knows you are "screen scraping," and it's reminding you that this is prohibited in that website's Terms of Use:

The foregoing prohibitions expressly include, but are not limited to, the practice of "screen scraping", or any other practice or activity the purpose of which is to obtain lists of data, portions of a database, or other lists or information from the Services, in any manner or in any quantities not authorized in writing by XE.

If you keep it up, you'll likely get your IP blocked from being able to access that website at all.

Your best bet is to try to find an API that supports retrieval of exchange rates, like fixer.io. If you decide to use fixer.io (seems useful, though I can't vouch for its accuracy), you could pull in the EURO to USD conversion rate by using webread():

w = webread('http://api.fixer.io/latest?symbols=USD');
EUR_USD_conversion = w.rates.USD;

Upvotes: 1

Related Questions