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

# Analytics

> Access market analytics, top movers, sector data, and analyst ratings with the Python SDK

## Overview

The Analytics API provides market intelligence including top gainers/losers, most active stocks, sector analysis, analyst ratings, market breadth, and net inflow data.

## Methods

### get\_top\_gainers()

```python theme={null}
gainers = client.analytics.get_top_gainers()
for stock in gainers:
    print(f"{stock.symbol}: +{stock.change_percent}%")
```

### get\_top\_losers()

```python theme={null}
losers = client.analytics.get_top_losers()
```

### get\_most\_active()

```python theme={null}
active = client.analytics.get_most_active()
```

### get\_sector\_tickers(sector)

```python theme={null}
tech_stocks = client.analytics.get_sector_tickers("TECHNOLOGY")
```

### get\_sector\_performance()

```python theme={null}
sectors = client.analytics.get_sector_performance()
```

### get\_options\_top\_volume()

```python theme={null}
options_volume = client.analytics.get_options_top_volume(type="stocks")
```

### get\_analyst\_ratings(symbol)

```python theme={null}
ratings = client.analytics.get_analyst_ratings("AAPL")
```

### get\_market\_breadth()

```python theme={null}
breadth = client.analytics.get_market_breadth()
print(f"Advancers: {breadth.advancers}")
print(f"Decliners: {breadth.decliners}")
```

### get\_net\_inflow()

```python theme={null}
inflow = client.analytics.get_net_inflow()
```

## Examples

```python theme={null}
# Find trading opportunities
gainers = client.analytics.get_top_gainers()
print("Top 5 Gainers:")
for stock in gainers[:5]:
    print(f"{stock.symbol}: {stock.price} (+{stock.change_percent}%)")

# Sector analysis
sectors = client.analytics.get_sector_performance()
best_sector = max(sectors, key=lambda x: x.change_percent)
print(f"Best performing sector: {best_sector.name} (+{best_sector.change_percent}%)")
```

## API Endpoints

* `GET /v1/equity/top-gainers`
* `GET /v1/equity/top-losers`
* `GET /v1/equity/top-most-active`
* `GET /v1/equity/sector-tickers`
* `GET /v1/analytics/ratings`
* `GET /v1/analytics/market-breadth`
