# MACD Screener (Multi-Asset) API
> Which markets just triggered a MACD buy or sell signal, computed live from Yahoo Finance (no key, nothing stored). The MACD — the gap between a fast and a slow moving average, smoothed by a signal line — is the workhorse momentum indicator: when the MACD line crosses up through its signal line it is a bullish trigger, down through it bearish, and the histogram between them shows momentum building or fading. For a cross-asset, cross-sector universe — equity indices and sectors, gold, oil, commodities, bonds and crypto — this computes each asset's MACD (12/26 EMA), signal line (9 EMA) and histogram, flags whether it is in a bullish or bearish posture, and detects how recently the lines crossed. The screener endpoint returns the fresh bullish and bearish crossovers across the board plus the histogram ranking. The asset endpoint returns one market's MACD card. The universe endpoint lists what is covered. The cross-asset MACD / momentum-crossover screener cut — distinct from the bring-your-own-candle technical-indicator APIs, the RSI, Bollinger and moving-average screeners and the FX-only signals API. It finds the fresh momentum triggers across every asset class at once.

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

## Pricing
- **Free** (Free) — 790 calls/Mo, 2 req/s
- **Starter** ($10/Mo) — 17,400 calls/Mo, 6 req/s
- **Pro** ($31/Mo) — 90,500 calls/Mo, 16 req/s
- **Business** ($71/Mo) — 494,000 calls/Mo, 40 req/s

## Endpoints

### Screener

#### `GET /v1/screener` — Cross-asset board with fresh MACD crossovers, histogram ranking and tally

**Parameters:**
- `class` (query, optional, string) — Filter by class: equities, sector, commodities, bonds, crypto Example: `sector`

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

**Response:**
```json
{
    "data": {
        "note": "Each market's MACD (12/26 EMA), signal line (9 EMA) and histogram. posture bullish = MACD above signal. last_cross/days_since_cross flag the most recent line cross — a fresh bullish_crossover (low days) is a buy trigger, bearish a sell. Sorted by histogram (strongest momentum first).",
        "class": "sector",
        "assets": [
            {
                "key": "health_care",
                "macd": 1.8249,
                "class": "sector",
                "label": "Health Care",
                "signal": 1.2419,
                "posture": "bullish (MACD above signal)",
                "histogram": 0.5829,
                "last_cross": "bullish_crossover",
                "days_since_cross": 30
            },
            {
                "key": "financials",
                "macd": 0.2387,
                "class": "sector",
                "label": "Financials",
                "signal": 0.1382,
                "posture": "bullish (MACD above signal)",
                "histogram": 0.1005,
                "last_cross": "bullish_crossover",
                "days_since_cross": 6
            },
            {
                "key": "real_estate",
                "macd": 0.2383,
                "class": "sector",
                "label": "Real Estate",
                "signal": 0.1758,
                "posture": "bullish (MACD above signal)",
                "histogram": 0.0625,
                "last_cross": "bullish_crossover",
         
…(truncated, see openapi.json for full schema)
```

### Asset

#### `GET /v1/asset` — One market MACD card

**Parameters:**
- `asset` (query, required, string) — Asset key (see /v1/universe) Example: `sp500`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/macd-api/v1/asset?asset=sp500"
```

**Response:**
```json
{
    "data": {
        "key": "sp500",
        "macd": 4.0935,
        "note": "One market's MACD card: MACD line (12/26 EMA), signal line (9 EMA), histogram, bullish/bearish posture and days since the last MACD/signal crossover.",
        "class": "equities",
        "label": "S&P 500",
        "signal": 8.2984,
        "source": "Yahoo Finance",
        "symbol": "SPY",
        "posture": "bearish (MACD below signal)",
        "histogram": -4.2049,
        "last_cross": "bearish_crossover",
        "days_since_cross": 24
    },
    "meta": {
        "timestamp": "2026-06-12T10:35:06.103Z",
        "request_id": "275344d6-95a6-410d-b9de-e93e552f694a"
    },
    "status": "ok",
    "message": "Asset retrieved successfully",
    "success": true
}
```

### Universe

#### `GET /v1/universe` — Supported instruments

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

**Response:**
```json
{
    "data": {
        "note": "Supported instruments. Pass key as asset= to /v1/asset, class= to /v1/screener.",
        "count": 21,
        "assets": [
            {
                "key": "sp500",
                "class": "equities",
                "label": "S&P 500",
                "symbol": "SPY"
            },
            {
                "key": "nasdaq100",
                "class": "equities",
                "label": "Nasdaq 100",
                "symbol": "QQQ"
            },
            {
                "key": "small_caps",
                "class": "equities",
                "label": "US Small Caps",
                "symbol": "IWM"
            },
            {
                "key": "developed_intl",
                "class": "equities",
                "label": "Developed ex-US",
                "symbol": "EFA"
            },
            {
                "key": "emerging",
                "class": "equities",
                "label": "Emerging Markets",
                "symbol": "EEM"
            },
            {
                "key": "technology",
                "class": "sector",
                "label": "Technology",
                "symbol": "XLK"
            },
            {
                "key": "financials",
                "class": "sector",
                "label": "Financials",
                "symbol": "XLF"
            },
            {
                "key": "energy",
                "class": "sector",
                "label": "Energy",
      
…(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/macd-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "screener class= filters by class. asset= is a supported key (see /v1/universe). MACD is 12/26 EMA with a 9 EMA signal. Read fresh per call, nothing cached.",
        "source": "Yahoo Finance daily closes (9mo range) across a multi-asset universe, live",
        "classes": [
            "equities",
            "sector",
            "commodities",
            "bonds",
            "crypto"
        ],
        "service": "macd-api",
        "settings": {
            "fast": 12,
            "slow": 26,
            "signal": 9
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/asset": "One market's MACD card (asset=sp500).",
            "GET /v1/screener": "Cross-asset board with fresh MACD crossovers, histogram ranking and bullish/bearish tally (class=sector optional).",
            "GET /v1/universe": "The supported instruments."
        },
        "description": "MACD screener (multi-asset) — which markets just triggered a MACD buy or sell signal, live from Yahoo Finance (no key, nothing stored). screener returns the fresh bullish and bearish MACD/signal crossovers across a cross-asset board plus the histogram ranking and bullish/bearish tally. asset returns one market's MACD card (MACD, signal, histogram, posture, days since cross). universe lists what is covered. The cross-asset MACD / momentum-crossover screener cut — distinct from the bring-your-own-candle technical-indicator APIs, the RSI,
…(truncated, see openapi.json for full schema)
```


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