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

AlexandriaFinanceAvailable now

CFTC Commitments of Traders · Legacy combined

cftc-gov/commitments-of-traders/legacy_combined

Get market and financial data with CFTC Commitments of Traders · Legacy combined from Alexandria through one Spiral API key. Positions and open interest from the CFTC Legacy - Combined report for one or many markets and weeks. Use markets first to find contract_market_code values; use fields to keep the payload small. It runs in the background and returns structured JSON. Pay as you go, with no subscription.

Pricing

$0.00873 per call.

Limits

Runs
In the background
Returns
json
Longest queue wait
1 hour
Run deadline
5 minutes
Longest run, end to end
225 minutes
Largest inline input
1 MB
Largest input file
2 GB
Largest output
5 GB

Input

FieldKindDefaultDescription
totext—

Latest report date to include, YYYY-MM-DD (inclusive). Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

fromtext—

Earliest report date to include, YYYY-MM-DD (inclusive). Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

sortone of
recent_first, oldest_first
recent_first

Order by report date then id. The upstream default order is undefined, so an order is always sent.

querytext—

SODA full-text search ($q) over the text columns, e.g. gold or chicago board of trade.

cursortext—

next_cursor from the previous page of the same query (the SODA $offset).

fieldslist—

Projection: SODA column names to return (open_interest_all, noncomm_positions_long_all, m_money_positions_long_all, ...). The identity columns id, market_and_exchange_names, report_date_as_yyyy_mm_dd and cftc_contract_market_code are always included. An unknown column is invalid_input. Omit for every column.

page_sizenumber
1 to 1000
100

Rows per page (a legacy row is ~4.7 KB, a disaggregated row ~7 KB).

report_datetext—

One weekly report date (a Tuesday), YYYY-MM-DD. Not combinable with from / to. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

exchange_codetext—

cftc_market_code without its padding: CBT, CME, CMX, NYME, ICUS, ICEU, CMXE, FREX... Matches the padded value the dataset stores ('CMX '). Pattern: ^[A-Za-z0-9]{1,4}$.

commodity_nametext—

Exact commodity_name, case-insensitive (GOLD, WHEAT, NATURAL GAS, BITCOIN).

commodity_group_nametext—

Exact commodity_group_name, case-insensitive: AGRICULTURE, NATURAL RESOURCES, FINANCIAL INSTRUMENTS.

contract_market_codetext—

Exact cftc_contract_market_code, a string with leading zeros kept (088691 = GOLD - COMMODITY EXCHANGE INC., 001602 = WHEAT-SRW - CBOT). Discover codes with markets. Alone, a code with no rows in this dataset is not_found; combined with date or other filters an empty page is a legitimate empty result. Pattern: ^[A-Za-z0-9]{1,12}$.

commodity_subgroup_nametext—

Exact commodity_subgroup_name, case-insensitive (GRAINS, PRECIOUS METALS, PETROLEUM AND PRODUCTS, CURRENCIES, STOCK INDICES, ...).

Same request in code

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-gov/commitments-of-traders/legacy_combined",
    "input": {
      "to": "<to>"
    }
  }'

Frequently asked questions

How much does CFTC Commitments of Traders · Legacy combined cost?

$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.

How do I use CFTC Commitments of Traders · Legacy combined through an API?

Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "cftc-gov/commitments-of-traders/legacy_combined"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.

Do I need an account with Alexandria to use CFTC Commitments of Traders · Legacy combined?

No. Spiral runs it on its own Alexandria account and charges your Spiral balance.

Can my AI agent use CFTC Commitments of Traders · Legacy combined?

Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.