Sample of using currency exchange rate web service, see more explanations on Developpers page, source code in PHP is available here

Click here to see our price or to subscribe

If you want to interact with .Net (C#), there are some incompatibilities with ListCurrencies function returning array, please use sample on https://fxtop.com/dev/clientwsdl.php
DescCurrency("EN", "JPY"); echo "Label of country for currency JPY is ".$mylist->CountryDescription .", currency label is ". $mylist->CurrencyLabel."

"; $mylist=$leservice->DescCurrency("FR", "FRF"); echo "French label of country using FRF is \"".$mylist->CountryDescription ."\", currency name is \"". $mylist->CurrencyLabel."\"

"; $mylist=$leservice->DescCurrency("DE", "ATS"); echo "Im Deutsch, Währung ATS ist ".$mylist->CountryDescription ."

"; $mylist=$leservice->DescCurrency("PT", "FRF"); echo "FRF currency in portuguese is ".$mylist->CountryDescription ."

"; $mylist=$leservice->DescCurrency("JP", "GBP"); echo "Label for GBP in japanese is \"".$mylist->CountryDescription ."\"

"; $mylist=$leservice->Convert("123.45", "EUR", "USD", "15/12/2011", "",""); echo "Converting 123.45 EUR in USD on 15/12/2011 - ResultAmount=".$mylist->ResultAmount .", DD=". $mylist->DD .", MM=". $mylist->MM .", YYYY=". $mylist->YYYY .", C1=". $mylist->C1 .", C2=". $mylist->C2 .", OriginalAmount=". $mylist->OriginalAmount .", ExchangeRate=". $mylist->ExchangeRate .", Comment=". $mylist->Comment ."

"; $mylist=$leservice->Convert("123.45", "EUR", "GBP", "", "",""); echo "Converting 123.45 EUR in GBP on today's date no password provided (should use year 1999 because no credentials) - ResultAmount=".$mylist->ResultAmount .", DD=". $mylist->DD .", MM=". $mylist->MM .", YYYY=". $mylist->YYYY .", C1=". $mylist->C1 .", C2=". $mylist->C2 .", OriginalAmount=". $mylist->OriginalAmount .", ExchangeRate=". $mylist->ExchangeRate .", Comment=". $mylist->Comment ."

"; $mylist=$leservice->Convert("123.45", "EUR", "GBP", "", "YOURLOGIN", "ASK FOR YOUR PASSWORD AT WEBMASTER@FXTOP.COM"); echo "Converting 123.45 EUR in GBP on today's date with login/password provided - ResultAmount=".$mylist->ResultAmount .", DD=". $mylist->DD .", MM=". $mylist->MM .", YYYY=". $mylist->YYYY .", C1=". $mylist->C1 .", C2=". $mylist->C2 .", OriginalAmount=". $mylist->OriginalAmount .", ExchangeRate=". $mylist->ExchangeRate .", Comment=". $mylist->Comment ."

"; $mylist=$leservice->Convert("123.45", "USD", "GBP", "15/12/1953", "YOURLOGIN", "ASK FOR YOUR PASSWORD AT WEBMASTER@FXTOP.COM"); echo "Converting 123.45 USD in GBP on 15/12/1953 with login/password provided - ResultAmount=".$mylist->ResultAmount .", DD=". $mylist->DD .", MM=". $mylist->MM .", YYYY=". $mylist->YYYY .", C1=". $mylist->C1 .", C2=". $mylist->C2 .", OriginalAmount=". $mylist->OriginalAmount .", ExchangeRate=". $mylist->ExchangeRate .", Comment=". $mylist->Comment ."

"; echo "calling ListCurrencies()
"; $mylist=$leservice->ListCurrencies("",""); var_dump($mylist); //echo "calling to ListCurrencies() returned : $mylist->IsocodeList
"; $lArray=explode("/",$mylist); print "Retrieve individual data in German for first 5 rows :

"; $li=1; foreach($lArray as $lCurrency) { $v=$leservice->DescCurrency("DE", $lCurrency); print ""; $li=$li+1; if ($li>5) { break; } } print "
NumberIsocodeCountryLabelNb DecMode C
" . ($li) . "" . $v->Isocode . "" . $v->CountryDescription . "" . $v->CurrencyLabel . "" . $v->NbDec . "" . $v->ModeC . "
"; echo "

calling TabCurrencies(\"FR\",\"\",\"\") which is much quicker :
"; $mylist=$leservice->TabCurrencies("FR", "", ""); print "

"; $array=$mylist->CurrencyDescription; foreach($array as $k=>$v) { print ""; } print "
NumberIsocodeCountryLabelNb DecMode C
" . ($k+1) . "" . $v->Isocode . "" . $v->CountryDescription . "" . $v->CurrencyLabel . "" . $v->NbDec . "" . $v->ModeC . "

"; echo "

calling HistoricalRates(\"EUR\", \"USD\", \"01/07/1999\", \"31/07/1999\", \"\",\"\") to retrieve EUR/USD historical rates in July 1999 :
"; $mylist=$leservice->HistoricalRates("EUR", "USD", "01/07/1999", "31/07/1999", "",""); print "

"; $array=$mylist->HistoricalRates; foreach($array as $k=>$v) { print ""; } print "
NumberDateExchange Rates
" . ($k+1) . "" . $v->DD . "/" . $v->MM . "/" . $v->YYYY ."" . $v->ExchangeRate . "

"; ?>