Currency exchange rates through the web service in MATLAB

How can I get the current exchange rate for two given currencies in matlab?

I tried this one , however it seems that the web service is no longer available.

Is there another easy way to get updated exchange rates through a web service in Matlab?

+3
source share
2 answers

Create a local class from the currency conversion web service using CREATECLASSFROMWSDL . You can then use the web service operations to convert using class methods. One web-based currency conversion service (there are many) can be found at http://www.webservicex.net/CurrencyConvertor.asmx?WSDL . Here is an example of its use:

>> converter = createClassFromWsdl ('http://www.webservicex.net/CurrencyConvertor.asmx?WSDL');
Retrieving document at 'http://www.webservicex.net/CurrencyConvertor.asmx?WSDL'
>> converter = CurrencyConvertor
    endpoint: 'http://www.webservicex.net/CurrencyConvertor.asmx'
        wsdl: 'http://www.webservicex.net/CurrencyConvertor.asmx?WSDL'

>> ConversionRate (converter, 'CAD', 'EUR')

ans =

0.7059

>> ConversionRate(converter, 'USD', 'CAD')

ans =

0.953

, ConversionRate char, .. str2double, .

http://www.webservicex.net/ws/wsdetails.aspx?wsid=10.

+3

, , . MATLAB (exchangerate.m), API openexchangerates.org, , . , ( ):

, openexchangerates.org API. , . app_id - openexchangerates.org, 1000 / API. , app_id .

:

1) base: , , 1. '', "USD" . . .

2) curr: a , . "" ", . . .

3) date: , ( ). " --". , = 'latest' '', . 1999

:

1) : , (), , .

2) : .

3) rate_struct: , . .

:

1) (: m )

[rates,currencies,rates_struct] = exchangerate('USD','BTC'); 
>> rates = 1.614e-3 
>> currencies = 'BTC' 
>> rates_struct = 
       BTC: 1.614e-3

2)

[rates,currencies,rates_struct] = exchangerate();

3) , , 5 2013 .

[rates,currencies,rates_struct] = exchangerate('USD',{'BTC','INR','EUR'},'2013-06-05'); 
>> rates = [8.246e-3; 5.672e1; 7.642e-1] 
>> currencies = {'BTC';'INR';'EUR'} 
>> rates_struct = 
      BTC: 8.246e-3 
      INR: 5.672e1 
      EUR: 7.642e-1
0

All Articles