To convert currency, ECB (it is a currency provider) provides the exchange rate for EUR. Namely how much “other currency” units it takes to buy 1 EUR.
When I want to convert an amount of another currency GBP to euro, I can do:
result = amount / gbp_exchange_rate_for_euro
To convert to USD, I can do:
result = ToEuro(amount) * usd_exchange_rate_for_euro
However, the exchange rates of banks usuall have some small fee hidden in the exchange rate. Am I guaranteed that if I ask my exchange provider what is the rate from GBP to USD, it will be the same as if I first convert from GBP to EUR then EUR to USD ?
Read the comments to that answer, it seems like the author is using a lot of wishful thinking. There is nothing to enforce transitivity except his amateur concern about getting rich fast: “In reality, arbitrage opportunities may exist briefly, but are eliminated very quickly by the market.”
The participants in that thread are thinking about the scenario “if I buy currency A, convert it to B then convert to A again, and it is more than what I started with => I make a profit”.
With my vast experience as a bank user (debit card owner), I am worried about the scenario “I convert A to B, then B to A, and it is less than what I started with”.
Please excuse my ignorance on this subject, but I don’t see how this question is related to the Go programming language. If you need help implementing a conversion rate calculator in Go, I think we can help, but I don’t think this is the right forum for international finance-related questions.