Choose the representation

PostgreSQL documents numeric for values where exactness is required, including monetary amounts. A declared scale can round on assignment. An integer in minor units also works where the currency and calculation scale are explicit. Fee rates and intermediate calculations may need more precision than the amount posted to a ledger. PostgreSQL · Numeric types ↗

Make the rounding point visible

Three illustrative fees of 0.005 rounded separately to cents at half-up become 0.03 in total. Summed before rounding, they become 0.02. The difference comes from policy and aggregation, even when all arithmetic is exact. Decide whether the fee rounds per fill, per order or per settlement batch.

Preserve audit inputs

Store the original amount and currency, calculation basis, rounding rule and posted amount. Reconcile per currency before converting for management reporting. Test credits, reversals and half-unit cases, and retain the pricing or conversion timestamp where foreign exchange is involved.