---
title: "Convert currencies with official reference rates"
method: GET
path: "/v1/fx"
---

# Convert currencies with official reference rates

`GET /v1/fx`

## Request

- Base URL: `https://statcite.com`
- URL: `https://statcite.com/v1/fx`
- Auth: none declared

ECB daily reference rates (~30 majors, since 1999) or World Bank official annual-average rates (~90 more currencies) via a USD bridge. The response states precision (daily | annual_average | mixed) and the exact method.

## Query parameters

- `amount` number, required
- `from` string, required
- `to` string, required
- `date` string

## Response `200`

Conversion with citations

- object
  - `amount` number, required
  - `from` string, required
  - `to` string, required
  - `converted_amount` number, required
  - `rate` number
  - `rate_date` string: The period the rate comes from. On a USD-bridged cross rate the two legs can be dated differently, and this is the STALEST of them: a cross rate is only as current as its oldest leg.
  - `legs` object[]: Present on USD-bridged conversions: one entry per side of the bridge, with the rate used, the period it came from (null for the USD identity leg) and the publisher.
    - `currency` string
    - `usd_per_unit` number
    - `period` string, nullable
    - `source` string
  - `method` string
  - `precision` string
  - `citations` Citation[], required: An ARRAY, not the singular `citation` object other endpoints return: a bridged rate legitimately cites one source per currency leg. Identical-currency conversions return an empty array.
    - `source` string
    - `dataset` string
    - `series_id` string
    - `series_name` string
    - `source_url` string
    - `api_url` string
    - `license` string
    - `attribution` string
    - `retrieved_at` string
    - `citation_text` string
    - `notices` string[]
    - `export_formats` object: Ready-to-paste citation strings derived from this citation's own fields, so they can never disagree with citation_text.
      - `bibtex` string
      - `apa` string
  - `notes` string[]

## Other responses

- `400`: Malformed, missing, unknown or repeated query parameter. The message names the parameter and lists what the route accepts.
- `405`: Method not supported on this endpoint. The Allow header lists what is.
- `422`: The request was well formed but cannot be answered, e.g. the source does not publish this series for this economy.
- `502`: An upstream statistical source could not be read. error.code is upstream_unavailable and the failure is usually transient, so retry.

---

[API](https://skmtc.dev/statcite/apis/statcite-api.md) · [All operations](https://skmtc.dev/statcite/apis/statcite-api/llms.txt) · [OpenAPI document](https://skmtc.dev/statcite/apis/statcite-api/revisions/8993772a4e80?raw)
