In a currency exchange rate what is the maximum number of decimal places used?

13,794

Solution 1

I once worked on an international financial C# based package, which had to support numerous currencies, and we supported 6 decimal places. We had a couple of very experienced designers who told us that would be sufficient.

Solution 2

Nowadays, to support the unlikely exchange rate of XBT/VND, you'll need 10 to 14 decimal places

As of 2017-11-20,

1 XBT = 185,416,429.63 VND
1 VND = 0.00000000539327 XBT
Share:
13,794
mikhail-t
Author by

mikhail-t

Updated on July 12, 2022

Comments

  • mikhail-t
    mikhail-t almost 2 years

    I need to store currency exchange rate data in the SQL 2008 database. I would like to keep rate as a decimal data type in the database.

    One thing I am not sure about, is how many decimal places to give (e.g. decimal(18, ?)).

    Since, I will be using this service as a source: http://openexchangerates.org/latest.json. There, it seems that the highest number of decimal places used is '6'.

    Is that the right number, or there possibly can be rates with more than 6 decimal places?

  • kurochenko
    kurochenko over 7 years
    Not sufficient for e.g. BitCoin anymore
  • Edgar
    Edgar over 6 years
    6 decimal places are not enough i.e. for Vietnam Dong: 1USD = 21,831.08VND, 1VND = 0.000045806254203USD