Why Open Interest Rising Faster Than Price Is a Warning
A crypto open interest vs price divergence API answers one question for every perp at once: is new leverage being added faster than price is moving? When open interest, the total notional of open perpetual contracts, climbs 6% in four hours while price goes nowhere, someone is building a large position that the market has not yet rewarded. That position has to be unwound eventually, and the unwind is where the violent moves come from.
Price alone cannot show you this. A flat chart with flat OI is a quiet market. A flat chart with surging OI is a loaded spring, and the two look identical on a candlestick. OI alone cannot show it either, because OI rising with price is ordinary trend participation. The signal is the gap between the two, measured over the same window.
This post covers /api/v1/liquidity/oi-divergence, which computes that gap per coin over 1h, 4h and 24h windows and ranks the universe by it; the oi_price_divergence label in /api/v1/liquidity/regime, which turns the gap into a regime with a fixed threshold; and the two raw OI routes you need to confirm what you are seeing. It also sets out the four OI and price quadrants and which fields identify each one.
The Four OI vs Price Quadrants, With the Fields That Identify Them
Pair the sign of the price change with the sign of the OI change over the same window and every move falls into one of four cases. The names describe who is acting, not where price goes next.
| Quadrant | price_change_4h_pct | oi_change_4h_pct | Who is acting | Positioning |
|---|---|---|---|---|
| New longs | > 0 | > 0 | Buyers opening fresh positions | Being fed; fragile if OI outruns price |
| Short covering | > 0 | < 0 | Shorts buying back to close | Consuming its own fuel; can exhaust |
| Long liquidation | < 0 | < 0 | Longs selling or being force-closed | Deleveraging; cleaner after |
| New shorts | < 0 | > 0 | Sellers opening fresh positions | Being fed; squeeze fuel if price turns |
The divergence field cuts across the table. divergence_4h is oi_change_4h_pct - price_change_4h_pct, so it is large and positive in two situations: new longs where OI rises much faster than price, and new shorts where price is falling while OI climbs. Both are "fragile positioning" in the sense the endpoint means: a lot of leverage has been added without the price confirmation that would make it comfortable. A strongly negative value is the opposite, positions being closed faster than price moves, which is the covering and liquidation side of the table.
What the field does not tell you is which of the two positive cases you are in. For that, read the sign of price_change_4h_pct next to it. The post on short squeeze detection covers the related oi_state field on the squeeze-alerts route, which labels the same quadrants during an active liquidation cascade.
How Do I Get OI vs Price Divergence for Every Perp in One Call?
curl "https://cryptodataapi.com/api/v1/liquidity/oi-divergence" \
-H "X-API-Key: cdk_live_your_key"
The response is {as_of, universe_size, rows}. Each row carries the coin's current price and open_interest_usd, then six percentage changes, price_change_1h_pct, price_change_4h_pct, price_change_24h_pct, oi_change_1h_pct, oi_change_4h_pct, oi_change_24h_pct, and the ranking key divergence_4h. An illustrative row, not a measurement:
{
"coin": "SOL",
"price": 184.2,
"open_interest_usd": 912000000,
"price_change_1h_pct": 0.12,
"price_change_4h_pct": 0.41,
"price_change_24h_pct": -1.8,
"oi_change_1h_pct": 1.9,
"oi_change_4h_pct": 6.3,
"oi_change_24h_pct": 9.7,
"divergence_4h": 5.89
}
Rows are sorted by divergence_4h descending, most fragile first, and rows whose divergence_4h is null sort to the end. A window reports null when the coin does not yet have enough buffered history for it, which happens after a collector restart (the 24h window takes a day to refill) and for a coin newly added to the universe. null means "not measurable yet", not zero, and a loop that treats it as zero will rank every cold coin as perfectly balanced.
The universe is the top 25 Hyperliquid perps by 24h notional, the same set the order-book depth collector tracks, refreshed about every two minutes; price is the Hyperliquid mid and open_interest_usd the Hyperliquid OI in dollars. A Free key gets the BTC row only; Pro and Pro Plus get the full table. While the collector is still warming after a deploy the route answers 503 rather than an empty list.
A screen in Python that separates the two positive quadrants:
import httpx
H = {"X-API-Key": "cdk_live_your_key"}
rows = httpx.get("https://cryptodataapi.com/api/v1/liquidity/oi-divergence", headers=H).json()["rows"]
for r in rows:
d, px = r["divergence_4h"], r["price_change_4h_pct"]
if d is None or d < 4:
continue
side = "new longs, unrewarded" if px > 0 else "new shorts into weakness"
print(f'{r["coin"]:6} oi {r["oi_change_4h_pct"]:+.1f}% px {px:+.1f}% -> {side}')
When Does Divergence Become a Regime?
/api/v1/liquidity/regime (Pro and Pro Plus) classifies each coin in the same universe into one of five labels, applied in priority order: post_cascade_impaired, depth_withdrawal, oi_price_divergence, deep_book, neutral. The divergence rule is fixed and worth knowing exactly:
- OI up by at least 5% over 4 hours, while
- price up by no more than 1% over the same 4 hours (which includes price falling), and
- a usable 4-hour-old baseline exists; a baseline older than 5 hours is rejected rather than stretched.
Because the priority order runs top-down, a coin that also qualifies as post_cascade_impaired or depth_withdrawal takes that label instead. Divergence is the "something is building" state; the two above it are "something already broke".
curl "https://cryptodataapi.com/api/v1/liquidity/regime" \
-H "X-API-Key: cdk_live_your_key"
Each entry in coins carries regime, confidence (0.75 for divergence with a full baseline, 0.45 when under 60 minutes of samples), a low_confidence flag, baseline_minutes and a signals object with the raw numbers that fired the rule, including oi_change_4h_pct and price_change_4h_pct, so you can audit the label against the same arithmetic as the divergence table. The market-wide aggregate counts coins per regime and gives pct_divergent, and composite_score maps the mix to a 0 to 100 health number with a sentiment band from healthy to fragile. pct_divergent is weighted at minus 25 points per 100% in that score, so a universe where a third of coins are divergent costs about eight points on its own.
One limit is structural: this regime is forward-only. Its rules read intraday depth deltas and 4h OI baselines that exist only in the live per-minute buffer, so there is no history to reconstruct before the collector started. The per-coin snapshot is archived daily (liquidity_regime_score in the daily snapshot) so a backtestable record builds from here. The regime family as a whole is covered in the liquidity regime post.
Confirming With the Raw Open Interest Routes
The divergence table is Hyperliquid-only. Before acting on a reading, it is worth knowing whether the same build-up shows on the larger venue or is a single-venue event.
/api/v1/hyperliquid/open-interest returns every Hyperliquid perp in one call: per asset coin, open_interest (contracts), open_interest_usd, mark_price, funding_rate, oracle_price, premium, day_volume and prev_day_px, plus total_oi, total_oi_usd, an as_of timestamp and a coverage block that says how many delisted markets were dropped. Polling it yourself and differencing open_interest_usd over your own windows is the way to extend the divergence idea to coins outside the top 25.
/api/v1/derivatives/open-interest?coin=SOL is the cross-venue view for one coin: a binance block with current_oi and trend_30d_pct, and a hyperliquid block with current_oi. When Binance's 30-day trend and Hyperliquid's 4h surge disagree, the surge is more likely a venue-local positioning story than a market-wide one. Both routes answer any valid key, and the ETH open interest post walks through the Binance side in more detail.
curl "https://cryptodataapi.com/api/v1/derivatives/open-interest?coin=SOL" \
-H "X-API-Key: cdk_live_your_key"
A reading that passes all three checks, high divergence_4h, an oi_price_divergence label with low_confidence: false, and a Binance trend pointing the same way, is a different quality of signal from a single hot row.
Divergence Table vs Regime Label: Which to Poll
/liquidity/oi-divergence | /liquidity/regime | |
|---|---|---|
| Output | Continuous: six deltas + divergence_4h per coin | Discrete: one of five labels + confidence |
| Threshold | Yours | Fixed: OI ≥ +5% and price ≤ +1% over 4h |
| Windows | 1h, 4h, 24h | 4h for this rule |
| Priority against other states | None, it is just arithmetic | Loses to cascade and withdrawal states |
| Market-wide read | Rank order only | aggregate.pct_divergent, composite_score |
| Tier | Free = BTC only; full table Pro | Pro and Pro Plus |
| Null meaning | Window not yet measurable | low_confidence: true under 60 min of samples |
Use the table when you want to set your own cut-off or watch the 1h and 24h windows the regime ignores. Use the label when you want a conservative, pre-thresholded flag that already defers to worse states, and when you want the market-wide fragility number in the same response.
How to Use This in a Bot (and When Not To)
As a sizing input, not an entry. Positive divergence says leverage is piling in without confirmation. It does not say which way the unwind resolves. A bot that reduces size, widens stops or refuses to add to a position in a coin whose divergence_4h is in the top few rows is using the signal as designed. A bot that shorts every top row is betting on direction the field does not carry.
Read the quadrant, then the funding. New shorts into weakness with divergence_4h high and funding_rate on /hyperliquid/open-interest turning negative is the classic squeeze set-up; new longs with positive funding is the classic long-flush set-up. The divergence table gives you the first half of each sentence.
Mind the windows after a restart. Treat null as "skip this coin for this window". Do not fill it with zero, and do not assume the 24h column is valid within a day of a collector deploy.
Not for coins outside the top 25, which the table does not cover; poll /hyperliquid/open-interest and compute your own deltas. Not for backtests before the collector existed, because the regime cannot be reconstructed. And not as a substitute for the liquidation tape: when a cascade is already running, /market-intelligence/squeeze-alerts and the liquidation routes are the faster read, and the regime classifier will already have moved the coin to post_cascade_impaired.
The BTC row is on a free key; the full table and the regime labels are on Pro.
Frequently asked questions
What does open interest vs price divergence mean?
It is the difference between the percentage change in open interest and the percentage change in price over the same window. On /api/v1/liquidity/oi-divergence the field is divergence_4h = oi_change_4h_pct - price_change_4h_pct. A large positive value means leverage is being added faster than price is moving, which the endpoint calls fragile positioning.
What are the four OI and price quadrants?
Price up with OI up is new longs; price up with OI down is short covering; price down with OI down is long liquidation; price down with OI up is new shorts. Read the signs of price_change_4h_pct and oi_change_4h_pct together to place a coin.
When does a coin get the oi_price_divergence regime label?
On /api/v1/liquidity/regime a coin is labelled oi_price_divergence when its open interest is up at least 5% over four hours while price is up no more than 1%, unless it already qualifies for post_cascade_impaired or depth_withdrawal, which take priority. Confidence is 0.75 with a full baseline and 0.45 with under 60 minutes of samples.
Why are some windows null on the divergence endpoint?
A window is null when the coin does not yet have enough buffered history for it, for example the 24h window within a day of a collector restart or for a coin newly added to the top-25 universe. Null means not measurable yet, not zero.
Which tier do I need?
A Free key gets the BTC row of /liquidity/oi-divergence. Pro and Pro Plus get the full top-25 Hyperliquid table and the /liquidity/regime labels. /hyperliquid/open-interest and /derivatives/open-interest answer any valid key.



