# Fibonacci Levels API
> Automatic Fibonacci retracement and extension levels for any stock, index, FX pair, commodity or crypto, computed live from Yahoo Finance candles, no key. Fibonacci levels are the support/resistance map traders draw from a trend's swing high and swing low: after a move, price tends to pull back to the 38.2%, 50% or 61.8% retracement before resuming, and to project to the 127.2%, 161.8% or 261.8% extension as a target. This finds the dominant recent swing automatically and lays the levels out, with where price sits right now. The retracement endpoint detects the swing high and low over a lookback window, works out the trend direction, and returns the retracement levels (0, 23.6, 38.2, 50, 61.8, 78.6, 100%) with their prices — plus which two levels price is currently between and the nearest one. The extension endpoint returns the projection targets beyond the swing (127.2, 141.4, 161.8, 200, 261.8%) in the trend's direction. Both report the swing they were built from so you can see exactly what was measured. This is the Fibonacci-levels cut — a distinct price-level tool, separate from the oscillator and channel indicator feeds (RSI, MACD, Bollinger, SuperTrend, Keltner), from FX pivot points and from the Ichimoku system. Levels are in the instrument's own price; the swing is detected mechanically (highest high / lowest low over the window), not hand-picked. Interval (1d/1wk/1mo) and lookback are configurable. Keyless, nothing stored beyond a short cache.

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

## Pricing
- **Free** (Free) — 1,050 calls/Mo, 2 req/s
- **Starter** ($19/Mo) — 61,000 calls/Mo, 6 req/s
- **Pro** ($49/Mo) — 415,000 calls/Mo, 16 req/s
- **Scale** ($106/Mo) — 2,550,000 calls/Mo, 40 req/s

## Endpoints

### Retracement

#### `GET /v1/retracement` — Fibonacci retracement levels and price position

**Parameters:**
- `symbol` (query, required, string) — Yahoo ticker (AAPL, EURUSD=X, BTC-USD, ^GSPC) Example: `AAPL`
- `interval` (query, optional, string) — 1d, 1wk or 1mo Example: `1d`
- `lookback` (query, optional, string) — Swing window in candles (10-400) Example: `60`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fibonacci-api/v1/retracement?symbol=AAPL&interval=1d&lookback=60"
```

**Response:**
```json
{
    "data": {
        "note": "Fibonacci retracement levels for AAPL on the 1d timeframe, built from the dominant swing over the last 60 candles. swing.direction is 'up' (low then high) or 'down' (high then low); 0% sits at the most recent extreme, 100% at the prior one. levels lists each ratio's price; position shows which two levels price is between and the nearest. The swing is detected mechanically (highest high / lowest low) — adjust lookback to measure a longer or shorter move. Levels in the instrument's own price. Live, cached ~5m.",
        "price": 291.130005,
        "swing": {
            "low": 245.509995,
            "high": 317.399994,
            "low_date": "2026-03-30",
            "direction": "up",
            "high_date": "2026-06-08"
        },
        "levels": [
            {
                "price": 317.399994,
                "ratio": 0
            },
            {
                "price": 300.433954,
                "ratio": 23.6
            },
            {
                "price": 289.938014,
                "ratio": 38.2
            },
            {
                "price": 281.454994,
                "ratio": 50
            },
            {
                "price": 272.971974,
                "ratio": 61.8
            },
            {
                "price": 260.894454,
                "ratio": 78.6
            },
            {
                "price": 245.509995,
                "ratio": 100
            }
        ],
        "source": "Yahoo
…(truncated, see openapi.json for full schema)
```

### Extension

#### `GET /v1/extension` — Fibonacci extension / projection targets

**Parameters:**
- `symbol` (query, required, string) — Yahoo ticker Example: `AAPL`
- `interval` (query, optional, string) — 1d, 1wk or 1mo Example: `1d`
- `lookback` (query, optional, string) — Swing window in candles (10-400) Example: `60`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fibonacci-api/v1/extension?symbol=AAPL&interval=1d&lookback=60"
```

**Response:**
```json
{
    "data": {
        "note": "Fibonacci extension (projection) targets for AAPL, built from the same dominant swing over the last 60 candles and projected in the trend's direction beyond the swing — the 127.2%, 141.4%, 161.8%, 200% and 261.8% levels traders use as profit targets. For an up swing these sit above the high; for a down swing, below the low. Levels in the instrument's own price. Live, cached ~5m.",
        "price": 291.130005,
        "swing": {
            "low": 245.509995,
            "high": 317.399994,
            "low_date": "2026-03-30",
            "direction": "up",
            "high_date": "2026-06-08"
        },
        "levels": [
            {
                "price": 336.954074,
                "ratio": 127.2
            },
            {
                "price": 347.162454,
                "ratio": 141.4
            },
            {
                "price": 361.828014,
                "ratio": 161.8
            },
            {
                "price": 389.289993,
                "ratio": 200
            },
            {
                "price": 433.718013,
                "ratio": 261.8
            }
        ],
        "source": "Yahoo Finance chart candles (query1.finance.yahoo.com), keyless",
        "symbol": "AAPL",
        "currency": "USD",
        "interval": "1d",
        "lookback": 60
    },
    "meta": {
        "timestamp": "2026-06-13T04:42:11.045Z",
        "request_id": "06c65ecc-252d-4ca6-8ba2-4fc967c9b6c8"
    },
    "status": 
…(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/fibonacci-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "retracement and extension take symbol (a Yahoo ticker like AAPL, EURUSD=X, BTC-USD, ^GSPC), interval (1d/1wk/1mo, default 1d) and lookback (10-400 candles, default 60). meta takes no parameters. Levels are in the instrument's own price; the swing is the highest high and lowest low over the lookback window. A short ~5-minute cache fronts Yahoo.",
        "sample": {
            "low": 245.51,
            "high": 317.4,
            "symbol": "AAPL",
            "direction": "up"
        },
        "source": "Yahoo Finance chart candles (query1.finance.yahoo.com), keyless, live",
        "service": "fibonacci-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/extension": "Fibonacci extension/projection targets (symbol=AAPL).",
            "GET /v1/retracement": "Fibonacci retracement levels + price position (symbol=AAPL, lookback=60)."
        },
        "description": "Automatic Fibonacci retracement and extension levels for any stock, index, FX pair, commodity or crypto, computed live from Yahoo Finance, no key. The retracement endpoint detects the dominant swing high and low over a lookback window, sets the trend direction, and returns the 0/23.6/38.2/50/61.8/78.6/100% levels with where price sits; the extension endpoint returns the 127.2/141.4/161.8/200/261.8% projection targets in the trend direction. The Fibonacci-levels cut — distinct from the oscillator/channel indicators (RSI, MACD, Bollinge
…(truncated, see openapi.json for full schema)
```


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