Claude
Skills
Sign in
Back

pp-exchangerate-api

Included with Lifetime
$97 forever

Every ExchangeRate-API endpoint, plus a local rate history, watchlists, drift alerts, and an MCP server no one else... Trigger phrases: `convert USD to EUR`, `what's the exchange rate for`, `check my FX quota`, `sync exchange rates`, `what was USD/EUR last week`, `use exchangerate-api`, `run exchangerate-api`.

Backend & APIs

What this skill does

<!-- GENERATED FILE — DO NOT EDIT.
     This file is a verbatim mirror of library/payments/exchangerate-api/SKILL.md,
     regenerated post-merge by tools/generate-skills/. Hand-edits here are
     silently overwritten on the next regen. Edit the library/ source instead.
     See the repository agent guide, section "Generated artifacts: registry.json, cli-skills/". -->

# ExchangeRate-API — Printing Press CLI

## Prerequisites: Install the CLI

This skill drives the `exchangerate-api-pp-cli` binary. **You must verify the CLI is installed before invoking any command from this skill.** If it is missing, install it first:

1. Install via the Printing Press installer. It defaults binaries to `$HOME/.local/bin` on macOS/Linux and `%LOCALAPPDATA%\Programs\PrintingPress\bin` on Windows:
   ```bash
   npx -y @mvanhorn/printing-press-library install exchangerate-api --cli-only
   ```
2. Verify: `exchangerate-api-pp-cli --version`
3. Ensure the reported install directory is on `$PATH` for the agent/runtime that will invoke this skill.

If the `npx` install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.3 or newer):

```bash
go install github.com/mvanhorn/printing-press-library/library/payments/exchangerate-api/cmd/exchangerate-api-pp-cli@latest
```

If `--version` reports "command not found" after install, the runtime cannot see the binary directory on `$PATH`. Do not proceed with skill commands until verification succeeds.

## When to Use This CLI

Reach for exchangerate-api-pp-cli whenever an agent or script needs live FX rates, multi-target conversions, or persistent historical context. It's the right pick over a one-off HTTP call when the agent will run more than once on the same data, when quota matters (1500/mo Free tier), or when the workflow benefits from a watchlist, drift report, or cross-rate matrix that requires local state. Use the MCP server (`mcp serve`) when wiring FX context into Claude Desktop, Cursor, or Windsurf.

## When Not to Use This CLI

Do not activate this CLI for requests that require creating, updating, deleting, publishing, commenting, upvoting, inviting, ordering, sending messages, booking, purchasing, or changing remote state. This printed CLI exposes read-only commands for inspection, export, sync, and analysis.

## Unique Capabilities

These capabilities aren't available in any other tool for this API.

### Local state that compounds
- **`history-cache`** — Reconstruct historical FX rates from your prior `latest` syncs — free tier gets time travel without `/history` quota.

  _Use when the user asks for past rates and the API key is on the Free or Standard tier where `/history` returns plan-upgrade-required._

  ```bash
  exchangerate-api-pp-cli history-cache USD EUR --since 30d --json
  ```
- **`watch check`** — Define currency pairs with movement thresholds; one command reports which crossed since the last check.

  _Use as a periodic monitor (cron/agent loop) instead of polling a paid alerting service._

  ```bash
  exchangerate-api-pp-cli watch check --json
  ```
- **`drift`** — Diff the latest snapshot against any prior point and report the biggest movers as ranked output.

  _Use to surface unusual FX moves the user cares about without writing a custom analysis._

  ```bash
  exchangerate-api-pp-cli drift --base USD --since 24h --top 10 --json
  ```
- **`pair --as-of`** — Look up the rate from local snapshots at any historical timestamp — free tier time travel.

  _Use when reconstructing the rate that was live at a specific moment without needing the paid `/history` endpoint._

  ```bash
  exchangerate-api-pp-cli rates pair USD EUR --as-of 1h --json
  ```

### Quota intelligence
- **`quota burn`** — Fit a trend over `quota_snapshots` and project when your quota will exhaust before refresh day.

  _Use before deploying anything that will hammer the API — the projection tells you if you'll survive the month._

  ```bash
  exchangerate-api-pp-cli quota burn --json
  ```
- **`matrix`** — Show full cross-rate matrix for any set of currencies from a single `latest` call — N² rates, 1 quota tick.

  _Use when comparing many pairs at once; saves quota and runs offline after one sync._

  ```bash
  exchangerate-api-pp-cli matrix USD,EUR,GBP,JPY --base USD --json
  ```
- **`convert-batch`** — Pipe a list of amounts to a single command; converts all of them with one rate fetch.

  _Use when processing many amounts (orders, transactions) without burning the quota linearly._

  ```bash
  exchangerate-api-pp-cli convert-batch --from USD --to EUR --input /dev/null --json
  ```

### Onboarding
- **`plan-check`** — Probe each tier-gated endpoint with a single low-cost request; reports which tier your key supports.

  _Use right after `doctor` to know which commands will work without `plan-upgrade-required`._

  ```bash
  exchangerate-api-pp-cli plan-check --json
  ```

### Agent-native plumbing
- **`log show`** — Every `convert` call is logged; query the log by base, target, time window for recurring conversion analysis.

  _Use to remind an agent what FX work was done recently without re-querying the API._

  ```bash
  exchangerate-api-pp-cli log show --since 7d --json
  ```
- **`mcp serve`** — Every user-facing command is exposed as an MCP tool with read-only annotations on safe queries.

  _Use when wiring Claude/Cursor/Windsurf to FX context — no competing MCP for this API today._

  ```bash
  exchangerate-api-pp-cli mcp serve
  ```

## Command Reference

The API key is read from `EXCHANGERATE_API_KEY` — never pass it as a positional.

**codes** — Supported currency codes

- `exchangerate-api-pp-cli codes` — List all 161 supported currency codes

**quota** — Your API quota usage

- `exchangerate-api-pp-cli quota` — Check remaining requests in the current quota period
- `exchangerate-api-pp-cli quota burn` — Project quota exhaustion from quota_snapshots history

**rates** — Live exchange rates and conversions

- `exchangerate-api-pp-cli rates latest <base_code>` — Get all exchange rates from a base currency
- `exchangerate-api-pp-cli rates pair <base_code> <target_code>` — Get conversion rate between two currencies
- `exchangerate-api-pp-cli rates pair-amount <base_code> <target_code> <amount>` — Convert a specific amount between two currencies
- `exchangerate-api-pp-cli rates enriched <base_code> <target_code>` — Pair conversion with locale, flag, and currency display metadata (Business/Volume tier)
- `exchangerate-api-pp-cli rates history <base_code> <year> <month> <day>` — Historical exchange rates for a specific date (Pro/Business/Volume tier)


### Finding the right command

When you know what you want to do but not which command does it, ask the CLI directly:

```bash
exchangerate-api-pp-cli which "<capability in your own words>"
```

`which` resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code `0` means at least one match; exit code `2` means no confident match — fall back to `--help` or use a narrower query.

## Recipes


### One-shot conversion in a script

```bash
exchangerate-api-pp-cli convert 1000 USD EUR --json --select conversion_result
```

Returns just the converted number for downstream piping.

### Daily sync + drift report (cron)

```bash
exchangerate-api-pp-cli sync-rates --base USD && exchangerate-api-pp-cli drift --base USD --since 24h --top 10 --json
```

Captures today's rates and surfaces the largest movers vs the prior snapshot.

### Pre-deploy quota check

```bash
exchangerate-api-pp-cli quota burn --json --select projected_exhaustion,requests_remaining
```

Projects when the monthly quota will run out, given recent usage.

### Cross-rate matrix for a portfolio

```bash
exchangerate-api-pp-cli matrix USD,EUR,GBP,JPY,CHF,CAD --base USD --csv
```

Full N×N matrix from one API call; pipes cleanly into spreadsheets.

### Watch a pair and alert when it moves

```bash
exchangerate-api-pp-cli watch add USD 

Related in Backend & APIs