# Forex — Wrapped API

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

> Access real-time forex prices and currency exchange rates, track client sentiment and pivot points, and browse economic calendar events. Search across multiple currency instruments and retrieve rollover rates.

**Category:** Finance & Markets | **Website:** [forex.com/](https://forex.com/) | **Docs:** [parse.bot/marketplace/a762f5d0-14ee-4d0a-9461-0a0ff17b4119/forex-com-api](https://parse.bot/marketplace/a762f5d0-14ee-4d0a-9461-0a0ff17b4119/forex-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/forex/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get client sentiment

Retrieve real-time client sentiment data showing bullish/bearish percentages and volume percentages for major forex pairs on FOREX.com US.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/forex/get-client-sentiment \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get currency pair price

Fetch the current indicative price for a specific forex currency pair. Returns bid, offer, spread, and direction. Pair is normalized to space-separated format internally (e.g. 'EUR USD' or 'EUR/USD' both work).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `pair` | string | No | Currency pair separated by space or slash (e.g. 'EUR USD', 'GBP/USD', 'USD JPY'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/forex/get-currency-pair-price \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"pair":"<string>"}'
```

### Get economic calendar

Retrieve upcoming economic events from the economic calendar including time, country, event name, volatility level, and actual/consensus/previous values. Returns events for the current trading day.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/forex/get-economic-calendar \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get pivot points

Fetch daily, weekly, and monthly pivot point data (S1-S3, R1-R3) for a specific currency pair using classic pivot point formulas. Returns current bid/offer alongside computed support and resistance levels for each time period.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `pair` | string | No | Currency pair separated by space or slash (e.g. 'EUR USD', 'GBP/USD'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/forex/get-pivot-points \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"pair":"<string>"}'
```

### Get popular currency pairs

Retrieve a list of 10 popular/major currency pairs with their current prices, direction, and spread. No parameters needed. Covers EUR/USD, GBP/USD, USD/JPY, AUD/USD, USD/CAD, USD/CHF, NZD/USD, EUR/GBP, EUR/JPY, GBP/JPY.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/forex/get-popular-currency-pairs \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get rollover rates

Fetch overnight rollover/swap rates for major forex instruments. Returns bid and offer rates for each pair.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/forex/get-rollover-rates \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Search instruments

Search for tradeable forex instruments by currency code or keyword. The search index covers forex pairs available on FOREX.com US. Returns matching instruments with title, description, URL, and type metadata.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword, typically a currency code (e.g. 'EUR', 'USD', 'GBP', 'JPY', 'AUD', 'CAD', 'CHF', 'NZD'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/forex/search-instruments \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.