# Fictional FX rate contract

Anant Mishra · 20 November 2026. Prepared with AI assistance.

Save fixture.json and reproduce.py together, then run `python3 reproduce.py > new-record.json`. Python's standard library is sufficient. Compare results, rounding and hashes against execution-record.json. The UTC execution time and Python version describe the actual run and can differ.

The eight fixtures contain invented quotes and amounts. A quote says that base_units of base_currency correspond to quote_units of quote_currency. A direct conversion multiplies the source amount by quote_units/base_units. An inverse conversion multiplies it by base_units/quote_units. Matching currencies use the identity path. Cross-currency requests require a quote matching the exact requested date, rate type and supported pair. Unit amounts must be positive. Missing, mismatched and zero-unit cases are rejected with explicit reasons.

The local model stores exact rational results. Its illustrative rounding policy uses half-up to GBP pence, with half values rounded away from zero. The separate three-row example compares rounding rows before summing with rounding the aggregate. Signed and zero conversion amounts are exercised as boundary checks.

The source review checked Microsoft Business Central exchange-rate unit documentation, the Dynamics 365 Finance CONVERTCURRENCY context documentation and the ECB quote-convention page on 20 November 2026. The model is an authored contract and does not reproduce a complete vendor implementation. The provider values in those sources were not imported. Actual reporting needs authorized amounts, source field definitions, provider evidence and approved selection/rounding policies. Triangulation, spreads, fees, availability, journals and statutory accounting treatment are outside this fixture.
