# Multi-asset correlations and risk (QuantSet API)

> USD-aligned pairwise daily return correlations, annualized volatility, cumulative return and max drawdown across 2 to 25 instruments.

> ## For AI agents
> The QuantSet API is at https://api.quantset.dev. Send the key in the `X-API-Key` header. The sandbox key `mw_demo` needs no signup and reads the sample listings.
> No key yet? An agent can open an account on its own: https://api.quantset.dev/skill.md
> Connect an MCP client to https://api.quantset.dev/mcp. Client setup is at https://api.quantset.dev/agents.md.
> Start with https://api.quantset.dev/llms.txt or read the full reference at https://api.quantset.dev/llms-full.txt. The OpenAPI file is https://api.quantset.dev/openapi.json. Add `.md` to any docs URL to get that page as Markdown.

`GET https://api.quantset.dev/api/v1/analytics/correlations` · `get_analytics_correlations`

Send a key in the `X-API-Key` header. Try `mw_demo` with the sample selectors.
Add `format=csv` to get a UTF-8 table.
Price: 5 credits for each listing you ask for.

## Research questions

### Did Nvidia, Apple and bitcoin tend to move together on comparable dates?

```http
GET https://api.quantset.dev/api/v1/analytics/correlations?tickers=us:NVDA,us:AAPL,crypto:BTCUSDT
```

Inspect window_start, window_end, currency and return_basis, then read the entry for the specific instrument pair.

### How closely did two US stocks’ total returns move during 2024?

```http
GET https://api.quantset.dev/api/v1/analytics/correlations?tickers=AAPL,MSFT&start=2024-01-02&end=2024-12-31&basis=total&currency=USD
```

Read the pair entry and its observation count. Keep the currency conversion and dividend basis with the coefficient.

## Reading the results

Correlations summarize joint movements in returns. The instrument summaries answer a separate question about each listing’s volatility and cumulative performance.


## Coverage and limits

Read overlapping_sessions for each pair. Correlation is withheld below five shared return observations or when either series has no return variance. Pairs in one request can have different overlap.


## Related guides

- [Choose a listing across exchanges](https://quantset.dev/docs/guides/instrument-ids)

## Parameters

- `tickers` (list, required): 2 to 25 distinct comma-separated listing selectors
- `start` (string, optional): First date to include, as an ISO date (YYYY-MM-DD).
- `end` (string, optional): Last date to include, as an ISO date (YYYY-MM-DD).
- `basis` (price | total, optional): price or total (verified US adjusted closes).
- `currency` (native | USD, optional): USD converts international closes with dated FX rates; native keeps local units.
- `snapshot_id` (string, optional): Pin the request to one immutable snapshot so a read across several pages stays consistent.
- `format` (json | csv, optional): Return a JSON page or UTF-8 CSV rows.
- `X-Max-Credits` (integer, 0 to 999,999,999,999, optional, in header): Refuse the request if its maximum charge exceeds this ceiling.
- `X-Workflow-Id` (string, optional, in header): Optional printable identifier for grouping charges in a research workflow.

## Response fields

- `return_basis` (price | total): Whether the return counts price only or includes dividends.
- `currency` (string): The currency the amounts on this row are in.
- `window_start` (string): The first date of the window the figure covers.
- `window_end` (string): The last date of the window the figure covers.
- `instruments` (array)
- `correlations` (array)

## Example

```
curl 'https://api.quantset.dev/api/v1/analytics/correlations?tickers=us:NVDA,us:AAPL,crypto:BTCUSDT' -H 'X-API-Key: mw_demo'
```

## Responses

- 200 Successful Response
- 400 Supply one credential.
- 401 Supply a valid API key.
- 402 Reduce the request ceiling or refill your credits.
- 403 Your key does not have the required access.
- 404 The requested listing is absent from the catalog.
- 409 Start the read again with the current snapshot.
- 413 Reduce the page size before requesting CSV again.
- 422 Correct the named parameter and retry.
- 429 Wait for Retry-After seconds.
- 500 The request could not be completed.
- 503 Retry safe reads after a short delay.

## Questions

**Can I try Multi-asset correlations and risk without signing up?** Yes. Use the sandbox key mw_demo and the sample selectors on this page.

**What does Multi-asset correlations and risk cost?** 5 credits for each listing you ask for. A request that fails costs nothing.

**Which plan includes it?** Every account. Free credits, credit packs and subscriptions all read this data.

**Can I get it as CSV or in a spreadsheet?** Yes. Add format=csv to the request. In Google Sheets, put that URL inside IMPORTDATA with a data-only key in apikey.

**Can an AI agent use this?** Yes. An agent calls it over HTTP like any client. Add .md to this page's address for a version written for agents.

**What does null mean in the response?** The value could not be confirmed. It is never a zero, so treat it as missing in your own calculations.

Group: Returns, risk and historical multiples
Docs page: https://quantset.dev/docs/api/analytics-correlations
Integrations & Ecosystem: https://quantset.dev/integrations (Claude/Cursor MCP, LangGraph, PydanticAI, CrewAI, Agno, Vercel AI SDK, Mastra, Sheets =QUANTSET(), Excel, Notion & x402)
Full API guide: https://api.quantset.dev/llms-full.txt
