Amounts & precision
Keep minor-unit money, fixed-point FX rates and instrument-scaled quantities exact.
Currency minor units
Money uses integer minor units or exact integer strings, as defined by the interface. NGN and USD have two decimal places: 100000 minor units is 1,000.00. Read currency exponents instead of assuming every currency has that convention. Avoid floating-point arithmetic and unsafe JavaScript integers.
Quote economics
FIXED_SOURCE fixes total source debit including fees. FIXED_DESTINATION fixes destination proceeds. Read source principal, fee, total debit, total-cost currency, rate direction and scale together. Do not add a fee twice to an all-in amount. Preserve the returned rate_scale when interpreting fixed-point rates.
Exchange scales
Read price_scale, quantity_scale, tick, step and minimums from market capabilities. Order prices and quantities are base-10 integer strings in the instrument scale. Fee amounts retain their own currency and minor-unit scale. Check tick and step divisibility before preparing an order.