Official ratesGuide

Calculate realised foreign exchange gains and losses

Compare booking and settlement values using the same official table for both dates.

2026-10-15 · 1 min read

A realised foreign exchange gain or loss is the difference between the home-currency value at booking and at settlement. The gain-loss endpoint values both dates using the same official table for a receivable or payable.

  • A realised gain or loss compares the value at booking with the value at settlement.
  • Use the same official table to value both dates.
  • Keep the lookup ID to retrieve the answer's publication evidence.

Compare booking and settlement values

A foreign-currency receivable or payable has a home-currency value when booked and a home-currency value when settled.

The difference is a realised foreign exchange gain or loss. Identify whether the amount is a receivable or payable when requesting the calculation.

Calculate at the official rate

POST /v1/official/{country}/{type}/gain-loss calculates the realised gain or loss in the home currency. It requires Pro.

Supply currency, amount, booked_on, settled_on and kind. Set kind to receivable or payable.

The endpoint values both dates at the selected table's official rate.

Use the same table for both dates

The country and type in the endpoint select one table for the calculation. That table supplies the rate valid on the booking date and the rate valid on the settlement date.

Using the same table keeps the comparison tied to one authority's table across both dates. Mixing tables would also change the basis of the comparison.

Keep evidence for the calculation

On Pro, each answer carries an X-Lookup-Id header. Keep that identifier with the calculation.

GET /v1/official/evidence/{lookup_id} returns what was answered, when and from which publication.

For the underlying rates, a date lookup with expand=source provides the exact printed value and units, publication number, publication date, source document URL and retrieval time. Corrections create new versions, and superseded versions are kept.

Questions

Which dates does the calculation use?

It uses booked_on and settled_on. Both dates are valued at the selected table's official rate.

Does the endpoint support both receivables and payables?

Yes. Set kind to receivable or payable. The endpoint returns the realised gain or loss in the home currency.

How do I retrieve evidence for an answer?

Keep the X-Lookup-Id response header, then request GET /v1/official/evidence/{lookup_id}. Evidence and gain-loss both require Pro.

Keep reading

Get the official rate in your app

The free plan has the current official rate; paid plans add history, CSV, Excel and each value’s source document

Get a free API key