Skip to content
Back to skills

Unirate Exchange Rates

BSecurity

Get live currency exchange rates, convert amounts between currencies (fiat and crypto), list supported currency codes, and look up EU/global VAT rates using the UniRate API. Use when the user asks to convert money, quote a price in another currency, fetch an FX rate, or find a country's VAT rate.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
developmentpythonbashapi

Works with

  • cli
  • api

Security analysis

B88/100
  • criticalExfiltrates credentials via HTTP — exact pattern from Snyk ToxicSkills study

Pro shows the line behind each finding and how to fix it

Scanned December 2, 2026

npx -y skills add UniRate-API/unirate-api-python --skill unirate-exchange-rates --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Unirate Exchange Rates?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Unirate Exchange Rates
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/unirate-api-unirate-exchange-rates/badge)](https://www.skillsdirectory.com/skills/unirate-api-unirate-exchange-rates)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: unirate-exchange-rates
description: Get live currency exchange rates, convert amounts between currencies (fiat and crypto), list supported currency codes, and look up EU/global VAT rates using the UniRate API. Use when the user asks to convert money, quote a price in another currency, fetch an FX rate, or find a country's VAT rate.
license: MIT
---

# UniRate exchange rates

[UniRate API](https://unirateapi.com) is a free currency exchange-rate API
covering 170+ fiat currencies plus crypto, with VAT rates for EU and other
countries. This skill tells an agent how to call it correctly.

## Before you start

- You need an API key. Read it from the `UNIRATE_API_KEY` environment variable.
  **Never hard-code it or print it.** If it is not set, tell the user to get a
  free key at [unirateapi.com](https://unirateapi.com) and export it.
- Base URL: `https://api.unirateapi.com`
- Every request is a `GET` with `api_key=<key>` as a query parameter.
- **Always send `Accept: application/json`.** Without it some endpoints (notably
  `/api/currencies`) return an HTML 404 page instead of JSON.
- Currency codes are ISO-4217 style (`USD`, `EUR`, `JPY`, `BTC`); uppercase them.

## Free-tier endpoints

### Current rate — `/api/rates`

```bash
curl -s -H 'Accept: application/json' \
  "https://api.unirateapi.com/api/rates?from=USD&to=EUR&api_key=$UNIRATE_API_KEY"
# {"amount":1.0,"base":"USD","to":"EUR","rate":0.918,"result":0.918}
```

Omit `to` to get every rate for the base currency in a `rates` object.

### Convert an amount — `/api/convert`

```bash
curl -s -H 'Accept: application/json' \
  "https://api.unirateapi.com/api/convert?from=USD&to=EUR&amount=100&api_key=$UNIRATE_API_KEY"
# {"amount":100.0,"from":"USD","to":"EUR","result":91.82}
```

### Supported currencies — `/api/currencies`

```bash
curl -s -H 'Accept: application/json' \
  "https://api.unirateapi.com/api/currencies?api_key=$UNIRATE_API_KEY"
# {"currencies":["AED","AFN", ... ,"USD", ...]}
```

Check a code against this list before telling the user a currency is unsupported.

### VAT rates — `/api/vat/rates`

```bash
curl -s -H 'Accept: application/json' \
  "https://api.unirateapi.com/api/vat/rates?country=DE&api_key=$UNIRATE_API_KEY"
# {"country":"DE","vat_data":{"country_code":"DE","country_name":"Germany","vat_rate":19.0}}
```

`country` is an ISO-3166 alpha-2 code. Omit it to get all countries under `vat_rates`.

## Pro-only endpoints

These return **HTTP 403 on a free key**. Tell the user it needs a
[UniRate Pro plan](https://unirateapi.com/pricing) instead of retrying:

- `/api/historical/rates?date=YYYY-MM-DD&from=USD&to=EUR`: the rate on a past date
- `/api/historical/timeseries?start_date=…&end_date=…&base=USD&currencies=EUR,GBP`: daily series (max 5-year span)
- `/api/historical/limits`: earliest and latest available date per currency

## Python

The official client [`unirate-api`](https://pypi.org/project/unirate-api/)
(this repository) wraps the same endpoints:

```python
import os
from unirate import UnirateClient

client = UnirateClient(os.environ["UNIRATE_API_KEY"])
client.get_rate("USD", "EUR")          # 0.918
client.convert("EUR", 100, "USD")      # 91.82  (to, amount, from)
client.get_supported_currencies()      # ["AED", "AFN", ...]
client.get_vat_rates("DE")
```

## Errors

| Status | Meaning | What to do |
|---|---|---|
| 400 | Bad parameters (for example, a malformed date) | Fix the input |
| 401 | Missing or invalid API key | Ask the user to check `UNIRATE_API_KEY` |
| 403 | Endpoint needs a Pro plan | Explain; don't retry |
| 404 | Unknown currency or no data | Check the code against `/api/currencies` |
| 429 | Rate limited | Back off, then retry once |
| 503 | Service unavailable | Retry later |

## Tips

- Rates may come back as JSON numbers or numeric strings. Parse both to a decimal or float.
- When presenting a conversion, show the rate used and round money to the target
  currency's normal precision (2 decimals for most fiat currencies, 0 for JPY and KRW).
- Rates are live mid-market rates, not bank buy/sell quotes. Say so when it matters.
- Full reference: [UniRate API docs](https://unirateapi.com/apidocs/).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.