It is really not personal finance question but I haven't found a more appropriate place for it. My question is about currency conversion. Let's imagine I have two prices for one item:

  1. Russian shop: 1000 roubles (Russian currency)
  2. American shop: 30 dollars

Now the visitor from some country comes to my site and I need to display him both prices in his currency (for example, let's imagine the user is from China and I need to convert prices to yuan currency).

How should I do it? Should I know the rates of China central bank? Or may I take the rates at central bank of any country? Does China central bank rate yuan/dollar is equal to the USA central bank dollar/yuan rate?


3 Answers 3


Central banks don't generally post exchange rates with other currencies, as they are not determined by central banks but by the currency markets. You need a source for live exchange rate data (for example www.xe.com), and you need to calculate the prices in other currencies dynamically as they are displayed -- they will be changing continually, from minute to minute.


For manual conversion you can use many sites, starting from google (type 30 USD in yuan) to sites like xe.com mentioned here. For programmatic conversion, you could use Google Calculator API or many other currency exchange APIs that are available.

Beware however that if you do it on the real site, the exchange rate is different from actual rates used by banks and payment processing companies - while they use market-based rates, they usually charge some premium on currency conversion, meaning that if you have something for 30 dollars, according to current rate it may bet 198 yuan, but if he uses a credit card for purchase, it may cost him, for example, 204 yuan. You should be very careful about making difference between snapshot market rates and actual rates used in specific transaction.


You probably can get away with only updating the exchange rates once a day and specify that any prices quoted in units other than your home currency are estimates only.

If you're planning to accept more than one currency as payment, I'd (a) see about whatever regulations there are for doing so, and (b) build in a nice spread for yourself if you're allowed to, since it is a service you're providing to your customers.

If you Google currency converter the first result is just that: a currency converter.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .