> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cesto.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Products

> List and fetch Cesto baskets.

`cesto.products` reads baskets (products). Both methods are read-only.

## List products

```ts theme={null}
const products = await cesto.products.list();

// filter by category
const defi = await cesto.products.list({ category: 'defi' });
```

### Include backtested performance

Set `includeBacktest` to merge backtested performance onto each item (one extra request).
If that data can't be fetched, `backtest` comes back `null` rather than failing the call.

```ts theme={null}
const products = await cesto.products.list({ includeBacktest: true });
products[0].backtest; // performance metrics, or null
```

**category** `string`

Optional category filter.

**includeBacktest** `boolean` (default: false)

Also fetch and attach backtested performance per product.

## Get a product

Fetch a single basket by its slug.

```ts theme={null}
const product = await cesto.products.get({ slug: 'my-basket-slug' });
product.id;          // product id
product.versionId;   // current version id
product.definition;  // the basket's workflow definition
```

### Include the backtested chart

```ts theme={null}
const detailed = await cesto.products.get({
  slug: 'my-basket-slug',
  includeBacktestChart: true,
  chartTimeRange: '1y', // '7d' | '1m' | '3m' | '6m' | '1y' | 'all', default '1y'
});
detailed.backtestChart; // chart data, or null on failure
```

**includeBacktestChart** `boolean` (default: false)

Also fetch and attach the backtested chart.

**chartTimeRange** `'7d' | '1m' | '3m' | '6m' | '1y' | 'all'` (default: 1y)

Chart window. Full metrics (CAGR, Sharpe, etc.) are only computed for `1y`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.