Foreign Exchange Rates - conversionRate differs

Solved! Go to solution
zhadrian
Regular Visitor

Foreign Exchange Rates - conversionRate differs

Hi,

i have application integrated with Foreign Exchange Rates API v1 already on production.

All examples and rates are for 3.04.2025 9:45.

When i send a request to get conversion rate as following:

{
"destinationCurrencyCode": "985",
"sourceCurrencyCode": "978",
"sourceAmount": "1000000"
}

so to get conversion for EUR -> PLN i got following response: 

{
"conversionRate": "4.1567",
"destinationAmount": "4156673.33",
"currencyNumCode": "978"
}

Conversion rate for PLN to EUR is 4.1567 (value is rounded to 4 digits by application).

But when i do the same conversion here: Kalkulator walutowy | Visa i got conversion rate 1 EUR = 4.199358 PLN which differs a lot from what i get from API.

ECB conversion rate is EUR 1 = PLN 4.1775 (took from here: Polish zloty (PLN))

I see that using online calculator there is 0.53% markup used on value returned from ECB but event when i add 0.53% markup to the value returned by API it is still way off the value from online calculator.

I think i'm missing something which is not mentioned in documentation (some additional request parameter or calculation need to be done after?) or there is something wrong with configuration/API.

 

 

 

2 REPLIES 2
jenn_kh
Community Moderator

Re: Foreign Exchange Rates - conversionRate differs

Hi @zhadrian, Thank you for reaching out. An agent will get back to you as soon as possible. Until then, if any community member knows a solution, feel free to reply in this thread.

zhadrian
Regular Visitor

Re: Foreign Exchange Rates - conversionRate differs

Okay i'll answer this question myself since i found what was the issue.

The main culprit is that the conversion rate differs depends on exchange direction (sell/buy). The API returns value for asked direction only where online calculator shows both values where the second one was that i needed.

So according to my example i had to ask the API for PLN -> EUR, than i got following response: 0.23813. Now i had to get the opposite value by dividing 1 by 0.23813 which gives me 4.19936. That the only way to get this value using API.