Spiral gives your agent every tool with one account. Browse the tools →

opencode · Finance

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.

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

Copy an example into opencode, or ask in your own words.

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.

U.S. Treasury gold reservesopencode
Try asking
  • 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.

    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.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    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.

    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.

    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.

U.S. Treasury gold reserves providers and prices

Spiral runs U.S. Treasury gold reserves through Alexandria. Open a card for today's price, with every fee included.

AlexandriaFinance
Treasury Fiscal Data · Gold reserve
treasury-fiscal-data/reserves/gold

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Page[size]a number up to 10000100

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]a number1

Page number, 1-indexed. meta.total-pages in the response says how many there are.

Every API field of Treasury Fiscal Data · Gold reserve is on its tool page: open its card above.

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.

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.

Get started

Start using U.S. Treasury gold reserves in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options