> For the complete documentation index, see [llms.txt](https://docs.clickoptions.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clickoptions.ai/api/analytics-controller.md).

# Analytics Controller

## Get top option contracts for underlyings

> Returns top-N option contracts for one or more underlyings, period, and metric, including per-vendor averages and the latest snapshot values. When no data is available, the response status is NO\_DATA and contracts are empty. Use extended=1 with WEEK or TWO\_WEEKS to include per-vendor daily stats.

```json
{"openapi":"3.1.0","info":{"title":"fintp-public-api","version":"0.0.1"},"tags":[],"servers":[{"url":"https://api.clickoptions.ai/api","description":"Generated server url"}],"paths":{"/v1/analytics/options/top-contracts":{"get":{"tags":["analytics-controller"],"summary":"Get top option contracts for underlyings","description":"Returns top-N option contracts for one or more underlyings, period, and metric, including per-vendor averages and the latest snapshot values. When no data is available, the response status is NO_DATA and contracts are empty. Use extended=1 with WEEK or TWO_WEEKS to include per-vendor daily stats.","operationId":"getTopContractsStats","parameters":[{"name":"underlying","in":"query","description":"Underlying symbol","required":false,"schema":{"type":"string"}},{"name":"underlyings","in":"query","description":"Underlying symbols list (comma-separated or repeated query param)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"period","in":"query","description":"Stats period (DAY, WEEK, TWO_WEEKS)","required":true,"schema":{"type":"string","description":"Supported analytics periods","enum":["DAY","WEEK","TWO_WEEKS"]}},{"name":"topN","in":"query","description":"Top N size (TOP1, TOP3, TOP5)","required":true,"schema":{"type":"string","description":"Supported top-N sizes","enum":["TOP1","TOP3","TOP5"]}},{"name":"metric","in":"query","description":"Metric to rank by (OI, VOLUME)","required":true,"schema":{"type":"string","description":"Supported analytics metrics","enum":["OI","VOLUME"]}},{"name":"extended","in":"query","description":"Extended response (set to 1 to include daily vendor stats; WEEK/TWO_WEEKS only)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved top contracts stats","content":{"application/json":{}}},"400":{"description":"Invalid request parameters"}}}}}}
```
