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

opencode · Finance

How to Use U.S. Treasury debt issues and redemptions in opencode

Returns Treasury security issues and redemptions by category, with daily and cumulative amounts. Use it to compare borrowing and repayments across bills, notes, bonds, and nonmarketable securities.

Prompts to try with U.S. Treasury debt issues and redemptions in opencode

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

Use U.S. Treasury debt issues and redemptions to build a July 2025 table comparing daily bill, note, and bond issues with redemptions.

U.S. Treasury debt issues and redemptionsopencode
Try asking
  • Use U.S. Treasury debt issues and redemptions to look this up and give me the result as a table. Save the result in ./assets.

  • Pull the latest numbers from U.S. Treasury debt issues and redemptions and tell me what changed since last week.

  • Check U.S. Treasury debt issues and redemptions and summarize what you find in three bullet points.

  • Pull the newest data from U.S. Treasury debt issues and redemptions and give me the result as a table.

How to set up U.S. Treasury debt issues and redemptions 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 debt issues and redemptions

    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/daily-statement/public-debt-transactions",
        "input": {
          "sort": "<sort>"
        }
      }'

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

U.S. Treasury debt issues and redemptions providers and prices

Spiral runs U.S. Treasury debt issues and redemptions through Alexandria. Open a card for today's price, with every fee included.

AlexandriaFinance
Treasury Fiscal Data · Public debt transactions
treasury-fiscal-data/daily-statement/public-debt-transactions

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 · Public debt transactions is on its tool page: open its card above.

What can you do with U.S. Treasury debt issues and redemptions in opencode?

Build a daily U.S. Treasury time series in your project. A coding agent can chart reported balances or transaction amounts and distinguish daily flows from cumulative totals.

Daily Treasury briefing

Prepare a dated briefing with the cash balance, major deposit and withdrawal categories, and security issues and redemptions.

Cash and borrowing comparison

Compare changes in Treasury cash with reported cash flows and debt transactions over a selected week.

Historical episode review

Examine a period such as June 2023 through separate charts of Treasury balances, cash transactions, and security issuance and redemption.

Quarterly fiscal comparison

Compare two quarters using closing cash balances, daily cash flows, and daily debt issues and redemptions. Keep cumulative transaction amounts separate from daily amounts.

Security repayment analysis

Compare bill, note, and bond issues with redemptions over a month to calculate net issuance for each category.

Questions about U.S. Treasury debt issues and redemptions in opencode

Can opencode use U.S. Treasury debt issues and redemptions?

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

How much does U.S. Treasury debt issues and redemptions 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 debt issues and redemptions in opencode?

No. Spiral runs U.S. Treasury debt issues and redemptions 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 debt issues and redemptions in opencode?

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

Does opencode wait while U.S. Treasury debt issues and redemptions runs?

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

What government activity does this source cover?

The Daily Treasury Statement covers the U.S. Treasury's cash and debt operations for the federal government. Its scope is federal cash and debt reporting.

How soon does Treasury publish each day's report?

Treasury states that the Daily Treasury Statement is available by 4:00 p.m. the following business day. The figures describe a completed reporting day.

How are weekends and federal holidays handled?

Treasury includes transactions occurring on weekends and federal holidays in the next business day's statement. A business-day observation can therefore include activity from intervening nonbusiness days.

How precise are the reported amounts?

Figures are rounded to the nearest million dollars. Treasury warns that rounded detail may not add exactly to published totals.

What accounting basis does Treasury use?

The statement uses a modified cash basis. Deposits are reported when received and withdrawals when processed.

Get started

Start using U.S. Treasury debt issues and redemptions 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