# Finance API
> Real-time quotes, historical price candles (OHLCV) and symbol search for stocks, ETFs, indices, foreign exchange and cryptocurrencies. Covers global markets — look up any ticker, index (^GSPC), FX pair (EURUSD=X) or coin (BTC-USD).

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

## Pricing
- **Free** (Free) — 800 calls/Mo, 1 req/s
- **Basic** ($22/Mo) — 40,000 calls/Mo, 8 req/s
- **Pro** ($69/Mo) — 200,000 calls/Mo, 25 req/s
- **Mega** ($169/Mo) — 750,000 calls/Mo, 60 req/s

## Endpoints

### Markets

#### `GET /v1/history` — Historical OHLCV candles

**Parameters:**
- `symbol` (query, required, string) — Ticker Example: `AAPL`
- `range` (query, optional, string) — 1d 5d 1mo 3mo 6mo 1y 2y 5y max Example: `1mo`
- `interval` (query, optional, string) — 1m 5m 1h 1d 1wk 1mo Example: `1d`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/finance-api/v1/history?symbol=AAPL&range=1mo&interval=1d"
```

**Response:**
```json
{
    "data": {
        "count": 21,
        "range": "1mo",
        "symbol": "AAPL",
        "candles": [
            {
                "low": 268.1400146484375,
                "high": 276,
                "open": 270.5,
                "time": "2026-04-30T13:30:00.000Z",
                "close": 271.3500061035156,
                "volume": 91848200
            },
            {
                "low": 278.3699951171875,
                "high": 287.2200012207031,
                "open": 278.8599853515625,
                "time": "2026-05-01T13:30:00.000Z",
                "close": 280.1400146484375,
                "volume": 79915400
            },
            {
                "low": 274.8599853515625,
                "high": 280.6300048828125,
                "open": 279.6600036621094,
                "time": "2026-05-04T13:30:00.000Z",
                "close": 276.8299865722656,
                "volume": 46668400
            },
            {
                "low": 276.5,
                "high": 284.57000732421875,
                "open": 276.92999267578125,
                "time": "2026-05-05T13:30:00.000Z",
                "close": 284.17999267578125,
                "volume": 49311700
            },
            {
                "low": 281.07000732421875,
                "high": 288.0299987792969,
                "open": 281.9200134277344,
                "time": "2026-05-06T13:30:00.000Z",
                "close": 287.510009765625,
                "volume": 58336100
  
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/quote` — Real-time quote

**Parameters:**
- `symbol` (query, required, string) — Ticker / index / FX / crypto Example: `AAPL`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/finance-api/v1/quote?symbol=AAPL"
```

**Response:**
```json
{
    "data": {
        "price": 312.06,
        "change": -0.45,
        "symbol": "AAPL",
        "volume": 56454230,
        "day_low": 309.53,
        "currency": "USD",
        "day_high": 315,
        "exchange": "NMS",
        "timezone": "EDT",
        "market_state": null,
        "change_percent": -0.144,
        "previous_close": 312.51,
        "instrument_type": "EQUITY"
    },
    "meta": {
        "timestamp": "2026-05-30T01:15:19.046Z",
        "request_id": "b92ba6a6-26a2-410a-b99c-32789c533624"
    },
    "status": "ok",
    "message": "Quote retrieved successfully",
    "success": true
}
```

#### `GET /v1/search` — Search symbols

**Parameters:**
- `q` (query, required, string) — Company or ticker Example: `tesla`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/finance-api/v1/search?q=tesla"
```

**Response:**
```json
{
    "data": {
        "count": 7,
        "query": "tesla",
        "results": [
            {
                "name": "Tesla, Inc.",
                "type": "EQUITY",
                "symbol": "TSLA",
                "exchange": "NASDAQ"
            },
            {
                "name": "Tesla Inc.                    R",
                "type": "EQUITY",
                "symbol": "TL0.F",
                "exchange": "Frankfurt"
            },
            {
                "name": "Tesla Inc.                    R",
                "type": "EQUITY",
                "symbol": "TL0.DE",
                "exchange": "XETRA"
            },
            {
                "name": "TESLA",
                "type": "EQUITY",
                "symbol": "1TSLA.MI",
                "exchange": "Milan"
            },
            {
                "name": "LEVERAGE SHARES PUBLIC LIMITED ",
                "type": "ETF",
                "symbol": "TSL3.L",
                "exchange": "London"
            },
            {
                "name": "LEVERAGE SHARES PUBLIC LIMITED ",
                "type": "ETF",
                "symbol": "STSL.L",
                "exchange": "London"
            },
            {
                "name": "KODEX TESLA Covered Call Balanc",
                "type": "ETF",
                "symbol": "475080.KS",
                "exchange": "Korea"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-05-30T01:15:19.705Z",
        "request_id": "8ff
…(truncated, see openapi.json for full schema)
```


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