# Exchange Rates

> **You are on:** `https://beta-api.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API |
> |---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com |
> | Beta | beta.paywithlocus.com | beta-api.paywithlocus.com |
> | Stage | stage.paywithlocus.com | stage-api.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Live, historical, and conversion exchange rates for 150+ currencies.

**Category:** Finance | **Website:** [www.abstractapi.com/api/exchange-rate-api](https://www.abstractapi.com/api/exchange-rate-api) | **Docs:** [docs.abstractapi.com/exchange-rates](https://docs.abstractapi.com/exchange-rates)

## Access Methods

| Method | Base URL | Auth |
|--------|----------|------|
| **MPP (Tempo)** | `https://abstract-exchange-rates.mpp.paywithlocus.com/abstract-exchange-rates/` | HTTP 402 auto-payment |
| **Wrapped API** | `https://beta-api.paywithlocus.com/api/wrapped/abstract-exchange-rates/` | `Authorization: Bearer <LOCUS_API_KEY>` |

**OpenAPI discovery:** `GET https://abstract-exchange-rates.mpp.paywithlocus.com/openapi.json`

## Endpoints

### Live Rates

Get current exchange rates for a base currency.

**Estimated cost:** $0.006

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `base` | string | Yes | Base currency code (e.g. USD) |
| `target` | string | No | Target currency code |

```bash
curl -X POST https://abstract-exchange-rates.mpp.paywithlocus.com/abstract-exchange-rates/live \
  -H "Content-Type: application/json" \
  -d '{"base":"<string>","target":"<string>"}'
```

### Convert

Convert an amount between two currencies.

**Estimated cost:** $0.006

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `base` | string | Yes | Source currency code |
| `target` | string | Yes | Target currency code |
| `base_amount` | number | No | Amount to convert |
| `date` | string | No | Historical date (YYYY-MM-DD) |

```bash
curl -X POST https://abstract-exchange-rates.mpp.paywithlocus.com/abstract-exchange-rates/convert \
  -H "Content-Type: application/json" \
  -d '{"base":"<string>","target":"<string>","base_amount":"<number>","date":"<string>"}'
```

### Historical Rates

Get exchange rates for a specific historical date.

**Estimated cost:** $0.006

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `base` | string | Yes | Base currency code |
| `date` | string | Yes | Date (YYYY-MM-DD) |
| `target` | string | No | Target currency code |

```bash
curl -X POST https://abstract-exchange-rates.mpp.paywithlocus.com/abstract-exchange-rates/historical \
  -H "Content-Type: application/json" \
  -d '{"base":"<string>","date":"<string>","target":"<string>"}'
```
