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

Codex · Finance

How to Use CFTC index trader positions in Codex

Returns CFTC agricultural positioning data, including index trader longs and shorts, open interest, weekly changes, and trader counts. Use it to compare index positioning with commercial and noncommercial positions across 13 futures-and-options markets.

Prompts to try with CFTC index trader positions in Codex

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

Use CFTC index trader positions to fetch corn history for 2025 using contract market code 002602. Add a CSV to this project with report dates, index longs, index shorts, and calculated net positions.

CFTC index trader positionsCodex
Try asking
  • Use CFTC index trader positions to build a chart in this project comparing index long positions as a share of open interest for corn, soybeans, and soybean oil during 2025.

  • Use CFTC index trader positions to add a table to this dashboard showing the latest two reports for lean hogs, live cattle, and feeder cattle, with index net positions and their weekly changes.

  • Use CFTC index trader positions to create a notebook comparing commercial, noncommercial, and index net positions in coffee during 2024 and 2025.

  • Use CFTC index trader positions to populate this project's cotton chart with five years of available index longs, shorts, and open interest. Calculate a historical percentile for the latest net position.

How to set up CFTC index trader positions in Codex

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

Use Spiral's MCP server

  1. Add the hosted server
    codex mcp add spiral --url https://api.spiral.ai/mcp
  2. Sign in

    Codex opens the browser: sign in to Spiral and click Authorize. No API key. codex mcp list then shows Spiral.

    codex mcp login spiral

Use the Spiral skill

  1. Send Codex 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 index trader 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/supplemental/index-traders",
        "input": {
          "$limit": 1000
        }
      }'

Then paste one of the prompts above: Codex finds CFTC index trader positions on Spiral, shows the price and runs it.

CFTC index trader positions providers and prices

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

AlexandriaFinance

Settings you can ask for

Ask Codex 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 · Supplemental report, commodity index traders is on its tool page: open its card above.

What can you do with CFTC index trader positions in Codex?

Build an agricultural positioning dashboard with index longs, shorts, and calculated net positions. A coding agent can add CFTC history to project files and chart index positions beside commercial and noncommercial positions.

Weekly agricultural positioning brief

Summarize changes in index trader longs, shorts, and calculated net positions across the covered contracts for a commodity research meeting.

Index participation comparison

Compare index trader long positions as a share of open interest in corn, soybeans, and wheat to show differences in participation.

Historical positioning ranges

Calculate where current corn or cotton index net positions sit within their available five-year history.

Commercial and index position comparison

Compare weekly commercial and index net position changes in sugar or coffee for a procurement team's market briefing.

Livestock positioning monitor

Track index longs and shorts in lean hogs, live cattle, and feeder cattle, highlighting the largest weekly changes.

Commodity research dataset

Build a dated table of open interest and positions by trader category for historical analysis, keeping each contract separate.

Participation change review

Compare category trader counts with position changes in cocoa and cotton to distinguish changes in participation from changes in aggregate exposure.

Questions about CFTC index trader positions in Codex

Can Codex use CFTC index trader positions?

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run CFTC index trader positions like any built-in tool.

How much does CFTC index trader positions cost in Codex?

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

Do I need an Alexandria account to use CFTC index trader positions in Codex?

No. Spiral runs CFTC index trader 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 index trader positions in Codex?

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

Does Codex wait while CFTC index trader positions runs?

CFTC index trader positions runs in the background. Codex starts the run, checks on it and gives you the json when it's ready.

Which markets does the CFTC Supplemental report cover?

It covers 13 selected agricultural contracts with futures and options combined. Coverage includes grains, livestock, and soft commodities; gold, crude oil, and financial futures fall outside this report.

How current are the positions?

The usual release is Friday at 3:30 p.m. Eastern time and describes positions from the previous Tuesday. Federal holidays can delay publication by one or two days.

How far back does the history go?

CFTC's Commodity Index Trader Supplement archive starts in January 2006. Use that boundary when requesting historical comparisons.

How are options counted alongside futures?

CFTC converts options into futures-equivalent positions using delta factors supplied by exchanges. Combined position totals therefore include delta-adjusted options exposure.

Does the index trader category measure index investment exactly?

No. CFTC assigns all of a trader's positions according to the predominant strategy, so the Supplemental totals can overstate or understate actual index trading.

Get started

Start using CFTC index trader positions in Codex

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

Paste this into Codex:

Set up Codex

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