# Stock Sectors API
> Live S&P 500 sector performance as an API — the sector-rotation picture traders watch, served from Yahoo Finance via the eleven SPDR sector ETFs. It returns each of the eleven GICS sectors — Technology, Financials, Energy, Health Care, Consumer Discretionary, Consumer Staples, Industrials, Materials, Utilities, Real Estate and Communication Services — with its tracking ETF's price, the day's change, the day's high and low, and the 52-week high and low. Pull the whole board ranked by the day's move, with the leading and lagging sectors called out, or look one sector up by name or ETF ticker. The sector-rotation and market-breadth layer for trading, macro-research and dashboard apps. Live, no key, no cache. Distinct from index-level, single-stock and cross-asset-ratio APIs — this is the equity-sector performance breakdown.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/sectors-api/..."
```

## Pricing
- **Free** (Free) — 10,000 calls/Mo, 4 req/s
- **Starter** ($10/Mo) — 130,000 calls/Mo, 12 req/s
- **Pro** ($24/Mo) — 660,000 calls/Mo, 35 req/s
- **Desk** ($59/Mo) — 3,400,000 calls/Mo, 100 req/s

## Endpoints

### Sectors

#### `GET /v1/sectors` — All 11 sectors ranked by the day move

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sectors-api/v1/sectors"
```

**Response:**
```json
{
    "data": {
        "as_of": "2026-06-08T20:00:00.000Z",
        "count": 11,
        "leader": {
            "sector": "technology",
            "change_pct": 2.15
        },
        "laggard": {
            "sector": "utilities",
            "change_pct": -1.87
        },
        "sectors": [
            {
                "etf": "XLK",
                "name": "Technology",
                "rank": 1,
                "as_of": "2026-06-08T20:00:00.000Z",
                "price": 184.18,
                "change": 3.88,
                "sector": "technology",
                "day_low": 183.17,
                "day_high": 186.71,
                "change_pct": 2.15,
                "week52_low": 119.15,
                "week52_high": 198.73,
                "previous_close": 180.3
            },
            {
                "etf": "XLE",
                "name": "Energy",
                "rank": 2,
                "as_of": "2026-06-08T20:00:00.000Z",
                "price": 58.33,
                "change": 0.66,
                "sector": "energy",
                "day_low": 57.97,
                "day_high": 58.96,
                "change_pct": 1.14,
                "week52_low": 42.05,
                "week52_high": 63.46,
                "previous_close": 57.67
            },
            {
                "etf": "XLY",
                "name": "Consumer Discretionary",
                "rank": 3,
                "as_of": "2026-06-08T20:00:00.000Z",
                "price": 11
…(truncated, see openapi.json for full schema)
```

### Sector

#### `GET /v1/sector` — One sector performance by name or ETF

**Parameters:**
- `sector` (query, optional, string) — Sector key (technology, energy, financials, …) Example: `technology`
- `etf` (query, optional, string) — SPDR ETF ticker Example: `XLK`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sectors-api/v1/sector?sector=technology&etf=XLK"
```

**Response:**
```json
{
    "data": {
        "etf": "XLK",
        "name": "Technology",
        "as_of": "2026-06-08T20:00:00.000Z",
        "price": 184.18,
        "change": 3.88,
        "sector": "technology",
        "day_low": 183.17,
        "day_high": 186.71,
        "change_pct": 2.15,
        "week52_low": 119.15,
        "week52_high": 198.73,
        "previous_close": 180.3
    },
    "meta": {
        "timestamp": "2026-06-09T03:02:03.374Z",
        "request_id": "b247f22a-cb8d-482f-858e-a83ecf2951e4"
    },
    "status": "ok",
    "message": "Sector retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata and sector list

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sectors-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "source": "Yahoo Finance SPDR sector ETFs (live)",
        "sectors": {
            "energy": "Energy (XLE)",
            "materials": "Materials (XLB)",
            "utilities": "Utilities (XLU)",
            "financials": "Financials (XLF)",
            "healthcare": "Health Care (XLV)",
            "technology": "Technology (XLK)",
            "industrials": "Industrials (XLI)",
            "real_estate": "Real Estate (XLRE)",
            "communication": "Communication Services (XLC)",
            "consumer_staples": "Consumer Staples (XLP)",
            "consumer_discretionary": "Consumer Discretionary (XLY)"
        },
        "service": "sectors-api",
        "endpoints": {
            "GET /v1/meta": "This document (with the full sector list).",
            "GET /v1/sector": "One sector's performance (sector=technology|energy|… or etf=XLK).",
            "GET /v1/sectors": "All 11 sectors ranked by the day's move, with leader/laggard."
        },
        "description": "Live S&P 500 sector performance from Yahoo Finance via the eleven SPDR sector ETFs: each GICS sector (Technology, Financials, Energy, Health Care, Consumer Discretionary, Consumer Staples, Industrials, Materials, Utilities, Real Estate, Communication Services) with its ETF price, day change, day high/low and 52-week high/low. Pull the whole board ranked by the day's move, or one sector. Live, no key. Distinct from index-level, single-stock and cross-asset-ratio APIs — this i
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/sectors-api
OpenAPI spec: https://www.oanor.com/api/sectors-api/openapi.json
