ISO 4217 is an international standard describing three letter codes to define the names of currencies established by the International Organization for Standardization (ISO).
The first two letters of the code are the two letters of ISO 3166-1 alpha-2 country codes (which are similar to those used for national top-level domains on the internet) and the third is usually the initial of the currency itself. So Japan's currency code becomes JPY-JP for Japan and Y for yen. This eliminates the problem caused by the names dollar, franc and pound being used in dozens of different countries, all with wildly differing values.
The standard also defines the relationship between the major currency unit and any minor currency unit. Often, the minor currency unit has a value that is 1/100 of the major unit, but 1/10 or 1/1000 are also common. Some currencies do not have any minor currency unit at all. Mauritania does not use a decimal division of units, setting 1 ouguiya (UM) = 5 khoums, and Madagascar has 1 ariary = 5 iraimbilanja.
ISO 4217 includes codes for not only currencies, but also codes for precious metals (gold, silver, palladium and platinum; normally measured in troy ounces) and certain other entities used in international finance, e.g. Special Drawing Rights. There are also special codes allocated for testing purposes (XTS), and to indicate no currency transactions (XXX). These codes all begin with the letter "X". ISO 3166 never assigns country codes beginning with "X", so ISO 4217 can use "X" codes for non-country-specific currencies without risk of clashing with future country codes.
Supranational currencies, such as the East Caribbean dollar, the CFP franc, the CFA franc BEAC and the CFA franc BCEAO are normally also represented by codes beginning with an "X". However, the Euro is represented by the code EUR; although EU is not an ISO 3166-1 country code, it was used anyway, and in order to do so EU was added to the ISO 3166-1 reserved codes list to represent the European Union. The predecessor to the Euro, the European Currency Unit, had the code XEU.
More detail about ISO 4217 can be found on wikipedia.org
The author blog: Online Forex Resource - http://forexbroker.blogspot.com