Special Currency Codes — XAU (Gold), XDR (SDR) & More
Guide to special ISO 4217 currency codes for precious metals (XAU, XAG, XPT, XPD), IMF SDR (XDR), testing (XTS), and other non-country codes starting with X.
Detailed Explanation
Special ISO 4217 Codes (X-Series)
ISO 4217 reserves the letter X as the first character for codes that do not represent a specific country's currency. These cover precious metals, supranational units, testing codes, and other special purposes.
Precious Metals
| Code | Metal | Unit | Typical Decimals |
|---|---|---|---|
| XAU | Gold | Troy ounce | 2-6 |
| XAG | Silver | Troy ounce | 2-6 |
| XPT | Platinum | Troy ounce | 2-6 |
| XPD | Palladium | Troy ounce | 2-6 |
These codes allow precious metals to be treated as currencies in financial systems. One "unit" equals one troy ounce (approximately 31.1 grams).
XAU/USD = 2,350.45
Means: 1 troy ounce of gold costs $2,350.45
Portfolio: 10 XAU
Means: 10 troy ounces of gold
Supranational Currencies
| Code | Name | Purpose |
|---|---|---|
| XDR | Special Drawing Rights | IMF's unit of account, basket of USD, EUR, CNY, JPY, GBP |
| XBA | European Composite Unit | Bond market unit |
| XBB | European Monetary Unit | Bond market unit |
| XBC | European Unit of Account 9 | Bond market unit |
| XBD | European Unit of Account 17 | Bond market unit |
| XSU | Sucre | ALBA trade unit (Latin America) |
| XUA | ADB Unit of Account | African Development Bank |
Special Purpose Codes
| Code | Purpose |
|---|---|
| XTS | Reserved for testing — use in development/staging |
| XXX | No currency — when the transaction has no monetary aspect |
| XBA-XBD | Bond market composite units |
XDR (Special Drawing Rights)
The SDR is not a currency in the traditional sense but an international reserve asset created by the IMF. Its value is based on a basket of five currencies:
- US Dollar (USD) — ~43%
- Euro (EUR) — ~29%
- Chinese Yuan (CNY) — ~12%
- Japanese Yen (JPY) — ~8%
- British Pound (GBP) — ~8%
SDR amounts appear in IMF transactions, country reserve reporting, and some international treaties.
Using XTS for Testing
When building financial software, use XTS as the currency code in test environments:
{
"amount": 9999,
"currency": "XTS"
}
This prevents test transactions from being confused with real ones and clearly marks data as test data.
Use Case
Developers working on commodity trading platforms, central bank systems, IMF-related applications, or any financial system that deals with precious metals need to support X-series codes. Using XTS in testing environments is a best practice that prevents test data from being mistaken for real financial transactions.