Data Formats & Units

Understanding different data formats, units, and currency conversions.

7 min read Last updated: 2025-06-13

Metal Price Units

Metal prices are provided in USD per troy ounce by default:
• XAU (Gold): USD per troy ounce
• XAG (Silver): USD per troy ounce
• XPT (Platinum): USD per troy ounce
• XPD (Palladium): USD per troy ounce

Currency Formats

All currency codes follow ISO 4217 standard:
• USD: United States Dollar
• EUR: Euro
• GBP: British Pound
• JPY: Japanese Yen
• CHF: Swiss Franc

Timestamp Formats

Timestamps are provided in Unix format:
// Convert Unix timestamp to Date
const timestamp = 1749752411;
const date = new Date(timestamp * 1000);
console.log(date.toISOString());
// Output: 2025-06-13T12:00:11.000Z

Precision and Rounding

Prices are provided with the following precision:
• Precious metals: 2 decimal places
• Currencies: 6 decimal places
• Percentages: 2 decimal places

Base Currency

Change the base currency using the base parameter:
GET /api/v1/latest?api_key=YOUR_API_KEY&base=EUR

Ready for the next step?

Continue learning with our next guide:

Next: Historical Data