# Chart Convert API
> Live conversion of OHLC candles into the alternative chart types traders use to filter noise — computed on demand, no key, nothing cached. Convert candles to Heikin-Ashi (which smooths price action and clarifies trend); build Renko bricks from a price series and a brick size (stripping out time and small moves); and produce a Three Line Break chart (which only prints a new line on a confirmed move). Each carries the latest trend direction. Works for any market — forex, stocks, crypto or commodities. A chart-transformation engine, distinct from pattern-detection and indicator tools: it turns ordinary candles into the trend-clarifying chart types a discretionary trader reads.

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

## Pricing
- **Free** (Free) — 5,200 calls/Mo, 3 req/s
- **Starter** ($6/Mo) — 116,000 calls/Mo, 10 req/s
- **Pro** ($17/Mo) — 548,000 calls/Mo, 25 req/s
- **Business** ($42/Mo) — 3,290,000 calls/Mo, 55 req/s

## Endpoints

### Chart Convert

#### `GET /v1/heikin-ashi` — Convert candles to Heikin-Ashi

**Parameters:**
- `candles` (query, required, string) — OHLC candles open:high:low:close, comma-separated, oldest first Example: `10:11:9.5:10.5,10.5:11.5:10.2:11.2,11.2:11.4:10.8:10.9,10.9:11:10.5:10.6,10.6:11.3:10.5:11.2`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/chartconvert-api/v1/heikin-ashi?candles=10%3A11%3A9.5%3A10.5%2C10.5%3A11.5%3A10.2%3A11.2%2C11.2%3A11.4%3A10.8%3A10.9%2C10.9%3A11%3A10.5%3A10.6%2C10.6%3A11.3%3A10.5%3A11.2"
```

**Response:**
```json
{
    "data": {
        "type": "heikin-ashi",
        "count": 5,
        "trend": "bullish",
        "source": "CHARTCONVERT",
        "candles": [
            {
                "low": 9.5,
                "high": 11,
                "open": 10.25,
                "close": 10.25,
                "color": "bullish"
            },
            {
                "low": 10.2,
                "high": 11.5,
                "open": 10.25,
                "close": 10.85,
                "color": "bullish"
            },
            {
                "low": 10.55,
                "high": 11.4,
                "open": 10.55,
                "close": 11.075,
                "color": "bullish"
            },
            {
                "low": 10.5,
                "high": 11,
                "open": 10.8125,
                "close": 10.75,
                "color": "bearish"
            },
            {
                "low": 10.5,
                "high": 11.3,
                "open": 10.78125,
                "close": 10.9,
                "color": "bullish"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-10T22:56:08.966Z",
        "request_id": "46289a1f-1915-4f72-a835-886eae6f9145"
    },
    "status": "ok",
    "message": "Heikin-Ashi computed",
    "success": true
}
```

#### `GET /v1/line-break` — Three Line Break chart

**Parameters:**
- `candles` (query, required, string) — OHLC candles (or use prices=close1,close2,...) Example: `10:11:9.5:10.5,10.5:11.5:10.2:11.2,11.2:11.4:10.8:10.9,10.9:11:10.5:10.6,10.6:11.3:10.5:11.2`
- `lines` (query, optional, string) — Lines to break for a reversal (default 3) Example: `3`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/chartconvert-api/v1/line-break?candles=10%3A11%3A9.5%3A10.5%2C10.5%3A11.5%3A10.2%3A11.2%2C11.2%3A11.4%3A10.8%3A10.9%2C10.9%3A11%3A10.5%3A10.6%2C10.6%3A11.3%3A10.5%3A11.2&lines=3"
```

**Response:**
```json
{
    "data": {
        "type": "three-line-break",
        "count": 1,
        "lines": [
            {
                "open": 10.5,
                "close": 11.2,
                "direction": "up"
            }
        ],
        "trend": "up",
        "source": "CHARTCONVERT",
        "up_lines": 1,
        "down_lines": 0,
        "lines_param": 3
    },
    "meta": {
        "timestamp": "2026-06-10T22:56:09.061Z",
        "request_id": "aef4b5cf-1420-493c-a8e5-3a8797c47537"
    },
    "status": "ok",
    "message": "Three Line Break computed",
    "success": true
}
```

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

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

**Response:**
```json
{
    "data": {
        "note": "candles = open:high:low:close, comma-separated, oldest first. Renko/line-break can also take prices=close1,close2,...",
        "source": "Computed in-process from caller-supplied OHLC candles (no upstream)",
        "service": "chartconvert-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/renko": "Renko bricks from closes + a brick size (candles=... or prices=..., brick=2 or brick_pct=1).",
            "GET /v1/line-break": "Three Line Break chart (candles=... or prices=..., lines=3).",
            "GET /v1/heikin-ashi": "Convert candles to Heikin-Ashi (candles=o:h:l:c,...)."
        },
        "description": "Live conversion of OHLC candles into alternative chart types traders use to filter noise. The heikin-ashi endpoint returns Heikin-Ashi candles, which smooth price action and clarify trend; the renko endpoint returns Renko bricks from a price series and a brick size, stripping out time and small moves; the line-break endpoint returns a Three Line Break chart, which only prints a new line on a confirmed move. Each carries the latest trend direction. Works for any market — forex, stocks, crypto or commodities. A chart-transformation engine, distinct from pattern-detection and indicator tools.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-10T22:56:09.164Z",
        "request_id": "e5abf3e0-6216-48c9-8099-75f986eca7c7"
    },
    "status": "ok",
    "messa
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/renko` — Renko bricks from a price series + brick size

**Parameters:**
- `candles` (query, required, string) — OHLC candles (or use prices=close1,close2,...) Example: `10:11:9.5:10.5,10.5:11.5:10.2:11.2,11.2:11.4:10.8:10.9,10.9:11:10.5:10.6,10.6:11.3:10.5:11.2`
- `brick` (query, optional, string) — Brick size in price units Example: `0.3`
- `brick_pct` (query, optional, string) — Brick size as % of the first price (alternative to brick)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/chartconvert-api/v1/renko?candles=10%3A11%3A9.5%3A10.5%2C10.5%3A11.5%3A10.2%3A11.2%2C11.2%3A11.4%3A10.8%3A10.9%2C10.9%3A11%3A10.5%3A10.6%2C10.6%3A11.3%3A10.5%3A11.2&brick=0.3"
```

**Response:**
```json
{
    "data": {
        "type": "renko",
        "count": 4,
        "trend": "up",
        "bricks": [
            {
                "open": 10.5,
                "close": 10.8,
                "direction": "up"
            },
            {
                "open": 10.8,
                "close": 11.1,
                "direction": "up"
            },
            {
                "open": 11.1,
                "close": 10.8,
                "direction": "down"
            },
            {
                "open": 10.8,
                "close": 11.1,
                "direction": "up"
            }
        ],
        "source": "CHARTCONVERT",
        "up_bricks": 3,
        "brick_size": 0.3,
        "down_bricks": 1
    },
    "meta": {
        "timestamp": "2026-06-10T22:56:09.259Z",
        "request_id": "e70d7e4e-51d6-4b50-a948-881661bba5ff"
    },
    "status": "ok",
    "message": "Renko computed",
    "success": true
}
```


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