<!-- Agent Datasets docs · Foreign Exchange REST endpoints · canonical: https://www.agentdatasets.com/docs/rest/fx · rendered from https://www.agentdatasets.com -->

# Foreign Exchange REST endpoints

Daily ECB euro reference rates and EUR-triangulated conversions.

2 endpoints. Paths are relative to `https://api.agentdatasets.com`. Every endpoint mirrors an MCP tool over the same service layer — https://www.agentdatasets.com/docs/tools.md documents the same operations for MCP clients.

## GET /v1/fx/convert

Conversion

Informational ECB conversion, not a transaction or execution price.

### Parameters

| Parameter | In | Type | Required | Default | Constraints | Description |
| --- | --- | --- | --- | --- | --- | --- |
| amount | query | `number \| string` | yes | — | — | Exact decimal amount to convert |
| from_currency | query | `string` | yes | — | — | ISO 4217 source currency |
| to_currency | query | `string` | yes | — | — | ISO 4217 destination currency |
| date | query | `string (date) \| null` | no | — | — | Requested fixing date; weekends/holidays resolve to the prior fixing |

### Example request

Required parameters only, with values taken from the schema.

```bash
curl --fail --silent --show-error \
  --header "X-API-KEY: adk_..." \
  "https://api.agentdatasets.com/v1/fx/convert?amount=1&from_currency=FROM_CURRENCY&to_currency=TO_CURRENCY"
```

### Response

`200` Successful Response — `FxConversionResult`.

- `data` `FxConversionData` (required)
  - `amount` `string` (required)
  - `from_currency` `string` (required)
  - `to_currency` `string` (required)
  - `requested_date` `string (date) | null` (required)
  - `rate_date` `string (date)` (required)
  - `rate` `string` (required)
  - `converted` `string` (required)
  - `derived` `boolean` (required)
  - `unit` `string` (required)
  - `currency` `string` (required)
  - `as_of` `string (date-time)` (required)
- `meta` `FxMeta` (required)
  - `source` `string` (required)
  - `as_of` `string (date-time) | string (date) | null`
  - `attribution` `string` (required)
  - `derived_method` `string | null` (required)
- `pagination` `Pagination | null`
  - `limit` `integer` (required)
  - `has_more` `boolean` (required)
  - `next_cursor` `string | null`

Fields are shown to 3 levels; the full schema is in https://www.agentdatasets.com/docs/machine/openapi.json

## GET /v1/fx/rates

Rates

ECB informational reference rates; not transaction or execution prices.

### Parameters

| Parameter | In | Type | Required | Default | Constraints | Description |
| --- | --- | --- | --- | --- | --- | --- |
| quote | query | `string` | yes | — | — | ISO 4217 quote currency, e.g. USD |
| base | query | `string` | no | "EUR" | — | ISO 4217 base currency, default EUR |
| start | query | `string (date) \| null` | no | — | — | Inclusive first fixing date |
| end | query | `string (date) \| null` | no | — | — | Inclusive last fixing date |
| limit | query | `integer` | no | 100 | min 1, max 500 | Rates to return, newest first |
| cursor | query | `string \| null` | no | — | — | Opaque next_cursor from the previous response |

### Example request

Required parameters only, with values taken from the schema.

```bash
curl --fail --silent --show-error \
  --header "X-API-KEY: adk_..." \
  "https://api.agentdatasets.com/v1/fx/rates?quote=QUOTE"
```

### Response

`200` Successful Response — `FxRatesResult`.

- `data` `FxRatesData` (required)
  - `base` `string` (required)
  - `quote` `string` (required)
  - `unit` `string` (required)
  - `currency` `string` (required)
  - `rates` `array<FxRate>` (required)
    - `date` `string (date)` (required)
    - `value` `string` (required)
    - `as_of` `string (date-time)` (required)
    - `derived` `boolean` (required)
- `meta` `FxMeta` (required)
  - `source` `string` (required)
  - `as_of` `string (date-time) | string (date) | null`
  - `attribution` `string` (required)
  - `derived_method` `string | null` (required)
- `pagination` `Pagination | null`
  - `limit` `integer` (required)
  - `has_more` `boolean` (required)
  - `next_cursor` `string | null`

Fields are shown to 3 levels; the full schema is in https://www.agentdatasets.com/docs/machine/openapi.json
