> ## 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 Go SDK

## Overview

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

## Methods

### GetTopGainers()

```go theme={null}
gainers, err := client.Analytics.GetTopGainers()
if err != nil {
    log.Fatal(err)
}
for _, stock := range gainers {
    fmt.Printf("%s: +%.2f%%\n", stock.Symbol, stock.ChangePercent)
}
```

### GetTopLosers()

```go theme={null}
losers, err := client.Analytics.GetTopLosers()
```

### GetMostActive()

```go theme={null}
active, err := client.Analytics.GetMostActive()
```

### GetSectorTickers(sector string)

```go theme={null}
techStocks, err := client.Analytics.GetSectorTickers("Technology")
```

### GetSectorPerformance()

```go theme={null}
sectors, err := client.Analytics.GetSectorPerformance()
```

### GetAnalystRatings(symbol string)

```go theme={null}
ratings, err := client.Analytics.GetAnalystRatings("AAPL")
```

### GetMarketBreadth()

```go theme={null}
breadth, err := client.Analytics.GetMarketBreadth()
fmt.Printf("Advancers: %d, Decliners: %d\n",
    breadth.Advancers, breadth.Decliners)
```

## Examples

```go theme={null}
gainers, err := client.Analytics.GetTopGainers()
if err != nil {
    log.Fatal(err)
}

fmt.Println("Top Gainers:")
for i, stock := range gainers {
    if i >= 5 {
        break
    }
    fmt.Printf("%s: $%.2f (+%.2f%%)\n",
        stock.Symbol, stock.Price, stock.ChangePercent)
}
```
