[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [U.S. Treasury gold reserves](https://spiral.ai/integrations/opencode/u-s-treasury-gold-reserves)

# How to Use U.S. Treasury gold reserves in opencode

Returns Treasury-owned gold holdings by facility, form, and location, with fine troy ounces and book value. Use it to compare monthly reserve balances and storage locations; book value follows a statutory valuation rather than the gold market.

|  |  |
| --- | --- |
| Model | U.S. Treasury gold reserves |
| Available through | Alexandria |
| Category | Finance |
| Price | $0.001746 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with U.S. Treasury gold reserves in opencode

- Use U.S. Treasury gold reserves to add a table to this project's dashboard comparing Fort Knox, Denver, and West Point for the latest reporting date, with ounces and book value.
- Use U.S. Treasury gold reserves to create a chart in this project of Fort Knox's monthly reported ounces from January 2023 through December 2025.
- Use U.S. Treasury gold reserves to add a working-stock history chart for the U.S. Mint from January 2024 through December 2025, highlighting changes between months.
- Use U.S. Treasury gold reserves to build a CSV export in this project containing every reported facility, form, location, ounce balance, and book value for September 30, 2025.
- Use U.S. Treasury gold reserves to reconcile the September 2025 reserve table in this repository against Treasury's reported balances and write a discrepancy report.

## How to set up U.S. Treasury gold reserves in opencode

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run U.S. Treasury gold reserves**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "treasury-fiscal-data/reserves/gold",
    "input": {
      "sort": "<sort>"
    }
  }'
```

Then paste one of the prompts above: opencode finds U.S. Treasury gold reserves on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## U.S. Treasury gold reserves tools and prices

- [Treasury Fiscal Data · Gold reserve](https://spiral.ai/tools/alexandria/treasury-fiscal-data/reserves/gold) (Alexandria): $0.001746 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| sort |  | — | Sort column, prefixed with `-` for descending: `-record_date` puts the latest first. Comma-separated for several. Unsorted results come back oldest first. |
| fields |  | — | Columns to return, comma-separated, in place of all of them. Rows come back distinct over the chosen columns, so `fields=security_type` on auction results answers three rows, not eleven thousand; keep every column that identifies a row in the list before counting or summing (for buybacks, `operation_date` and `operation_start_time_est`, plus `cusip_nbr` on securities). A column not in the declared list answers HTTP 400 naming it. |
| filter |  | — | Filter, as `column:operator:value`, several joined by commas: `record_date:gte:2026-01-01`, `security_type:eq:Bill,auction_date:gte:2026-08-01`. Operators: eq, lt, lte, gt, gte, and in with a parenthesised list `security_type:in:(Bill,Note)`. An unknown column answers HTTP 400. |
| page[size] | … to 10000 | 100 | Rows per page, 1 to 10,000. The default of 100 is fine for a summary series and far too small for a full auction history. |
| page[number] |  | 1 | Page number, 1-indexed. `meta.total-pages` in the response says how many there are. |

## What can you do with U.S. Treasury gold reserves in opencode?

Build a reserve dashboard that compares Treasury-owned gold by location and reporting month. A coding agent can add charts for ounces and book value, with numeric conversion before calculations.

### Compare reserve locations

Build a table of reported ounces at Fort Knox, Denver, and West Point for the same reporting date, then calculate each location's share of the selected holdings.

### Check a claim about reserve changes

Compare reported ounces before and after a claimed change in U.S. gold holdings. Show the dates and locations that account for any difference.

### Prepare a monthly reserve briefing

Summarize the latest holdings by facility and form, with changes from the previous reporting month and a separate explanation of book value.

### Track working stock

Chart the U.S. Mint's reported working-stock ounces over a selected period and identify months when the balance changed.

### Explain gold custody

Separate reported Treasury-owned gold held at Mint facilities from holdings at Federal Reserve locations for a public-finance explainer.

### Reconcile a reserve table

Compare a published report's location balances and book values with Treasury's figures for the matching reporting date, listing discrepancies by row.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## U.S. Treasury gold reserves in other agents

- [Amp](https://spiral.ai/integrations/amp/u-s-treasury-gold-reserves)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/u-s-treasury-gold-reserves)
- [Claude](https://spiral.ai/integrations/claude-desktop/u-s-treasury-gold-reserves)
- [Claude Code](https://spiral.ai/integrations/claude-code/u-s-treasury-gold-reserves)
- [Cline](https://spiral.ai/integrations/cline/u-s-treasury-gold-reserves)
- [Codex](https://spiral.ai/integrations/codex/u-s-treasury-gold-reserves)
- [Cursor](https://spiral.ai/integrations/cursor/u-s-treasury-gold-reserves)
- [Devin](https://spiral.ai/integrations/devin/u-s-treasury-gold-reserves)
- [dots](https://spiral.ai/integrations/dots/u-s-treasury-gold-reserves)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/u-s-treasury-gold-reserves)
- [Gemini](https://spiral.ai/integrations/gemini/u-s-treasury-gold-reserves)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/u-s-treasury-gold-reserves)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/u-s-treasury-gold-reserves)
- [goose](https://spiral.ai/integrations/goose/u-s-treasury-gold-reserves)
- [Grok](https://spiral.ai/integrations/grok/u-s-treasury-gold-reserves)
- [Grok Build](https://spiral.ai/integrations/grok-build/u-s-treasury-gold-reserves)
- [Hermes](https://spiral.ai/integrations/hermes/u-s-treasury-gold-reserves)
- [Instinct](https://spiral.ai/integrations/instinct/u-s-treasury-gold-reserves)
- [Manus](https://spiral.ai/integrations/manus/u-s-treasury-gold-reserves)
- [Muse](https://spiral.ai/integrations/muse/u-s-treasury-gold-reserves)
- [Muse Code](https://spiral.ai/integrations/muse-code/u-s-treasury-gold-reserves)
- [n8n](https://spiral.ai/integrations/n8n/u-s-treasury-gold-reserves)
- [Notion](https://spiral.ai/integrations/notion/u-s-treasury-gold-reserves)
- [OpenClaw](https://spiral.ai/integrations/openclaw/u-s-treasury-gold-reserves)
- [Perplexity](https://spiral.ai/integrations/perplexity/u-s-treasury-gold-reserves)
- [Raycast](https://spiral.ai/integrations/raycast/u-s-treasury-gold-reserves)
- [VS Code](https://spiral.ai/integrations/vscode/u-s-treasury-gold-reserves)
- [Windsurf](https://spiral.ai/integrations/windsurf/u-s-treasury-gold-reserves)
- [Zapier](https://spiral.ai/integrations/zapier/u-s-treasury-gold-reserves)

## More opencode guides

- [U.S. Treasury debt to the penny](https://spiral.ai/integrations/opencode/u-s-treasury-debt-to-the-penny)
- [U.S. Treasury historical debt outstanding](https://spiral.ai/integrations/opencode/u-s-treasury-historical-debt-outstanding)
- [U.S. Treasury debt issues and redemptions](https://spiral.ai/integrations/opencode/u-s-treasury-debt-issues-and-redemptions)
- [U.S. Treasury interest expense](https://spiral.ai/integrations/opencode/u-s-treasury-interest-expense)
- [U.S. Treasury daily deposits and withdrawals](https://spiral.ai/integrations/opencode/u-s-treasury-daily-deposits-and-withdrawals)
- [U.S. Treasury upcoming auctions](https://spiral.ai/integrations/opencode/u-s-treasury-upcoming-auctions)

## Questions about U.S. Treasury gold reserves in opencode

**Can opencode use U.S. Treasury gold reserves?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run U.S. Treasury gold reserves like any built-in tool.

**How much does U.S. Treasury gold reserves cost in opencode?**

$0.001746 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an Alexandria account to use U.S. Treasury gold reserves in opencode?**

No. Spiral runs U.S. Treasury gold reserves on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up U.S. Treasury gold reserves in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while U.S. Treasury gold reserves runs?**

U.S. Treasury gold reserves runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**Does this cover only gold at Fort Knox?**

No. Treasury-owned gold includes holdings at locations run by the U.S. Mint and Federal Reserve, so Fort Knox alone does not represent the full reserve.

**How fresh are the reserve figures?**

Treasury releases the dataset monthly. As checked on November 20, 2026, the latest reporting date was October 31, 2026, with an update published November 3.

**Does book value tell me what the gold is worth today?**

Book value follows a statutory valuation that does not fluctuate with the gold market. It therefore cannot serve as a current market valuation.

**What is the difference between deep storage and working stock?**

Deep storage consists primarily of gold bars secured in sealed vaults. Working stock is gold available to the U.S. Mint for coin production.

**Does a monthly balance mean the vault was inspected that month?**

The monthly reporting schedule is separate from the inspection schedule. Treasury describes deep-storage vaults as examined annually by its Office of the Inspector General.

