# Volume/OI Ratio

**Tier:** Dev

`GET /volume-oi-ratio`

Rolling volume-to-open-interest ratio per exchange over a configurable date range and smoothing window. The ratio signals whether a market is in an active trading regime (high ratio) or an accumulation/positioning phase (low ratio). Use it to build a multi-exchange OI efficiency chart, detect regime shifts, or filter exchanges by relative trading intensity.

---

## Authentication

Requires Dev tier or higher. Dev: up to 30 days, `window_days` ≤ 7. Pro and Team: full stored date history, with `window_days` up to 365.

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `range` | string | No | Preset lookback: `1d`, `3d`, `7d`, `14d`, `30d`, `90d`, or `all`. Defaults to `30d`. Do not combine with `start`/`end`. |
| `start` | string | No | Custom range start (ISO 8601). Date-only strings are accepted. `start_date` is accepted as a legacy alias. |
| `end` | string | No | Custom range end (ISO 8601). Date-only strings are accepted. Defaults to now when `start` is provided. `end_date` is accepted as a legacy alias. |
| `exchanges` | string | No | Comma-separated exchange filter. |
| `window_days` | int | No | Smoothing window in days, 1–365. Defaults to 1. Dev is clamped to 7. |

## Tier behavior

**Dev:** Maximum 30-day date range. `window_days` capped at 7. Requests beyond these are clamped.
**Pro:** Full stored date history. Any `window_days` value up to 365.

## Example request

```bash
curl -H "X-Api-Key: lk_live_your_key_here" \
  "https://api.loris.tools/volume-oi-ratio?range=30d&exchanges=binance,bybit"
```

## Example response

```json
{
  "data": {
    "binance": [
      {
        "timestamp": "2026-06-01T00:00:00Z",
        "ratio": 2.35,
        "volume": 42800000000,
        "open_interest": 18200000000
      }
    ],
    "bybit": [
      {
        "timestamp": "2026-06-01T00:00:00Z",
        "ratio": 2.01,
        "volume": 18900000000,
        "open_interest": 9400000000
      }
    ]
  },
  "window_days": 1,
  "notices": [],
  "unit": "ratio",
  "range": "30d",
  "resolution": "1d"
}
```

## Errors

- `400` — Invalid range, invalid date format, mixed `range` plus `start`/`end`, invalid date order, or `window_days` outside 1–365.
- `403` — API key tier is below Dev.

## Related

- [Exchange OI Totals](/docs/api/open-interest/exchange-totals)
- [Exchange Volume Totals](/docs/api/volume/exchange-totals)
