# Usagold — 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.

> Get live and historical gold and silver prices from USAGOLD, including daily, weekly, and monthly data to track price trends over time. Access current market rates or retrieve price history summaries to monitor precious metal values.

**Category:** Finance & Markets | **Website:** [usagold.com/](https://usagold.com/) | **Docs:** [parse.bot/marketplace/66765ce3-cb58-40fe-b3e9-cd1c764b4f1b/usagold-com-api](https://parse.bot/marketplace/66765ce3-cb58-40fe-b3e9-cd1c764b4f1b/usagold-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/usagold/`
**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 gold price by date

Get the closing price for a specific date and metal. Returns the price and daily change. Only trading days have data; weekends and holidays return not-found.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | Yes | Date in YYYY-MM-DD format. Must be a trading day. |
| `metal` | string | No | Metal type to query. |

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

### Get gold price history summary

Get summary price statistics showing Yesterday, Last Week, and Last Month closing prices with changes versus the prior period. Provides a quick snapshot of recent price movement.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `metal` | string | No | Metal type to query. |

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

### Get gold prices by month

Get all daily prices for a specific month, year, and metal. Returns an array of prices for each trading day in the month. Trading days only; weekends and holidays are omitted.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `metal` | string | No | Metal type to query. |
| `month` | string | Yes | Month as a number from 1 to 12. |
| `year` | string | Yes | Year in YYYY format (e.g. 2026). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/usagold/get-gold-prices-by-month \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"metal":"<string>","month":"<string>","year":"<string>"}'
```

### Get live prices

Get live gold and silver spot prices with current change amount and direction. Returns both metals in a single call. Prices update during market hours.

**Estimated cost:** Metered

_No parameters required._

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

### Get weekly gold prices

Get weekly gold or silver closing prices for a specific year. Returns one price per week, ordered most recent first. Each entry contains the week-ending date and closing price.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `metal` | string | No | Metal type to query. |
| `year` | string | No | Year in YYYY format (e.g. 2026). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/usagold/get-weekly-gold-prices \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"metal":"<string>","year":"<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.