liquidity-pools
get/v1/liquidity-pools/{pool_id}

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer

Path parameters

pool_idstring required

Pool ID — a classic pool's SEP-23 strkey (L…) or a soroban pool's contract address (C…), 56 chars.

Response

Pool detail

created_at_ledgerinteger required
fee_bpsinteger required
fee_percentstring required

fee_bps / 100 as decimal string. Conversion done server-side so the frontend can render directly (frontend §6.13/§6.14).

fee_revenuestring nullable

USD, decimal string rounded to cents. Detail endpoint only. volume × fee_bps / 10000 — the pool's 24h fee estimate.

latest_snapshot_atstring date-time nullable
latest_snapshot_ledgerinteger nullable
participant_countinteger nullable

Count of active liquidity providers (lp_positions WHERE shares > 0). Computed from the live table — not dependent on the snapshot freshness window, so it is populated even on stale pools (where tvl/volume/fee_revenue are NULL).

null for a soroban pool: its providers are the holders of its share token, which lp_positions does not index, so a 0 there would claim an empty pool rather than an unread one.

pool_idstring required

A classic pool's SEP-23 strkey (L…) or a soroban pool's contract address (C…), 56 chars. DB stores the same 32 bytes for both (ADR 0024); the handler encodes them by kind at the response boundary.

pool_kind'classic' | 'soroban' required
protocolstring nullable

The protocol running a soroban pool (Aquarius, Soroswap, Phoenix), named only when the protocol's own publications claim the router or factory that registered the pool. null for a classic pool and for a soroban pool registered by a deployment no protocol claims — never a guess from matching code.

total_sharesstring nullable

Pool shares outstanding, as a decimal string. Classic: the latest snapshot. Soroban: the pool's own instance storage, scaled by its share token's published decimals; null when the pool keeps no total there (concentrated and config-factory pools) or the scale is unknown — a 0 is served only for a pool whose every reserve is 0.

tvlstring nullable

USD, decimal string rounded to cents (task 0199 compute-at-read). Populated on both the list (Phase A2, one batched price lookup per page) and the detail endpoint. tvl = latest reserves × each leg's last hourly USD close (prices.price_usd_series_1h, ≤ ~2h stale); null unless both legs price (never a one-leg partial) — untracked assets and stale pools read null.

volumestring nullable

USD, decimal string rounded to cents. Detail endpoint only. Gross trade volume over the last 24h — every trade's leg-A amount, whichever way it went (a classic pool's gross_volume_a, a soroban pool's trade events) — priced at the leg-A last hourly close; null when leg A is unpriceable, when it has no known decimals, and for a pool with three or four legs, whose volume is not priced (its tvl can still be).

Changes