Skip to main content
Liquidity is what lets a holder actually sell. When it leaves a pool, everyone behind it is trapped, and the first warning is the liquidity curve, not the price. This guide resolves a token to its deepest pool, streams that pool’s liquidity as OHLC candles, aligns the series against price, and ties any collapse to security and supply data.

TL;DR

  • Resolve the token to its deepest pool
  • Pull that pool’s liquidity as OHLC candles
  • Align liquidity against token price to spot divergence
  • Explain a collapse with security and supply data
Solana liquidity monitoring pipeline of Birdeye Data endpoints All requests share the base URL https://public-api.birdeye.so, authenticate with the X-API-KEY header, and select the network with x-chain: solana.
One detail runs through every step and trips up most first integrations. The address parameter means the token on some endpoints and the pool on others. Passing the wrong one returns the wrong data with no obvious error.

The four stage pipeline

1

Resolve the token to its deepest pool

A token rarely lives in one pool. It trades across many, and most are too shallow to matter, so the first job is finding the one pool that actually holds the liquidity.Endpoint: GET /defi/v2/markets
Here address is the token. Each result’s own address is a pool, not the token. Keep using the token mint in Step 2 and the liquidity history comes back empty, since that endpoint is keyed by pool. Grab the pool address from the top item and hold onto it.
A token can list more than a thousand pools, so sorting by liquidity with sort_type=desc is not optional. The source field names the venue behind each pool.
2

Pull the pool's liquidity as OHLC candles

With the pool address in hand, watch its liquidity move. This returns liquidity as OHLC candles minute by minute, so a slow bleed and a one block rug both show up as a shape on a chart rather than a single number.Endpoint: GET /defi/v3/liquidity/ohlc/pair
Here address is the pool from Step 1, not the token. Plot open_liquidity_usd, high_liquidity_usd, low_liquidity_usd, and close_liquidity_usd. There is no single liquidity_usd field.
Read the balance fields, open_base_balance through close_base_balance and the matching quote fields, to separate a real drain from a price effect. If balances hold steady while close_liquidity_usd drops, that is a reprice, not a withdrawal. If balances fall with it, tokens actually left the pool.
One call returns at most 100 candles. For a longer window, page with next_cursor and prev_cursor, and stop when has_more is false.
3

Align liquidity against token price

Liquidity falling alongside price is ordinary selling. Liquidity vanishing while price holds, or dropping far faster than price, is the shape of a pull. To see that, overlay price candles on the liquidity series from Step 2.Endpoint: GET /defi/v3/ohlcv
Here address flips back to the token. Price candles use short field names, c for close, while liquidity candles use close_liquidity_usd. Join the two series on unix_time rather than assuming a shared shape.
Set a threshold on the ratio: flag any candle where close_liquidity_usd drops past a percent you choose while price moves less than a smaller percent over the same unix_time. Tune both numbers to your tolerance for false alarms.
4

Explain a collapse with security and supply data

An alert tells you liquidity left. It does not tell you whether the token was a trap from the start or whether supply was inflated on the way out.Endpoint: GET /defi/token_security, GET /defi/v3/token/mint-burn-txs
Cross the timing of a large mint against the liquidity drop from Step 2. A stealth dilution lines up with the moment liquidity left. A fake burn shows the opposite tell: an announced burn with no matching row in the window, or a ui_amount far smaller than claimed.

Rug Checker

The full authority, concentration, and behavior check set, with the exact field list per chain.

Watch your credit budget

Liquidity monitoring polls, and a tool watching many pools at once can run up calls fast. Endpoint: GET /utils/v1/credits
Poll the liquidity history and price on the same cadence so the two series stay aligned, and call the security and supply endpoints only when an alert fires rather than on every cycle. That keeps a wide watchlist affordable.

Before you ship

  • Every call sends x-chain: solana and an X-API-KEY.
  • address is the token for markets, ohlcv, token_security, and mint-burn-txs, and the pool for liquidity/ohlc/pair.
  • The liquidity series is plotted from open_liquidity_usd through close_liquidity_usd, not a liquidity_usd field.
  • Liquidity and price candles are joined on unix_time, since their field names differ.
  • Security and supply calls fire only on an alert, with credits monitored as pools are added.

FAQ

Liquidity belongs to a pool, while price, security, and supply belong to a token. liquidity/ohlc/pair takes the pool address, while markets, ohlcv, token_security, and mint-burn-txs take the token mint. Carrying the wrong one between calls is the most common mistake in this pipeline.
The liquidity OHLC candles expose open_liquidity_usd, high_liquidity_usd, low_liquidity_usd, and close_liquidity_usd. There is no single liquidity_usd field.
By the divergence between liquidity and price. Liquidity falling alongside price is ordinary selling, while liquidity vanishing as price holds, or dropping far faster than price, is the shape of a pull. The balance fields on each liquidity candle confirm whether tokens actually left the pool.
Resolve, watch, align, and explain: a liquidity collapse stops being a mystery and becomes an event you saw coming and can account for.