---
title: "Build a thematic basket from a prompt"
method: POST
path: "/v1/themes"
tags: ["Market Intelligence"]
---

# Build a thematic basket from a prompt

`POST /v1/themes`

## Request

- Base URL: `https://tradewink.fly.dev`
- URL: `https://tradewink.fly.dev/v1/themes`
- Auth: HTTP bearer

Turns a plain-English theme into a weighted basket of US-listed stocks/ETFs and backtests it against a benchmark. Holdings are chosen today, so the backtest is hindsight-biased and not an out-of-sample test (disclosed in hindsight_warning).

## Request body

- object
  - `prompt` string, required
  - `weighting` 'equal' | 'inverse_vol' | 'market_cap'
  - `max_holdings` integer
  - `lookback` '3mo' | '6mo' | '1y' | '2y' | '5y'

## Response `200`

Basket with holdings, weights, and backtest statistics

## Other responses

- `400`: Invalid request
- `422`: A basket could not be built for this theme
- `429`: Per-key rate limit exceeded (`code: rate_limited`). Wait `Retry-After` seconds.
- `503`: Feature disabled

---

[API](https://skmtc.dev/tradewink/apis/tradewink-rest-api.md) · [All operations](https://skmtc.dev/tradewink/apis/tradewink-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tradewink/apis/tradewink-rest-api/revisions/f0a3bbe3e992?raw)
