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

# Get a Sector Performance Snapshot

> Fetch NGX sector-level performance data to identify which parts of the market are moving.

The sectors endpoint aggregates price performance across all companies in each NGX sector, giving you a single call that shows which sectors are leading or lagging the market.

**Endpoint:** `GET /market/sectors` (Growth plan)

## Fetch all sectors

<CodeGroup>
  ```bash curl theme={null}
  curl "https://api.ngnmarket.com/v1/market/sectors" \
    -H "Authorization: Bearer ngm_live_YOUR_KEY"
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch(
    'https://api.ngnmarket.com/v1/market/sectors',
    { headers: { Authorization: 'Bearer ngm_live_YOUR_KEY' } }
  );
  const { data } = await res.json();
  // data.sectors → sorted by 1-day change descending
  // data.summary.top_sector_1d → name of the best-performing sector today
  ```

  ```python Python theme={null}
  import requests

  res = requests.get(
      'https://api.ngnmarket.com/v1/market/sectors',
      headers={'Authorization': 'Bearer ngm_live_YOUR_KEY'},
  )
  data = res.json()['data']
  sectors = data['sectors']
  top_today = data['summary']['top_sector_1d']
  ```
</CodeGroup>

### Sample response (trimmed)

```json theme={null}
{
  "success": true,
  "data": {
    "summary": {
      "top_sector_1d": "Oil & Gas",
      "top_sector_7d": "Banking"
    },
    "sectors": [
      {
        "sector": "Oil & Gas",
        "company_count": 8,
        "total_market_cap": 4829104730200,
        "total_value_traded": 821093847,
        "total_volume": 48291030,
        "change_1d": 2.10,
        "change_7d": 5.40,
        "change_52w": 31.20,
        "breadth": {
          "advancers": 6,
          "decliners": 1,
          "unchanged": 1
        }
      },
      {
        "sector": "Banking",
        "company_count": 14,
        "total_market_cap": 7102948201000,
        "total_value_traded": 1204817293,
        "total_volume": 102847291,
        "change_1d": 0.84,
        "change_7d": 6.10,
        "change_52w": 44.70,
        "breadth": {
          "advancers": 9,
          "decliners": 3,
          "unchanged": 2
        }
      }
    ]
  }
}
```

## Sort or filter in your code

The response is already sorted by `change_1d` descending. If you want a different sort (by 52-week performance or market cap, for example) do it client-side:

```javascript JavaScript theme={null}
// Top sectors by 52-week change
const byYearly = [...data.sectors].sort((a, b) => b.change_52w - a.change_52w);

// Sectors where more stocks declined than advanced (bearish breadth)
const bearish = data.sectors.filter(
  (s) => s.breadth.decliners > s.breadth.advancers
);
```

<Card title="Sectors reference" icon="book" href="/api-reference/market/sectors">
  Full response schema for `GET /market/sectors`
</Card>
