# Sector Rotation RRG (Relative Rotation Graph) API
> Where each S&P 500 sector sits on the rotation map versus the market, computed live from Yahoo Finance (no key, nothing stored). The Relative Rotation Graph is how professional allocators visualise sector rotation: it plots each sector on two axes — relative strength (is it out- or under-performing the S&P 500) and relative momentum (is that relative strength improving or fading) — and the combination lands each sector in one of four quadrants that rotate clockwise over time: Leading (strong and getting stronger), Weakening (strong but losing steam), Lagging (weak and getting weaker) and Improving (weak but turning up). Money rotates Improving to Leading to Weakening to Lagging, so the quadrant tells you not just who is winning but who is next. This computes each of the eleven SPDR sectors' RS-Ratio and RS-Momentum against the S&P 500 and places it in its quadrant. The rrg endpoint returns the whole rotation map; the sector endpoint returns one sector's coordinates and quadrant; the sectors endpoint lists what is covered. The sector-rotation RRG / quadrant cut — distinct from the relative-strength ranking (a one-dimensional list), the sector price/performance feed and the correlation APIs. It shows the rotation, not just the ranking.

## 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/rrg-api/..."
```

## Pricing
- **Free** (Free) — 700 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 16,200 calls/Mo, 6 req/s
- **Pro** ($35/Mo) — 87,500 calls/Mo, 16 req/s
- **Business** ($80/Mo) — 476,000 calls/Mo, 40 req/s

## Endpoints

### RRG

#### `GET /v1/rrg` — The full sector rotation map: every sector RS-Ratio, RS-Momentum and quadrant

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

**Response:**
```json
{
    "data": {
        "note": "Each sector's position on the Relative Rotation Graph versus the S&P 500. rs_ratio > 100 = outperforming; rs_momentum > 100 = that outperformance is improving. Quadrants rotate clockwise: improving -> leading -> weakening -> lagging. Leading = strong and strengthening; Improving = early turnaround candidates. Not financial advice.",
        "source": "Yahoo Finance",
        "scanned": 11,
        "sectors": [
            {
                "key": "health_care",
                "name": "Health Care",
                "quadrant": "leading",
                "rs_ratio": 104.23,
                "rs_momentum": 102.17
            },
            {
                "key": "financials",
                "name": "Financials",
                "quadrant": "leading",
                "rs_ratio": 102.84,
                "rs_momentum": 102.42
            },
            {
                "key": "real_estate",
                "name": "Real Estate",
                "quadrant": "leading",
                "rs_ratio": 102.6,
                "rs_momentum": 102.84
            },
            {
                "key": "consumer_staples",
                "name": "Consumer Staples",
                "quadrant": "leading",
                "rs_ratio": 102.38,
                "rs_momentum": 103.8
            },
            {
                "key": "industrials",
                "name": "Industrials",
                "quadrant": "leading",
                "rs_ratio": 102.27,
     
…(truncated, see openapi.json for full schema)
```

### Sector

#### `GET /v1/sector` — One sector RRG coordinates and quadrant

**Parameters:**
- `sector` (query, required, string) — Sector key/alias (see /v1/sectors) Example: `technology`

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

**Response:**
```json
{
    "data": {
        "key": "technology",
        "name": "Technology",
        "note": "One sector's RRG coordinates versus the S&P 500: rs_ratio (relative strength, >100 = outperforming) and rs_momentum (>100 = improving), with its rotation quadrant.",
        "source": "Yahoo Finance",
        "quadrant": "weakening",
        "rs_ratio": 100.91,
        "benchmark": "S&P 500",
        "rs_momentum": 97.35,
        "quadrant_meaning": "strong but losing momentum — leaders rolling over"
    },
    "meta": {
        "timestamp": "2026-06-12T10:34:57.811Z",
        "request_id": "2757baa5-58d0-4b10-b2a2-090d537be162"
    },
    "status": "ok",
    "message": "Sector retrieved successfully",
    "success": true
}
```

### Sectors

#### `GET /v1/sectors` — The eleven S&P 500 sectors

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

**Response:**
```json
{
    "data": {
        "note": "The eleven S&P 500 sectors plotted on the Relative Rotation Graph against the S&P 500. Pass key/alias as sector= to /v1/sector.",
        "count": 11,
        "source": "Yahoo Finance",
        "sectors": [
            {
                "etf": "XLK",
                "key": "technology",
                "name": "Technology"
            },
            {
                "etf": "XLF",
                "key": "financials",
                "name": "Financials"
            },
            {
                "etf": "XLE",
                "key": "energy",
                "name": "Energy"
            },
            {
                "etf": "XLV",
                "key": "health_care",
                "name": "Health Care"
            },
            {
                "etf": "XLY",
                "key": "consumer_discretionary",
                "name": "Consumer Discretionary"
            },
            {
                "etf": "XLP",
                "key": "consumer_staples",
                "name": "Consumer Staples"
            },
            {
                "etf": "XLI",
                "key": "industrials",
                "name": "Industrials"
            },
            {
                "etf": "XLB",
                "key": "materials",
                "name": "Materials"
            },
            {
                "etf": "XLU",
                "key": "utilities",
                "name": "Utilities"
            },
            {
                "etf"
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

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

**Response:**
```json
{
    "data": {
        "note": "rrg is parameter-less; sector= takes a sector key/alias (see /v1/sectors). RS-Ratio = relative-strength line vs its 21-day average (x100); RS-Momentum = RS-Ratio vs its 10-day average (x100); both centred on 100. Read fresh per call, nothing cached.",
        "source": "Yahoo Finance daily SPDR sector ETF closes vs SPY (6mo range), live",
        "service": "rrg-api",
        "endpoints": {
            "GET /v1/rrg": "The full sector rotation map: every sector's RS-Ratio, RS-Momentum and quadrant.",
            "GET /v1/meta": "This document.",
            "GET /v1/sector": "One sector's RRG coordinates and quadrant (sector=technology).",
            "GET /v1/sectors": "The eleven S&P 500 sectors."
        },
        "quadrants": [
            "leading",
            "weakening",
            "lagging",
            "improving"
        ],
        "description": "Sector rotation RRG (Relative Rotation Graph) — where each S&P 500 sector sits on the rotation map versus the market, live from Yahoo Finance (no key, nothing stored). rrg returns the whole rotation map: each sector's RS-Ratio (relative strength) and RS-Momentum (is it improving) and its quadrant (leading/weakening/lagging/improving). sector returns one sector's coordinates. sectors lists what is covered. The sector-rotation RRG / quadrant cut — distinct from the relative-strength ranking (a one-dimensional list), the sector price/performance feed and the correlation APIs. It shows th
…(truncated, see openapi.json for full schema)
```


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