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

Windsurf · Finance

How to Use CFTC commodity futures positions in Windsurf

Returns weekly commodity futures positions by trader category, including longs, shorts, open interest, and weekly changes. Use it to study futures positioning without the options exposure included in the combined report.

Prompts to try with CFTC commodity futures positions in Windsurf

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

Use CFTC commodity futures positions to fetch five years of COMEX gold observations and add a chart of managed-money longs, shorts, and net positions to this project's dashboard.

CFTC commodity futures positionsWindsurf
Try asking
  • Use CFTC commodity futures positions to retrieve CBOT corn observations for 2024 and 2025, then create a CSV in this project with producer and merchant positions, managed-money positions, and open interest.

  • Use CFTC commodity futures positions to retrieve two years of COMEX gold concentration measures and add a view comparing the largest four and eight traders on gross long and gross short positions.

  • Use CFTC commodity futures positions to look this up and give me the result as a table. Save the result in ./assets.

  • Pull the latest numbers from CFTC commodity futures positions and tell me what changed since last week.

How to set up CFTC commodity futures positions in Windsurf

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

Use Spiral's MCP server

  1. Add the server

    Open the Customize page from the Agents window and click MCPs. Under This computer, open the config file, or edit it directly: ~/.config/devin/mcp_config.json on macOS and Linux, %APPDATA%\devin\mcp_config.json on Windows. Add this:

    {
      "mcpServers": {
        "spiral": {
          "url": "https://api.spiral.ai/mcp"
        }
      }
    }
  2. Sign in

    Click Authenticate on the Spiral server in Customize › MCPs, or let the agent call Spiral once: your browser opens. Sign in to Spiral, pick the organization and click Authorize. No API key.

    devin mcp login spiral
  3. Check it

    Spiral is listed under This computer in Customize › MCPs. From the terminal:

    devin mcp list

Use the Spiral skill

  1. Send Windsurf 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 CFTC commodity futures positions

    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": "cftc/disaggregated/futures-only",
        "input": {
          "$limit": 1000
        }
      }'

Then paste one of the prompts above: Windsurf finds CFTC commodity futures positions on Spiral, shows the price and runs it.

CFTC commodity futures positions providers and prices

Spiral runs CFTC commodity futures positions through Alexandria. Open a card for today's price, with every fee included.

AlexandriaFinance
CFTC · Disaggregated report, futures only
cftc/disaggregated/futures-only

Settings you can ask for

Ask Windsurf for any of these in your prompt.

SettingAllowed valuesDefaultDescription
$limita number1000

Rows to return. The default is 1,000; the datasets hold hundreds of thousands, so a date or market filter is what keeps a page useful rather than this.

$offseta number

Rows to skip, for paging past $limit.

Every API field of CFTC · Disaggregated report, futures only is on its tool page: open its card above.

What can you do with CFTC commodity futures positions in Windsurf?

Build a commodity positioning dashboard with category longs, shorts, weekly changes, and open interest. A coding agent can turn CFTC observations into charts and historical research features in your project.

Write a weekly commodity positioning brief

Summarize changes in managed-money longs, shorts, and net positions for gold, silver, and copper. Include each market's open interest and identify the report basis used.

Put current positioning in historical context

Calculate where the latest managed-money net position sits within five years of observations for a selected commodity market.

Compare producers with managed money

Chart producer and merchant longs and shorts alongside managed-money positions in corn or wheat. Show how the category totals changed over the same reporting dates.

Compare positioning across commodity markets

Express managed-money net positions as a percentage of each market's open interest to compare gold, silver, and copper without ranking raw contract counts alone.

Monitor spreading positions

Track reported spreading positions for managed money, swap dealers, and other reportable traders. Compare their weekly changes with changes in outright longs and shorts.

Review concentration in a commodity market

Compare the open-interest concentration measures for the largest four and eight traders over time. Highlight weeks when concentration rises alongside a change in total open interest.

Build positioning features for research

Create weekly series of category net positions, weekly changes, and open-interest shares for a commodity research model. Apply the publication lag when deciding when each observation becomes available.

Check how options change the positioning picture

Compare futures-only and combined positions for the same market and reporting dates. Show whether including delta-adjusted options changes the size or direction of a category's net exposure.

Questions about CFTC commodity futures positions in Windsurf

Can Windsurf use CFTC commodity futures positions?

Yes. Add Spiral to Windsurf as an MCP server, and Windsurf can find and run CFTC commodity futures positions like any built-in tool.

How much does CFTC commodity futures positions cost in Windsurf?

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

Do I need an Alexandria account to use CFTC commodity futures positions in Windsurf?

No. Spiral runs CFTC commodity futures positions on its own Alexandria account. You sign in to Spiral once and never paste a key.

How long does it take to set up CFTC commodity futures positions in Windsurf?

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

Does Windsurf wait while CFTC commodity futures positions runs?

CFTC commodity futures positions runs in the background. Windsurf starts the run, checks on it and gives you the json when it's ready.

Which markets do the disaggregated reports cover?

They cover agriculture and natural resource contracts. Reportable positions are divided into four categories: Producer/Merchant, Swap Dealers, Managed Money, and Other Reportables.

How fresh are the positions?

CFTC generally publishes reports Friday at 3:30 p.m. Eastern using the preceding Tuesday's positions. A newly published report is a weekly snapshot with a reporting lag.

How far back does disaggregated history go?

The Public Reporting Environment offers disaggregated data back to 2006. That boundary applies to disaggregated reports even though CFTC's Legacy report history starts earlier.

Why can a market disappear from a weekly report?

CFTC removes a contract market when its number of reportable large traders falls below 20. It can appear again once that number reaches at least 20.

Why can positions appear without a trader count?

CFTC suppresses a category's trader count when it has fewer than four active traders. The associated position sizes remain public.

Get started

Start using CFTC commodity futures positions in Windsurf

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

Paste this into Windsurf:

Set up Windsurf

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