# Fx Rates Live (`worthwhile_loblolly/fx-rates-live`) Actor

- **URL**: https://apify.com/worthwhile_loblolly/fx-rates-live.md
- **Developed by:** [rx d](https://apify.com/worthwhile_loblolly) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.18 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## FX Rates Live — Multi-Currency Quote Table

Fetch **near-real-time and historical FX reference rates** for multiple currency pairs from the public [Frankfurter API](https://frankfurter.dev) (European Central Bank and other official / central-bank sources) into a clean Apify dataset.

This Actor calls `https://api.frankfurter.dev` only. It does **not** scrape bank websites, bypass rate limits, or access private data. **No API key required.**

> **Important:** Rates are **official / mid-market reference rates** (typically updated once per business day). They are **not** live trading ticks and are **not** financial advice.

### Features

- Configurable **base currency** (ISO 4217)
- Multiple **quote currencies** (or all available quotes)
- Latest snapshot, single historical **date**, or **date-range** time series
- Optional **provider filter** (e.g. `ecb` for European Central Bank only)
- Optional **amount → converted_amount** helper
- Optional **inverse rate** rows (swapped pairs)
- Flat, analysis-ready dataset + `OUTPUT_SUMMARY` in the key-value store

### Input

| Field | Type | Description |
| --- | --- | --- |
| `base` | string | Base currency, e.g. `USD`, `EUR`, `CNY` (required) |
| `quotes` | string\[] | Target currencies; empty = all available for the base |
| `amount` | number | Multiply rate → `converted_amount` (default `1`) |
| `date` | string | Single day `YYYY-MM-DD` (empty = latest) |
| `dateFrom` / `dateTo` | string | Historical series bounds (`YYYY-MM-DD`) |
| `provider` | string | \`\` (blended), `ecb`, `fred`, `boe`, `boj`, `cfets`, `bis` |
| `includeInverse` | boolean | Also push quote→base rows |
| `maxItems` | integer | Safety cap (1–100000, default 5000) |

#### Example input — latest multi-pair table

```json
{
  "base": "USD",
  "quotes": ["EUR", "GBP", "CNY", "JPY", "HKD", "AUD", "CAD", "CHF"],
  "amount": 1,
  "includeInverse": false,
  "maxItems": 500
}
```

#### Example input — ECB EUR series

```json
{
  "base": "EUR",
  "quotes": ["USD", "CNY", "GBP"],
  "provider": "ecb",
  "dateFrom": "2026-09-01",
  "dateTo": "2026-10-09",
  "maxItems": 5000
}
```

### Output

Each dataset item is one rate quote:

`date`, `base`, `quote`, `pair`, `rate`, `inverse_rate`, `amount`, `converted_amount`, `provider`, `is_inverse`, `fetched_at`, `source`, `source_url`.

A run summary is stored as key-value record `OUTPUT_SUMMARY`.

### Use cases

- E-commerce / SaaS multi-currency price tables
- Accounting, tax, and ERP reference-rate snapshots
- Dashboards and scheduled FX monitoring
- Downstream enrichment for AI / RAG / spreadsheet pipelines

### Compliance & attribution

- Data source: [Frankfurter](https://frankfurter.dev) aggregating public central-bank / official reference rates (including ECB)
- [License & provider terms](https://frankfurter.dev/license/) · [API docs](https://www.frankfurter.app/docs/)
- Software: MIT (Frankfurter). Rates belong to their respective providers; their terms apply.
- For tax, accounting, or legal work, verify figures against the provider’s own publication.
- This Actor retries politely on HTTP 429/5xx.

### Pricing (suggested)

Recommended monetization: **Pay-per-event (PPE)** — rental is sunset for new Actors.

Suggested events:

| Event | Suggested FREE-tier price | Notes |
| --- | --- | --- |
| `apify-actor-start` | `$0.00005` (platform default) | Covers first seconds of compute |
| `apify-default-dataset-item` | **`$0.0004` – `$0.0006`** per result | ~`$0.40`–`$0.60` per 1,000 rate rows |

Offer ~10% off Silver and ~20% off Gold vs FREE. Start near **`$0.0005` / result**; adjust after real usage. Rows are tiny and time-series runs can be large — keep PPE modest.

### Changelog

#### 1.0.0

- Initial release: Frankfurter v2 latest / historical / provider-filtered FX quote table

# Actor input Schema

## `base` (type: `string`):

ISO 4217 base currency code (e.g. USD, EUR, CNY). Rates are quoted as: 1 base = rate quote.

## `quotes` (type: `array`):

Target ISO 4217 currency codes. Leave empty to return all available quotes for the base.

## `amount` (type: `number`):

Multiply each rate by this amount and store converted_amount (1 base → X quote by default). Minimum 0.

## `date` (type: `string`):

Fetch rates for one calendar date. Leave empty for the latest available reference rates. Ignored if dateFrom is set.

## `dateFrom` (type: `string`):

Start of a historical time series (inclusive). Pair with dateTo. Leave empty for a single snapshot (latest or date).

## `dateTo` (type: `string`):

End of a historical time series (inclusive). Defaults to latest available when dateFrom is set and dateTo is empty.

## `provider` (type: `string`):

Optional data provider key. Empty = blended rates across providers. Use ecb for European Central Bank official reference rates only. Keys match Frankfurter /v2/providers.

## `includeInverse` (type: `boolean`):

If true, also push a swapped row (quote→base) with inverse_rate for each pair.

## `maxItems` (type: `integer`):

Safety cap on dataset rows pushed (1–100000). Useful for long time series × many quotes.

## Actor input object example

```json
{
  "base": "USD",
  "quotes": [
    "EUR",
    "GBP",
    "CNY",
    "JPY",
    "HKD",
    "AUD",
    "CAD",
    "CHF"
  ],
  "amount": 1,
  "provider": "",
  "includeInverse": false,
  "maxItems": 500
}
```

# Actor output Schema

## `rates` (type: `string`):

Dataset of base/quote rates with date, rate, inverse_rate, and converted_amount.

## `summary` (type: `string`):

Key-value record OUTPUT_SUMMARY with counts, base, quotes, and source attribution.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "base": "USD",
    "quotes": [
        "EUR",
        "GBP",
        "CNY",
        "JPY",
        "HKD",
        "AUD",
        "CAD",
        "CHF"
    ],
    "amount": 1,
    "date": "",
    "maxItems": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("worthwhile_loblolly/fx-rates-live").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "base": "USD",
    "quotes": [
        "EUR",
        "GBP",
        "CNY",
        "JPY",
        "HKD",
        "AUD",
        "CAD",
        "CHF",
    ],
    "amount": 1,
    "date": "",
    "maxItems": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("worthwhile_loblolly/fx-rates-live").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "base": "USD",
  "quotes": [
    "EUR",
    "GBP",
    "CNY",
    "JPY",
    "HKD",
    "AUD",
    "CAD",
    "CHF"
  ],
  "amount": 1,
  "date": "",
  "maxItems": 500
}' |
apify call worthwhile_loblolly/fx-rates-live --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,worthwhile_loblolly/fx-rates-live"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/JEhrsf0eRboxsfUBb/builds/eNbIrpHyzrl1xEoQr/openapi.json
