Skip to main content

Overview

Roxom APIs use standardized decimal formatting to ensure precision and consistency across all financial data. Understanding these formats is crucial for accurate calculations and data interpretation.

Precision Standards

All monetary and price values in Roxom APIs follow these precision standards:

String Representation

All numerical values are returned as strings to prevent precision loss during JSON parsing.

Example Response

Parsing Guidelines

JavaScript/TypeScript

Python

Java

Currency Pairs and Precision

Different trading pairs may have specific precision requirements:

Major Pairs (8 decimal places)

Minor Pairs (6 decimal places)

Formatting for Display

When displaying values to users, consider appropriate rounding:

Validation

Always validate decimal inputs before sending to the API:

Common Pitfalls

Never use native floating-point arithmetic for financial calculations:
Configure JSON parsers to preserve numerical precision:
Use appropriate decimal/numeric types in databases:

Next Steps

Market Data

Learn how decimal formatting applies to market data endpoints
Last modified on May 14, 2026