# Builder activity heatmap Source: https://docs.coinversa.ai/api-reference/builder-analytics/builder-activity-heatmap /api-reference/openapi.json get /api/public/v1/builders/{builder}/heatmap When this builder's users trade: a 7x24 UTC weekday-by-hour grid of attributed volume, builder fees, and fill counts over the trailing 12 weeks, zero-filled and Sunday-first. Useful for support-coverage planning, feature-launch timing, and spotting bot-like around-the-clock flow versus human trading hours. # Builder attributed fills Source: https://docs.coinversa.ai/api-reference/builder-analytics/builder-attributed-fills /api-reference/openapi.json get /api/public/v1/builders/{builder}/fills Individual fills attributed to the builder within a lookback window (clamped to 90d), with optional exact-coin and wallet filters. Each fill carries price, size, USD volume, realized PnL, the builder fee paid, and the order id it attributes to. Trigger-order fills (stop/TP) are not yet attributed, so this feed slightly undercounts versus ledger revenue; see the response's dataNotes. # Builder audience overlap Source: https://docs.coinversa.ai/api-reference/builder-analytics/builder-audience-overlap /api-reference/openapi.json get /api/public/v1/builders/{builder}/overlap The top 10 other builders this builder's active users also traded via in the period, ranked by shared users. Each row carries the overlap's share of this builder's active users and the builder fees those shared users paid to the OTHER builder in the period. feesUsd is null (unknown, never zero) when the fee probe exceeds its budget — the shared-user counts always serve; see the response's dataNotes. # Builder order intent Source: https://docs.coinversa.ai/api-reference/builder-analytics/builder-order-intent /api-reference/openapi.json get /api/public/v1/builders/{builder}/orders What this builder's users INTEND, not just what filled: order counts and shares by action type (plain orders, batch modifies, and stop/TP trigger orders), time-in-force mix, reduce-only share, a full trigger breakdown (take-profit vs stop, market vs limit, position-TPSL vs standalone, resolved vs still-pending), and the share of intents that reached at least one attributed fill. Trigger-order history begins 2026-03-24 (earlier history is being backfilled); see the response's dataNotes. # Builder profile Source: https://docs.coinversa.ai/api-reference/builder-analytics/builder-profile /api-reference/openapi.json get /api/public/v1/builders/{builder}/profile Single-builder overview: exact ledger revenue over the period, first/last fee accrual, distinct fee tokens, most common requested fee rate, a daily attributed series (fees, volume, users, fills) with the biggest day highlighted, top coins by attributed volume, and how many of the period's attributed wallets are all-time profitable. coins is null (unknown, never an empty list) when the live coin-split pass exceeds its budget — everything else always serves; see the response's dataNotes. Returns 404 for addresses with no revenue in the fee ledger. # Builder retention cohorts Source: https://docs.coinversa.ai/api-reference/builder-analytics/builder-retention-cohorts /api-reference/openapi.json get /api/public/v1/builders/{builder}/retention Retention matrix for the builder's users: wallets are cohorted by the calendar month (or ISO week, with granularity=weekly) of their first activity via this builder, and each later period counts how many of that cohort were active again. WHICH PLANE defines 'first' and 'active' is disclosed per response in dataNotes: the attribution rollup's presence rows (at least one attributed fill that period) whenever it can serve the builder, otherwise the orders plane (at least one builder-fee order placed that period — the order need not fill, so those counts can exceed the attributed-fill user counts on the cohorts and overlap endpoints). Oldest cohort first; each cohort's activeWallets series starts at its own period (index 0 == newWallets). revenueWeighted=true adds a parallel activeRevenueUsd fee series, cohorted identically to activeWallets; covers the last 12 months or 16 weeks depending on granularity. # Builder revenue leaderboard Source: https://docs.coinversa.ai/api-reference/builder-analytics/builder-revenue-leaderboard /api-reference/openapi.json get /api/public/v1/builders/leaderboard Builders ranked by exact revenue from Hyperliquid's cumulative builder-fee ledger over the requested period (day, week, or month). Each row carries join-attributed volume, distinct users, and fill counts — plus the same metrics for the immediately preceding window for deltas — and the builder's most common requested fee rate over the last 7d of orders. Attributed metrics slightly undercount versus ledger revenue because trigger-order fills (stop/TP) are not yet attributed (~6% of fees ecosystem-wide), and are null altogether when the attribution pass exceeds its budget — revenue always serves. See the response's dataNotes. # Builder user cohort composition Source: https://docs.coinversa.ai/api-reference/builder-analytics/builder-user-cohort-composition /api-reference/openapi.json get /api/public/v1/builders/{builder}/cohorts Cohort composition of the builder's attributed users over the period, split by all-time profitability tier (pnlTiers) and size tier (sizeTiers), with per-cohort users, share of total, builder fees, volume, realized PnL, and fills. Wallets missing from the traders rollup appear under tier 'untracked' so per-tier user counts always sum to totalUsers. Tiers are lifetime labels — the pulse cohort endpoints use 30d-rolling tiers, so the same wallet can sit in a different cohort there. # Builder user journey economics Source: https://docs.coinversa.ai/api-reference/builder-analytics/builder-user-journey-economics /api-reference/openapi.json get /api/public/v1/builders/{builder}/journey Lifetime economics of the builder's trailing-year acquisition cohort (wallets with 3+ attributed fills): average and median revenue per wallet, concentration (avg/median), median days from first fill to peak-revenue day and to 50% and 75% of lifetime revenue, and where users peak (before day 7, days 7-30, after day 30). Answers how fast and how unevenly a builder monetizes new users. BREAKING (2026-08-28): avgRevenueUsd, medianRevenueUsd, concentration, and every avgDays/medianDays field are now NULLABLE and serve null when users = 0 (no qualifying cohort). They previously served 0, which clients could not distinguish from a cohort that genuinely earned nothing. Counts (users, peakDayDistribution) are unchanged and still serve 0. # Builder user lifecycle Source: https://docs.coinversa.ai/api-reference/builder-analytics/builder-user-lifecycle /api-reference/openapi.json get /api/public/v1/builders/{builder}/lifecycle Every wallet that ever traded via this builder, partitioned into mutually exclusive stages by recent activity: active (attributed fill within 7d), cooling (30d), switched (no fill via this builder in 30d but at least one via a DIFFERENT builder — detectable only with all-builder attribution), dormant (90d), and movedOn. Headline ratios: trueRetention, churn, and competitiveLoss (switched share) with competitiveLossFeesUsd — builder fees those switched wallets paid to other builders in the last 30d (null, meaning unknown and never zero, when the fee probe exceeds its budget — the buckets and ratios always serve; see the response's dataNotes). # Builders a wallet trades through Source: https://docs.coinversa.ai/api-reference/builder-analytics/builders-a-wallet-trades-through /api-reference/openapi.json get /api/public/v1/trader/{address}/builders Every builder the wallet had attributed fills via within the lookback window (clamped to 90d), ordered by builder fees paid. Each row carries the wallet's fills, fees, and volume via that builder plus first/last attributed-fill timestamps within the window. # Builder's attributed traders Source: https://docs.coinversa.ai/api-reference/builder-analytics/builders-attributed-traders /api-reference/openapi.json get /api/public/v1/builders/{builder}/traders Wallets that traded via the builder in the window, sortable by builder fees paid, volume, or realized PnL. Each row is enriched with the wallet's latest equity and its all-time cohort tiers (pnlTier / sizeTier) from the traders rollup — lifetime labels, not the 30d-rolling tiers the pulse cohort endpoints classify by, so memberships can differ. # Builder endpoints Source: https://docs.coinversa.ai/api-reference/builders The 12 builder analytics endpoints: ledger-exact revenue, attributed flow, cohort mix, retention, and cross-builder overlap — REST and x402. Twelve endpoints cover the Hyperliquid builder-code economy, all under `https://api.coinversa.ai/api/public/v1` with the `X-API-Key` header. Every endpoint is **Starter** or **Pro**, and every one has an [x402 pay-per-call twin](/api-reference/tiers#x402-pay-per-call) that needs no key at all. For the data model — the exact-vs-attributed distinction, the verified stamp, `dataNotes`, and builder names — see [Builder codes & attribution](/concepts/builder-attribution). ## Endpoint guide ### `/builders/leaderboard` · Starter All builders ranked by **exact ledger revenue** over the period (`period=day|week|month`, default `week`; `limit` ≤100, `offset` ≤1000). Attributed metrics (volume, users, fills) ride along, each with the immediately-preceding same-length window's value for deltas. `feeTenthsBp` is the builder's most common requested fee over the last 7 days of orders, in tenths of a basis point. ### `/builders/{builder}/profile` · Starter One builder in depth: exact `revenueUsd` for the period (default `month`), `firstSeen` / `lastSeen` in the fee ledger, distinct fee tokens, a daily attributed series with `biggestDay`, top coins (`topCoins` ≤50, default 10) with `marketType`, and user totals including `profitableUsers`. Gotcha: returns **404** when the builder has no revenue in the fee ledger; the daily series, coins, and user counts are attribution-plane. ### `/trader/{address}/builders` · Starter The per-wallet view: every builder a wallet traded through in the window (`since`, default `30d`, clamped to 90d), ordered by fees paid descending, with fills, volume, and first/last seen. Gotcha: the response's `window` echoes what you requested even when the data was clamped to 90d. ### `/builders/{builder}/traders` · Pro A builder's attributed wallets for the window, sortable by `sort=builderFee|volume|pnl` (default `builderFee`; `limit` ≤500). Each row carries realized PnL on attributed fills, fees paid, volume, live `equity`, and the exchange-wide all-time `pnlTier` / `sizeTier`. Gotcha: `equity` is `0` and both tiers are `null` when the wallet isn't in the cohort rollup yet. ### `/builders/{builder}/fills` · Pro The raw attributed fill stream: time, wallet, coin, `marketType` (`perp|spot|hip4` — `@N` coins are spot, `#N` are HIP-4 outcomes), side, price, size, PnL, and the builder fee per fill, with `oid` (nullable) and `tid`. Filters: `since` (default `24h`, clamped to 90d), exact `coin` (`BTC`, `xyz:GOLD`, `@123`, `#10010`), and `address`. ### `/builders/{builder}/cohorts` · Pro Cohort composition of the builder's user base for the period: users, share, fees paid, volume, PnL, and fills split by all-time PnL tier and size tier. Gotcha: wallets missing from the cohort rollup appear under tier `untracked`, so per-tier user counts always sum to `totalUsers`; `share` is `users / totalUsers`. ### `/builders/{builder}/retention` · Pro Retention triangle over the **last 12 calendar months** (or 16 ISO weeks with `granularity=weekly`): wallets are cohorted by the period of their first builder-fee order via this builder, and `activeWallets[k]` counts how many were still active k periods later (index 0 = the cohort period itself). Parameters: `granularity=monthly|weekly` (default `monthly`) and `revenueWeighted=true`, which adds a per-cohort `activeRevenueUsd` series of attributed builder fees (fill plane). Gotchas: "active" means *placed at least one builder-fee order that month* — the order need not fill, so these counts can exceed the attributed-fill user counts on `/cohorts` and `/overlap`. It's the heaviest builder query and is cached for 6 hours. ### `/builders/{builder}/overlap` · Pro The top 10 **other** builders this builder's active users also traded through in the period, by shared users. Gotchas: `feesUsd` is what the shared users paid to the *other* builder, not to this one; `share` uses `activeUsers` (this builder's attributed users in the period) as the denominator. ### `/builders/{builder}/orders` · Pro Order intent, not just what filled: `totalIntents` and counts and shares by action type (plain orders, batch modifies, stop/TP trigger orders) in `actions`, the time-in-force mix (`tifs`), `reduceOnlyShare`, a `trigger` breakdown (take-profit vs stop, market vs limit, position-TPSL vs standalone, resolved vs still-pending), and `fillConversion` — how much of that intent reached at least one attributed fill. `period=day|week|month`, default `week`. Gotcha: trigger-order history begins **2026-03-24** (earlier history is being backfilled — see `dataNotes`). ### `/builders/{builder}/heatmap` · Pro When the builder's users trade: a 7×24 UTC weekday-by-hour grid of attributed volume, builder fees and fill counts over a fixed trailing **84 days** (12 weeks), zero-filled and Sunday-first. No query parameters. ### `/builders/{builder}/lifecycle` · Pro Every wallet that ever traded via the builder, in mutually exclusive stages by recent activity: `active` (attributed fill within 7d), `cooling` (30d), `switched` (no fill via this builder in 30d but at least one via a different builder), `dormant` (90d) and `movedOn`. Headline ratios: `trueRetention`, `churn` and `competitiveLoss` (switched share), with `competitiveLossFeesUsd` — fees those switched wallets paid to other builders in the last 30d. Gotcha: `competitiveLossFeesUsd` is `null` (unknown, never zero) when the fee probe exceeds its budget; the stages and ratios always serve. Cached for 6 hours. ### `/builders/{builder}/journey` · Pro Lifetime economics of the builder's trailing-year acquisition cohort (wallets with 3+ attributed fills): average and median revenue per wallet, concentration, median days from first fill to the peak-revenue day and to 50% and 75% of lifetime revenue, and where users peak (before day 7, days 7–30, after day 30). Gotcha: the revenue, concentration and day fields are `null` when `users` is 0; counts still serve `0`. Cached for 6 hours. ## Response envelope Every builder response carries `builderName` (omitted when unknown), a `verified` stamp, and the constant `dataNotes` disclosure. A trimmed leaderboard response: ```json theme={null} { "period": "week", "builders": [ { "builder": "0x1922810825c90f4270048b96da7b1803cd8609ef", "builderName": "Example Builder", "revenueUsd": 1204551.18, "prevRevenueUsd": 1150322.77, "attributedVolumeUsd": 2410880412.55, "attributedUsers": 4812, "attributedFills": 1930211, "feeTenthsBp": 10 } ], "verified": { "ledger_block": 723441892, "ledger_chain_time": "2026-08-21T14:02:11Z", "coverage": null }, "dataNotes": "Revenue figures are exact per Hyperliquid's cumulative builder-fee ledger. Trigger-order fills (stop/TP) currently attribute at ledger level only (~6% of fees ecosystem-wide) until the parser upgrade, so join-attributed fills, volume, and user counts slightly undercount versus ledger revenue." } ``` * `revenueUsd` is **exact** (ledger plane); `attributed*` fields come from the fill join and slightly undercount — see [the two data planes](/concepts/builder-attribution#two-data-planes). * `verified.coverage` is null until the reconciliation pipeline ships — [normal, not an error](/concepts/builder-attribution#the-verified-stamp). ## Errors Builder routes return **huma problem-details** errors (`title` / `status` / `detail` / `code`), the same error model as every `/api/public/v1` endpoint — see [Authentication](/authentication#error-responses). A tier-gated request without sufficient entitlement returns: ```json theme={null} { "title": "Forbidden", "status": 403, "detail": "Api key needed for this request", "code": "TIER_GATE", "reason": "missing_api_key", "current_tier": "none", "required_tier": "starter", "upgrade_url": "https://coinversa.ai/developers#pricing" } ``` `reason` is `missing_api_key` (no key), `invalid_api_key` (key present but inactive) or `insufficient_tier` (key below the required tier). Other errors: `400` with `detail: "invalid ethereum address"` for a malformed builder or wallet address, and `404` from `/profile` when the builder has no revenue in the fee ledger. ## For AI agents The canonical request: ```bash theme={null} curl "https://api.coinversa.ai/api/public/v1/builders/leaderboard?period=week" \ -H "X-API-Key: cvsa_..." ``` Auth on the REST API is the `X-API-Key` header — **not** a Bearer token (the REST API ignores an `Authorization: Bearer` header and treats it as a missing key; the [WebSocket](/websocket/overview#authentication) is where a Bearer token belongs). * **Gate handling** — on a 403, read `code`. If it's `"TIER_GATE"`, report `required_tier` and hand the human `upgrade_url` — or fall back to the endpoint's [x402 twin](/api-reference/tiers#x402-pay-per-call) for keyless pay-per-call. * **Stamp interpretation** — `verified.coverage === null` is normal (pipeline not yet live); never retry on it. Treat `verified.ledger_chain_time` as the freshness timestamp. `revenueUsd` is exact; `attributed*` fields slightly undercount — relay `dataNotes` whenever you present the numbers. * **Field gotchas** — `builderName` absent means unknown, not invalid. Tier slugs are legacy (`smart_money`, not `sharps`) — match per [Trader cohorts](/concepts/cohorts). `since` silently clamps at 90d (the response echoes what you asked for). Retention's active counts are orders-plane and can exceed user counts elsewhere. * **MCP** — builder data is in the [MCP tool catalog](/mcp/tools): eleven `builder_*` tools plus `trader_builders`, the per-wallet inverse. `builder_heatmap` is registered but withheld by default while its hourly rollup backfills, so an agent sees eleven of the twelve. # Chart layer endpoints Source: https://docs.coinversa.ai/api-reference/chart-layers Positioning by entry price, whale trades, Apex vs Crowd cohort-bias history and bounded recent candles: the Hyperliquid REST endpoints behind the Coinversa chart, with parameters, response fields, caching and caveats. Four endpoints feed the Coinversa chart — and work just as well on their own. **Positioning by entry** shows where the money that is open right now got in, **whale trades** lists the largest recent fills with both counterparties, **cohort-bias history** gives Apex vs The Crowd hour by hour, and **recent candles** draws the price underneath. Each one is a single cached call with bounded parameters, and every body says how fresh it is instead of implying "live". Positioning by entry is **Agent**; whale trades and cohort-bias history are **Pro**; candles are **Starter**. On a Starter key the chart keeps its candles, indicators and the Starter snapshots (liquidation levels, cohort positioning) and marks the gated layers instead of failing; on an Agent key it adds the entry profile and average entry lines and marks the two Pro layers. | Endpoint | Tier | Cache | What it answers | | - | - | - | - | | `/live/positioning-by-entry/{coin}` | Agent | 30 s | Where did the open longs and shorts get in, by cohort — and who is underwater? | | `/live/whale-trades/{coin}` | Pro | 60 s | What were the biggest fills in the last few hours, and who was on each side? | | `/live/cohort-bias-history/{coin}` | Pro | 30 s | How has Apex vs The Crowd positioning moved, hour by hour? | | `/pulse/market/candles/recent/{symbol}` | Starter | 15 s | Recent OHLCV for the price pane | All four take a market symbol in the path — a native perp (`BTC`) or a builder-dex symbol (`xyz:GOLD`). Case and surrounding whitespace are normalized, and the body echoes the canonical spelling. For positioning by entry, whale trades and recent candles, a symbol Hyperliquid's own universe does not list is a `404` (`Unknown market 'X'`). Cohort-bias history does not check the universe: an unknown symbol returns `200` with no history. A listed market with nothing to report is a `200` with empty arrays. Cohorts are returned as **legacy slugs** — `money_printer` is Apex, `exit_liquidity` is The Crowd — see [Cohorts](/concepts/cohorts). ## Positioning by entry `GET /live/positioning-by-entry/{coin}` — every open Hyperliquid position on the market, bucketed by **entry price** into equal-width bins, split long vs short and by cohort, plus one summary row per cohort and side. Think of it as a volume-by-price profile built from who is actually holding, not from what traded. | Param | Default | Bounds | Meaning | | - | - | - | - | | `tierType` | `pnl` | `pnl` \| `pnl_recent` \| `size` | Cohort axis: all-time PnL tiers, the same slugs over the wallet's **last 30 days** of PnL (who is winning now), or lifetime traded-volume tiers | | `buckets` | `60` | 1–200 (`422` outside) | Number of equal-width entry-price bins | | `range` | `30` | 1–100 (`422` outside) | Percent below and above the reference mark the bins cover — `30` means mark × 0.7 to mark × 1.3 | ### Response | Field | What it is | | - | - | | `bins[]` | Ascending price bins: `priceLow` / `priceHigh`, `longNotional` / `shortNotional` (USD), `longAccounts` / `shortAccounts`, and a per-cohort `tiers[]` split, most notional first. Empty when there are no positions or no mark | | `cohorts[]` | One row per (tier, side) with open notional, in tier order, long before short — **market-wide**, not limited to the bin range | | `rangeLow` / `rangeHigh` / `binSize` | The entry-price range the bins cover and the width of one bin, USD — derived from `markPx × (100 ± range) / 100` | | `nearLiqPct` | The near-liquidation threshold, in percent of mark (`5`) | | `cohorts[].pricedNotional` / `unpricedNotional` / `unpricedAccounts` | Notional with and without a stored entry price, and the positions without one. `pricedNotional` is the denominator of `avgEntryPx` and `inProfitShare` | | `cohorts[].avgEntryPx` | Notional-weighted average entry over priced positions; `null` when nothing is priced | | `cohorts[].avgLeverage` | Notional-weighted average leverage over positions with a stored leverage; `null` when none has one. `leverageCoveredNotional` is the notional behind it | | `cohorts[].inProfitNotional` / `underwaterNotional` / `flatNotional` | Priced notional strictly on the right side, the wrong side, or exactly at the reference mark. **Fees and funding are not included.** `inProfitShare` is in-profit ÷ priced, 0–1 | | `cohorts[].unknownProfitNotional` | Notional whose side of the mark cannot be told — unpriced positions, or everything when there is no mark | | `cohorts[].outsideRangeNotional` | Priced notional whose entry falls outside the bin range | | `cohorts[].nearLiqNotional` | Notional whose stored liquidation price is within `nearLiqPct` (5%) of the reference mark | | `cohorts[].notional` / `accounts` | Open notional and positions (= wallets — one row per wallet per market), **including** positions without an entry price, so totals reconcile with `/live/cohort-bias/{coin}` | | `long` / `short` | Side totals market-wide, including `pricedNotional` / `unpricedNotional` / `unpricedAccounts`, plus `inRangeNotional` / `outsideRangeNotional` and `inRangeAccounts` / `outsideRangeAccounts` for the bin range | | `markPx`, `markAsOf`, `markMethod`, `markSource` | The reference mark used for the bins, profit split and near-liquidation, and where it came from (below) | | `storedMark`, `storedMarkAsOf`, `markDivergencePct` | The mark the position rows themselves carry, and `(markPx − storedMark) / storedMark × 100` | | `coverage` | `positions`, `withoutTier`, `withoutEntry` (+ `withoutEntryNotional`), `withoutLeverage` — what was and was not counted | | `source` | `table` (`live_positions`), `kind` (`snapshot`), `asOf` (compute time, kept on cache hits), `newestRow` / `oldestRow` / `medianAgeS` (the spread of position observation times) | | `tierType`, `cohortBasis`, `tierWindowDays` | The axis echoed: `all_time_pnl`, `recent_30d_pnl` or `lifetime_volume`; `tierWindowDays` is `30` for `pnl_recent`, else `null` | | `notes[]` | Caveats to show beside the data | Only positions above \$10 notional are counted (`coverage.positions`). **The reference mark** is Hyperliquid's live mark when the feed answers (`markMethod: "live_mark"`, read through a short per-dex cache — never older than 60 s). If the feed is unavailable the endpoint falls back to the mark stored on the most recently refreshed position (`newest_position`), then a notional-weighted stored mark (`weighted_fallback`), then `none` — never a `500`. The live mark is also skipped when it is older than the newest stored position row; the stored mark is then the reference (`newest_position`) and a note says so. The stored mark is always reported beside it: stored notionals are size × each wallet's **last-poll** mark, so a `markDivergencePct` above 1% means stored notionals and liquidation distances are noticeably stale, and a note says so. > [!WARNING] > > **A snapshot, never a history.** This is the open book now. A wallet that has not traded keeps its last-poll mark and notional, so in a quiet market positions can be hours old on average — read `source.medianAgeS` before calling it "live". Cohorts are each wallet's **current** label, not the label it had when it entered. Positions whose wallet has no tier yet are in the bins and side totals but in no cohort row (`coverage.withoutTier`). No wallet addresses are returned. ## Whale trades `GET /live/whale-trades/{coin}` — the largest individual fills on a market by USD notional (`price × size`), largest first, with **both counterparties** where indexed. | Param | Default | Bounds | Meaning | | - | - | - | - | | `since` | `6h` | `1m` to **`24h`**. Over 24h is a `400` — never silently narrowed. Below `1m` is a `422` | Lookback window: number + `m`, `h` or `d` | | `minNotional` | `1000000` | **Floor `100000`** (`422` below; `NaN` and infinities rejected) | Smallest fill, USD | | `limit` | `50` | 1–200 (`422` outside) | Fills returned, largest notional first, then newest | Each `trades[]` row carries `tid` (a **decimal string** — 64-bit, do not parse it into a JavaScript number), `idKind`, `time`, `price`, `size`, `notional`, and a `buyer` and `seller` with `address`, `pnlTier`, `sizeTier` and `direction` (what the fill did to that wallet's position: `Open Long`, `Close Short`, `Long > Short`, …). An unindexed counterparty is an empty party. | Field | What it is | | - | - | | `since` | The window as requested | | `minNotional` | The notional floor applied, USD | | `count` | Fills returned | | `windowStart` / `windowEnd` | The exact UTC bounds queried, `[windowStart, windowEnd)`, Unix ms — captured once per computation | | `truncated` | `true` only when at least one more fill above `minNotional` exists in the window — proven by fetching `limit + 1`, not inferred | | `ranking` | Always `notional_desc` | | `tierAssignment` | Always `current` — tiers are the wallets' labels now, not at fill time | | `aggressor` | Always `unknown` — which side took liquidity is not recorded | | `source.asOf` | Compute time (kept on cache hits). `source.observedThrough` is `null` and `coverage.completeness` is `unknown`: there is no ingestion watermark yet, so the newest fills of the window may be missing | **"Whale" means the trade is large** — not the `whale` size tier (lifetime volume) and not realized PnL (`/pulse/biggest-wins`, `/pulse/biggest-losses` and `/pulse/trades/recent` rank by PnL). A fill whose exchange id was missing carries a negative, wallet-specific id and `idKind: "synthetic"`: it is one wallet's observation and cannot be paired with its counterparty, which may appear as a separate row. > [!NOTE] > > The 24h ceiling is a performance bound, not a data limit: fills are not indexed by notional, so cost grows with the market's fill count in the window. Equivalent windows (`6h`, `360m`) share one cache entry. ## Cohort-bias history `GET /live/cohort-bias-history/{coin}` — long/short notional and net bias per cohort, read from the stored snapshot table. A snapshot is normally stored every **15 minutes**; snapshots from before 10 November 2026 are hourly, so a window that reaches back past that date returns both spacings. Every stored row in the window is returned — nothing is bucketed to hours: | Param | Default | Bounds | Meaning | | - | - | - | - | | `hours` | `168` | Silently clamped to 1–2160 (90 days) | Window ending now, UTC. It bounds time, not rows: at four snapshots an hour, 2,160 hours is up to 8,640 points per series | | `tierType` | `pnl` | `pnl` \| `pnl_recent` \| `size` | `pnl_recent` (30-day PnL tiers) snapshots exist **since 2026-05-14** and are never backfilled | | `tier` | — | Either vocabulary | One series, as a flat array | | `tiers` | — | 1–8 comma-separated slugs, either vocabulary; whitespace and duplicates tolerated. Unknown slug → `422`; with `tier` → `422` | Several series in one call, `[{tier, history}]` in the order given | | `format` | `rows` | `rows` \| `layer` | `layer` returns the chart envelope below and needs `tier` or `tiers`; `rows` returns the plain history rows | The chart's call is `/live/cohort-bias-history/BTC?tiers=apex,crowd&hours=2160&format=layer`, which returns: ```json theme={null} { "coin": "BTC", "tierType": "pnl", "cohortBasis": "all_time_pnl", "tierWindowDays": null, "tiers": ["money_printer", "exit_liquidity"], "windowStart": 1786600500000, "windowEnd": 1794376500000, "netBiasUnit": "ratio", "series": [ { "tier": "money_printer", "hoursPresent": 2209, "points": [ { "timestamp": 1786600800000, "longNotional": 4.4e8, "shortNotional": 6.4e8, "netBias": -0.18, "accountCount": 151 } ] } ], "source": { "table": "cohort_bias_snapshots", "kind": "hourly", "asOf": 1794376500000, "observedFrom": 1786600800000, "observedThrough": 1794375900000, "cadence": "..." }, "coverage": { "hoursExpected": 2160, "provenance": "unknown_mixed", "backtestSuitable": false, "tierAssignment": "snapshot_or_current" } } ``` * **`netBias` is a −1..1 ratio** on this route (`netBiasUnit: "ratio"`), not the −100..100 percent of `/pulse/cohort-bias/history`. Long share is `(netBias + 1) / 2`. * **The window is explicit UTC**: `(windowStart, windowEnd]`, captured once and echoed in the body; rows stamped in the future are excluded. Snapshots are stamped on the quarter hour (:00, :15, :30, :45 UTC), so `observedThrough` normally trails now by up to about 15 minutes. * **Missing snapshots stay missing.** A skipped snapshot has no row, and a cohort with no open notional at a snapshot has no point — never 50%. Draw gaps; do not interpolate or zero-fill. * **Some fields still say "hours".** `hoursPresent` is the number of snapshots returned for the series. With 15-minute snapshots it can be larger than `coverage.hoursExpected` (the hours in the window), so the difference between the two no longer counts what is absent — read spacing and gaps from each point's `timestamp`. `source.kind` still reads `hourly` and `source.cadence` still describes an hourly write; neither reflects the current spacing. > [!WARNING] > > **Not suitable for backtests.** Some hours are written by a backfill that stamps **today's** tier labels on past hours (lookahead) and can touch the last 7 days, not only old ones; beyond the 30-day candle window a backfilled hour may also carry a placeholder price. Live and backfilled rows cannot be told apart yet, so `coverage.provenance` is `unknown_mixed` and `backtestSuitable` is `false` at every age. Compare snapshot to snapshot for "change vs 1h" — the current `/live/cohort-bias/{coin}` value filters out positions of \$10 notional or less, and the snapshots do not. ## Recent candles `GET /pulse/market/candles/recent/{symbol}` returns recent OHLCV, **newest first**: | Param | Default | Bounds | Meaning | | - | - | - | - | | `interval` | `1m` | `1m`, `5m`, `15m`, `1h`, `4h`, `1d` — anything else is a `422` | `1m` and `1h` are stored; `5m`, `15m`, `4h` and `1d` are rolled up from `1m` | | `limit` | `120` | **Max 500.** Larger values are **clamped** to 500, not rejected, and the response carries `X-Limit-Clamped: 500`. Below 1 uses the default | Number of candles | * **Unknown market → `404`**, the same contract as `/market/price/{symbol}`: only when Hyperliquid's universe says the symbol does not exist. A listed market with no candles stays `200 []`. * **Rolled-up intervals inherit 1-minute retention** (30 days), so `1d` returns at most 30 daily bars. * Responses are **cached for 15 s**, keyed by symbol (case-folded), interval and effective limit — `limit=600` and `limit=720` share one entry. The [MCP chart view](/mcp/tools#chart-layers-v0-16-0) is built on exactly these four calls — one per layer, cached, no fan-out. See [the tier matrix](/api-reference/tiers) and [data windows](/api-reference/data-windows) for how they sit alongside the rest of the API. # Compare trader cohort positioning Source: https://docs.coinversa.ai/api-reference/cohort-intelligence/compare-trader-cohort-positioning /api-reference/openapi.json get /api/public/v1/live/cohort-bias/{coin} Compare long and short positions across all-time PnL cohorts for one exact market. Long share by count is longCount / (longCount + shortCount); do not substitute notional bias. Zero denominator means no observed positions, not a neutral trading signal. Responses retain legacy cohort slugs (smart_money = Sharps, exit_liquidity = The Crowd). An empty array means no matching cohort rows, not an error. Suitable as structured agent context; include these definitions when interpreting the result. # Discover trader performance and size cohorts Source: https://docs.coinversa.ai/api-reference/cohort-intelligence/discover-trader-performance-and-size-cohorts /api-reference/openapi.json get /api/public/v1/pulse/cohorts/summary Summarize wallets by all-time PnL and size cohort. Wallet/trade counts and fill-level win rates are not position notional or the probability of a profitable strategy. Response cohort identifiers retain legacy slugs. Use /live/cohort-bias/{coin} for current positioning in a market. # Compare one underlying asset across venues Source: https://docs.coinversa.ai/api-reference/cross-market-intelligence/compare-one-underlying-asset-across-venues /api-reference/openapi.json get /api/public/v1/assets/{canonical}/cross-market Resolve an underlying asset and compare its venue instruments. For example GOLD includes recognized aliases such as PAXG; canonical identifiers are different from venue symbols such as xyz:GOLD. Position-count bias and notional exposure measure different things. Missing optional venue fields mean unavailable, not zero. Aggregated wallet counts sum per-venue counts and do not deduplicate wallets across venues. # Data windows Source: https://docs.coinversa.ai/api-reference/data-windows How far back each endpoint reads. Window sizes are enforced server-side in SQL and aren't visible in the OpenAPI spec. Endpoints fall into four buckets by how they treat history. The window is enforced by the query layer, not by request parameters, so calling with a wider `since` than the underlying source allows will silently return data only as far back as the source goes. ## Rolling 90-day window Lifecycle-derived endpoints. Underlying aggregates are refreshed **hourly**. Querying beyond 90 days returns no rows. | Group | Endpoints | | - | - | | Trader lifecycle | `/pulse/trader/{address}/lifecycles`, `/pulse/trader/{address}/lifecycle-summary` | | Wallet discovery | `/pulse/persistent-winners`, `/pulse/one-month-wonders`, `/pulse/survivors`, `/pulse/anti-survivors`, `/pulse/capital-titans`, `/pulse/coin-kings`, `/pulse/newcomer-whales` | | Behavior analytics | `/pulse/coin-alpha-map`, `/pulse/hour-profitability`, `/pulse/style-distribution`, `/pulse/market-concentration` | | Risk / liquidations | `/pulse/top-liquidators`, `/pulse/lethal-coins`, `/pulse/backstop-events` | | Cohort drilldowns (lifetime) | `/pulse/cohorts/{tierType}/{tier}/*` | | Cohort drilldowns (rolling) | `/pulse/cohorts-recent/{tierType}/{tier}/*` | | Closed positions | `/pulse/trader/{address}/closed-positions`, `/pulse/trader/{address}/closed-positions/stats` (rolling lifecycle window; `/stats` aggregates the latest 10,000 rows) | ## All-time / lifetime Reads the trader's full indexed history (since Coinversa began indexing the wallet). No cap. | Group | Endpoints | | - | - | | Trader profile | `/pulse/trader/{address}`, `/pulse/trader/{address}/tokens` | | Discovery | `/pulse/leaderboard?period=allTime`, `/pulse/hidden-gems`, `/pulse/most-traded`, `/pulse/token-leaderboard/{coin}` | | Cohort summary | `/pulse/cohorts/summary` | | Daily Pulse | `/pulse/daily/{date}`, `/pulse/daily/latest` — editions are frozen once stamped and kept forever; any past date returns the exact document it returned on day one | ## Caller-bounded via `since` Window is what the caller passes, silently capped at 90 days (`since` above `90d` / `2160h` / `129600m` is treated as 90 days). Routes with a lower ceiling reject an overlong window with a `400` instead. | Endpoint | Default `since` | | - | - | | `/pulse/trades/recent` | `1h` | | `/pulse/trader/{address}/trades` | `1h` | | `/pulse/cohorts/{tierType}/{tier}/trades`, `/pulse/cohorts-recent/{tierType}/{tier}/trades` | `1h` | | `/pulse/closed-positions/recent` | `1h` | | `/pulse/lifecycles/recent` | `1h` | | `/pulse/cohorts/daily-stats` | `30d` | | `/pulse/cohort-bias/history` | `7d` | | `/market/historical-oi` | `7d` | | `/live/risk/liquidations/recent`, `/live/risk/liquidations/summary` | `7d` | | `/live/whale-trades/{coin}` | `6h` — **24h ceiling** (`400` above it) | The `since` parameter accepts a number + unit (weeks are not a unit — use `m`, `h` or `d`, e.g. `14d`, not `2w`; a malformed `since` is an error, not a default). Routes with a ceiling **reject** an overlong window rather than clamping it: `since= exceeds this route's ceiling`, as a `400`. `/pulse/trades/recent` is the one to watch — **30 days with `?coin=`, but only 6 hours without it**. `/live/whale-trades/{coin}` stops at **24 hours**. Within a route's ceiling the effective maximum is bounded by the underlying data freshness, not by your tier. ## Builder analytics windows The [builder endpoints](/api-reference/builders) use their own window parameters, enforced server-side like everything else on this page: | Endpoint | Window parameter | Default | Bound | | - | - | - | - | | `/builders/leaderboard` | `period` (`day\|week\|month`) | `week` | Also computes the immediately-preceding same-length window for deltas | | `/builders/{builder}/profile` | `period` | `month` | — | | `/builders/{builder}/traders`, `/cohorts`, `/overlap` | `period` | `week` | — | | `/builders/{builder}/fills` | `since` | `24h` | Clamped to 90d | | `/trader/{address}/builders` | `since` | `30d` | Clamped to 90d | | `/builders/{builder}/orders` | `period` (`day\|week\|month`) | `week` | — | | `/builders/{builder}/retention` | `granularity` (`monthly\|weekly`) | `monthly` | Last 12 calendar months or 16 ISO weeks | | `/builders/{builder}/heatmap` | none | — | Fixed: trailing 84 days (12 weeks) | | `/builders/{builder}/lifecycle` | none | — | Stages by last attributed fill: 7d / 30d / 90d | | `/builders/{builder}/journey` | none | — | Trailing-year acquisition cohort | The `since` clamp is **silent**: the response's `window` field echoes what you requested even when the data was clamped to 90 days — same truncation-detection advice as above: compare response timestamps against your requested window. **Underlying history:** builder-fee orders and attributed fills are complete and gapless from **2025-01-25**. Trigger-order (stop/TP) fill capture went live **2026-08-20** with backfill to **2026-03-24** and earlier history in progress — until it completes, attributed metrics slightly undercount vs ledger revenue (disclosed in every response's `dataNotes`). Ledger revenue itself is cumulative on-chain data with no window floor. The clamps above are per-request query windows, not data floors — retention's 12-month triangle reads the full order history. See [Builder codes & attribution](/concepts/builder-attribution). ## Sharpe windows The [Sharpe endpoints](/concepts/sharpe) count **completed UTC days** and always exclude today. Unlike `since`, their windows are **validated, not clamped**: a `days` value outside its range, non-integer or missing is a `422`; on `/sharpe/interval`, a malformed `startDay`, a start more than 90 days ago or an end later than today is a `400`. | Endpoint | Window | Bound | | - | - | - | | `/pulse/trader/{address}/sharpe`, `/pulse/sharpe-leaderboard` | Last 30 completed days | `days` accepts only `30` | | `/pulse/trader/{address}/sharpe/interval` | `startDay` (inclusive) + `days` | `days` 1–90; `startDay` no earlier than 90 days ago; the exclusive end no later than today | | `/pulse/trader/{address}/sharpe/monthly` | Three buckets | 3 × 30 days (90), or with `useCalendarMonths=true` the current month to date plus two full months (at most 93) | The leaderboard also takes activity floors over the same 30-day window: `minActiveDays` (fill days inside the window, 1–30, default 10) and `minPnl` (−1,000,000,000 to 1,000,000,000, default 1000). Values out of range are a `422`. The `minRecentSharpe` filter reads a stored 30-day score refreshed hourly; `minTotalSharpe` reads a stored score from each wallet's first available daily history through yesterday, refreshed daily. Both are the wallet's **current** score, also when filtering older trades or lifecycles. ## Live / real-time Most `/live/*` routes return current state — each call returns the latest state from the indexer. | Group | Endpoints | | - | - | | `/live/*` snapshots | Long/short ratio, cohort bias, liquidation heatmap, risk overview, positioning by entry, etc. | | Market state | `/market/positions/{address}`, `/market/price/{symbol}`, `/market/orderbook/{symbol}` | | TP/SL trigger orders | `/market/book/triggers/{coin}`, `/pulse/trader/{address}/trigger-orders` — an exchange-wide snapshot refreshed roughly every minute, **latest only, no history**; `503` once it is older than 1,200 seconds (20 minutes). See [TP/SL trigger orders](/concepts/trigger-orders) | These take an explicit window: `/live/long-short/history`, `/live/oi-history[/{coin}]`, `/live/official-oi[/{coin}]`, `/live/risk/coins/{coin}/history` and `/live/cohort-bias-history/{coin}` (`hours`, default 168, silently clamped to 1–2160); `/live/risk/coins/{coin}/mark-dislocations` (`hours`, default and maximum 168); `/live/risk/liquidations/recent` and `/live/risk/liquidations/summary` (`since`, default `7d`); `/live/whale-trades/{coin}` (`since`, default `6h`, 24h ceiling). `/live/cohort-bias-history/{coin}` reads **hourly snapshots** and echoes its explicit UTC window in the `format=layer` body. `/live/positioning-by-entry/{coin}` is a **current snapshot of open positions**, never history, whose rows were observed at different times (`source.medianAgeS`). See [Chart layer endpoints](/api-reference/chart-layers). `/pulse/market/candles/recent/{symbol}` returns at most **500** candles (larger `limit` values are clamped, with `X-Limit-Clamped: 500`); its rolled-up intervals (`5m`, `15m`, `4h`, `1d`) read 1-minute candles kept for **30 days**, so `1d` returns at most 30 bars. ## FAQ > [accordion] Why 90 days? > > The 90-day cap balances refresh cost (full lifecycle reconstruction is expensive) and storage against the analytical window most consumers actually need. Backtests and behavior-pattern studies rarely care about positions older than a quarter; trend-detection consumers care about the last few weeks. > [accordion] Can I get more history? > > Yes — longer windows are available on Enterprise. Contact [chat@coinversa.ai](mailto:chat@coinversa.ai) with the wallet set and time range you need; one-off bulk exports and recurring custom-window endpoints are both possible. > [accordion] How fresh is the data within the 90-day window? > > * **Aggregates** (lifecycles, cohort rollups, discovery endpoints): refreshed **hourly**. > * **Trades, closed positions, raw events**: written as they're indexed, typically within seconds of the L1 fill. > * **Live endpoints**: current indexer state, but freshness differs by route — snapshot routes built from per-wallet polling (e.g. positioning by entry) carry observation times in the body; check `source.medianAgeS` / `source.asOf` / `observedThrough` rather than assuming real time. > [accordion] What happens if I request a window larger than the source allows? > > Where a route has no ceiling, the query runs against the available data and returns whatever it has — compare your response timestamps against your requested `since` to detect truncation. Where a route **does** have a ceiling, an overlong `since` is a `400`, not a short answer. # Get API public v1 assets Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-assets /api-reference/openapi.json get /api/public/v1/assets # Get API public v1 assets by canonical Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-assets-by-canonical /api-reference/openapi.json get /api/public/v1/assets/{canonical} # Get API public v1 census stamp Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-census-stamp /api-reference/openapi.json get /api/public/v1/census/stamp # Get API public v1 entities leaderboard Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-entities-leaderboard /api-reference/openapi.json get /api/public/v1/entities/leaderboard # Get API public v1 entity by address Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-entity-by-address /api-reference/openapi.json get /api/public/v1/entity/{address} # Get API public v1 exchange active traders Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-exchange-active-traders /api-reference/openapi.json get /api/public/v1/exchange/active-traders # Get API public v1 exchange oi Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-exchange-oi /api-reference/openapi.json get /api/public/v1/exchange/oi # Get API public v1 exchange pnl leaders Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-exchange-pnl-leaders /api-reference/openapi.json get /api/public/v1/exchange/pnl-leaders # Get API public v1 exchange positions Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-exchange-positions /api-reference/openapi.json get /api/public/v1/exchange/positions # Get API public v1 exchange volume Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-exchange-volume /api-reference/openapi.json get /api/public/v1/exchange/volume # Get API public v1 hip4 cross product overlap Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-hip4-cross-product-overlap /api-reference/openapi.json get /api/public/v1/hip4/cross-product/overlap # Get API public v1 hip4 daily volume Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-hip4-daily-volume /api-reference/openapi.json get /api/public/v1/hip4/daily-volume # Get API public v1 hip4 most active Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-hip4-most-active /api-reference/openapi.json get /api/public/v1/hip4/most-active # Get API public v1 hip4 outcomes Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-hip4-outcomes /api-reference/openapi.json get /api/public/v1/hip4/outcomes # Get API public v1 hip4 outcomes by outcome ID Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-hip4-outcomes-by-outcome-id /api-reference/openapi.json get /api/public/v1/hip4/outcomes/{outcome_id} # Get API public v1 hip4 outcomes by outcome ID perp position context Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-hip4-outcomes-by-outcome-id-perp-position-context /api-reference/openapi.json get /api/public/v1/hip4/outcomes/{outcome_id}/perp-position-context # Get API public v1 hip4 outcomes by outcome ID recent trades Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-hip4-outcomes-by-outcome-id-recent-trades /api-reference/openapi.json get /api/public/v1/hip4/outcomes/{outcome_id}/recent-trades # Get API public v1 hip4 outcomes by outcome ID summary Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-hip4-outcomes-by-outcome-id-summary /api-reference/openapi.json get /api/public/v1/hip4/outcomes/{outcome_id}/summary # Get API public v1 hip4 questions Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-hip4-questions /api-reference/openapi.json get /api/public/v1/hip4/questions # Get API public v1 hip4 settlements recent Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-hip4-settlements-recent /api-reference/openapi.json get /api/public/v1/hip4/settlements/recent # Get API public v1 hip4 top traders Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-hip4-top-traders /api-reference/openapi.json get /api/public/v1/hip4/top-traders # Get API public v1 hip4 trader by address outcomes Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-hip4-trader-by-address-outcomes /api-reference/openapi.json get /api/public/v1/hip4/trader/{address}/outcomes # Get API public v1 live cohort bias history by coin Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-cohort-bias-history-by-coin /api-reference/openapi.json get /api/public/v1/live/cohort-bias-history/{coin} # Get API public v1 live coins by coin long short Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-coins-by-coin-long-short /api-reference/openapi.json get /api/public/v1/live/coins/{coin}/long-short # Get API public v1 live long short Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-long-short /api-reference/openapi.json get /api/public/v1/live/long-short # Get API public v1 live long short history Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-long-short-history /api-reference/openapi.json get /api/public/v1/live/long-short/history # Get API public v1 live official oi by coin Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-official-oi-by-coin /api-reference/openapi.json get /api/public/v1/live/official-oi/{coin} # Get API public v1 live oi history Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-oi-history /api-reference/openapi.json get /api/public/v1/live/oi-history # Get API public v1 live oi history by coin Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-oi-history-by-coin /api-reference/openapi.json get /api/public/v1/live/oi-history/{coin} # Get API public v1 live positioning by entry by coin Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-positioning-by-entry-by-coin /api-reference/openapi.json get /api/public/v1/live/positioning-by-entry/{coin} # Get API public v1 live risk coins by coin Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-risk-coins-by-coin /api-reference/openapi.json get /api/public/v1/live/risk/coins/{coin} # Get API public v1 live risk coins by coin history Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-risk-coins-by-coin-history /api-reference/openapi.json get /api/public/v1/live/risk/coins/{coin}/history # Get API public v1 live risk coins by coin mark dislocations Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-risk-coins-by-coin-mark-dislocations /api-reference/openapi.json get /api/public/v1/live/risk/coins/{coin}/mark-dislocations # Get API public v1 live risk liquidations recent Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-risk-liquidations-recent /api-reference/openapi.json get /api/public/v1/live/risk/liquidations/recent # Get API public v1 live risk liquidations summary Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-risk-liquidations-summary /api-reference/openapi.json get /api/public/v1/live/risk/liquidations/summary # Get API public v1 live risk overview Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-risk-overview /api-reference/openapi.json get /api/public/v1/live/risk/overview # Get API public v1 live whale trades by coin Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-live-whale-trades-by-coin /api-reference/openapi.json get /api/public/v1/live/whale-trades/{coin} # Get API public v1 market historical oi Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-market-historical-oi /api-reference/openapi.json get /api/public/v1/market/historical-oi # Get API public v1 market orderbook by symbol Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-market-orderbook-by-symbol /api-reference/openapi.json get /api/public/v1/market/orderbook/{symbol} # Get API public v1 market price by symbol Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-market-price-by-symbol /api-reference/openapi.json get /api/public/v1/market/price/{symbol} # Get API public v1 plan Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-plan /api-reference/openapi.json get /api/public/v1/plan # Get API public v1 pulse compare Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-pulse-compare /api-reference/openapi.json get /api/public/v1/pulse/compare # Get API public v1 pulse daily by date Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-pulse-daily-by-date /api-reference/openapi.json get /api/public/v1/pulse/daily/{date} # Get API public v1 pulse daily latest Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-pulse-daily-latest /api-reference/openapi.json get /api/public/v1/pulse/daily/latest # Get API public v1 pulse lifecycle by ID Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-pulse-lifecycle-by-id /api-reference/openapi.json get /api/public/v1/pulse/lifecycle/{id} # Get API public v1 pulse market overview Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-pulse-market-overview /api-reference/openapi.json get /api/public/v1/pulse/market-overview # Get API public v1 pulse stats Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-pulse-stats /api-reference/openapi.json get /api/public/v1/pulse/stats # Get API public v1 pulse trader by address demo Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-pulse-trader-by-address-demo /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/demo # Get API public v1 pulse trader by address lifecycle summary Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-pulse-trader-by-address-lifecycle-summary /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/lifecycle-summary # Get API public v1 pulse trader by address lifecycles Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-pulse-trader-by-address-lifecycles /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/lifecycles # Get API public v1 pulse trader by address performance Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-pulse-trader-by-address-performance /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/performance # Get API public v1 verify Source: https://docs.coinversa.ai/api-reference/get-api-public-v1-verify /api-reference/openapi.json get /api/public/v1/verify # Hidden gems: consistent mid-size winners Source: https://docs.coinversa.ai/api-reference/hidden-gems:-consistent-mid-size-winners /api-reference/openapi.json get /api/public/v1/pulse/hidden-gems Wallets from the all-time traders table with a trade count in [minTrades, maxTrades], win rate >= minWinRate, total PnL >= minPnl, activity on at least minActiveDays distinct days and on at least minDistinctCoins markets, ranked by total PnL. This is a column filter over all-time aggregates, not a skill model: it cannot see position sizing, leverage, or whether the wins came from a single trend, and win rate counts fills with positive closed PnL, so scalpers and market makers score high. largestLoss is <= 0 and is 0 when the wallet has no losing fill. # Introduction Source: https://docs.coinversa.ai/api-reference/introduction The full REST surface under /api/public/v1, auto-generated from the live Coinversa OpenAPI spec — trader analytics, builder analytics, market data, live risk, HIP-4, entities. The Coinversa Pulse REST API exposes everything the MCP server uses and more — 110+ endpoints covering trader analytics, builder analytics, market data, live risk, HIP-4 outcomes, entity resolution, and the cross-market asset registry. **Base URL:** `https://api.coinversa.ai/api/public/v1` **Auth:** `X-API-Key` header on every request — see [authentication](/authentication) **Spec:** [`https://api.coinversa.ai/openapi.json`](https://api.coinversa.ai/openapi.json) (OpenAPI 3.1) The **WebSocket** fill stream is not part of this spec or this reference — it is a separate protocol on `wss://ws.coinversa.ai`, documented in the [WebSocket section](/websocket/overview). The reference pages in the sidebar are auto-generated from the spec. Every endpoint has parameter docs, response schemas, and a "Try it" panel that issues live requests against production using your key. ## Endpoint families Only some endpoints carry tags so far, so the generated reference mixes a few tagged groups with a long untagged list. These are the endpoint families you'll find in it: * **Pulse** — historical trader and cohort analytics; the rich endpoints (`/pulse/*`), including the Daily Pulse editions (`/pulse/daily/*`). * **Builders** — the builder-code economy: ledger-exact revenue, attributed flow, retention, overlap (`/builders/*`, `/trader/{address}/builders`). Start from the [endpoint guide](/api-reference/builders). * **Live** — near-real-time market and risk (`/live/*`), including the chart-layer endpoints: cohort positioning by entry price (`/live/positioning-by-entry/{coin}`, Agent), large fills (`/live/whale-trades/{coin}`, Pro) and cohort bias history (Pro) in layer format (`/live/cohort-bias-history/{coin}?format=layer`). See [Chart layers](/api-reference/chart-layers). For fills pushed as they land rather than polled, use the [WebSocket](/websocket/overview). * **Market** — mark price, L2 orderbook and positions (`/market/price/{symbol}`, `/market/orderbook/{symbol}`, `/market/positions/{address}`), L4 order-book rollups from Coinversa snapshots (`/market/book/*`), historical open interest (`/market/historical-oi`), and OHLCV candles at `/pulse/market/candles/recent/{symbol}` (intervals 1m, 5m, 15m, 1h, 4h, 1d; up to 500 per call). * **Assets** — canonical cross-market taxonomy (`/assets/*`). * **HIP-4** — outcome contract discovery, settlements, perp-position context (`/hip4/*`). * **Entities & exchange** — owner-level resolution (`/entity/*`, `/entities/*`) and exchange-wide aggregates (`/exchange/*`). * **Utility** — plan introspection (`/plan`) and the chain-verification stamp (`/census/stamp`). ## Conventions * Success responses return the resource body directly. **Errors are JSON problem details** — `title`, `status`, `detail`, a machine-matchable `code` (plus `current_tier` / `required_tier` / `upgrade_url` on tier gates), and, when available, a `reason` (`missing_api_key`, `invalid_api_key`, `insufficient_tier`, `invalid_parameters`, `account_suspended`). A suspended account gets 403 with `code: "ACCOUNT_SUSPENDED"` and no tier fields: contact support rather than retrying or upgrading. See [error responses](/authentication#error-responses). * Timestamps are unix milliseconds unless explicitly noted as ISO strings. * Numeric fields are JSON numbers (be aware of float precision on large notionals — most are within JS-safe-integer range). * Pagination uses `limit` + `offset` or cursor-style `since` / `until` depending on the endpoint. ## Tier requirements Every endpoint requires an API key; each is gated at **Free**, **Starter**, **Agent** or **Pro** — the full matrix is in [Tiers](/api-reference/tiers). A 403 carries `code: "TIER_GATE"` with `required_tier` and an `upgrade_url`, so agents can explain exactly what a request needs. ## Stability The public API surface is considered stable. Breaking changes are versioned (`v1` → `v2`); additive changes (new endpoints, new fields) ship without version bumps. The MCP server, by contrast, evolves its tool catalog more aggressively — see [github.com/Coinversaa/mcp-server/releases](https://github.com/Coinversaa/mcp-server/releases). # Inspect potential liquidation exposure by price Source: https://docs.coinversa.ai/api-reference/liquidation-risk/inspect-potential-liquidation-exposure-by-price /api-reference/openapi.json get /api/public/v1/live/liquidation-heatmap/{coin} Group currently indexed positions by liquidation price around the current mark. Risk notional is potential exposure in USD, not realized liquidations or a price forecast. The timestamp is when the heatmap was computed, including when served from cache. Empty buckets with currentPrice zero mean no matching input positions. Numeric query parameters must be integers; buckets <= 0 returns an empty heatmap under the existing contract. # List API public v1 market positions by address Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-market-positions-by-address /api-reference/openapi.json get /api/public/v1/market/positions/{address} # List API public v1 pulse anti survivors Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-anti-survivors /api-reference/openapi.json get /api/public/v1/pulse/anti-survivors # List API public v1 pulse backstop events Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-backstop-events /api-reference/openapi.json get /api/public/v1/pulse/backstop-events # List API public v1 pulse biggest losses Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-biggest-losses /api-reference/openapi.json get /api/public/v1/pulse/biggest-losses # List API public v1 pulse biggest wins Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-biggest-wins /api-reference/openapi.json get /api/public/v1/pulse/biggest-wins # List API public v1 pulse capital titans Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-capital-titans /api-reference/openapi.json get /api/public/v1/pulse/capital-titans # List API public v1 pulse cohort bias history Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-cohort-bias-history /api-reference/openapi.json get /api/public/v1/pulse/cohort-bias/history # List API public v1 pulse cohorts by tier type by tier history Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-cohorts-by-tier-type-by-tier-history /api-reference/openapi.json get /api/public/v1/pulse/cohorts/{tierType}/{tier}/history # List API public v1 pulse cohorts by tier type by tier positions Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-cohorts-by-tier-type-by-tier-positions /api-reference/openapi.json get /api/public/v1/pulse/cohorts/{tierType}/{tier}/positions # List API public v1 pulse cohorts by tier type by tier trades Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-cohorts-by-tier-type-by-tier-trades /api-reference/openapi.json get /api/public/v1/pulse/cohorts/{tierType}/{tier}/trades # List API public v1 pulse cohorts daily stats Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-cohorts-daily-stats /api-reference/openapi.json get /api/public/v1/pulse/cohorts/daily-stats # List API public v1 pulse cohorts recent by tier type by tier alpha concentration Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-cohorts-recent-by-tier-type-by-tier-alpha-concentration /api-reference/openapi.json get /api/public/v1/pulse/cohorts-recent/{tierType}/{tier}/alpha-concentration # List API public v1 pulse cohorts recent by tier type by tier lifecycle stats Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-cohorts-recent-by-tier-type-by-tier-lifecycle-stats /api-reference/openapi.json get /api/public/v1/pulse/cohorts-recent/{tierType}/{tier}/lifecycle-stats # List API public v1 pulse cohorts recent by tier type by tier positions Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-cohorts-recent-by-tier-type-by-tier-positions /api-reference/openapi.json get /api/public/v1/pulse/cohorts-recent/{tierType}/{tier}/positions # List API public v1 pulse cohorts recent by tier type by tier top positions Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-cohorts-recent-by-tier-type-by-tier-top-positions /api-reference/openapi.json get /api/public/v1/pulse/cohorts-recent/{tierType}/{tier}/top-positions # List API public v1 pulse cohorts recent by tier type by tier trades Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-cohorts-recent-by-tier-type-by-tier-trades /api-reference/openapi.json get /api/public/v1/pulse/cohorts-recent/{tierType}/{tier}/trades # List API public v1 pulse coin alpha map Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-coin-alpha-map /api-reference/openapi.json get /api/public/v1/pulse/coin-alpha-map # List API public v1 pulse coin kings Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-coin-kings /api-reference/openapi.json get /api/public/v1/pulse/coin-kings # List API public v1 pulse hour profitability Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-hour-profitability /api-reference/openapi.json get /api/public/v1/pulse/hour-profitability # List API public v1 pulse lethal coins Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-lethal-coins /api-reference/openapi.json get /api/public/v1/pulse/lethal-coins # List API public v1 pulse lifecycles recent Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-lifecycles-recent /api-reference/openapi.json get /api/public/v1/pulse/lifecycles/recent # List API public v1 pulse market candles recent by symbol Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-market-candles-recent-by-symbol /api-reference/openapi.json get /api/public/v1/pulse/market/candles/recent/{symbol} # List API public v1 pulse market concentration Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-market-concentration /api-reference/openapi.json get /api/public/v1/pulse/market-concentration # List API public v1 pulse max pain events Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-max-pain-events /api-reference/openapi.json get /api/public/v1/pulse/max-pain-events # List API public v1 pulse most traded Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-most-traded /api-reference/openapi.json get /api/public/v1/pulse/most-traded # List API public v1 pulse one month wonders Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-one-month-wonders /api-reference/openapi.json get /api/public/v1/pulse/one-month-wonders # List API public v1 pulse perfect exits Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-perfect-exits /api-reference/openapi.json get /api/public/v1/pulse/perfect-exits # List API public v1 pulse persistent winners Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-persistent-winners /api-reference/openapi.json get /api/public/v1/pulse/persistent-winners # List API public v1 pulse style distribution Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-style-distribution /api-reference/openapi.json get /api/public/v1/pulse/style-distribution # List API public v1 pulse survivors Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-survivors /api-reference/openapi.json get /api/public/v1/pulse/survivors # List API public v1 pulse token leaderboard by coin Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-token-leaderboard-by-coin /api-reference/openapi.json get /api/public/v1/pulse/token-leaderboard/{coin} # List API public v1 pulse trader by address daily Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-trader-by-address-daily /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/daily One row per active UTC day in the latest 90 calendar days, today included, oldest first. Applies to every caller. cumulativePnl remains the running total over the wallet's whole indexed history, including omitted earlier days. # List API public v1 pulse trader by address tokens Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-trader-by-address-tokens /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/tokens # List API public v1 pulse trader by address trades Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-trader-by-address-trades /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/trades # List API public v1 pulse trades recent Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-trades-recent /api-reference/openapi.json get /api/public/v1/pulse/trades/recent # List API public v1 pulse wallet drawdown curve by address Source: https://docs.coinversa.ai/api-reference/list-api-public-v1-pulse-wallet-drawdown-curve-by-address /api-reference/openapi.json get /api/public/v1/pulse/wallet-drawdown-curve/{address} # Official OI history for a whole dex Source: https://docs.coinversa.ai/api-reference/live-markets/official-oi-history-for-a-whole-dex /api-reference/openapi.json get /api/public/v1/live/official-oi Per-coin open-interest history for EVERY coin on the requested dex in one response, from Hyperliquid's official market snapshots (open interest, mark price, and rolling 24h notional volume per snapshot). The batch replaces N calls to /live/official-oi/{coin} with one window scan; the per-coin route remains for single-market callers. Hours is clamped to the 90-day product ceiling (1..2160). Coins are grouped in symbol order with each history ascending by time; a coin with no snapshots in the window is simply absent. # L4 order book coverage Source: https://docs.coinversa.ai/api-reference/market/l4-order-book-coverage /api-reference/openapi.json get /api/public/v1/market/book/coverage How fresh the L4 order-book rollups are: coins covered, the newest L1 block height and block time, the age of the freshest row and whether the source is stale. Returns no book data, so it is free — this is the `book` dataset behind the MCP's data_coverage tool. # L4 order book price levels Source: https://docs.coinversa.ai/api-reference/market/l4-order-book-price-levels /api-reference/openapi.json get /api/public/v1/market/book/levels/{coin} The depth ladder with the detail L2 discards: the top price levels per side, best-first, each with total size, order count, DISTINCT wallet count and the age of the oldest order on it — so a level held by one wallet is distinguishable from the same size across twenty. Snapshot-derived, refreshed every 60s, latest-only. Available snapshots return HTTP 200 with stale=true when age_s > 1200, otherwise stale=false. # L4 order book stop map Source: https://docs.coinversa.ai/api-reference/market/l4-order-book-stop-map /api-reference/openapi.json get /api/public/v1/market/book/stops/{coin} Where the stops are: every untriggered stop / take-profit order bucketed by distance from mid in 0.25% steps out to within_pct, with per bucket the count, size, reduce-only share, stop vs take-profit split and side split — plus totals below and above mid, the nearest trigger each side, and how many sit beyond the window. Snapshot-derived, refreshed every 60s, latest-only. Available snapshots return HTTP 200 with stale=true when age_s > 1200, otherwise stale=false. # L4 order book summary Source: https://docs.coinversa.ai/api-reference/market/l4-order-book-summary /api-reference/openapi.json get /api/public/v1/market/book/summary/{coin} How deep and how lopsided a book is right now: touch prices, spread in bps, and per side the size / order count / distinct wallet count within 0.5, 1, 2, 5 and 10% of mid, plus near- and far-band imbalance, the orders resting at the touch, their median age and post-only share. Snapshot-derived, refreshed every 60s, latest-only. Available snapshots return HTTP 200 with stale=true when age_s > 1200, otherwise stale=false. /market/orderbook/{symbol} remains the aggregated L2 view. # L4 order book whales Source: https://docs.coinversa.ai/api-reference/market/l4-order-book-whales /api-reference/openapi.json get /api/public/v1/market/book/whales/{coin} Who is sitting on a book: the largest resting orders (wallet, side, price, size, distance from mid, tif, order type, rest duration) and the biggest wallets per side by total resting size. Wallet addresses join to the trader routes. Snapshot-derived, refreshed every 60s, latest-only. Available snapshots return HTTP 200 with stale=true when age_s > 1200, otherwise stale=false. # Market trigger orders Source: https://docs.coinversa.ai/api-reference/market/market-trigger-orders /api-reference/openapi.json get /api/public/v1/market/book/triggers/{coin} Individual untriggered stop/take-profit orders for a market, ordered by coin and order ID. Latest-only exchange-wide snapshot, refreshed roughly every minute independently of the L4 book rollups. Prices and sizes are decimal strings. Available snapshots return HTTP 200 with stale=true when age_s > 1200, otherwise stale=false. Missing snapshots return 503. A snapshot with no matching orders returns an empty list (including unknown coins); it does not establish market existence. Use /market/book/stops/{coin} for the bucketed aggregate view. Pagination uses limit/offset and snapshot_height; changed snapshots require restarting. # Rolling 24-hour market VWAP Source: https://docs.coinversa.ai/api-reference/market/rolling-24-hour-market-vwap /api-reference/openapi.json get /api/public/v1/pulse/market/vwap/{coin} Exact volume-weighted execution price from indexed perpetual fills over [windowStart, windowEnd), not candles or open-position entries. One current 24h result per venue market; no custom windows or anchors. Markets with at least 25,000 per-user fill rows/day are refreshed together every two minutes; smaller markets and requests before the first successful warm calculate on demand. Requests never start the exchange-wide batch. Failed batch refreshes may serve older results: inspect windowEnd, calculatedAt and latestTradeAt. An empty window returns null vwap, zero volumes and null latestTradeAt; 404 is returned only when the venue confirms the symbol is unknown. No migrations or additional indexes are required. # Newcomer whales Source: https://docs.coinversa.ai/api-reference/newcomer-whales /api-reference/openapi.json get /api/public/v1/pulse/newcomer-whales Wallets whose first known activity — the earlier of their first indexed fill and their first reconstructed position lifecycle — is within newcomerDays, and whose gross lifecycle notional over the last 90 days is at least minNotional. Wallets with no trade history whose first lifecycle sits on the lifecycle table's first day are excluded as window-start artefacts. # PnL Sharpe leaderboard Source: https://docs.coinversa.ai/api-reference/pnl-sharpe-leaderboard /api-reference/openapi.json get /api/public/v1/pulse/sharpe-leaderboard Annualized gross realized-PnL Sharpe proxy: sqrt(365) * mean daily PnL / sample standard deviation, with risk-free return zero. Not equity-normalized portfolio Sharpe; excludes fees, funding and unrealized PnL. Days without fills count as zero. Only completed UTC days are included; today is excluded. No equity eligibility filter applies to wallet routes. Uses 30 completed UTC calendar days. Top 50 wallets with latest stored account equity >= $2,500, at least minActiveDays completed UTC days with a fill in the window (default 10) and window realized PnL >= minPnl (default $1,000); equity and activity eligibility are applied before ranking. minActiveDays=1 with minPnl=-1000000000 removes the activity floors. Missing equity and zero-variance scores are excluded. No checkpoint-age cutoff is applied. EquityUpdatedAt identifies checkpoint age. Ranking breaks ties by realized PnL descending, then wallet ascending. Cached and proactively refreshed every 30 minutes; failed refreshes may serve the previous result. Cache refresh does not refresh equity checkpoints. # Closed-position stats for a wallet Source: https://docs.coinversa.ai/api-reference/pulse/closed-position-stats-for-a-wallet /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/closed-positions/stats Aggregate over the wallet's CLOSED position lifecycles: count, average/min/max hold time, total and average realized PnL, win/loss counts, win rate, and the first/last close time (RFC 3339). Source: the latest 10,000 eligible rows for the wallet in position_lifecycles_full — closed perps only, excluding censored lifecycles that opened before the table's start. There is no time cutoff. The 10,000-position cap bounds work for very active wallets; totalPositions is therefore at most 10,000. losingPositions counts realized_pnl <= 0 (flat closes included), so winningPositions + losingPositions = totalPositions. winRate = winningPositions / totalPositions x 100. Coverage: this route previously aggregated the legacy closed_positions table, whose history reaches further back than the lifecycle table (which begins on 2026-08-31) but whose PnL was the unrealized snapshot at close rather than realized PnL, and whose exact per-position resolution could not complete within the request budget for wallets with tens of thousands of closed positions. totalPositions and firstClose can therefore be lower/later than before because lifecycle history is shorter and the newest 10,000-position cap may apply; PnL figures are now realized. Wallets with no eligible closed lifecycle return zero counts and omit firstClose/lastClose. # Recently closed positions (deprecated: use /pulse/lifecycles/recent) Source: https://docs.coinversa.ai/api-reference/pulse/recently-closed-positions-deprecated:-use-pulselifecyclesrecent /api-reference/openapi.json get /api/public/v1/pulse/closed-positions/recent DEPRECATED — superseded by GET /pulse/lifecycles/recent, which returns the same rows with a richer shape (MAE/MFE, liquidation flag, builder fee, optional spot). Both routes read the position_lifecycles_full table with identical filters, so ids, realizedPnl, fees, size (= peakSize) and notional (= peakSize x entryVwap) agree between them. Fields that only exist on the legacy shape are fixed: unrealizedPnl is 0 (the lifecycle is closed), leverage and leverageType are null (not tracked per lifecycle). Perp-only. # Wallet trigger orders Source: https://docs.coinversa.ai/api-reference/pulse/wallet-trigger-orders /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/trigger-orders Individual untriggered stop/take-profit orders for this exact wallet across markets, optionally filtered by case-sensitive coin. Ordered by coin and order ID. Latest-only exchange-wide snapshot, refreshed roughly every minute. Available snapshots return HTTP 200 with stale=true when age_s > 1200, otherwise stale=false. Missing snapshots return 503. No trader registration or related-subaccount lookup is required; a wallet with no matching orders returns an empty list. Pagination uses limit/offset and snapshot_height; changed snapshots require restarting. # Tier and pricing matrix Source: https://docs.coinversa.ai/api-reference/tiers Which endpoints each tier unlocks, rate limits, and pricing. Single source of truth. Tier gates are enforced server-side. A request without sufficient entitlement returns `403` with code `TIER_GATE` and machine-actionable fields: ```json theme={null} { "title": "Forbidden", "status": 403, "detail": "Api key needed for this request", "code": "TIER_GATE", "reason": "missing_api_key", "current_tier": "none", "required_tier": "starter", "upgrade_url": "https://coinversa.ai/developers#pricing" } ``` `reason` is `missing_api_key` (no key), `invalid_api_key` (key present but inactive) or `insufficient_tier` (key below the required tier). Tiers rank `free` \< `starter` \< `agent` \< `pro` \< `enterprise`, and `required_tier` / `current_tier` use those slugs. Every endpoint requires an API key — keyless requests are rejected with the shape above (`current_tier: "none"`), even on endpoints whose required tier is `free`. The keyless exception is the [x402 pay-per-call surface](#x402-pay-per-call) below. ## Comparison | Tier | Rate (req/min) | Daily cap | Monthly cap | Max keys | Price/mo | | - | -: | -: | -: | -: | -: | | Free | 30 | 1,000 | unlimited | 1 | \$0 | | Starter | 120 | 2,000 | 50,000 | 3 | \$29 | | Agent | 300 | 10,000 | 250,000 | 5 | \$49 | | Pro | 600 | 20,000 | 500,000 | 10 | \$199 | | Enterprise | 10,000+ | unlimited | unlimited | unlimited | from \$1,999 | Free has no monthly bucket — its ceiling is the daily cap. Rate-limit behavior, header semantics, and error response shapes are documented in [Authentication](/authentication). These are **REST** limits. The [WebSocket](/websocket/overview) is metered on capacity instead — connections **per account** (shared across keys), subscriptions per connection, and fair-use bandwidth — and never draws down the request counts above: | Tier | Websocket connections (per account) | Subscriptions per connection | Feeds | Fair-use bandwidth / mo | | - | -: | -: | - | -: | | Free | 1 | 2 | `tradesByCoin`, `tradesByUser`, `candle`, `twapSliceFillsByUser`, `bbo`, `allMids` | 5 GB | | Starter | 1 | 25 | Free's feeds plus `trades`, `tradesByUsers`, `allCandles`, `twapSliceFills`, `twapSliceFillsByUsers`, `l2Book` | 50 GB | | Agent | 2 | 50 | Starter's feeds plus `liquidations`, `liquidationsByUser`, `liquidationsByUsers` | 100 GB | | Pro | 5 | 100 | all 24, incl. `l4Book`, leverage changes, [TWAP orders and statuses](/websocket/feeds#twap-statuses), the [derived quote feeds](/websocket/feeds#derived-order-book-quotes) and the [multi-wallet variants](/websocket/feeds#multi-wallet-subscriptions) | 250 GB | | Enterprise | custom overrides | custom overrides | all 24 | 250 GB | Enterprise websocket numbers are per-account overrides reported in the `connected` frame — see [WebSocket plan limits](/websocket/limits). [Webhooks](/webhooks/overview) are limited on their own too — a subscription allowance per account and, for inbox delivery, a pending-message limit; receiving a delivery never draws down the request counts above. They are managed at `https://webhook.coinversa.ai` with `Authorization: Bearer`, which has its own plain-text [errors](/webhooks/api#errors) rather than the `TIER_GATE` problem details above: | Tier | Webhook subscriptions (tentative) | Types | Pending inbox messages | | - | -: | - | -: | | Free | 0 | can read the definitions; `tradesByUser`, `twapSliceFillsByUser` and `priceCross` are Free-tier data | 0 — inbox subscriptions are `403` | | Starter | 2 | `tradesByUser`, `twapSliceFillsByUser`, `priceCross`, the four [cohort bias types](/webhooks/cohort-bias), and the four [liquidation risk types](/webhooks/liquidation-types) | 1,000 | | Agent | 6 | Starter's plus `liquidations`, `liquidationsByUser` | 50,000 | | Pro | 10 | Agent's plus `twapStatusesByUser` | 1,000,000 | | Enterprise | 20 | every type | 1,000,000 | Inbox messages are kept for 14 days under a 2 GiB compressed-payload cap per account, the oldest evicted on overflow. See [Webhook plan limits](/webhooks/limits) and [Inbox delivery](/webhooks/inbox). ## Endpoints by tier > [accordion] Free (with API key) > > Global and per-trader basics. **Only four `/live/*` endpoints are Free** — the long/short trio and official open interest for one coin (last 24 hours); the live cohort-bias and risk snapshots are Starter, positioning by entry is Agent, and longer history, the whole-dex OI batch, whale trades and cohort-bias history are Pro. Most `/market/*` endpoints are Free, but not all. See the table below for the exact list. > > | Group | Endpoints | > | - | - | > | Global | `/pulse/stats`, `/pulse/market-overview`, `/pulse/leaderboard` | > | Daily Pulse | `/pulse/daily/{date}`, `/pulse/daily/latest` | > | Discovery | `/pulse/hidden-gems`, `/pulse/most-traded`, `/pulse/biggest-wins`, `/pulse/biggest-losses` | > | Cohort summary | `/pulse/cohorts/summary` | > | Trader profile | `/pulse/trader/{address}`, `/pulse/trader/{address}/trades`, `/daily`, `/performance`, `/tokens`, `/demo`, `/closed-positions`, `/closed-positions/stats` | > | Coin views | `/pulse/token-leaderboard/{coin}`, `/pulse/trades/recent` | > | Lifecycle (single) | `/pulse/lifecycle/{id}`, `/pulse/closed-positions/recent` | > | Live state | `/live/long-short`, `/live/coins/{coin}/long-short`, `/live/long-short/history`, `/live/official-oi/{coin}` (last 24 hours on Free, Starter and Agent; up to 30 days on Pro) — **only these four**; the rest of `/live/*` is Starter, Agent or Pro | > | Market | `/market/positions/{address}`, `/market/price/{symbol}`, `/market/orderbook/{symbol}`, `/market/book/coverage` | > | Exchange aggregates | `/exchange/volume`, `/exchange/oi`, `/exchange/active-traders`, `/exchange/positions` | > | Assets | `/assets`, `/assets/{canonical}`, `/assets/{canonical}/cross-market` | > | Other | `/pulse/lifecycles/recent`, `/verify` | > | HIP-4 | `/hip4/outcomes`, `/hip4/outcomes/{outcome_id}`, `/hip4/outcomes/{outcome_id}/recent-trades`, `/hip4/questions`, `/hip4/settlements/recent`, `/hip4/daily-volume`, `/hip4/most-active` | > | Utility | `/plan`, `/census/stamp` | > [accordion] Starter — includes Free, plus > > | Group | Endpoints | > | - | - | > | Live positioning & risk (snapshots) | `/live/cohort-bias/{coin}`, `/live/liquidation-heatmap/{coin}`, `/live/risk/overview`, `/live/risk/coins/{coin}`, `/live/risk/liquidations/recent`, `/live/risk/liquidations/summary` — what is true right now; their history is Pro | > | Chart & book | `/pulse/market/candles/recent/{symbol}` (the price pane of the chart), `/market/book/summary/{coin}` (L4 depth and imbalance summary) | > | Lifecycle aggregates | `/pulse/trader/{address}/lifecycles`, `/pulse/trader/{address}/lifecycle-summary` | > | Comparison | `/pulse/compare` | > | Sharpe | `/pulse/sharpe-leaderboard`, `/pulse/trader/{address}/sharpe`, `/pulse/trader/{address}/sharpe/interval`, `/pulse/trader/{address}/sharpe/monthly` — a realized-PnL Sharpe proxy (not equity returns; excludes fees, funding and unrealized PnL). The leaderboard only ranks wallets with at least $2,500 of stored equity and, by default, 10 fill days and $1,000 of realized PnL in the window. The `minRecentSharpe` / `minTotalSharpe` filters on cohort and positioning endpoints do not change those endpoints' tiers. See [Sharpe ratios](/concepts/sharpe) | > | Coin alpha | `/pulse/coin-alpha-map`, `/pulse/coin-kings` | > | Behavior | `/pulse/hour-profitability`, `/pulse/style-distribution` | > | Risk | `/pulse/top-liquidators` | > | Builder analytics | `/builders/leaderboard`, `/builders/{builder}/profile`, `/trader/{address}/builders` — see [Builder endpoints](/api-reference/builders) | > | Exchange aggregates | `/exchange/pnl-leaders` | > | HIP-4 | `/hip4/outcomes/{outcome_id}/summary`, `/hip4/top-traders`, `/hip4/trader/{address}/outcomes` | > [accordion] Agent — includes Starter, plus > > Starter's endpoints at Agent volume (300 / min, 10,000 / day, 250,000 / month), plus two live positioning routes: > > | Group | Endpoints | > | - | - | > | Positioning by entry | `/live/positioning-by-entry/{coin}` — open positions bucketed by entry price, by cohort; the chart's entry profile and average entry lines. See [Chart layer endpoints](/api-reference/chart-layers#positioning-by-entry) | > | L4 stop map | `/market/book/stops/{coin}` — untriggered stop and take-profit size bucketed by distance from mid. The per-order book tools (`/market/book/whales/{coin}`, `/market/book/levels/{coin}`, `/market/book/triggers/{coin}`) stay Pro | > [accordion] Pro — includes Agent, plus > > | Group | Endpoints | > | - | - | > | Discovery (deep) | `/pulse/persistent-winners`, `/pulse/one-month-wonders`, `/pulse/survivors`, `/pulse/anti-survivors`, `/pulse/capital-titans`, `/pulse/newcomer-whales` | > | Risk & market | `/pulse/lethal-coins`, `/pulse/backstop-events`, `/pulse/market-concentration`, `/market/historical-oi` | > | Live risk history | `/live/risk/coins/{coin}/history`, `/live/risk/coins/{coin}/mark-dislocations` | > | Live OI & cohort-bias history | `/live/oi-history`, `/live/oi-history/{coin}`, `/live/official-oi` (all coins), `/live/official-oi/{coin}` beyond 24 hours (7-day default, up to 30 days), `/live/cohort-bias-history/{coin}` | > | Chart layers | `/live/whale-trades/{coin}` — with `/live/cohort-bias-history/{coin}` above, these are the chart's history and large-trade layers (the candles are Starter, positioning by entry is Agent); see [Chart layer endpoints](/api-reference/chart-layers) | > | Deep archetypes | `/pulse/max-pain-events`, `/pulse/perfect-exits`, `/pulse/wallet-drawdown-curve/{address}` | > | Cohort drilldowns (lifetime) | `/pulse/cohorts/{tierType}/{tier}/positions`, `/trades`, `/history` | > | Cohort drilldowns (rolling 30d) | `/pulse/cohorts-recent/{tierType}/{tier}/positions`, `/trades`, `/lifecycle-stats`, `/top-positions`, `/alpha-concentration` | > | Cohort timeseries | `/pulse/cohorts/daily-stats`, `/pulse/cohort-bias/history` | > | Builder analytics (deep) | `/builders/{builder}/traders`, `/builders/{builder}/fills`, `/builders/{builder}/cohorts`, `/builders/{builder}/retention`, `/builders/{builder}/overlap`, `/builders/{builder}/orders`, `/builders/{builder}/heatmap`, `/builders/{builder}/lifecycle`, `/builders/{builder}/journey` — see [Builder endpoints](/api-reference/builders) | > | L4 order book (per order) | `/market/book/whales/{coin}`, `/market/book/levels/{coin}` — order-level, with the wallet on every order. `/market/book/stops/{coin}` is Agent, `/market/book/summary/{coin}` is Starter; `/market/book/coverage` is Free. | > | TP/SL trigger orders | `/market/book/triggers/{coin}`, `/pulse/trader/{address}/trigger-orders` — every pending stop-loss and take-profit order, by market or by wallet. See [TP/SL trigger orders](/concepts/trigger-orders) | > | Entity resolution | `/entity/{address}`, `/entities/leaderboard` | > | HIP-4 (deep) | `/hip4/cross-product/overlap`, `/hip4/outcomes/{outcome_id}/perp-position-context` | > [accordion] Enterprise — everything, plus > > * Custom RPM, daily, and monthly caps > * Unlimited active keys > * Custom data windows beyond 90 days (see [Data windows](/api-reference/data-windows)) > * Dedicated support channel > * SLA on uptime and response times > * Optional bulk historical exports and custom data delivery > > Negotiated per-engagement. Contact [chat@coinversa.ai](mailto:chat@coinversa.ai). ## x402 pay-per-call Every GET endpoint has a **pay-per-call twin** — no API key, no subscription. The twin lives at the same path under the `/x402` prefix; the [builder analytics endpoints](/api-reference/builders) are the first surface we document for it: ```text theme={null} https://api.coinversa.ai/x402/api/public/v1/builders/leaderboard?period=week ``` Payment is negotiated via the [x402 protocol](https://www.x402.org/): an unpaid request returns `HTTP 402` with a challenge (base64 JSON in the `Payment-Required` header) listing the accepted networks, assets, and the per-call price; your client signs a payment and retries with the payment header. x402 client libraries handle the handshake automatically — the per-call price is whatever the 402 challenge quotes. Two things to know: * The x402 twins are **intentionally absent from the OpenAPI spec** and the "Try it" panels — this page and [Builder endpoints](/api-reference/builders) are their documentation surface. * The [MCP server](/mcp/setup) does not sign x402 payments natively — pay-per-call is a direct-REST feature today. ## How tier resolution works Each API key has an effective tier. Endpoint access and daily/monthly caps are checked using that tier, but REST usage is shared across the account’s keys — creating another key does not create another request allocation. A Free key calling alongside an unused Pro key still has Free endpoint access and daily/monthly caps. The websocket resolves differently: a connection gets the **highest entitled tier across the account's keys**, and its connection cap is shared by all of them. See [WebSocket plan limits](/websocket/limits#resolved-limits-not-the-table). Tier entitlement is granted by an active Stripe subscription, an explicit grandfather override, or a failed renewal payment still inside its **4-day** grace window — access continues for 4 days after the failed payment, then the key drops to Free limits until the card is updated. A paid key whose own entitlement ends is still served at its tier if another active key on the same account is entitled at that tier (or at the lower paid tier that sibling holds); otherwise it falls back to Free limits. The key is **not deleted** — your existing integrations keep working at reduced quota until you reactivate. See [Authentication](/authentication) for the request-time mechanics and rate-limit headers. # Top liquidators (90d) Source: https://docs.coinversa.ai/api-reference/top-liquidators-90d /api-reference/openapi.json get /api/public/v1/pulse/top-liquidators Wallets that most often appear as the liquidator on other wallets' position lifecycles liquidated in the last 90 days, ranked by penalty fees collected. victimClosedPnl is the summed closed PnL of the LIQUIDATED positions — the victims' losses, a negative number — not the liquidator's profit: the liquidator's own PnL is realized later, when the position it took over closes, and cannot be attributed from fills. Rows where the liquidator is the liquidated wallet itself (mark-price closes) are excluded. # Trader closed positions Source: https://docs.coinversa.ai/api-reference/trader-closed-positions /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/closed-positions Complete, closed perp lifecycles in the rolling lifecycle retention window. Same source and completeness filters as closed-positions/stats (stats is capped at the latest 10,000 rows). realizedPnl and fees come directly from the lifecycle; PnL is gross of fees. size is peak size. unrealizedPnl is 0 on closed positions. leverage and leverageType are null (not tracked per lifecycle). # Trader leaderboard Source: https://docs.coinversa.ai/api-reference/trader-leaderboard /api-reference/openapi.json get /api/public/v1/pulse/leaderboard Ranked traders. period=allTime reads the all-time traders table. day/week/month aggregate trader_daily_stats over UTC calendar days (a fill at 23:59 counts for its whole day). minTrades (default 10) applies before ranking in every supported sort. score and risk-adjusted are unsupported and return 400. winRate is the percentage of all fills with positive closed PnL, not a position win rate. PnL is gross of fees. totalFees, largestWin, largestLoss, firstTradeAt and lastTradeAt are all-time facts the period aggregate does not compute, so period rows carry null for them. total is the number of rows returned. Spot pairs are not excluded, so a spot market maker can top the pnl and volume sorts. # Inspect a wallet's trading context Source: https://docs.coinversa.ai/api-reference/wallet-intelligence/inspect-a-wallets-trading-context /api-reference/openapi.json get /api/public/v1/pulse/trader/{address} Fetch the indexed trader profile for a wallet. Combine it with the WebSocket tradesByUser feed to follow wallet activity. Trade statistics describe indexed fills; a successful lookup does not establish that a stream is connected. A syntactically valid example address may have no indexed profile (404). Use a wallet you intend to inspect. # Wallet interval PnL Sharpe Source: https://docs.coinversa.ai/api-reference/wallet-interval-pnl-sharpe /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/sharpe/interval Annualized gross realized-PnL Sharpe proxy: sqrt(365) * mean daily PnL / sample standard deviation, with risk-free return zero. Not equity-normalized portfolio Sharpe; excludes fees, funding and unrealized PnL. Days without fills count as zero. Only completed UTC days are included; today is excluded. No equity eligibility filter applies to wallet routes. startDay is an inclusive YYYY-MM-DD UTC date; days is required and must be 1–90. Start must be within the last 90 days and the exclusive end cannot exceed today. Invalid bounds are rejected, not silently shortened. A one-day interval returns a null score and zero standard deviation. # Wallet monthly PnL Sharpe Source: https://docs.coinversa.ai/api-reference/wallet-monthly-pnl-sharpe /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/sharpe/monthly Annualized gross realized-PnL Sharpe proxy: sqrt(365) * mean daily PnL / sample standard deviation, with risk-free return zero. Not equity-normalized portfolio Sharpe; excludes fees, funding and unrealized PnL. Days without fills count as zero. Only completed UTC days are included; today is excluded. No equity eligibility filter applies to wallet routes. Returns exactly three buckets, newest first. useCalendarMonths defaults to false: the last 30 completed days, the previous 30, and the previous 30 (90 days total). True uses the current partial UTC month and two preceding full UTC months, capped at 93 days and excluding all earlier months. On the first of a month the current bucket is empty with a null score. Each bucket exposes its actual dates, day count and asOf. # Wallet PnL Sharpe Source: https://docs.coinversa.ai/api-reference/wallet-pnl-sharpe /api-reference/openapi.json get /api/public/v1/pulse/trader/{address}/sharpe Annualized gross realized-PnL Sharpe proxy: sqrt(365) * mean daily PnL / sample standard deviation, with risk-free return zero. Not equity-normalized portfolio Sharpe; excludes fees, funding and unrealized PnL. Days without fills count as zero. Only completed UTC days are included; today is excluded. No equity eligibility filter applies to wallet routes. Uses 30 completed UTC calendar days. No equity eligibility filter applies to this route. # Authentication Source: https://docs.coinversa.ai/authentication API keys, rate-limit headers, tier behavior, and error responses. Every request to `api.coinversa.ai/api/public/v1/*` requires an API key. Get one at [developers.coinversa.ai](https://developers.coinversa.ai). This page is about the **REST API**. The [WebSocket](/websocket/overview) uses the same key but a different protocol: a Bearer token on the upgrade (or the `bearer` subprotocol from a browser), refusals as HTTP `401` / `429` / `503` or close codes rather than problem details, and capacity limits rather than request quotas. Its rules live in [WebSocket authentication](/websocket/overview#authentication), not here. ## Sending the key Pass your key in the `X-API-Key` header on every request: ```bash theme={null} curl https://api.coinversa.ai/api/public/v1/pulse/stats \ -H "X-API-Key: cvsa_..." ``` That's it — no OAuth, no bearer prefix, no signing. (The REST API ignores an `Authorization: Bearer` header entirely; that header is how the [WebSocket](/websocket/overview#authentication) authenticates.) > [!WARNING] > > Never commit your key to a public repo, and never ship it in a page served to other people — a key in someone else's browser is a key you have published. For a REST call from a browser, keep the key on a server you control and proxy the request. The [WebSocket](/websocket/overview#authentication) can be opened directly from **your own** browser tools with the `bearer` subprotocol; the same publishing rule applies. Use a separate key per environment so you can rotate without disrupting other clients. ## Tiers Your key's tier is set by your active subscription. Free is the default; paid tiers are managed in the [billing portal](https://developers.coinversa.ai/billing). | Tier | Rate / min | Per day | Per month | Keys | Price | | - | -: | -: | -: | -: | -: | | Free | 30 | 1,000 | unlimited | 1 | \$0 | | Starter | 120 | 2,000 | 50,000 | 3 | \$29 / mo | | Agent | 300 | 10,000 | 250,000 | 5 | \$49 / mo | | Pro | 600 | 20,000 | 500,000 | 10 | \$199 / mo | | Enterprise | 10,000+ | unlimited | unlimited | unlimited | from \$1,999 / mo | See [pricing](/pricing) for what each tier unlocks. > [!NOTE] > > **Access is checked per key; request usage is shared by account.** Additional keys do not multiply your REST RPM or daily/monthly allowance. A key serves the tier it was provisioned at, capped by your account's active entitlement — a Free key calling alongside an unused Pro key on the same account still has Free endpoint access and daily/monthly caps. See [how tier resolution works](/api-reference/tiers#how-tier-resolution-works). ## Rate-limit headers Authenticated responses include these, 429s included: | Header | Meaning | | - | - | | `X-RateLimit-Tier` | Tier resolved for this request (`free`, `starter`, `agent`, `pro`, `enterprise`) | | `X-RateLimit-Remaining` | Minimum remaining tokens across the account minute and per-route buckets | | `X-RateLimit-Next` | Time until the next token is available across the checked buckets (a duration string, e.g. `12.4s`), not a full-window refill | | `X-RateLimit-Route` | Remaining allowance on the per-route limit, where one applies | | `X-RateLimit-Daily` | Requests remaining today (only on tiers with a daily cap) | | `X-RateLimit-Monthly` | Requests remaining this billing month (only on tiers with a monthly cap) | | `X-RateLimit-Scope` | Identity the limits were counted against: `account` (keyed request) or `ip` | | `X-RateLimit-Reset` | Unix seconds when the next token is available | | `X-RateLimit-Daily-Reset` / `X-RateLimit-Monthly-Reset` | Unix seconds when the daily / monthly allowance resets (only on tiers with that cap) | | `Retry-After` | Seconds to wait before retrying (on `429` only) | | `X-Billing-State` / `X-Billing-Grace-Expires` | Present only during a payment grace window: the state (`grace`) and when the window ends | ## Error responses All errors are JSON **problem details**: `title`, `status`, a human-readable `detail`, a machine-matchable `code` (retained for compatibility) and, when available, a more specific `reason` (`missing_api_key`, `invalid_api_key`, `insufficient_tier`, `invalid_parameters` or `account_suspended`). Match on `reason` when present, else `code` — the `detail` wording can change. There is no 401 in this API: every auth failure is a `403`. > [accordion] 403 Forbidden — missing key (code TIER_GATE) > > ```json theme={null} > { > "title": "Forbidden", > "status": 403, > "detail": "Api key needed for this request", > "code": "TIER_GATE", > "reason": "missing_api_key", > "current_tier": "none", > "required_tier": "free", > "upgrade_url": "https://coinversa.ai/developers#pricing" > } > ``` > > Action: include the `X-API-Key` header. `required_tier` names the minimum tier for the endpoint — even `free` endpoints need a key. A key that is recognized but inactive gets this same `Api key needed` body with `reason` `invalid_api_key`. > [accordion] 403 Forbidden — invalid key (code FORBIDDEN) > > ```json theme={null} > { > "title": "Forbidden", > "status": 403, > "detail": "Invalid API key", > "code": "FORBIDDEN", > "reason": "invalid_api_key" > } > ``` > > Action: check the key isn't revoked or rotated in the [portal](https://developers.coinversa.ai/keys). > [accordion] 403 Forbidden — insufficient tier (code TIER_GATE) > > ```json theme={null} > { > "title": "Forbidden", > "status": 403, > "detail": "Tool not available for current tier, must be pro or higher", > "code": "TIER_GATE", > "reason": "insufficient_tier", > "current_tier": "starter", > "required_tier": "pro", > "upgrade_url": "https://coinversa.ai/developers#pricing" > } > ``` > > `required_tier` is one of `starter`, `agent`, `pro` or `enterprise` — tiers rank `free` \< `starter` \< `agent` \< `pro` \< `enterprise`. > > Action: upgrade at `upgrade_url`, or (for [builder endpoints](/api-reference/builders)) fall back to the endpoint's [x402 pay-per-call twin](/api-reference/tiers#x402-pay-per-call). Agents: report `required_tier` to the human rather than retrying. > [accordion] 403 Forbidden — account suspended (code ACCOUNT_SUSPENDED) > > ```json theme={null} > { > "title": "Forbidden", > "status": 403, > "detail": "Account flagged for suspicious activity, check email or contact support", > "code": "ACCOUNT_SUSPENDED", > "reason": "account_suspended" > } > ``` > > Action: check your email or contact support. Do not retry or upgrade — the hold applies to every key on the account. > [accordion] 429 Too Many Requests — per-minute rate limit (code RATE_LIMITED) > > ```json theme={null} > { > "title": "Too Many Requests", > "status": 429, > "detail": "Rate limit exceeded for requests (Exceeded requests per minute)", > "code": "RATE_LIMITED" > } > ``` > > Action: wait the number of seconds in `Retry-After` (or until `X-RateLimit-Reset`), or upgrade for higher RPM. > [accordion] 429 Too Many Requests — daily or monthly cap (code RATE_LIMITED) > > ```json theme={null} > { > "title": "Too Many Requests", > "status": 429, > "detail": "Exceeded daily and/or monthly request allowance update plan or wait for next reset", > "code": "RATE_LIMITED" > } > ``` > > Action: the daily window resets at 00:00 UTC; the monthly bucket at your billing period boundary. `Retry-After` gives the seconds to wait, and `X-RateLimit-Daily-Reset` / `X-RateLimit-Monthly-Reset` give the reset times. Or upgrade. > [accordion] 502 Bad Gateway (code BAD_GATEWAY) > > The upstream Hyperliquid endpoint timed out or returned an error. Retry with backoff. (The MCP server retries timeouts and short-lived 429s, not 502s.) > [!NOTE] > > **No key at all?** Every GET endpoint has a keyless [x402 pay-per-call twin](/api-reference/tiers#x402-pay-per-call) — payment is negotiated per request via the x402 protocol instead of a subscription. The [builder analytics endpoints](/api-reference/builders) are the documented x402 surface today. ## Historical-window caps Caller-controlled history windows (`since`, `hours`/`days` params, explicit `startTime`/`endTime` ranges) are capped at **90 days** on every tier — the cap is universal, not tier-based. How a route enforces it differs: routes with a documented `since` **ceiling reject** an overlong window with a `400` (`since= exceeds this route's ceiling`), while the rest run against the capped window and may echo the range you asked for. Compare response timestamps against your requested range to detect truncation, and see [data windows](/api-reference/data-windows) for the per-route ceilings. Risk endpoints (`/live/risk/liquidations/*`, etc.) are additionally clamped to data starting `2026-01-01` (the day we began collecting L1 liquidation events). Longer windows are available on Enterprise as custom exports and negotiated data delivery, not as an API parameter. See [Data windows](/api-reference/data-windows) for per-endpoint window semantics. ## Usage logging Authenticated requests that pass the access and rate-limit checks are logged with the response time and status code so you can audit usage in **Usage** in the portal. Logs include endpoint, method, IP, and user-agent — but never the key itself (only the SHA-256 hash). # Changelog Source: https://docs.coinversa.ai/changelog/overview Product updates and releases for Coinversa Pulse. **November 13, 2026** ## Webhooks: four liquidation risk types Four subscription types that report **potential liquidation exposure** are now available, with delivery confirmed in production. They are on **Starter** and above, with both delivery modes: a signed POST to your URL, or the inbox. Two watch **one wallet's** positions: * **`liquidationRiskCross`**: a position's distance to its liquidation price crosses a threshold (`liquidationDistancePct`). `direction` is `below` (closer to liquidation), `above` or `both`. Reaching the threshold exactly is not a crossing. * **`liquidationRisk`**: that distance has moved at least `points` percentage points from the last notified baseline. It takes a `liquidationDistancePct` filter, exact or as `gt` / `gte` / `lt` / `lte` bounds. Two watch a **whole market**: * **`liquidationExposure`**: at least `minNotional` of positions have liquidation levels within a `priceMovePct` move from the mark — `down` sums longs, `up` sums shorts. After it fires, exposure must fall below `resetNotional` before it can fire again. * **`liquidationMap`**: the market's full liquidation map, sent when the mark has moved at least `priceChangePct` from the reference price. The first observation only records the reference. The distance is `100 * abs((markPx - liquidationPx) / markPx)`, in percent: `"5"` means 5%. The wallet types take **exactly one** wallet; `coin` is case-insensitive and can be a qualified symbol such as `xyz:GOLD`. These types describe positions that are **still open**. They are not executed liquidations — those are the existing `liquidations` and `liquidationsByUser` types — and they are not a guarantee that a position will be liquidated, or a recommendation to trade. The service checks about once a minute, using positions and liquidation levels as last stored; it does not follow every price tick, and a move that happens and reverses between two checks is not seen. The market types need a mark price tick less than five minutes old, and send nothing without one. See [Liquidation risk types](/webhooks/liquidation-types) for the arguments, the delivered fields and an illustrative delivery for each, and the [API reference](/webhooks/api#liquidation-risk-types) for the create bodies. **November 11, 2026** ## Webhooks: four cohort bias types Four new subscription types report how a **trader cohort** — Apex, The Crowd, Heavyweights and the rest of the [PnL and size tiers](/concepts/cohorts) — is positioned on one coin. They join the six event types, on **Starter** and above, with both delivery modes: a signed POST to your URL, or the inbox. * **`cohortBias`**: the cohort rows of each new snapshot — long notional, short notional, net bias and account count — and the current state once when the subscription is created. Leave `cohort` out to get every cohort's row. * **`cohortBiasFlip`**: a cohort's net bias goes from long to short, or from short to long. `direction` (`long`, `short` or `both`) picks the side it flips to. * **`cohortBiasOpposition`**: two cohorts enter opposite positioning — one net long, the other net short. It fires on entry, not while the opposition persists. * **`cohortBiasMove`**: net bias has moved at least `points` percentage points from the last notified baseline — points of net bias, not a relative percent. * **Net bias** is `(longNotional - shortNotional) / (longNotional + shortNotional)`, from `-1` to `1`; positive is net long. `cohortBias`, `cohortBiasFlip` and `cohortBiasMove` take `netBias`, `longNotional`, `shortNotional` and `accountCount` filters, exact or as `gt` / `gte` / `lt` / `lte` bounds. * **Four classifications**: `tierType` is `pnl` (default), `size`, `pnl_recent` or `size_recent`. Cohort positioning is a **stored snapshot**, normally taken every 15 minutes. These types tell you about a change at the next snapshot, not when a trade happens, and a change that happens and reverses between two snapshots is not seen. The snapshot already stored when you subscribe only sets the starting state for a flip, an opposition or a move; the next new one is the first that can produce one. They describe positioning; they are not a recommendation to trade. See [Cohort bias types](/webhooks/cohort-bias) for the arguments, the delivered rows and a delivery example for each, and the [API reference](/webhooks/api#cohort-bias-types) for the create bodies. **November 11, 2026** ## Cohort bias history: a snapshot every 15 minutes Cohort bias snapshots are now normally stored every **15 minutes** instead of once an hour, starting 10 November 2026. Snapshots from before that date stay hourly, so a window that reaches back past it returns both spacings. * **More rows for the same window.** `/live/cohort-bias-history/{coin}`, `/pulse/cohort-bias/history` and the cohort section of `/live/risk/coins/{coin}/history` return every stored snapshot, so 15-minute data is four times the rows of hourly data over the same window. The `hours` and `since` limits are unchanged. The `live_cohort_bias_history` and `pulse_cohort_bias_history` tools page and cap rows as before. * **`format=layer` still says "hours" in places.** `hoursPresent` is the number of snapshots returned, so it can now be larger than `coverage.hoursExpected`, and `source.kind` still reads `hourly`. Read spacing and gaps from each point's `timestamp`. See [Cohort-bias history](/api-reference/chart-layers#cohort-bias-history). **November 9, 2026** ## Webhooks: the WebSocket feeds, pushed to your URL **Webhooks** push the same data the WebSocket streams to a URL you own, so you no longer have to hold a socket open. Create a **subscription** — a type, a wallet or market, optional filters and your URL — and every matching frame is POSTed to you, signed, as the raw frame plus the subscription it matched. * **Six subscription types**: a wallet's fills (`tradesByUser`), its TWAP fills (`twapSliceFillsByUser`) and the node's TWAP status records (`twapStatusesByUser`, Pro); every liquidation on the exchange (`liquidations`) or one account's (`liquidationsByUser`), both Agent; and a market's mark or trade price crossing a threshold, `above`, `below` or `both` (`priceCross`). See [Subscription types](/webhooks/events). * **One subscription, up to 1,000 wallets**: on the four by-user types `args.user` is one address or an array of 1 to 1,000 addresses, sorted and deduplicated — one subscription against your allowance for all of them. * **Exact filters**: `coin`, `side`, `px`, `sz` and `closedPnl` on fills and liquidations, as exact values or `gt` / `gte` / `lt` / `lte` bounds on decimal strings compared with exact arithmetic — no floating point (an advantage over the WebSocket's unfiltered feeds, which deliver everything). `GET /v1/subscriptions/definitions` tells a client what its plan may create, so nothing is hard-coded. * **Standard Webhooks** signing (`webhook-id`, `webhook-timestamp`, `webhook-signature` — an open spec, verified with the off-the-shelf `standardwebhooks` library for your language), one signing secret per subscription, any `2xx` acknowledges, retries over about 76 hours, and a `410` that disables a subscription until you re-enable it. See [Signatures and delivery](/webhooks/signatures). * **An inbox, for when you have no server**: create a subscription with `"deliveryMode": "inbox"` and no URL, and matched frames are stored for you to pull — `POST /v1/inbox/drain` reads without deleting, `POST /v1/inbox/ack` deletes what you processed, by batch prefix or by `inboxId`, idempotently; `GET /v1/inbox` reports what is pending and two cumulative loss counters. One inbox per account, the same subscription slots, no signing secret; Starter holds 1,000 pending messages, Agent 50,000, Pro and Enterprise 1,000,000, under a 2 GiB cap, for 14 days. See [Inbox delivery](/webhooks/inbox). * **From chat**: five inbox tools on the MCP server — `inbox_subscribe` creates an inbox subscription from a type, `args` and filters, `inbox_subscriptions` lists them, `inbox_unsubscribe` deletes one, `inbox_state` reports what is pending and `inbox_drain` reads and acknowledges messages. They are inbox-only: a subscription that POSTs to a URL is created in the portal or over REST. See [Webhooks for agents](/webhooks/agents). * **Hosted connections work too**: users who connected with "Continue with Coinversa" never pasted a key, and the inbox tools resolve the same account and plan for them. * **Plans** (tentative): Starter 2 subscriptions, Agent 6, Pro 10, Enterprise 20; Free can read the definitions but has none. See [Webhook plan limits](/webhooks/limits). Manage it in the [developer portal](https://developers.coinversa.ai) or over [REST](/webhooks/api) at `webhook.coinversa.ai` with your API key as a Bearer token; the inbox is also available from chat. Start with the [quickstart](/webhooks/quickstart); [troubleshooting](/webhooks/troubleshooting) is ordered by symptom. Position events and risk alerts are in development. **October 29, 2026** ## New plan: Agent (\$49/month) **Agent** is a new paid plan between Starter and Pro, effective when the plan launches in the [billing portal](https://developers.coinversa.ai/billing). It is for agents and bots that need more request volume than Starter, plus the live positioning tools. **$49/month or $490/year.** | | Starter | **Agent** | Pro | | - | -: | -: | -: | | Requests / min | 120 | **300** | 600 | | Requests / day | 2,000 | **10,000** | 20,000 | | Requests / month | 50,000 | **250,000** | 500,000 | | Active keys | 3 | **5** | 10 | | WebSocket connections (per account) | 1 | **2** | 5 | | Subscriptions per connection | 25 | **50** | 100 | | Fair-use bandwidth / month | 50 GB | **100 GB** | 250 GB | Agent includes everything in Starter, and two endpoints move from Pro to Agent: * **Positioning by entry** — `/live/positioning-by-entry/{coin}` (`live_positioning_by_entry`): open positions bucketed by entry price, long vs short and by cohort. In the chart, this is the entry profile and the average entry lines * **L4 stop map** — `/market/book/stops/{coin}` (`book_stop_map`): untriggered stop and take-profit size bucketed by distance from mid On the WebSocket, Agent gets Starter's feeds plus the three **liquidation feeds** — `liquidations`, `liquidationsByUser` and `liquidationsByUsers` — which move from Pro to Agent. History, wallet deep-dives, whale trades, cohort drill-downs, the per-order L4 book tools (`book_whales`, `book_levels`, `book_triggers`), TP/SL trigger orders and the `l4Book` feed stay on **Pro**. Pro keeps every endpoint and feed it had. **Plan denials can now name Agent.** A REST `403 TIER_GATE` can carry `required_tier: "agent"`, the `X-RateLimit-Tier` header can read `agent`, and in the connector a plan-limited tool result can carry `requiredPlan: { "tier": "agent", "name": "Agent", "priceUsdMonthly": 49 }`. See [the tier matrix](/api-reference/tiers), [Pricing](/pricing) and [WebSocket plan limits](/websocket/limits). **October 21, 2026** ## Connector v0.17.5–v0.17.6: clearer tool names Eleven connector tools have new names that say what they return. The old names keep working as aliases, with the same inputs, plan and output, but the connector no longer lists them; update saved prompts and agents when convenient. | New name | Old name (alias) | What it returns | | - | - | - | | `pulse_trader_position_summary` | `pulse_trader_demo` | One wallet's 90-day position summary and largest recent wins and losses | | `pulse_exits_near_peak_favorable_move` | `pulse_perfect_exits` | Exits that captured a high share of the maximum favorable move | | `pulse_fee_efficiency_leaderboard` | `pulse_capital_titans` | Wallets ranked by realized PnL per dollar of fees | | `pulse_top_earners_by_coin` | `pulse_coin_kings` | Highest realized-PnL wallet(s) per coin | | `pulse_liquidation_rate_by_coin` | `pulse_lethal_coins` | Coins ranked by the share of positions liquidated | | `pulse_profitable_after_drawdown` | `pulse_max_pain_events` | Profitable closed positions that first had a deep drawdown | | `pulse_high_win_rate_low_activity_wallets` | `pulse_hidden_gems` | Wallets with a high win rate and positive PnL over a moderate trade count | | `pulse_single_month_giveback_wallets` | `pulse_one_month_wonders` | One large profitable month, part of which was later given back | | `pulse_coin_profit_pools` | `pulse_coin_alpha_map` | Per-coin winner, loser and net profit pools | | `pulse_cohort_recent_profit_concentration` | `pulse_cohort_recent_alpha_concentration` | Profit concentration within a recent-tier cohort | | `pulse_largest_liquidation_losses` | `pulse_backstop_events` | The largest individual liquidations ranked by realized loss | Tool titles and descriptions across the catalog were reworded to describe the data plainly, and the connector's server instructions are now reference notes (coverage, which tool answers which question, freshness, plans and tier names). Tier parameters now list only the current tier names (Apex, Sharps, ... Heavyweights, ...); the older tier identifiers are still accepted. The `best_traders_positioning` prompt is now `tier_positioning_by_coin`. No endpoint, output or plan changed. The catalog is still **115 tools** (114 advertised while `builder_heatmap` is withheld). See the [MCP tool catalog](/mcp/tools). **October 15, 2026** ## Sharpe ratios in the connector, and every pending TP/SL order on Hyperliquid **Sharpe ratios (Starter).** The realized-PnL Sharpe from October 13 is now in the connector, with two new ways to slice it. Four tools, each with its endpoint: * `pulse_sharpe_leaderboard` — `/pulse/sharpe-leaderboard`: the 50 most consistent wallets over the last 30 completed UTC days, among wallets with at least $2,500 of stored equity. **New:** activity floors `minActiveDays` (default 10 fill days) and `minPnl` (default $1,000 of window realized PnL), applied before ranking; each row reports `activeDays` * `pulse_trader_sharpe` — `/pulse/trader/{address}/sharpe`: one wallet's 30-day score * **New:** `pulse_trader_sharpe_interval` — `/pulse/trader/{address}/sharpe/interval`: any window of 1–90 completed days within the last 90. Out-of-range windows are rejected, not clamped: a bad `startDay` or a window outside the last 90 days is a `400`, a `days` value outside 1–90 a `422` * **New:** `pulse_trader_sharpe_monthly` — `/pulse/trader/{address}/sharpe/monthly`: three buckets, newest first — 3 × 30 days, or the current and two previous calendar months — to see whether a wallet is getting more or less consistent **Sharpe filters** on nine cohort and positioning endpoints and their tools — `/live/cohort-bias/{coin}`, `/live/positioning-by-entry/{coin}`, the lifetime cohort positions and trades, and the five `/pulse/cohorts-recent/*` drill-downs: `minRecentSharpe` (30-day score, refreshed hourly) and `minTotalSharpe` (full-history score, refreshed daily) keep only wallets above a threshold, so "how are Apex wallets positioned on BTC" can become "how are the *consistent* Apex wallets positioned". Filters use each wallet's current score and do not change any endpoint's tier. The method is unchanged and stays a proxy: √365 × mean daily realized PnL ÷ its standard deviation, with no equity normalization and no fees, funding or unrealized PnL. It rewards consistency, not size. The leaderboard's default floors keep few-day and few-dollar wallets off it, but the wallet scores and cohort filters have no activity floor, so read the score with `realizedPnl` and `trades`. See [Sharpe ratios](/concepts/sharpe). **TP/SL trigger orders (Pro).** Every untriggered **stop-loss and take-profit order** on Hyperliquid, one by one with the wallet that placed it: * `book_triggers` — `/market/book/triggers/{coin}`: every pending trigger order on a market * `pulse_trader_trigger_orders` — `/pulse/trader/{address}/trigger-orders`: one wallet's pending triggers, across markets or for one coin One exchange-wide snapshot covers native perps, builder dexes and HIP-4, refreshed roughly every minute, latest only (no history); a snapshot older than 1,200 seconds (20 minutes) is a `503` rather than a stale answer. Pages are pinned to a snapshot with `snapshot_height`. `book_stop_map` keeps the bucketed view; these are the orders behind it (Hyperliquid's own API returns trigger orders one wallet at a time — this is the whole exchange in one call). See [TP/SL trigger orders](/concepts/trigger-orders). The catalog is **115 tools**, up from 109; `builder_heatmap` is still withheld, so the connector advertises 114. The API has **124 endpoints**. **October 13, 2026** ## Starter now includes live positioning, risk and the chart **Starter (\$29/month)** now includes the "right now" tools that most people use: * `/live/cohort-bias/{coin}` (`live_cohort_bias`) * `/live/liquidation-heatmap/{coin}` (`live_liquidation_heatmap`) * `/live/risk/overview` and `/live/risk/coins/{coin}` (`live_risk_overview`, `live_coin_risk_snapshot`) * `/live/risk/liquidations/recent` and `/live/risk/liquidations/summary` (`live_recent_liquidations`, `live_liquidation_summary`) * `/pulse/market/candles/recent/{symbol}` (`market_recent_candles`, the interactive chart) * `/market/book/summary/{coin}` (`book_summary`) **Free** now includes official open interest for one coin, `/live/official-oi/{coin}` (`live_official_oi`), for the last 24 hours. A longer window on Free or Starter returns the last 24 hours with a `note`; Pro keeps the 7-day default and up to 30 days. **New on Starter (beta): realized-PnL Sharpe.** `GET /pulse/sharpe-leaderboard` ranks the top 50 wallets with at least \$2,500 of stored equity, and `GET /pulse/trader/{address}/sharpe` scores one wallet. The score is annualized: √365 × mean daily realized PnL ÷ its sample standard deviation over the last 30 completed UTC days, counting days without fills as zero. It is a proxy, not a portfolio Sharpe: it is not normalized by equity and excludes fees, funding and unrealized PnL. REST only for now; the connector tools follow once the leaderboard has minimum-activity filters. **Pro (\$199/month)** keeps the history and depth behind those snapshots: cohort-bias, risk and open-interest history, the chart's Coinversa layers (entry profile, average entries, Apex vs Crowd history, biggest trades), cohort drill-downs, entities, and the per-order book tools. On a Starter key the chart keeps its candles, indicators and the Starter snapshots, and marks the Pro layers with an upgrade link. The full list is in the [tier matrix](/api-reference/tiers). **A plan limit is now an answer, not an error, in the hosted connector** (`https://mcp.coinversa.ai/mcp`; the npm stdio package picks it up in its next release). When a key's plan does not include a tool, the result says which plan it needs and the price, which plan the key is on, and where to upgrade. Where the key's plan allows it, the result also includes a partial answer from tools the key can call, such as the current price and long/short ratio for the same coin. Every gated tool's description now states its plan. See [When the plan does not include a tool](/mcp/tools#when-the-plan-does-not-include-a-tool). The REST `403` is unchanged. **October 12, 2026** ## Connector v0.17.0: an interactive chart with Coinversa layers, and two new endpoints `market_recent_candles` gains an interactive MCP Apps chart for Pro users, with candlesticks, dollar volume and technical indicators. The chart is not just a price chart: alongside candles and indicators it draws **where open positions got in**, **who holds them** and **how Apex and The Crowd have moved** — data a standard exchange chart does not show, because it comes from every open Hyperliquid position matched to its wallet's cohort. Text-only clients keep the candle result. Use `market_price` for a quick price lookup and `market_recent_candles` for chart questions. Two new Pro endpoints, each with a matching tool: * **Positioning by entry** — `/live/positioning-by-entry/{coin}` and `live_positioning_by_entry`. Open positions bucketed by entry price, long vs short and by cohort, with each cohort's average entry, average leverage, in-profit vs underwater notional and notional near liquidation — against Hyperliquid's live mark, with the stored mark's divergence disclosed. A current snapshot, never a history. * **Whale trades** — `/live/whale-trades/{coin}` and `live_whale_trades`. The largest fills by USD notional over up to 24 hours (default $1M, floor $100K), with both counterparties' cohorts and what each fill did to their position. "Whale" means the trade is large, not the size tier; the aggressor is not recorded. `/live/cohort-bias-history/{coin}` takes **`tiers`** (several series in one call, e.g. `tiers=apex,crowd`), **`format=layer`** (a chart envelope with a −1..1 net bias, explicit UTC window, per-series hour counts and provenance) and **`tierType=pnl_recent`** (30-day PnL cohorts — who is winning now). History stays honest: missing hours stay missing, and because some hours are reconstructed with today's labels the envelope marks it `backtestSuitable: false`. `live_cohort_bias_history` gains the same options and reaches back **90 days**. `/pulse/market/candles/recent/{symbol}` now has an explicit contract: `limit` up to **500** (larger values are clamped, with `X-Limit-Clamped: 500`), an interval allowlist (`1m`, `5m`, `15m`, `1h`, `4h`, `1d` — anything else is `422`), `404` for a market Hyperliquid does not list, and a 15-second cache. The connector applies the same **500** cap, clamping larger values rather than rejecting them; aggregated intervals can contain fewer output bars because the cap applies to their source history. Volume is **USD notional**; hourly-source bars estimate it from base quantity and typical price before aggregation. **VWAP uses base quantity**: `sum(HLC3 × base quantity) / sum(base quantity)`, resetting at the UTC day for intraday candles and anchoring at the first loaded bar for daily candles. When the source lacks base quantity, VWAP is unavailable. The chart has a searchable market picker, cached market/interval switching, synchronized indicator panes, candle readouts, keyboard inspection, and local pan/zoom/range controls. `list_markets` supports case-insensitive symbol `search` before pagination, including builder-dex symbols such as `xyz:GOLD`; inactive listings remain hidden by default. Refresh fetches candles explicitly and retains the previous chart on failure; liquidation and cohort snapshots refresh separately. Host-supported expansion and a previewed analysis prompt connect chart exploration to the conversation; hosts without text messaging keep the prompt available for copying. A **Market read** strip explains the indicators in plain English (momentum, trend, MACD, Bollinger, and with Coinversa overlays on, positioning and the nearest liquidation cluster), with the number behind each item. It describes data, not trades. An optional Stochastic (14, 3, 3) pane and RSI zone markers are under Indicators. Under Layers, **Entry profile**, **Average entry lines**, **Apex vs Crowd history** and opt-in **Biggest trades** join liquidation levels, with an all-time / 30-day PnL grouping. Biggest trades shows, by default, up to 50 fills of \$100K or more from the last 24 hours (window and size filters adjustable). Each layer loads once, says how fresh it is, and never polls. A new **Share** composer turns the chart or a cohort positioning card into an X landscape or Instagram portrait PNG, rendered on your device and never posted for you. Interactive availability depends on MCP Apps being enabled and supported by the client. The catalog is **109 tools**, up from 107 (adds `live_positioning_by_entry` and `live_whale_trades`). `builder_heatmap` is still withheld while its rollup backfills, so the connector advertises 108. See [Chart layer endpoints](/api-reference/chart-layers) and [the interactive chart notes](/mcp/tools#interactive-chart-v0-17-0). **September 30, 2026** ## Derived quotes: `bbo`, `l2Book` and `allMids` Three feeds now publish a **derived view** of the same resting book `l4Book` is built from, instead of the raw orders. Two of them are on **every plan**. | Feed | Tier | Argument | What it carries | | - | - | - | - | | `bbo` | Free | `coin` | Best bid and ask, with resting size and order count at each | | `allMids` | Free | none | Every native perp mid, as one map | | `l2Book` | Starter | `coin` | Up to 20 aggregated price levels a side | The catalog is **twenty-four feeds**, up from twenty-one. `bbo` sends a message only when the top of book changes. `l2Book` and `allMids` each **replace** their whole view on every frame — the top-20 depth and the entire mids map respectively — so neither is a diff stream, and applying them as diffs corrupts the result. `allMids` is an initial version and is **narrower than Hyperliquid's own**: it covers native perpetual markets only, with no spot, no builder dexes and no fall back to the last trade when a book side is empty. A coin missing either side is omitted from the map, so absence means one-sided, not zero. All three share one book per coin. The subscribe is **acked at once**; what waits is the first data frame, while the server re-requests the snapshot every 250 ms behind that ack. If the book is not ready in **2 minutes** (`bbo`, `l2Book`) or **5 minutes** (`allMids`), `quote book warming up` arrives instead of the snapshot. Do not time out waiting for the first frame sooner than that. `seq` is the source book height and skips blocks that changed nothing visible. **September 23, 2026** ## Connector v0.13.0: payload controls on the five heaviest tools `live_risk_overview`, `live_coin_risk_snapshot`, `list_assets`, `hip4_questions` and `pulse_trader_daily_stats` returned payloads with no way to trim them. All five now take shaping parameters — `include`, `search`, `detail`, `status`, `startDate`/`endDate`, and `limit`/`offset` as each one warrants — and every capped response carries `totalCount`, `truncated` and a `note` naming the next `offset`. These are applied **by the connector**, after it fetches the endpoint. The API routes take none of them: `/live/risk/overview` and `/hip4/questions` accept no query parameters at all, `/live/risk/coins/{coin}` and `/pulse/trader/{address}/daily` accept only their path parameter, and `/assets` accepts only `crossMarketOnly`. A route ignores a parameter it does not declare, so `GET /assets?limit=3` still returns all 415 assets. See [Connector-side parameters](/mcp/tools#connector-side-parameters). The catalog page also now lists `builder_lifecycle`, `builder_journey` and `builder_orders` (shipped in 0.11.1 but never added) and drops `pulse_market_overview`, removed in 0.12.0. `builder_heatmap` is registered but withheld while its hourly rollup backfills, so the connector advertises **106** of its 107 tools. **September 22, 2026** ## TWAP statuses: the node's own state machine, with a live-set snapshot Two new Pro feeds close the last gap in the TWAP product. **`twapStatuses`** and **`twapStatusesByUser`** carry the node's own TWAP state machine — activated, waiting on a trigger, finished, terminated, stopped, or refused mid-run — and a subscription **opens with a snapshot of the TWAPs running right now**. The catalog is **twenty-one feeds**, up from nineteen. ```json theme={null} {"method":"subscribe","subscription":{"type":"twapStatuses"}} {"method":"subscribe","subscription":{"type":"twapStatusesByUser","user":"0x6365…2441"}} ``` That makes three views of one TWAP, joined on `twap_id`: | Feed | What it sees | | - | - | | `twapOrders` | **Placement and refusal** — the terms asked for, and the node's answer | | `twapSliceFills` | **Execution** — every slice, with real `px`, `sz` and `fee` | | **`twapStatuses`** | **State** — activation, triggers, endings, and running `executedSz` | Two things to know before building on it. The snapshot reports its own coverage: `complete` says whether the upstream reaches back far enough to hold every activated TWAP, and `coverage_from_ms` is the oldest block time it has applied — **when `complete` is false, a TWAP that activated before that bound may be missing from the set**, so apply the stream on top of the snapshot and insert a `twap_id` you had not seen rather than discarding the event. And `twapStatuses` sequences on the **source block height**, while its sibling `twapOrders` sequences on a **nanosecond** replica timestamp: the two views join on `twap_id`, never on `seq`, and one cursor cannot span them. There is deliberately **no `twapStatusesByUsers`** — this is the one wallet-scoped family with no multi-wallet list variant. Follow a set of accounts by filtering the unfiltered feed on `state.user`. Full contract in [TWAP statuses](/websocket/feeds#twap-statuses); the snapshot and error frames are on the [wire protocol](/websocket/protocol#twap-status-frames) page. **September 22, 2026** ## Multi-wallet feeds: 1,000 addresses on one subscription Every by-user websocket feed now has a **list variant** that follows a set of wallets on a single subscription. The catalog is **nineteen feeds**, up from fourteen. | Singular feed | List variant | Plans | | - | - | - | | `tradesByUser` | **`tradesByUsers`** | Starter and above | | `twapSliceFillsByUser` | **`twapSliceFillsByUsers`** | Starter and above | | `liquidationsByUser` | **`liquidationsByUsers`** | Pro and above | | `leverageUpdatesByUser` | **`leverageUpdatesByUsers`** | Pro and above | | `twapOrdersByUser` | **`twapOrdersByUsers`** | Pro and above | Each carries exactly what its singular feed carries — the same `[wallet, fill]` pairs, liquidation objects or replica updates, under the same `seq` — filtered to any wallet in the list. The wallets go in a required `users` JSON string array: ```json theme={null} {"method":"subscribe","subscription":{"type":"tradesByUsers","users":["0x9bad…1f07","0x28f0…4c19"]}} ``` **A list holds up to 1,000 distinct wallets, and counts as one subscription** against your per-connection cap. The ceiling is the same on every plan. (Hyperliquid's own websocket allows ten unique users across every user-specific subscription per IP — that ceiling is what these feeds exist to lift.) The list is hashed as a set, so order and duplicates never change the subscription id: a copy-trading bot re-sending its roster in a different order rejoins the same stream rather than opening a second one. Full contract in [multi-wallet subscriptions](/websocket/feeds#multi-wallet-subscriptions); the refusal strings are on the [wire protocol](/websocket/protocol#errors-on-an-open-socket) page. The singular feeds are unchanged. **September 21, 2026** ## L4 order book: four tools, four routes, and the wallet on every order Four question-shaped views over the **order-level** book — every resting order with the wallet behind it, not an aggregated ladder. Each answers one question rather than handing you a book to parse: | Tool | Route | Answers | | - | - | - | | `book_summary` | `/market/book/summary/{coin}` | How deep and how lopsided is this book? | | `book_stop_map` | `/market/book/stops/{coin}` | Where are the stops, and how much fires if price gets there? | | `book_whales` | `/market/book/whales/{coin}` | Who is sitting on this book, and where? | | `book_levels` | `/market/book/levels/{coin}` | What does the ladder look like, with the detail L2 throws away? | All four are **Pro**. `/market/book/coverage` is Free and reports coins covered, the latest L1 height and how fresh it is. **The wallets join to the trader tools.** `book_whales` returns addresses that go straight into `pulse_trader_profile` — so "who is holding up this bid, and are they any good" is one follow-up call. That join is the reason these exist as question-shaped views rather than a raw book dump. > [!WARNING] > > **The coin is CASE-SENSITIVE on these four**, unlike every other coin-taking > tool. It must be the node's own spelling — `BTC`, `xyz:GOLD`, `#28200`. `btc` > returns a 404 carrying a hint rather than being normalised, because the > rollups are keyed on the node's own spelling. Snapshot-derived and **latest-only**: one row per coin, replaced when its block height advances, so there is no history. Every response carries `as_of_height` and `age_s` — check `age_s` before citing a number, and past the staleness ceiling the routes answer `503` rather than serving a stale book. `data_coverage` gains a `book` dataset. For the aggregated L2 view with no tier gate, `market_orderbook` is unchanged. Full contract: [MCP tools](/mcp/tools#l4-order-book-v0-12-0) and [tier matrix](/api-reference/tiers). **Connector v0.12.0 is published** — `npx @coinversaa/mcp-server` now carries these four tools, taking the catalog to 107. It also picks up two `data_coverage` fixes that shipped between releases: source calls are now sequential and paced 250 ms apart, with 429 backoff, so a coverage call no longer burns a key's burst allowance. Anyone pinned to 0.11.1 has been hitting the old behaviour. **September 20, 2026** ## Five new feeds: `allCandles` and TWAP **`allCandles`** streams the same OHLC candles as [`candle`](#september-19-2026) for **every market at once** on one subscription — `interval` and an optional `source`, no coin. Starter and above. **`twapSliceFills`** and **`twapSliceFillsByUser`** carry every fill the node attributes to a TWAP order, as the node's own `[wallet, fill]` pairs — so a client that already reads `trades` reads these unchanged. Group by `twapId` to follow one order and sum `sz` to track its executed size. Starter for the unfiltered feed, every plan for the by-user one. **`twapOrders`** and **`twapOrdersByUser`** carry TWAP placements, refusals and cancellations. **Refusals are emitted rather than dropped**, because a refused TWAP leaves no other trace anywhere on the network — filter on `update_type` if you only want orders that ran. Pro and above. `twap_id` is the join key between the two: one gives an order's terms, the other its executions. Subscribe to both for a wallet and join on it. > [!WARNING] > > **A refused TWAP comes back from the node with an outer status of `ok`.** > Acceptance is read from the inner `response.data.status`, never from the outer > status alone. If you reimplement this against raw node output and check only > the outer status, you will report TWAPs as started that never ran — and the > only symptom is slices that never arrive. Also on `candle`: a closed candle is now republished once with `"closed": true` (an `omitempty` addition, so nothing that ignores it is affected). Without it the newest candle had to be treated as open indefinitely. Hyperliquid's own channel has no such flag, so this is an addition rather than parity. And for the record, since it reads like a bug and is not: `1M` is **thirty days, not a calendar month**, and `1w` opens on a **Thursday**. Every interval is a flat bucket floored against the Unix epoch. That is measured against `api.hyperliquid.xyz`, where every observed `1M` bucket is exactly 30 days wide — keeping 30 days *is* matching Hyperliquid. **September 19, 2026** ## `candle` — live OHLC on every plan **`candle`** streams live OHLC candles for one market on one of 14 intervals (`1m` … `1M`). It is the first new websocket feed since launch that is not Pro-gated: it is on **every plan**, Free included. ```json theme={null} {"method":"subscribe","subscription":{"type":"candle","coin":"BTC","interval":"1m","source":"trade"}} ``` Candles are **trade-based by default** — built from fills, so `o`/`h`/`l`/`c` are traded prices, `v` is traded base volume and `n` is the trade count, the same meanings Hyperliquid's own `candle` channel carries. Both sides of a trade arrive as separate fills under one `tid`, and volume is counted once per `tid` rather than once per fill, so `v` matches Hyperliquid instead of doubling it. Trade candles sequence on the source block height, like the fill and book feeds. The previous mark-price behaviour is still available, now opt-in as `"source":"mark"`. It is byte-for-byte what it was. `source` defaults to `trade` before the subscription id is hashed, so an omitted `source` and an explicit `"trade"` are one subscription, not two. > [!WARNING] > > **On `source: "mark"`, `v` is always the string `"0"` and `n` counts > mark-price observations, not trades.** A mark-price update carries no traded > size. Hyperliquid client code pointed at a mark candle compiles, runs, and > quietly produces zeros in volume and a wrong VWAP — nothing errors. Mark > candles also sequence on the replica block's **Unix timestamp in > nanoseconds** rather than on block height, so one `candle` channel can carry > both kinds of `seq` depending on the argument; see [sequence > numbers](/websocket/protocol#sequence-numbers). `interval` is case-sensitive and it bites: `1m` is one minute, `1M` is 30 days, and both are valid, so an upper-cased argument subscribes successfully to the wrong interval. `coin` is **not** case-sensitive here — `btc` and `BTC` are one subscription — and `s` echoes the market as the data spells it. A value outside the allowed set is refused in band with a new exact error string, `invalid argument ` — `invalid argument interval` and `invalid argument source`. Full contract: [candles](/websocket/feeds#candles). **September 17, 2026** ## Four new websocket feeds: liquidations and leverage **`liquidations`** and **`liquidationsByUser`** stream every liquidation on Hyperliquid as it lands — the liquidated account, the counterparty that took the other side, the coin, the penalty fee and the realized loss. Filtered out of the same fill stream, so they carry the source block height as `seq` like every trade feed. ```json theme={null} {"method":"subscribe","subscription":{"type":"liquidations"}} ``` **`leverageUpdates`** and **`leverageUpdatesByUser`** stream accepted leverage and isolated-margin changes read from the node's replica-command stream — `leverage`, `isolated_margin` and `top_up_isolated_margin`, with the account each one applied to. Rejected actions never appear: every request is paired with its accepted response by bundle hash and action index before anything is published as an applied change, and `user` comes from the response rather than the broadcaster, so an agent-signed action reaches the account it applied to. ```json theme={null} {"method":"subscribe","subscription":{"type":"leverageUpdatesByUser","user":"0x9bad…"}} ``` All four are **Pro and above**, and all four accept any address — not only wallets you control. Full field tables: [feeds and the fill object](/websocket/feeds#liquidations). > [!WARNING] > > **`seq` is no longer one kind of number.** It stays the source block height > on the fill, liquidation and book feeds, but `leverageUpdates` sequences on > the replica block's **Unix timestamp in nanoseconds**, because the replica > stream does not expose its height outside the payload. Both only increase and > both are valid reconnect cursors — but never compare one against the other, > and never hold a single "last seq" across a mixture of the two. See > [sequence numbers](/websocket/protocol#sequence-numbers). **September 17, 2026** ## `seq` is now the source block height > [!WARNING] > > **Breaking for any client that checks sequence contiguity.** `seq` used to be > a per-subscription counter that started at 1 and incremented by one per > frame. It is now the **source block height**, the same number on every feed. > A client that checks `seq === last + 1` will report almost every frame on a > filtered feed as a lost message. Check that `seq` **increases**, not that it increases by one. A filtered feed sends no frame for a block that matched nothing, so `tradesByCoin` on a quiet coin legitimately skips hundreds of numbers between frames. What is actually broken is `seq` going backwards or repeating — the chain only moves forward, so that means frames were replayed or reordered. On `l4Book` the snapshot now carries `seq` equal to its `height` (it was `0`), and every update carries `seq == height`. The replay-bridge frames that used to arrive with `seq: 0` are gone. Keep gating the book on `prev`: it names the exact predecessor block, which `seq` alone does not. **New: resume instead of starting over.** Pass the last `seq` you applied back on resubscribe and the server replays what you missed, with no snapshot: ```json theme={null} {"method":"subscribe","subscription":{"type":"tradesByCoin","coin":"BTC","sequence":123456}} ``` Retention is 10,000 messages per feed per connection manager, and an idle feed group stays warm for 60 seconds; past either you get `sequence is not retained` or `sequence is older than retained history`, and should subscribe without the cursor. `sequence` and `snapshot` are control data — they do not change the subscription id, so a resume continues the same subscription. To skip initial state entirely, pass `"snapshot": false`. **Also changed:** the 8-concurrent-`l4Book`-subscriptions limit is gone — book subscriptions count against the per-connection cap like any other. Book failures no longer arrive as `{"channel":"l4Book","error":…,"reason":…}`; they are dropped and reported on the ordinary `error` channel, without the coin on them. **Expect a slower first book frame.** The server now buffers about 105 source blocks before it fetches the snapshot, so it has history to join the snapshot onto. A cold subscription commonly waits **10–60 seconds**, up to about 100 if all ten attempts are needed — but only on a coin nobody else is subscribed to: a warm feed group passes straight through. Two new errors end the wait, `snapshot buffer did not fill` and `snapshot is older than retained history`. The 30 MB message requirement for `BTC` is unchanged. See [sequence numbers](/websocket/protocol#sequence-numbers), [reconnecting](/websocket/protocol#reconnecting) and [Order book (L4)](/websocket/order-book). **September 15, 2026** ## The full L4 order book, with wallets, on the WebSocket A new feed, **`l4Book`**, streams the complete order book of one Hyperliquid market — every resting order with the wallet behind it, plus the untriggered stop and take-profit orders — straight from the node, as **one snapshot followed by a diff message per block** (Hyperliquid's own public `l2Book` aggregates by price level; this is the order-level book, with the trader on every order). Any market the node knows, spelled as the node spells it: `BTC`, `xyz:GOLD`, `#28200`. The server holds no book; you apply the diffs, and the wire gives you what you need to do it safely — `height` and `prev` chain every block, empty blocks are still sent so silence is detectable, and a `partial` flag marks a block the node only half delivered. The client rule is one line: apply an update only if its `prev` is the last height you applied; otherwise reconnect with the last `seq` you applied, falling back to a fresh snapshot if that cursor is no longer retained. **Pro and above**, and listed in the `connected` frame's `limits.feeds` when your account has it. Two things to size for: the snapshot is the whole book in one message — about 30 MB for `BTC`, a few KB for most coins — so set your client's read limit, and book subscriptions count against your connection's subscription cap like any other. Read the feed page at [Order book (L4)](/websocket/order-book), copy an [order-book client](/websocket/quickstart#order-book) in Browser, Node, Python or Go, and see the [plan limits](/websocket/limits) for how snapshots count against fair use. **September 7, 2026** ## Browsers can connect to the WebSocket directly A browser `WebSocket` cannot set headers, so until now no page could authenticate to `wss://ws.coinversa.ai`. The connection manager now also takes the key as the second subprotocol after the literal `bearer` — `new WebSocket(url, ['bearer', key])` — so a dashboard or tool of your own can stream fills with no relay. The key still travels in a request header, never in the URL, and the `Authorization` header keeps working unchanged for every other client. A browser cannot read the HTTP status of a refused upgrade, so on this path the three refusals arrive as **close codes** instead: `4401` invalid or missing key, `4429` connection cap full, `4503` entitlement lookup unavailable. Details in [WebSocket authentication](/websocket/overview#authentication). The portal's Usage page now shows websocket usage honestly: bytes delivered against the fair-use allowance, frames and connections opened for the period, and connections and subscriptions open against the account's **resolved** caps — enterprise overrides included — updated every minute. **September 4, 2026** ## The WebSocket API is live Every fill on Hyperliquid — native perps, the seven builder dexes, spot — streamed over one socket at block cadence, with the trader's wallet on every fill and `closedPnl`, `dir` and `startPosition` already attached. Three feeds: **`trades`** (the firehose, Starter and above), **`tradesByCoin`** and **`tradesByUser`** (every plan; `tradesByUser` takes *any* address, not only wallets you control). Frame shapes are Hyperliquid-compatible, so existing client code is familiar, and every data frame carries a per-subscription `seq` so you can tell what you missed. Authentication is your existing API key, sent as `Authorization: Bearer` on the HTTP upgrade — there is no separate websocket key and no auth frame. Limits are on **capacity**, not messages: connections per account (shared across your keys), subscriptions per connection, and a fair-use bandwidth allowance; streaming never draws down your REST quota. Start at the [WebSocket overview](/websocket/overview), copy a [working client](/websocket/quickstart), and read the [plan limits](/websocket/limits). **August 21, 2026** ## Builder analytics arrives on MCP (connector v0.11.0) The eight builder-analytics endpoints are now first-class MCP tools on both the hosted connector (`https://mcp.coinversa.ai/mcp`) and the npx package (`@coinversaa/mcp-server@0.11.0`), taking the tool surface from **91 → 99**: `builder_leaderboard`, `builder_profile`, `builder_traders`, `builder_fills`, `builder_cohorts`, `builder_retention`, `builder_overlap`, and the inverse `trader_builders`. Ask your agent *"which frontends do MetaMask's traders also use?"* and it can answer from cross-builder attribution no other data source has. Full catalog in [MCP tools](/mcp/tools); endpoint semantics in [Builder codes & attribution](/concepts/builder-attribution). ## Builder analytics: ledger-exact revenue for every builder code Eight new REST endpoints cover the Hyperliquid **builder-code economy** — the fees that front-ends, wallet apps, bots, and builder dexes earn on the order flow they route. Revenue is computed from Hyperliquid's own on-chain cumulative builder-fee ledger (validated to ±0.1% against the chain); fill-level detail comes from order→fill attribution. See the new [Builder codes & attribution](/concepts/builder-attribution) concept page and the [endpoint guide](/api-reference/builders). **Starter:** * **`GET /builders/leaderboard`** — every builder ranked by exact ledger revenue, with attributed volume/users/fills and prior-period deltas. * **`GET /builders/{builder}/profile`** — one builder in depth: revenue, daily series, top coins, user base, fee rate, first/last seen. * **`GET /trader/{address}/builders`** — which builders a wallet trades through, ordered by fees paid. **Pro:** * **`GET /builders/{builder}/traders`** — the builder's users with PnL, fees paid, equity, and cohort tiers. * **`GET /builders/{builder}/fills`** — the raw attributed fill stream (perp / spot / HIP-4), filterable by coin and wallet. * **`GET /builders/{builder}/cohorts`** — who actually uses the builder: user composition by PnL and size tier. * **`GET /builders/{builder}/retention`** — a 12-month monthly retention triangle of first-order cohorts. * **`GET /builders/{builder}/overlap`** — the top 10 other builders a builder's users also trade through (cross-builder switching — only possible with all-builder attribution). Every response carries a **`verified` stamp** (the ledger block and chain time it was checked against) and a **`dataNotes`** disclosure. Attributed history is complete since **2025-01-25** (most trackers' builder data starts around August 2025). Honest caveat: trigger-order (stop/TP) fills currently attribute at ledger level only — per-builder attribution coverage is \~77–95% while the backfill completes (live capture since 2026-08-20, backfilled to 2026-03-24) — so attributed fills/volume/users slightly undercount versus the exact ledger revenue; every response says so in `dataNotes`. All 8 endpoints also ship **[x402 pay-per-call](/api-reference/tiers#x402-pay-per-call) twins** — the first x402 surface in the docs (every GET endpoint has carried a keyless `/x402` twin since May 2026; builder analytics is where we make it official): no API key, price quoted in the 402 challenge. In review: order-level lifecycle/journey/heatmap endpoints, weekly and revenue-weighted retention, and a live attribution-coverage ratio in the verified stamp. Builder MCP tools are also on the way. **August 14, 2026** ## Cohort tiers renamed The trader cohort tiers have new display names and new canonical input slugs. The new slugs are **rolling out with this release** everywhere a tier is an input — path parameters, query parameters, and MCP tool arguments. Until the rollout reaches your endpoint (and until your MCP connector refreshes its cached tool schemas, which may still list only the legacy slugs), keep sending legacy slugs if a new slug is rejected. Nothing breaks either way: **legacy slugs remain accepted on input indefinitely, and responses are unchanged** — they continue to return the legacy slugs (e.g. `pnlTier` still returns `money_printer`). | Display name | New slug | Legacy slug | | - | - | - | | Apex | `apex` | `money_printer` | | Sharps | `sharps` | `smart_money` | | Grinders | `grinders` | `grinder` | | Scrapers | `scrapers` | `humble_earner` | | The Crowd | `crowd` | `exit_liquidity` | | Bleeders | `bleeders` | `semi_rekt` | | Trapped | `trapped` | `full_rekt` | | Blown Out | `blown_out` | `giga_rekt` | | Heavyweights | `heavyweights` | `leviathan` | | Cruiserweights | `cruiserweights` | `tidal_whale` | | Middleweights | `middleweights` | `whale` | | Welterweights | `welterweights` | `small_whale` | | Lightweights | `lightweights` | `apex_predator` | | Featherweights | `featherweights` | `dolphin` | | Flyweights | `flyweights` | `fish` | | Strawweights | `strawweights` | `shrimp` | See [Trader cohorts](/concepts/cohorts) for the full tier reference. **August 14, 2026** ## Liquidation intelligence: notional, sides, and cohorts The liquidation summary (`GET /live/risk/liquidations/summary`) now returns the full two-layer picture: * **`totalNotional`** — liquidated position value (the industry-standard headline number), alongside the existing `totalClosedPnl` realized losses. * **`longNotional` / `shortNotional`** and event counts — which side got force-closed. * **`byCohort`** — liquidated notional, losses, events, and wallets broken down by behavioral tier. See who actually gets liquidated. * **`wallets`** — distinct liquidated wallets in the window. The same aggregates power the explorer's new public [liquidations page](https://www.coinversa.ai/explorer/liquidations). Fields are additive — existing consumers are unaffected. **August 13, 2026** ## The Daily Pulse — frozen daily editions via the API Two new FREE-tier endpoints expose [The Daily Pulse](https://www.coinversa.ai/explorer/pulse), the auto-generated Hyperliquid morning edition: * **`GET /pulse/daily/{date}`** — the edition for a given `YYYY-MM-DD` date. Editions are **frozen**: once stamped (00:05 UTC), the document never changes, so any past date returns exactly what it returned on day one. * **`GET /pulse/daily/latest`** — the newest edition. Each edition carries the surprise-ranked stories (whale moves, cohort divergences, OI rotations, liquidation spikes, settlement upsets) with full receipts, matched news headlines, the standing blocks (biggest moves, coin movers, settlements), and the chain-state census stamp the numbers were verified against. Also in recent releases: lifecycle fills now carry per-fill PnL/fee attribution fields (`attributedPnl`, `attributedFee`, `attributedSize`, `rawClosedPnl`, `fillPnlBasis`), and cohort bias responses include `netBiasByCount` / `netBiasByNotional`. **July 16, 2026** ## Zero-knowledge connector: your API key never leaves our backend The hosted MCP connector's credential handling has been rebuilt end to end: * **Connecting no longer transmits your API key.** Picking a key on the authorization page hands over a **single-use connect code** (2-minute lifetime, dead after first redemption). The MCP server exchanges it server-to-server for an opaque key *reference* — the raw key never touches the browser or the connector host. * **Pick any existing key.** The authorization page now lists your active keys — connect one in a click, no need to have the value saved and no forced duplicate keys. * **Encryption at rest for everything else.** Sessions from the paste-a-key flow are now AES-256-GCM-encrypted under a key held outside the database, and all OAuth bearer tokens are stored as SHA-256 digests. A stolen copy of the connector's database yields nothing. * Tiers, rate limits, metering, and instant revocation behave exactly as before — revoking a key still disconnects every agent authorized with it. **July 15, 2026** ## One-click connect: OAuth sign-up on the hosted MCP Connecting Coinversa to Claude, Perplexity, Cursor, or any MCP client no longer requires copying an API key. Paste `https://mcp.coinversa.ai/mcp` into your client and it opens the new authorization page: * **Existing users** sign in with their Coinversa account and connect a key in one click — or paste a saved `cvsa_` key directly. * **New users** create an account right on the page. Every new account gets **14 days of Pro** — all 99 tools, no credit card — and the key is provisioned automatically. * Keys stay visible once at creation and revocable any time from the [developer portal](https://developers.coinversa.ai/keys); revoking a key disconnects every agent authorized with it. See the updated [MCP setup](/mcp/setup) guide — client configs no longer need auth headers. **July 5, 2026** ## Entity resolution, tier-aware sessions & exchange aggregates Pulse 0.9.0 adds **owner-level intelligence**: Hyperliquid traders run named sub-accounts that trade independently, so per-wallet views undercount every multi-account trader. Pulse now resolves any wallet to its owner entity and aggregates across the whole family — a view no other Hyperliquid data product offers. Under the hood, the position dataset is now **reconciled hourly against Hyperliquid's own chain state** (the census pipeline), and responses carry the chain block they were last verified against. ### New features * **Entity resolution** — `GET /entity/{address}` resolves any wallet (master, sub-account, or unknown) to its owner entity: master address, every named sub-account, each member's open book, the combined positions across all of them, and a verified-vs-chain stamp. `GET /entities/leaderboard` ranks the top *owners* (not wallets) by combined open notional. Both Pro tier. MCP: `pulse_entity_profile`, `pulse_entity_leaderboard`. * **Exchange aggregates** — `GET /exchange/volume` (24h volume **by dex** — builder dexes are \~43% of Hyperliquid volume and most trackers' headline numbers omit them), `GET /exchange/oi` (open interest by dex with long/short split), `GET /exchange/active-traders` (24h distinct traders). MCP: `pulse_exchange_volume`, `pulse_exchange_oi`, `pulse_active_traders`. * **Plan introspection** — `GET /plan` returns the caller's tier, effective limits, and every tier's limits with an upgrade link. MCP: `pulse_my_plan`. * **Chain-verification stamp** — `GET /census/stamp` exposes the chain-state block the dataset was last reconciled against; entity responses include it inline. ### Updates * **Tier-gated and rate-limited responses are now machine-actionable**: 403s carry `current_tier`, `required_tier`, and an `upgrade_url` (code `TIER_GATE`), so agents can explain exactly what a request needs instead of a bare "forbidden". * The MCP tool surface grew from **83 → 91 tools**; the REST API from **87 → 96 endpoints**. * Data-accuracy note: this release follows a full reconciliation of the position dataset against Hyperliquid chain state — open positions, open interest, and volumes now match independent trackers to well under 1%, with the residual continuously verified. **June 9, 2026** ## Position lifecycles & execution quality Pulse 0.8.0 is built on a fully re-derived [position-lifecycle](/concepts/position-lifecycles) dataset — every position reconstructed open→close from on-chain fills, now carrying **MAE/MFE** (the worst adverse and best favorable price each position ever saw). For the first time you can analyze *execution quality*, not just realized PnL. ### New features * **Position lifecycles** — per-wallet open→close history, aggregate lifecycle stats, single-lifecycle drill-downs (with composing fills), and a one-call wallet briefing. See [Position lifecycles](/concepts/position-lifecycles). * **Execution quality (MAE/MFE)** — per-position drawdown / run-up curves, "max-pain" survivors (winners that endured deep drawdowns), perfect exits (high MFE capture), and the most catastrophic individual liquidations. * **Trader archetypes** — survivors & anti-survivors, persistent winners, capital-efficient titans (PnL per fee), one-month wonders, newcomer whales, coin kings, top liquidators, and lethal coins — all derived from 90-day lifecycle behavior. * **Market structure** — per-coin winner/loser profit pools, profitability by UTC hour, alpha concentration (percentile profit share), HFT-vs-swing-vs-holder splits, and head-to-head wallet comparison. * **Refreshed cohorts** — `pulse_cohort_recent_*` tools label wallets by their last-30-day tier (not all-time), surfacing who is printing right now. * **Global recent feed** — `pulse_lifecycles_recent` streams the most recently closed positions across the entire exchange. ### Updates * The Pulse MCP tool surface grew from **55 → 91 tools** — see the full catalog in [MCP tools](/mcp/tools). The REST API now exposes **96 endpoints**. * The legacy closed-position tools (`pulse_trader_closed_positions`, `pulse_trader_closed_position_stats`, `pulse_recent_closed_positions`) are kept for backward compatibility but are **superseded** by the lifecycle tools, which read the corrected lifecycle dataset (more history, MAE/MFE, spot coverage). ### Notes * MAE/MFE is perp-only (spot positions have no adverse/favorable excursion by design). The freshest closes may briefly show null MAE/MFE while the hourly risk backfill catches up. **May 22, 2026** ## HIP-4 outcome intelligence Coinversa Pulse now indexes the full [HIP-4 outcome-contract](/concepts/hip4) wire format from Hyperliquid, with discovery, settlement, volume, recent trades, trader overlap, and perp-position context for every outcome. ### New features * **12 HIP-4 MCP tools** for outcome-contract discovery, settlements, volume, recent trades, and trader overlap. See the full surface in [MCP tools](/mcp/tools). * **Outcome + perp context tool** lets agents pull a trader's open perp position alongside their HIP-4 outcome exposure in a single call — useful for hedging and conviction-overlap analysis. * **Hosted Remote MCP** is now documented at `https://mcp.coinversa.ai/mcp`, so you can connect agents without installing the npm package. See [MCP setup](/mcp/setup). ### Updates * The Pulse MCP tool surface grew from **43 → 55 tools**. * README, agent SKILL metadata, and server instructions updated for the new HIP-4 surface. ### Breaking changes * **Keyless / no-API-key mode has been removed.** All MCP tools now require a Coinversa API key. Grab a free-tier key from the [dashboard](https://developers.coinversa.ai) — see [Authentication](/authentication) and [Pricing](/pricing) for details. # Builder codes & attribution Source: https://docs.coinversa.ai/concepts/builder-attribution How builder-fee revenue and per-fill attribution are computed — the exact on-chain ledger, the orders-to-fills join, the verified stamp, and what dataNotes means. A **builder code** on Hyperliquid is an address that attaches a fee to the orders it routes — wallets approve a maximum fee per builder, and the builder earns that fee on every fill it originates. It's how front-ends, wallet apps, trading bots, and builder dexes monetize order flow. Coinversa indexes the entire builder-fee economy: exact revenue for every builder, plus fill-level attribution of who traded what through whom. > [!NOTE] > > **Builder ≠ builder dex.** [Builder dexes](/concepts/markets), such as `xyz`, `io`, `mkts` and `para`, are one kind of builder — venues that list their own markets. But any front-end can run a builder code without being a dex (wallet apps are among the largest). This page and the [builder endpoints](/api-reference/builders) use "builder" to mean any builder-code operator. ## Two data planes Every builder response mixes two data sources with different guarantees: | Plane | Source | Powers | Guarantee | | - | - | - | - | | **Ledger** | Hyperliquid's own cumulative builder-fee ledger | `revenueUsd` everywhere | **Exact** for any window inside ledger history (from 2026-08-11), validated to ±0.1% against the on-chain ledger. Earlier windows serve revenue from the attributed rollup (≥97% of ledger on reconciled days) with a `dataNotes` disclosure | | **Attribution** | Trades joined to builder-fee orders on `(oid, address)` | Fills, volume, users, coins, PnL breakdowns | Attributed — currently \~77–95% coverage per builder (see below) | The one-line rule: **revenue is exact; detail metrics are attributed.** When a leaderboard row says a builder earned \$1.2M last week, that number reconciles with the chain. When it says 4,812 users generated it, that count comes from the fill join and can slightly undercount. ## The trigger-order gap (read dataNotes) Trigger-order fills (stop-loss / take-profit) currently attribute at ledger level only — roughly **6% of fees ecosystem-wide**, which puts per-builder attribution coverage at **\~77–95%**. Trigger-order placements (used by `/orders`) are captured live since **2026-08-20** and backfilled to **2026-03-24**. Their fills are not yet joined to builders, so attributed metrics undercount. Practical consequence: attributed fills, volume, and user counts **slightly undercount** versus ledger revenue. Every builder response says so in its `dataNotes` field: ```json theme={null} "dataNotes": "Revenue figures are exact per Hyperliquid's cumulative builder-fee ledger. Trigger-order fills (stop/TP) currently attribute at ledger level only (~6% of fees ecosystem-wide) until the parser upgrade, so join-attributed fills, volume, and user counts slightly undercount versus ledger revenue." ``` If you're building on this data, surface the caveat to your users — we do. ## The verified stamp Every builder response carries a `verified` stamp, the same pattern as the census stamp on entity responses: ```json theme={null} "verified": { "ledger_block": 723441892, "ledger_chain_time": "2026-08-21T14:02:11Z", "coverage": null } ``` * `ledger_block` / `ledger_chain_time` — the latest block in Hyperliquid's builder-fee ledger this response was verified against. Treat `ledger_chain_time` as the freshness timestamp. * `coverage` — **null today**, by design. When the attribution-reconciliation pipeline ships, it becomes a live ratio object (`window_start`, `window_end`, `ledger_fees_usd`, `attributed_fees_usd`, `ratio`, `computed_at`) quantifying exactly how much of ledger revenue the fill-level metrics account for. > [!NOTE] > > `coverage: null` means "not yet provisioned" — it is never an error, and nothing about the response is degraded when it's null. Don't retry on it. ## Builder names `builderName` comes from a curated registry of 115 known builders. When a builder isn't in the registry, the field is **omitted — never guessed**. Builder addresses in responses are always canonical lowercase 0x-hex; path parameters accept any 0x spelling. ## Cohort tiers on builder endpoints The `/traders` and `/cohorts` endpoints label wallets with their exchange-wide **all-time** `pnlTier` / `sizeTier`, returned as legacy slugs (`smart_money`, `whale`, …) per the [trader cohorts](/concepts/cohorts) vocabulary. These are lifetime classifications — the pulse `cohorts-recent` endpoints classify by 30-day-rolling tiers, so the same wallet can carry a different tier there. Wallets not yet in the cohort rollup appear as `null` tiers on `/traders` and in an `untracked` bucket on `/cohorts`, so per-tier user counts always sum to `totalUsers`. ## History depth Coinversa's copy of the builder-fee **ledger begins 2026-08-11**. Windows that reach earlier serve revenue from the attributed rollup (a floor, ≥97% of ledger on reconciled days), and `dataNotes` says so. Attributed history is visible through the [retention endpoint's](/api-reference/builder-analytics/builder-retention-cohorts) 12-month cohort triangle and the `firstSeen` / `lastSeen` timestamps on builder profiles. Per-request query windows are narrower than the underlying history: `period` is `day | week | month`, and `since` parameters clamp to 90 days — see [Data windows](/api-reference/data-windows#builder-analytics-windows). ## Which endpoint answers what | Endpoint | Tier | Question it answers | | - | - | - | | [`/builders/leaderboard`](/api-reference/builder-analytics/builder-revenue-leaderboard) | Starter | Who are the top builders by exact revenue, and how are they trending? | | [`/builders/{builder}/profile`](/api-reference/builder-analytics/builder-profile) | Starter | One builder's revenue, daily series, top coins, and user base. | | [`/trader/{address}/builders`](/api-reference/builder-analytics/builders-a-wallet-trades-through) | Starter | Which builders does this wallet trade through? | | [`/builders/{builder}/traders`](/api-reference/builder-analytics/builders-attributed-traders) | Pro | Who are a builder's users — with PnL, fees paid, and cohort tiers? | | [`/builders/{builder}/fills`](/api-reference/builder-analytics/builder-attributed-fills) | Pro | The raw attributed fill stream for a builder. | | [`/builders/{builder}/cohorts`](/api-reference/builder-analytics/builder-user-cohort-composition) | Pro | What kind of traders use this builder — Sharps or The Crowd? | | [`/builders/{builder}/retention`](/api-reference/builder-analytics/builder-retention-cohorts) | Pro | Do this builder's users stick around month over month? | | [`/builders/{builder}/overlap`](/api-reference/builder-analytics/builder-audience-overlap) | Pro | Which other builders do this builder's users also trade through? | | [`/builders/{builder}/orders`](/api-reference/builder-analytics/builder-order-intent) | Pro | What do this builder's users intend — action and time-in-force mix, stop/TP triggers? | | [`/builders/{builder}/heatmap`](/api-reference/builder-analytics/builder-activity-heatmap) | Pro | When do this builder's users trade — a 7x24 UTC weekday-by-hour grid over the trailing 12 weeks. | | [`/builders/{builder}/lifecycle`](/api-reference/builder-analytics/builder-user-lifecycle) | Pro | How do this builder's users split across active / cooling / switched / dormant / movedOn? | | [`/builders/{builder}/journey`](/api-reference/builder-analytics/builder-user-journey-economics) | Pro | Lifetime economics of the builder's trailing-year acquisition cohort. | Cross-builder overlap is only possible because Coinversa attributes fills for **all** builders, not one — a single-builder integration can't see where its users go. > [!NOTE] > > Builder analytics is available over **REST, [x402 pay-per-call](/api-reference/tiers#x402-pay-per-call) and the [MCP connector](/mcp/tools)** — eleven `builder_*` tools plus `trader_builders`, the per-wallet inverse. # Trader cohorts Source: https://docs.coinversa.ai/concepts/cohorts Every tracked wallet is classified by two independent tier systems: PnL and size. Coinversa indexes every active Hyperliquid wallet and classifies it into two orthogonal tier systems: * **PnL tier** — by all-time realized (closed) PnL from indexed fills * **Size tier** — by lifetime traded notional (USD) A classified wallet has exactly one PnL tier and one size tier. Wallets not yet in the traders rollup have no tier: cohort aggregates leave them out and say how many (e.g. `coverage.withoutTier`; `untracked` on builder cohorts). Together the two tiers form a 2D map of trader behavior — e.g. *"Sharps + Middleweights"* is a different cohort from *"Sharps + Featherweights"*, even though both are profitable. Each tier has a canonical slug and a legacy slug. Requests accept either one on path parameters, query parameters and MCP tool arguments. Responses return the legacy slug (e.g. `pnlTier: "money_printer"`), so match on the legacy slug, or on either, when you read responses. ## PnL tiers Ordered from best to worst. Thresholds are fixed dollar buckets on realized PnL; lower bounds are inclusive. | Display name | Realized PnL | Slug (send this) | Legacy slug (accepted & returned) | | - | - | - | - | | Apex | ≥ \$1M | `apex` | `money_printer` | | Sharps | $100K to $1M | `sharps` | `smart_money` | | Grinders | $10K to $100K | `grinders` | `grinder` | | Scrapers | $0 to $10K | `scrapers` | `humble_earner` | | The Crowd | −$10K to under $0 | `crowd` | `exit_liquidity` | | Bleeders | −$100K to −$10K | `bleeders` | `semi_rekt` | | Trapped | −$1M to −$100K | `trapped` | `full_rekt` | | Blown Out | below −\$1M | `blown_out` | `giga_rekt` | ## Size tiers Ordered from largest to smallest. Thresholds are fixed dollar buckets on traded notional; lower bounds are inclusive. | Display name | Traded notional | Slug (send this) | Legacy slug (accepted & returned) | | - | - | - | - | | Heavyweights | ≥ \$5M | `heavyweights` | `leviathan` | | Cruiserweights | $1M to $5M | `cruiserweights` | `tidal_whale` | | Middleweights | $500K to $1M | `middleweights` | `whale` | | Welterweights | $100K to $500K | `welterweights` | `small_whale` | | Lightweights | $50K to $100K | `lightweights` | `apex_predator` | | Featherweights | $10K to $50K | `featherweights` | `dolphin` | | Flyweights | $250 to $10K | `flyweights` | `fish` | | Strawweights | below \$250 | `strawweights` | `shrimp` | ## All-time vs 30-day tiers All-time tiers classify a wallet on its lifetime realized PnL and traded volume. 30-day tiers use the same slugs and the same dollar thresholds on the wallet's last 30 days (`pnl_tier_recent` / `size_tier_recent`), refreshed hourly. They are used by the `pulse_cohort_recent_*` tools / `/pulse/cohorts-recent/*` routes, and by `tierType=pnl_recent` on `live_positioning_by_entry` and `live_cohort_bias_history` (`pnl_recent` snapshots from 2026-05-14). Layer responses echo the axis as `cohortBasis` (`all_time_pnl`, `recent_30d_pnl` or `lifetime_volume`) and `tierWindowDays` (30, or `null` for all-time axes). Labels are always the wallet's *current* tier, so one wallet can sit in different cohorts on the two axes. ## How to query cohorts Use the cohort tools when you want behavior at the group level rather than per wallet: | Tool | Use it when… | | - | - | | `pulse_cohort_summary` | You want every cohort's wallet count, total and average PnL, average win rate and total/average volume (all-time tiers). | | `pulse_cohort_positions` | You want to see what one cohort is currently long/short. | | `pulse_cohort_trades` | You want the recent trades from one cohort. | | `pulse_cohort_history` | You want how one cohort has performed over time. | | `pulse_cohort_bias_history` | You want a cohort's long-short bias trajectory. | | `pulse_cohort_performance_daily` | You want day-by-day cohort PnL / volume. | | `live_cohort_bias` | You want who is long or short one coin right now, by tier (current snapshot). | | `live_cohort_bias_history` | You want the stored cohort-bias snapshots for one coin — normally one every 15 minutes, hourly before 10 November 2026 — over up to 2160h (90d), with `tierType` `pnl`, `pnl_recent` or `size`, `tiers=apex,crowd` and `format=layer`. See [Cohort-bias history](/api-reference/chart-layers#cohort-bias-history). | | `live_positioning_by_entry` | You want one coin's open positions bucketed by entry price per cohort (snapshot only). See [Positioning by entry](/api-reference/chart-layers#positioning-by-entry). | | `live_whale_trades` | You want the largest fills by notional over up to 24h, with both counterparties' tiers. See [Whale trades](/api-reference/chart-layers#whale-trades). | | `pulse_cohort_recent_positions` / `_trades` / `_lifecycle_stats` / `_top_positions` / `_alpha_concentration` | You want the same questions answered on 30-day tiers. | Whale trades rank fills by size; they are unrelated to the Middleweights (legacy `whale`) size tier. Cohorts are addressed by `tierType` (`pnl` or `size`) and `tier` (a slug from the tables above — either the new or the legacy slug works): ``` GET /pulse/cohorts/pnl/sharps/positions GET /pulse/cohorts/size/middleweights/history ``` ## When to use cohorts vs individual wallets * **Cohorts** when you want a *signal* — "are the Middleweights loading up on BTC?" / "are the Sharps bearish on ETH?". * **Builder cohorts** when you want the *user mix of a builder code* — the [builder endpoints](/api-reference/builders) label wallets with their **lifetime** tiers (`pnlTier` / `sizeTier`, legacy slugs), which can differ from the 30d-rolling tiers the `cohorts-recent` endpoints classify by. See [Builder codes & attribution](/concepts/builder-attribution#cohort-tiers-on-builder-endpoints). * **Individual wallets** when you want a *specific story* — "what is `0xabc...` doing?" / "how is this trader I follow performing?". Most agent workflows benefit from cohort-first analysis: it's signal-rich, and you can drill into specific wallets with `pulse_token_leaderboard` (top traders for a coin) when you want names. # Cross-market assets Source: https://docs.coinversa.ai/concepts/cross-market-assets Canonical taxonomy unifying native HL perps with builder dex listings — PAXG and xyz:GOLD both resolve to GOLD. The same underlying exposure can appear under different tickers on different venues. Pulse maintains a **canonical asset registry** so cross-market questions ("which venues trade gold?", "total OI on BTC across all dexes?") return one coherent answer instead of needing you to dedup symbols yourself. ## Vocabulary * **Canonical** — the economic-exposure identifier. Examples: `GOLD`, `BTC`, `OIL`. * **Symbol** — what appears on a specific venue. Examples: `GOLD` (native HL spot), `xyz:GOLD`, `hyna:PAXG` (a historical, legacy-dex symbol). The registry maps every symbol to its canonical, including documented **synonyms** where two tickers track the same exposure. > [!NOTE] > > Venue lists cover native Hyperliquid, `xyz` and the legacy dexes (`flx`, `vntl`, `hyna`, `km`, `abcd`, `cash`; delisted, zero open interest). `io`, `mkts` and `para` are not in the asset directory yet. ## Known synonyms | Symbol | Canonical | Why | | - | - | - | | `PAXG` | `GOLD` | PAXG is gold-backed | | `XAUT` | `GOLD` | XAUT is gold-backed | | `XAGT` | `SILVER` | XAGT is silver-backed | ## Resolving symbols to canonical The asset endpoints accept either form — canonical names or any symbol that resolves to one: ```bash theme={null} # Both return the same asset's venue breakdown GET /assets/GOLD GET /assets/PAXG # resolves to GOLD GET /assets/xyz:GOLD # also resolves to GOLD ``` The MCP tool equivalents (`list_asset`, `pulse_cross_market_asset`) accept the same flexible input. ## Cross-market aggregation When you want total exposure across every venue that trades an asset, use `pulse_cross_market_asset`. It joins per-venue live position breakdowns (longs, shorts, notionals, bias, unique wallets) onto the venue list and returns per-venue rows plus a roll-up. ```bash theme={null} GET /assets/BTC/cross-market ``` Sample shape: ```json theme={null} { "query": "BTC", "resolvedCanonical": "BTC", "asset": { "canonical": "BTC", "synonyms": [], "crossMarket": true, "venueCount": 2 }, "aggregate": { "totalOpenInterest": ..., "longPositions": 13071, "shortPositions": 10392, "longNotional": ..., "shortNotional": ..., "netBias": 0.114, "biasRange": 0.077, "totalUniqueWallets": ..., ... }, "venues": [ { "dex": "hl", "symbol": "BTC", "longPositions": 12431, "shortPositions": 9802, "netBias": 0.118, ... }, { "dex": "xyz", "symbol": "xyz:BTC", "longPositions": 640, "shortPositions": 590, "netBias": 0.041, ... } ] } ``` `netBias` here is position-count bias, `(long - short) / (long + short)`. `totalUniqueWallets` is summed per venue, not deduplicated. An omitted venue metric means unavailable, not zero. ## When to use canonical vs venue symbols | Question | Use | | - | - | | "What's the BTC mark price on `xyz`?" | venue symbol (`xyz:BTC`) | | "Which venues trade gold?" | canonical (`GOLD`) | | "Total OI on BTC across all dexes?" | canonical (`BTC`) → cross-market | | "Is PAXG the same as GOLD?" | resolve via `list_asset` | | "Show me cohort bias on `xyz:SILVER`" | venue symbol (live data is per-venue) | Live position / cohort data is **always per-venue** — `live_cohort_bias` expects a specific symbol, not a canonical. Use cross-market endpoints only when you explicitly want the aggregation. ## Discovery | Tool / endpoint | Returns | | - | - | | `list_assets` / `GET /assets` | Full directory of canonicals with their venue lists; also returns `venues`, the builder dexes the directory covers | | `list_asset` / `GET /assets/:c` | One canonical's venue breakdown (accepts synonyms) | # Data coverage Source: https://docs.coinversa.ai/concepts/data-coverage What's indexed, how fresh it is, and where the cutoffs are. Pulse runs an indexer against Hyperliquid L1 + builder dexes + HIP-4. This page covers what's tracked, how often it updates, and the historical bounds you should expect. ## What's indexed | Data | Source | Updated | | - | - | - | | All Hyperliquid wallet trades | L1 historical clearinghouse | Continuous, from **2025-03-22** (`pulse_global_stats.dataStartDate`) | | Live positions (size, entry, leverage, liquidation price) | Per-wallet polling of L1 clearinghouse state | Flushed in batches every 5 s; each row is as of that wallet's last poll (see `source.newestRow` / `oldestRow` / `medianAgeS`) | | Market data (mark, OI, funding, candles) | HL info/stats APIs | 5–10s cache | | Liquidation events | L1 user-action stream | Continuous, from **2026-01-01** | | L1 mark price history | L1 mark-price stream | Continuous, from **2026-01-01** | | Builder dex trades + positions | Per-dex sub-accounts | Continuous | | Builder-fee orders + attribution | HL builder-fee ledger + order stream | Continuous | | HIP-4 outcome trades + settlements | L1 trades on outcome coins | Continuous, from **2026-05-02** | | Cohort classification | traders rollup over indexed fills | All-time tiers update whenever a wallet's rolled-up PnL or volume changes; 30-day tiers refresh hourly | | L4 order book rollups (`book_*`) | Node L4 book re-export | Every 60 s, latest only (no history); 503 when older than 10 min | Coins outside the order-book sweep return 404 `BOOK_NOT_COVERED`, and spot pairs are not covered. Call `data_coverage` (MCP) for each dataset's live window and freshness stamp. ## Cutoffs Some endpoints have **hard historical floors** because the underlying data collection started after Hyperliquid mainnet: * **Risk metrics** (liquidations, mark dislocations, user-action–derived signals) — clamped to **`2026-01-01`**. Earlier `since` requests are silently truncated to that floor. * **HIP-4 outcomes** — clamped to **`2026-05-02`** (mainnet launch). Earlier `since` requests are silently truncated. * **Cohort tiers** — wallets not yet in the traders rollup have no tier (counted in `coverage.withoutTier` / `untracked`). * **Builder-fee attribution** — trigger-order (stop/TP) fills attribute at ledger level only, so join-attributed fills, volume and users slightly undercount (see `dataNotes`). Trigger-order placements are captured live since **2026-08-20** and backfilled to **2026-03-24**; resolving them to fills is still largely unpopulated. Coinversa's copy of the builder-fee ledger begins **2026-08-11**. Windows that reach earlier serve revenue from the attributed rollup (a floor, ≥97% of ledger on reconciled days), and `dataNotes` says so. See [Builder codes & attribution](/concepts/builder-attribution). Separately from these floors, most caller-controlled windows are silently clamped to **90 days on every tier**. Some routes are tighter: `/live/whale-trades` allows up to 24h and rejects longer windows with 400; `/pulse/cohort-bias/history` and `/pulse/cohorts/daily-stats` allow up to 30 days; HIP-4 perp-position context clamps `days` to 60. See [Data windows](/api-reference/data-windows) and [authentication](/authentication#historical-window-caps). ## Snapshots vs history Current-state routes (`/live/cohort-bias`, `/live/positioning-by-entry`, cohort positions) describe open positions now and are never a history. Cohort-bias history is the `cohort_bias_snapshots` table as stored — normally one snapshot every 15 minutes, hourly before 10 November 2026: missing snapshots are absent, and a cohort with no open notional at a snapshot has no point (never 50%). Backfilled hours carry the wallet's *current* tier (lookahead), so `coverage.provenance` is `unknown_mixed` and `backtestSuitable` is `false` — do not treat it as a point-in-time backtest. Windows: `/live/cohort-bias-history` up to 2160h (90d); `/pulse/cohort-bias/history` and `/pulse/cohorts/daily-stats` up to 30d; `pnl_recent` snapshots from 2026-05-14. ## Freshness Server cache refresh intervals by endpoint: | Endpoint | Refresh | | - | - | | `live/long-short`, `live/coins/{coin}/long-short` | 10 s | | `live/cohort-bias/{coin}` | Computed per request over per-wallet-polled rows | | `live/liquidation-heatmap/{coin}`, `live/risk/overview`, `live/risk/coins/{coin}` | 10 s | | `live/positioning-by-entry` | 30 s | | `live/whale-trades` | 60 s | | `live/cohort-bias-history` | 30 s (a new snapshot normally every 15 minutes) | | `live/official-oi` (all coins) | 2 min | | `live/official-oi/{coin}`, `live/oi-history` | Uncached | | `pulse/market-overview` (`list_markets`) | 30 s | | `pulse/stats` (`pulse_global_stats`) | 2 min | | `pulse/leaderboard` | 2 min | | `pulse/hidden-gems` | Uncached | | `market/price`, `market/orderbook` | Direct passthrough | Layer routes carry `source.asOf` and risk routes `generatedAt`, so you can measure staleness. ### Live mark vs stored mark `markPx` on positioning-by-entry is Hyperliquid's live mark (`markMethod: live_mark`, per-dex 10 s cache, builder-dex symbols resolved on their own dex) when the feed answers. Otherwise it is the newest stored position mark (`newest_position`), then a notional-weighted stored mark (`weighted_fallback`). `storedMark` and `markDivergencePct` show how far the stored book lags. Stored notionals and liquidation distances use each wallet's last-poll mark, and a note flags divergence above 1%. For fills themselves, polling is the wrong tool: the [WebSocket](/websocket/overview) pushes every fill at block cadence, with a per-subscription sequence number so you can tell when you missed one. ## What's not indexed * **Spot trades on non-canonical pairs** (`@N` indexes) — present in raw data, not classified into cohorts. * **Off-chain orderflow** (RFQ, OTC) — only on-chain L1 fills are captured. * **Private user information** (KYC, beneficial ownership) — addresses are public; wallets are not de-anonymized. ## How recent is "recent"? Tools that take a `since` parameter accept a number plus unit: * `m` — minutes (e.g. `10m`) * `h` — hours (e.g. `24h`) * `d` — days (e.g. `7d`) Weeks are not a unit — `2w` is rejected with `400 invalid since format`; use days (`14d`). Or use explicit `startTime` / `endTime` (unix ms or ISO date) for exact ranges. Both are silently clamped to the 90-day window on most routes (some routes are tighter; see [Cutoffs](#cutoffs)) — see [Data windows](/api-reference/data-windows). # HIP-4 outcome contracts Source: https://docs.coinversa.ai/concepts/hip4 Prediction-market style side tokens indexed from Hyperliquid — encoding, settlements, trader overlap with perps. HIP-4 introduced **outcome contracts** to Hyperliquid — prediction-market style side tokens that settle to 0 or 1 based on a real-world question. Each question has two or more outcomes, and each outcome has one side token per side (YES / NO). Coinversa indexes the full HIP-4 wire format and exposes discovery, settlement, volume, recent trades, trader overlap, and perp-position context for every outcome. > [!NOTE] > > HIP-4 mainnet launched **2026-05-02**. Queries with a `since` reaching earlier are clamped to that date. ## Encoding The HIP-4 wire format uses an integer `encoding` that combines outcome ID and side: ``` encoding = 10 * outcomeId + side ``` `side` is the side index from the outcome's metadata (`sides[].name`): side 0 is the first side, which the API treats as YES on yes/no outcomes, and side 1 is NO. A multi-way question (e.g. price buckets) is several outcomes under one question, not extra sides. The side token appears in trades as: * **Outcome side coin** — `#` (e.g. `#90` = outcome 9, side 0 (YES)) * **Side token** — `+` (e.g. `+91` = outcome 9, side 1 (NO)) You usually don't construct these manually — the API/MCP exposes `outcomeId` and `side` separately and handles the encoding internally. ## Settlement rules * **Settlement** — `dir_id = 0` AND `px ∈ {0, 1}` * **Pair redemption** — `dir_id = 0` AND `px ≈ 0.5` (two-way market) * **Auction-phase clearing** — `dir_id = 0` AND `px ≈ 0.33333` (three-way bucket) * **Quote token** — HIP-4 outcomes settle in **USDH**, not USDC ## Tool catalog | Tool | Use it when… | | - | - | | `hip4_outcomes` | You want to browse all known outcome contracts. | | `hip4_questions` | You want outcomes grouped by underlying question. | | `hip4_outcome` | You want metadata for one specific outcome. | | `hip4_outcome_summary` | You want volume + holder stats for one outcome. | | `hip4_outcome_recent_trades` | You want recent fills on one outcome. | | `hip4_recent_settlements` | You want which outcomes have settled recently. | | `hip4_daily_volume` | You want overall HIP-4 trading volume over time. | | `hip4_most_active` | You want the most-traded outcomes right now. | | `hip4_top_traders` | You want the biggest outcome traders by volume / PnL. **Starter tier.** | | `hip4_trader_outcomes` | You want which outcomes a specific wallet has traded. **Starter tier.** | | `hip4_cross_product_overlap` | You want to find traders active in both outcomes and perps. **Pro tier.** | | `hip4_perp_position_context` | You want to know whether holders of one outcome already have open perp positions in the underlying asset. **Pro tier.** | ## Why `hip4_perp_position_context` matters This is the most interesting tool in the HIP-4 suite. It joins one outcome's current net-positive holders to currently open perp positions on the same underlying asset, then labels each holder. Holders are wallets that traded the outcome in the last `days` (default 14, max 60) and still hold net contracts. `signal` is `aligned`, `hedge` or `prediction_native`: * **`aligned`** — the perp position is in the same direction as the outcome bet (e.g. holding the YES side of "BTC > \$100k" AND long BTC perps → conviction trade) * **`hedge`** — the perp position is opposite the outcome bet (e.g. holding YES AND short BTC → hedge) * **`prediction_native`** — no underlying perp position (e.g. pure prediction market participant) It returns per-side wallet counts, long/short wallet counts, net underlying notional, and the top wallets with their signal label. Use it when a user asks: * *"Are outcome traders also exposed to the same asset?"* * *"Is this side directional or hedged?"* * *"Which large outcome holders have no perp exposure?"* ## Indexing assumptions If you're building on raw L1 data, the indexing convention is: * `trades.coin LIKE '#'` for HIP-4 fills * Settlement detection by `(dir_id, px)` combinations described above * Cross-product overlap requires joining `trades` on outcome coins with `live_positions` on the underlying The MCP tools handle all of this — you only need to understand it if you're querying the database directly. # Markets & symbols Source: https://docs.coinversa.ai/concepts/markets Native Hyperliquid perps, builder dexes, and symbol-format conventions. Hyperliquid hosts two layers of perpetual markets: the **native** L1 perps (BTC, ETH, SOL, HYPE, etc.) and **builder dexes** — independent perp exchanges built on top of Hyperliquid with their own collateral tokens and listings. > [!NOTE] > > **Builder dex ≠ builder code.** A builder *dex* is a venue with its own markets (this page). A builder *code* is any address that attaches a fee to the orders it routes — every builder dex runs one, but so do wallet apps, front-ends, and bots that list no markets of their own. The [builder analytics endpoints](/concepts/builder-attribution) are about builder codes. ## Builder dexes Active builder dexes (Hyperliquid perpDexs, checked 2026-09-23): | Dex | What it trades | Collateral | Example symbols | | - | - | - | - | | *(none)* | Native HL perps | USDC | `BTC`, `ETH`, `SOL`, `HYPE` | | `xyz` | Stocks, commodities, indices, FX | USDC | `xyz:GOLD`, `xyz:SILVER`, `xyz:TSLA` | | `io` | Pre-IPO and single stocks | USDC | `io:ANTH`, `io:OAI` | | `mkts` | Indices and bonds (Markets by Kinetiq) | USDC | `mkts:US500`, `mkts:USTECH` | | `para` | Stocks and crypto indices | USDC | `para:BTCD`, `para:AVGO` | > [!NOTE] > > **Legacy dexes.** Every market on `flx`, `vntl`, `hyna`, `km`, `abcd` and `cash` is delisted on Hyperliquid (zero open interest, zero volume); `km`'s listings moved to `mkts`. Their historical trades still appear in the `pulse_*` trade and wallet analytics, but their prices are not live, and `list_markets` hides them unless `includeInactive=true`. ## Symbol format * **Native symbols:** just the ticker — `BTC`, `ETH`, `SOL`. * **Builder dex symbols:** `prefix:TICKER` — `xyz:SILVER`, `io:ANTH`, `mkts:US500`. The prefix is always lowercase; the ticker is always uppercase. This convention matches Hyperliquid's L1 storage format and is what the API expects in path / query params. > [!NOTE] > > Discover all available symbols with the `list_markets` tool (or `GET /pulse/market-overview`). Optionally pass a `dex` filter to narrow results to one venue. > > `list_markets` / `GET /pulse/market-overview` and `market_price` cover native perps, `xyz` and the legacy dexes only. `io`, `mkts` and `para` markets appear in trade, lifecycle and wallet analytics (`pulse_*`), but `list_markets(dex="io")` returns an empty list with a note, and `market_price` explains the gap instead of returning a price. ## Asset classes Internally we tag every coin with an asset class. You usually don't need to think about this, but it surfaces in HIP-4 contexts: | Class | Format | Example | | - | - | - | | `perp` | bare ticker (native HL perp) | `BTC`, `HYPE` | | `hip3-perp` | `dex:TICKER` (builder-deployed) | `xyz:BTC`, `xyz:TSLA` | | `spot-canonical` | `X/Y` named spot pair | `PURR/USDC` | | `spot-non-canonical` | `@N` spot index | `@1`, `@22` | | `outcome` | `#` HIP-4 side token | `#90`, `#211` | ## Cross-market and synonyms The same underlying exposure can appear under different tickers on different venues. For cross-market questions, use the canonical asset, not the venue symbol — see [cross-market assets](/concepts/cross-market-assets) for the full model. ## Funding rates Funding fields (`fundingRate` on `market_price`, etc.) are **raw hourly decimal rates** from Hyperliquid, not annualized percentages: * Hourly funding % = `fundingRate * 100` * Annualized APR % = `fundingRate * 24 * 365 * 100` Example: `fundingRate: 0.00000625` = 0.000625% hourly = \~5.475% APR. # Position lifecycles & execution quality Source: https://docs.coinversa.ai/concepts/position-lifecycles Every position reconstructed open→close from on-chain fills, with MAE/MFE — analyze how a trade was managed, not just its PnL. A **position lifecycle** is one complete position — open → scale → close — reconstructed from a wallet's on-chain fills. Instead of a flat list of trades, you get the full arc of each position: entry/exit VWAP, peak size, hold duration, fees, realized PnL, and liquidation status. Pulse re-derives every lifecycle from the corrected fill history and enriches each one with **MAE/MFE**, unlocking *execution-quality* analysis — not just realized PnL. ## MAE / MFE For every closed perp position, Pulse records the two price extremes it lived through while open: * **MAE — Maximum Adverse Excursion**: the worst the price went *against* the position (the deepest unrealized drawdown it survived). * **MFE — Maximum Favorable Excursion**: the best the price went *for* the position (the peak unrealized profit it reached). These are **direction-aware**: for a long, `MAE ≤ entry ≤ MFE`; for a short, `MAE ≥ entry ≥ MFE`. > [!NOTE] > > **Why it matters.** Two wallets can both book +\$10k on the same coin — one after white-knuckling a 50% drawdown and getting bailed out, the other never going 3% underwater. Same PnL, completely different trader. MAE/MFE is the first time you can separate skill from luck — and tell which wallets are actually worth following. MAE/MFE is **perp-only** — spot positions have no adverse/favorable excursion by design. The very freshest closes may briefly show null MAE/MFE until the risk backfill catches up (it refreshes hourly). MAE/MFE are emitted only when non-zero, which in practice means larger positions, so filter by notional when you need rows that carry them. ## What you can ask | Question | Tool | | - | - | | Show me every position this wallet opened and closed | `pulse_trader_lifecycles` | | What are this wallet's position-level stats? | `pulse_trader_lifecycle_summary` | | Break one position down into its composing fills | `pulse_lifecycle` | | How far underwater did each position go before working? | `pulse_wallet_drawdown_curve` | | Which profitable positions had the deepest drawdowns first? | `pulse_profitable_after_drawdown` | | Which exits captured most of the favorable move? | `pulse_exits_near_peak_favorable_move` | | What just closed across the whole exchange? | `pulse_lifecycles_recent` | ## Trader archetypes Because lifecycles capture the full arc of every position over a rolling 90-day window, Pulse can group wallets by how their positions played out: * **Survivors / anti-survivors** — wallets that hit a deep cumulative-PnL trough then recovered (or never did). * **Persistent winners** — profitable across multiple distinct months. * **Fee efficiency** (`pulse_fee_efficiency_leaderboard`) — realized PnL per dollar of fees paid. * **Single large month, then giveback** (`pulse_single_month_giveback_wallets`) — one large profitable month, part of which was later given back. * **Newcomer whales** — a recent first lifecycle with large notional. * **Top earners by coin** (`pulse_top_earners_by_coin`) — the highest-PnL wallet(s) on each coin. * **Top liquidators / liquidation rate by coin** (`pulse_top_liquidators`, `pulse_liquidation_rate_by_coin`) — which wallets execute the most liquidations, and which coins have the highest share of positions liquidated. ## Refreshed cohorts The `pulse_cohort_recent_*` tools classify wallets by their **last-30-day** tier (`pnl_tier_recent` / `size_tier_recent`) instead of all-time — reflecting recent performance and showing changes the all-time [cohort](/concepts/cohorts) tools miss. Same dollar thresholds as the all-time tiers, refreshed hourly. The same labels are available as `tierType=pnl_recent` on `live_positioning_by_entry` and `live_cohort_bias_history`. See [Trader cohorts](/concepts/cohorts). ## Window & freshness * Lifecycle endpoints use a rolling **90-day** window (positions closed within the last 90 days, plus any still-open positions). * Precomputed lifecycle aggregates (archetypes, market structure, cohorts) refresh **hourly**. * Spot pairs (`@`-prefixed coins) are excluded by default. See the [MCP tool catalog](/mcp/tools) for every lifecycle tool, or the [API reference](/api-reference/introduction) for endpoint schemas. # Sharpe ratios Source: https://docs.coinversa.ai/concepts/sharpe Annualized realized-PnL Sharpe for any tracked Hyperliquid wallet: 30-day score, custom 1–90-day intervals, three monthly buckets, a top-50 Sharpe leaderboard and Sharpe filters on cohort endpoints. Starter. A **Sharpe ratio** asks how steady a wallet's profits are, not how large. Pulse computes one for every tracked Hyperliquid wallet from its daily realized PnL — a single wallet's score, the same score over any window in the last 90 days, three month-sized buckets to see whether it is improving, and a leaderboard of the most consistent wallets with real equity behind them. All four endpoints are **Starter**. ## How the score is computed ```text theme={null} annualizedPnlSharpe = √365 × mean(daily realized PnL) ÷ sample standard deviation(daily realized PnL) ``` * **Daily realized PnL**, in dollars, from the same per-wallet daily rollup as the rest of Pulse. It is not limited to perps. * **Every day in the window counts.** A day without fills counts as `0`, so a wallet that trades twice a month is not scored on its two good days. * **Completed UTC days only.** Today is always excluded; `asOf` is midnight UTC at the end of the window, and `calculatedAt` is when the number was computed. * **Risk-free rate is zero.** Annualized with √365 because crypto trades every day. * **Null, not zero,** when there are fewer than two days or the daily PnL never varies. The score is rounded to 4 decimals. > [!WARNING] > > **This is a realized-PnL proxy, not a portfolio Sharpe.** It is not divided by account equity, so it measures dollar PnL rather than percentage returns, and it excludes **fees, funding and unrealized PnL**. A wallet sitting on a large open loss can score well. **It rewards consistency, not size.** A wallet that makes $3 a day without fail can outrank one that made $1.5M with some red days, and a wallet with a single winning day in 30 scores √(365/30) ≈ 3.49 whatever the amount. On the 14 Oct 2026 leaderboard, before activity floors were added, the #2 wallet had \$77.85 of realized PnL over the 30 days. The leaderboard now applies activity floors by default (see [below](#the-leaderboard)); the wallet endpoints do not. Always read `annualizedPnlSharpe` alongside `realizedPnl` and `trades`, which every response carries next to it with `meanDailyPnl` and `stdDailyPnl`. ## Endpoints | Endpoint | MCP tool | What it returns | Window | | - | - | - | - | | `/pulse/trader/{address}/sharpe` | `pulse_trader_sharpe` | One wallet's score and its inputs | Last 30 completed UTC days (`days` accepts only `30`) | | `/pulse/trader/{address}/sharpe/interval` | `pulse_trader_sharpe_interval` | The same, over a window you choose | `startDay` (`YYYY-MM-DD`, inclusive) and `days` (1–90), both required | | `/pulse/trader/{address}/sharpe/monthly` | `pulse_trader_sharpe_monthly` | Exactly three buckets, newest first | 3 × 30 days, or calendar months with `useCalendarMonths=true` | | `/pulse/sharpe-leaderboard` | `pulse_sharpe_leaderboard` | Top 50 wallets by score | Last 30 completed UTC days (`days` accepts only `30`) | The wallet endpoints answer for wallets Pulse tracks; an address it has never indexed returns `404`. They apply **no equity filter** — any tracked wallet gets a score. ### Custom intervals `/sharpe/interval` scores 1–90 completed days. `startDay` must be no earlier than 90 days before today, and the exclusive end (`startDay + days`) cannot be later than today. **Out-of-range windows are rejected, not shortened** — unlike the silent `since` clamps elsewhere in the API: a malformed `startDay`, a start more than 90 days ago or an end later than today is a `400`; a missing, non-integer or out-of-range `days` (outside 1–90) is a `422`. A one-day interval returns a `null` score and a standard deviation of `0`. ### Monthly buckets `/sharpe/monthly` always returns three buckets, newest first, each with its own `startDay`, `endDayExclusive`, `days` and `asOf`: * **Default** (`useCalendarMonths=false`): the last 30 completed days, the 30 before that, and the 30 before that — 90 days in all. * **`useCalendarMonths=true`**: the completed days of the current UTC month plus the two full calendar months before it — at most 93 days. On the 1st of a month the current bucket has `days: 0`, zero statistics and a `null` score. ### The leaderboard `/pulse/sharpe-leaderboard` ranks the top **50** wallets. To be eligible a wallet needs **at least \$2,500 of stored account equity** (`minEquity`) and must clear two **activity floors**. Both apply by default and can be changed: | Parameter | Default | Range | Keeps wallets with | | - | - | - | - | | `minActiveDays` | `10` | 1–30, integer | at least this many completed UTC days in the window with one or more fills | | `minPnl` | `1000` | −1,000,000,000 to 1,000,000,000 | summed realized PnL over the window of at least this many dollars (inclusive) | All three checks happen **before** ranking, so the 50 slots go to wallets that pass. Wallets with no equity on record, or with zero variance, are left out. Ties break by realized PnL, then by wallet address. Each row also reports `activeDays`, and the response echoes the floors it applied as `minActiveDays` and `minPnl` next to `minEquity`. Out-of-range, non-integer `minActiveDays` or non-finite values are a `422`. The defaults keep wallets whose score rests on a couple of lucky days or a few dollars off the board. `minActiveDays` counts fill days the same way as `/pulse/hidden-gems`, but only inside the 30-day window (hidden-gems counts over all time). `minPnl` has the same name, dollar meaning and default as on `/pulse/max-pain-events` and `/pulse/perfect-exits`, but unlike them it accepts negative values, so the floor can be switched off. To see the whole field, pass `minActiveDays=1&minPnl=-1000000000`. * `accountValue` and `equityUpdatedAt` are the wallet's **latest stored equity checkpoint** — not necessarily its live balance, and no checkpoint is too old to count. * The result is **cached and refreshed every 30 minutes**; if a refresh fails, the previous result may be served. `calculatedAt` tells you how old the answer is. ## Sharpe filters on cohort endpoints Nine cohort and positioning endpoints take two optional filters that keep only wallets above a Sharpe threshold: | Parameter | Score it filters on | Refreshed | | - | - | - | | `minRecentSharpe` | The wallet's score over the last 30 completed UTC days | Hourly | | `minTotalSharpe` | The wallet's score from its first available daily history through yesterday UTC | Daily | Both are **inclusive minimums**. Zero and negative values are valid; non-finite values are `422`. Leave a filter out and nothing is filtered on it; set it and wallets without a score are excluded. Set both and a wallet must pass both. Filters apply **before** limits and aggregation, so totals and medians describe the qualifying wallets only. The filter uses each wallet's **current** score. On trade and lifecycle history, a fill from three weeks ago is kept or dropped by the wallet's score today, not its score then — do not use it to backtest. > [!NOTE] > > **These filters have no activity floor.** Unlike the leaderboard, they do not take `minActiveDays` or `minPnl`. The stored score does not record how many days a wallet traded, and a wallet with a single winning day in the window scores about **3.49**. A `minRecentSharpe` below that can therefore admit one-day wallets. The cohort itself (its PnL or size tier) is the only size floor. | Endpoint | Tier | MCP tool | | - | - | - | | `/live/cohort-bias/{coin}` | Starter | `live_cohort_bias` | | `/live/positioning-by-entry/{coin}` | Agent | `live_positioning_by_entry` | | `/pulse/cohorts/{tierType}/{tier}/positions` | Pro | `pulse_cohort_positions` | | `/pulse/cohorts/{tierType}/{tier}/trades` | Pro | `pulse_cohort_trades` | | `/pulse/cohorts-recent/{tierType}/{tier}/positions` | Pro | `pulse_cohort_recent_positions` | | `/pulse/cohorts-recent/{tierType}/{tier}/trades` | Pro | `pulse_cohort_recent_trades` | | `/pulse/cohorts-recent/{tierType}/{tier}/top-positions` | Pro | `pulse_cohort_recent_top_positions` | | `/pulse/cohorts-recent/{tierType}/{tier}/lifecycle-stats` | Pro | `pulse_cohort_recent_lifecycle_stats` | | `/pulse/cohorts-recent/{tierType}/{tier}/alpha-concentration` | Pro | `pulse_cohort_recent_profit_concentration` | The filters do not change an endpoint's tier. ## What you can ask | Question | Tool | | - | - | | Who are the most consistent traders on Hyperliquid this month? | `pulse_sharpe_leaderboard` | | Which consistent traders made at least \$50k over the last 30 days? | `pulse_sharpe_leaderboard` with `minPnl: 50000` | | What's the Sharpe ratio of 0x…? | `pulse_trader_sharpe` | | How did 0x…'s Sharpe look between 1 and 21 September? | `pulse_trader_sharpe_interval` | | Is 0x… getting more or less consistent month by month? | `pulse_trader_sharpe_monthly` | | How is BTC positioned among Apex wallets with a 30-day Sharpe above 2? | `live_cohort_bias` with `minRecentSharpe: 2` | | Where did high-Sharpe wallets get into their ETH positions? | `live_positioning_by_entry` with `minTotalSharpe` | ```bash curl theme={null} curl "https://api.coinversa.ai/api/public/v1/pulse/trader/0xYOUR_WALLET/sharpe/interval?startDay=2026-09-01&days=21" \ -H "X-API-Key: $COINVERSA_API_KEY" ``` ## Coverage * **Wallets**: every wallet Pulse tracks (see [Data coverage](/concepts/data-coverage)). The leaderboard additionally needs a stored equity checkpoint of at least $2,500 and, by default, 10 fill days and $1,000 of realized PnL in the window. * **History**: per-wallet scores and intervals reach back **90 days**; the monthly view up to 93. `minTotalSharpe` uses each wallet's full available daily history. * **Freshness**: wallet scores are computed on each request from the daily rollup; the leaderboard is up to 30 minutes old; the stored filter scores refresh hourly (recent) and daily (total). See the [tier matrix](/api-reference/tiers) for plans and the [API reference](/api-reference/introduction) for full response schemas. # TP/SL trigger orders Source: https://docs.coinversa.ai/concepts/trigger-orders Every pending take-profit and stop-loss order on Hyperliquid, one by one with the wallet behind it — by market or by wallet, across native perps, builder dexes and HIP-4. Latest-only snapshot refreshed about every minute. Pro. A **trigger order** is a conditional order that waits for a price — a **stop-loss** or **take-profit** — and only becomes a real order when that price trades. Until then it sits outside the visible book. Pulse snapshots every untriggered trigger order on Hyperliquid and serves them **individually**: the trigger price, size, side, and the wallet that placed each one. Both endpoints are **Pro**. ## Endpoints | Endpoint | MCP tool | What it answers | | - | - | - | | `/market/book/triggers/{coin}` | `book_triggers` | Which stop-loss and take-profit orders are waiting on this market, and whose are they? | | `/pulse/trader/{address}/trigger-orders` | `pulse_trader_trigger_orders` | Which TP/SL orders does this wallet have pending, across every market or one (`coin`)? | For the **bucketed** view — how much stop and take-profit size sits at each distance from mid — use `/market/book/stops/{coin}` (`book_stop_map`, Agent and above) from the [L4 order book](/mcp/tools#l4-order-book-v0-12-0) tools. The trigger endpoints are the order-by-order detail behind that picture. ## What each order carries | Field | Meaning | | - | - | | `coin`, `oid`, `address` | Market, Hyperliquid order ID, and the wallet that placed it | | `side` | `B` = buy, `A` = sell. This is the order's side, **not** the position's long/short — a long's stop-loss is a sell | | `trigger_px` | The price that fires the order | | `limit_px` | The order's limit price | | `size`, `orig_size` | Current and original size | | `order_type` | Hyperliquid's order type label | | `reduce_only` | Whether the order can only reduce a position | | `is_position_tpsl` | `true` for a TP/SL attached to the position, `false` for a standalone trigger order | | `placed_at` | Placement time, Unix milliseconds UTC | | `cloid` | Client order ID, or `null` | Prices and sizes are **decimal strings**, kept at the exchange's precision — parse them rather than comparing as text. Orders are sorted by `coin`, then `oid`. ## Coverage and freshness * **Every market.** One exchange-wide snapshot covers native perps, [builder dexes](/concepts/markets) (e.g. `xyz:GOLD`) and [HIP-4](/concepts/hip4) outcomes (e.g. `#28200`). It is separate from the L4 book rollups, so a coin outside the [L4 sweep](/mcp/tools#l4-order-book-v0-12-0) still has trigger orders here. * **Refreshed roughly every minute.** Every response says what it is true at: `as_of_height` (the L1 block), `as_of_block_time` and `age_s`. Check `age_s` before citing a number. * **Latest only — no history.** You can ask what is pending now, not what was pending yesterday, or which orders fired. * **Stale is an error, not an answer.** If the snapshot is missing or older than **1,200 seconds (20 minutes)**, both endpoints return `503`. * **Untriggered orders only.** Resting limit orders are in the [L4 book](/mcp/tools#l4-order-book-v0-12-0) tools; executed fills are in the trade endpoints. > [!WARNING] > > **The coin is case-sensitive and not normalized.** Use the node's own spelling — `BTC`, `xyz:GOLD`, `#28200` — and `list_markets` to find it. An unknown or misspelled coin returns an **empty list, not a 404**, so an empty answer does not prove a market exists or has no stops. Names containing `/` cannot be addressed on `/market/book/triggers/{coin}`. The wallet endpoint looks up **that exact address** — not its sub-accounts or owner entity (`pulse_entity_profile` resolves those). It needs no trader record, so any address works, and a wallet with no pending triggers returns an empty list. ## Paging Both endpoints page with `limit` (1–500, default 100) and `offset` (0–100,000). Because the snapshot changes every minute, later pages are pinned to the first page's snapshot: **1. First page** Call with `offset=0` and no `snapshot_height`. Note `as_of_height`, and whether `has_more` is `true`. **2. Next pages** Keep the same filters, advance `offset` by the number of orders returned, and pass `snapshot_height=`. An `offset` above 0 without `snapshot_height` is a `400`. **3. If you get 409** The snapshot was replaced while you were paging. Start again at `offset=0` without `snapshot_height`. The MCP tools do the bookkeeping for you: each result adds `count`, `hasMore`, `nextOffset` and a `note` with the `snapshot_height` to send next. ```bash curl theme={null} curl "https://api.coinversa.ai/api/public/v1/market/book/triggers/BTC?limit=500" \ -H "X-API-Key: $COINVERSA_API_KEY" ``` ## What you can ask | Question | Tool | | - | - | | Show me every stop-loss and take-profit order waiting on BTC | `book_triggers` | | Which wallets have take-profit orders waiting on xyz:GOLD? | `book_triggers` | | What TP/SL orders does 0x… have open, and at what prices? | `pulse_trader_trigger_orders` | | Where are 0x…'s stops on ETH? | `pulse_trader_trigger_orders` with `coin: "ETH"` | | How much stop size sits within 2% of the BTC mid? | `book_stop_map` | The `address` on each order goes straight into `pulse_trader_profile` or `pulse_trader_sharpe`, so "whose stops are these, and are they any good" is one follow-up call. See the [tier matrix](/api-reference/tiers) for plans and the [API reference](/api-reference/introduction) for full response schemas. # Coinversa Pulse Source: https://docs.coinversa.ai/index Crypto intelligence for AI agents and serious traders — Hyperliquid trader analytics, HIP-4 outcome contracts, real-time risk, builder dex coverage, and a canonical cross-market asset registry. Coinversa Pulse is a REST API and MCP server for crypto intelligence on Hyperliquid. It indexes every tracked wallet, classifies behavior into cohorts, and exposes trader analytics, liquidation heatmaps, HIP-4 outcome contract data, and a cross-market asset registry that resolves venue symbols (`xyz:GOLD`, `hyna:PAXG`) to canonical assets. The same endpoints power our own dashboard, every MCP client (Claude, Cursor, Perplexity), and external bots. ## Choose your path There are three ways into the same data, all with the same API key — pick the one that matches what you're building. > [card] [Building an AI agent?](/mcp/setup) > > Use the **MCP server**. One connector gives Claude, Cursor, or Perplexity first-class tool access — the agent picks and calls tools for you, no HTTP code. > > `https://mcp.coinversa.ai/mcp` > [card] [Building an app, script, or SDK?](/quickstart) > > Use the **REST API** directly. Every endpoint, JSON, in your language. This is the complete and authoritative surface — the MCP wraps a curated subset of it. > > `https://api.coinversa.ai/api/public/v1` > [card] [Need fills as they happen?](/websocket/overview) > > Use the **WebSocket**. Every fill on Hyperliquid streamed at block cadence — the firehose, one coin, or one wallet — with the trader's wallet and PnL on each fill. Same key; limits are on connections, not messages. > > `wss://ws.coinversa.ai` > [!NOTE] > > The MCP is a thin wrapper over the REST API — it translates tool calls into the same HTTP endpoints documented here. Anything the MCP can do, the REST API can do; the REST API also exposes endpoints not yet wrapped as tools, and supports [x402 pay-per-call](/api-reference/tiers#x402-pay-per-call) which the MCP does not yet sign natively. When in doubt, the REST API is the full surface. ## Get started > [card] [Quickstart](/quickstart) > > Get an API key and make your first request in under 5 minutes. > [card] [MCP setup](/mcp/setup) > > Connect Pulse to Claude, Cursor, or Perplexity. > [card] [API reference](/api-reference/introduction) > > 110+ endpoints, auto-generated from the live OpenAPI spec. > [card] [Authentication](/authentication) > > API keys, rate-limit headers, tier behavior. > [card] [WebSocket API](/websocket/overview) > > Stream every fill: auth on the upgrade, twenty-four feeds, sequence numbers, plan limits. ## What's in the data > [card] [Position lifecycles](/concepts/position-lifecycles) > > Every position reconstructed open→close with MAE/MFE — analyze execution quality, drawdowns, and trader archetypes, not just PnL. > [card] [Trader cohorts](/concepts/cohorts) > > Every tracked wallet classified by PnL and size tier — from Apex to Blown Out, Heavyweights to Strawweights. > [card] [Builder analytics](/concepts/builder-attribution) > > Ledger-exact revenue for every builder code, plus attributed fills since Jan 2025 — retention triangles, cohort mix, and cross-builder overlap. > [card] [Cross-market assets](/concepts/cross-market-assets) > > Canonical taxonomy unifying native HL perps with builder dex listings — `PAXG`, `xyz:GOLD`, and `hyna:PAXG` all resolve to `GOLD`. > [card] [HIP-4 outcomes](/concepts/hip4) > > Prediction-market style outcome contracts: discovery, settlements, perp-position context, trader overlap. > [card] [Live risk](/concepts/data-coverage) > > Liquidation heatmaps, recent liquidations, cohort bias, long/short ratios, OI history. ## How it's used * **AI agents** — install the [MCP server](/mcp/setup) into Claude / Cursor / Perplexity and the agent gets first-class tool access to the Pulse data surface. * **Trading bots & SDKs** — hit the [REST API](/api-reference/introduction) directly with `X-API-Key`. Same key, same tier, same data — and the full endpoint surface, including anything not yet exposed as an MCP tool. * **Dashboards** — the [Coinversa Pulse dashboard](https://coinversa.ai) and partner integrations consume the same REST endpoints. * **Indexers & live feeds** — subscribe over the [WebSocket](/websocket/overview) and receive every fill as it lands, instead of polling. > [!NOTE] > > The MCP server is open source: [github.com/Coinversaa/mcp-server](https://github.com/Coinversaa/mcp-server). It's a thin transport layer — the API key you use governs the tier and rate limits at the API layer. # MCP setup Source: https://docs.coinversa.ai/mcp/setup Connect Coinversa Pulse to Claude, Cursor, Perplexity, or any MCP-compatible client. The Coinversa MCP server exposes the Pulse tools to AI agents over the Model Context Protocol. You install it once in your client, and the agent gets first-class access to Hyperliquid trader analytics, HIP-4 outcomes, live risk, and the cross-market asset registry. The MCP is the **agent interface** — a curated set of tools wrapping the REST API. If you need direct programmatic access to the full endpoint surface (including endpoints not yet exposed as tools) or [x402 pay-per-call](/api-reference/tiers#x402-pay-per-call), use the [REST API](/api-reference/introduction) directly. Both use the same API key. **Hosted MCP endpoint:** `https://mcp.coinversa.ai/mcp` **Source:** [github.com/Coinversaa/mcp-server](https://github.com/Coinversaa/mcp-server) The hosted endpoint uses **OAuth**: paste the URL into your client and it opens a Coinversa authorization page in your browser. Sign in — or create an account right there — and connect a key in one click: existing accounts **pick any of their keys from a list** (no need to have the value saved), new accounts get a key created automatically. **New accounts get 14 days of Pro, no credit card.** No headers, no config beyond the URL. > [!NOTE] > > Prefer pasting? The authorization page also accepts a saved `cvsa_` key directly. The two paths differ in what the server holds: connecting with a code hands over a single-use, 2-minute reference and the server stores **only that reference, never the key**, while a pasted `cvsa_` key is held by the server for the life of the grant. Keys stay revocable any time from the [developer portal](https://developers.coinversa.ai/keys) — revoking a key instantly disconnects every agent that authorized with it. ## Claude.ai (web) No local install. Coinversa is listed in Claude's connector directory; adding it by URL as a custom connector works the same way. ### From the Claude connector directory **1. Find Coinversa** Search for **Coinversa** in Claude's connectors directory and connect it. **2. Authorize** Claude opens the Coinversa authorization page. Sign in and pick a key — or sign up and one is created for you — then click **Authorize**. ### Alternative: custom connector URL **1. Open the connector modal** Visit [claude.ai/customize/connectors?modal=add-custom-connector](https://claude.ai/customize/connectors?modal=add-custom-connector). **2. Fill in the form** * **Name:** `Coinversa` * **URL:** `https://mcp.coinversa.ai/mcp` Leave the auth fields empty — Claude discovers the OAuth flow automatically. **3. Authorize** Claude opens the Coinversa authorization page. Sign in and pick a key — or sign up and one is created for you — then click **Authorize**. **4. Verify** Open a new chat and ask: *"What's the global trading stats from Coinversa Pulse?"* — Claude should call `pulse_global_stats`. ## Claude Desktop Use the same Coinversa connector you added in Claude (Settings → Connectors); it is available in Claude Desktop and renders interactive views. ### Alternative: local config Claude Desktop can also read MCP servers from a local JSON config. This path runs the tools through `mcp-remote` and does not render interactive views. **1. Locate your config file** | OS | Path | | - | - | | macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` | | Windows | `%APPDATA%\Claude\claude_desktop_config.json` | | Linux | `~/.config/Claude/claude_desktop_config.json` | **2. Add the Coinversa entry** ```json theme={null} { "mcpServers": { "coinversa": { "command": "npx", "args": ["-y", "mcp-remote", "https://mcp.coinversa.ai/mcp"] } } } ``` If the file already has other `mcpServers`, just add `coinversa` alongside them — don't replace the whole block. **3. Restart and authorize** Fully quit (`Cmd+Q` / right-click → quit), then reopen. On first connection `mcp-remote` opens the Coinversa authorization page in your browser — sign in and click **Authorize**. Look for the Coinversa tool icon in the chat input. > [!NOTE] > > **Why `mcp-remote`?** Entries in `claude_desktop_config.json` are launched as local stdio processes; `mcp-remote` is a small shim that bridges stdio ↔ HTTP and handles the OAuth dance for you. ## Cursor **One click:** [Add Coinversa Pulse to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=coinversa\&config=eyJ1cmwiOiJodHRwczovL21jcC5jb2ludmVyc2EuYWkvbWNwIn0%3D). Cursor opens with the server filled in; approve it, then sign in with your Coinversa account when Cursor asks. Coinversa Pulse is also listed on [cursor.directory](https://cursor.directory/plugins/coinversa-pulse). **Or by hand:** Cursor supports HTTP MCP servers natively. Add to your `~/.cursor/mcp.json`: ```json theme={null} { "mcpServers": { "coinversa": { "url": "https://mcp.coinversa.ai/mcp" } } } ``` Restart Cursor, approve the authorization prompt in your browser, and the Coinversa tools appear in the agent's tool palette. ## Perplexity Use Perplexity's Custom Connectors. **1. Open connectors** Visit [perplexity.ai/computer/connectors](https://www.perplexity.ai/computer/connectors). **2. Add custom connector** * **URL:** `https://mcp.coinversa.ai/mcp` No headers needed. **3. Authorize** Perplexity opens the Coinversa authorization page — sign in (or create a free account; every new account gets 14 days of Pro) and click **Authorize**. Perplexity shows tool results as text; interactive charts and maps are a Claude feature. Every tool returns the same data, including `market_recent_candles` candle rows. ## Other clients (stdio / npx) For any stdio-based MCP client, run the published server directly with your API key from the [developer portal](https://developers.coinversa.ai/keys): ```bash theme={null} COINVERSAA_API_KEY=cvsa_... npx -y @coinversaa/mcp-server ``` This runs the same tools locally over stdio, authenticated by the env key instead of OAuth. The stdio package returns text only unless you set `MCP_APPS_ENABLED=1` and your client supports MCP Apps. ## Interactive views (MCP Apps) In clients that support MCP Apps, four tools can render an interactive view instead of only text: | View | Tool | Tier | | - | - | - | | Chart | `market_recent_candles` | Starter (entry profile and average entries: Agent; Apex vs Crowd history and biggest trades: Pro) | | Liquidation map | `live_liquidation_heatmap` | Starter | | Long vs short by cohort | `live_cohort_bias` | Starter | | Wallet profile card | `pulse_trader_profile`, `pulse_trader_performance`, `pulse_trader_position_summary` | Free | Asking for a chart — *"show me the ETH 1h chart with RSI"* — makes `market_recent_candles` render an interactive chart instead of only candle rows. It adds Coinversa layers — entry profile, average entries, liquidation levels, Apex vs Crowd and its history, and opt-in biggest trades — and a **Share** button that exports the chart or a cohort positioning card as an image. Text-only clients get the same data as text. See [the tool catalog](/mcp/tools#interactive-chart-v0-17-0). Interactive views render in Claude on web, desktop and mobile (iOS/Android). Claude asks you to allow the view once (choose **Always allow** to skip future prompts). Add the connector on web or desktop first; it then works on mobile. Claude Desktop caches views, so fully quit and reopen it to pick up updates. ## Verify it works Regardless of client, ask the agent: > *What's the global trading stats from Coinversa Pulse?* You should see the agent call `pulse_global_stats` and return Pulse's coverage and trading totals — this check works on every plan, Free included. If it says "no tool available," the install didn't take — restart the client. ## Troubleshooting > [accordion] 401 Unauthorized in agent responses > > Your authorization expired or the key behind it was revoked. Reconnect the connector (your client will reopen the authorization page). If you revoked the key on purpose, sign in during authorization and pick another key — or create a fresh one right there. > [accordion] Agent says 'no Coinversa tools available' > > The MCP connection didn't initialize. For Claude Desktop, check Console.app on macOS for `mcp` errors. For Cursor, check the MCP panel in settings. Most often: missing `-y` on the npx command, or a JSON syntax error in the config. > [accordion] Rate limit errors immediately > > You may have an aggressive prompt or you share a key with a bot. The MCP and direct-API calls share one quota — see [authentication](/authentication#rate-limit-headers). Ask the agent to call `pulse_my_plan` to see your tier and limits, and move to a plan with more volume (Starter, Agent or Pro) if you genuinely need more. > [accordion] Want to run a self-hosted MCP server > > Clone [Coinversaa/mcp-server](https://github.com/Coinversaa/mcp-server) and run `bun run remote`. Set `COINVERSAA_KEK` (`openssl rand -base64 32`, keep it stable), and `COINVERSAA_SERVICE_KEY` (or `COINVERSAA_ALLOW_NO_SERVICE_KEY=1` for local development; only the paste-a-key path then works). Set `COINVERSAA_API_URL` if you also host the backend, and `MCP_APPS_ENABLED=1` for interactive views. See the [README](https://github.com/Coinversaa/mcp-server#readme) for the full environment table. # Tool catalog Source: https://docs.coinversa.ai/mcp/tools All 121 Coinversa Pulse MCP tools by category, with descriptions, required tiers, connector-side parameters and the interactive views. Every MCP tool is a thin wrapper around a public API endpoint, and each tool's tier is the tier of the endpoint behind it. There is no clean split by family: among the single-trader tools the lifecycle and compare tools are Starter and the drawdown curve is Pro; most HIP-4 tools are Free, with some at Starter and two at Pro; the live snapshot tools (cohort bias, liquidation heatmap, risk overview and coin snapshot, recent liquidations and their summary) are Starter, `live_positioning_by_entry` is Agent, live history and whale trades are Pro, and `live_long_short_ratio` is Free; `market_price` and `market_orderbook` are Free, `market_recent_candles` is Starter and `market_historical_oi` is Pro; `book_summary` is Starter, `book_stop_map` is Agent, and the other book tools, including the trigger-order tools, are Pro; the four Sharpe tools are Starter; the archetype tools are split between Starter and Pro. Where a tier cell below links to the matrix, check the matrix for that tool's current tier. Check [the tier matrix](/api-reference/tiers) for the endpoint a tool wraps rather than inferring from its name. The connector registers **121 tools**; `builder_heatmap` is withheld while its hourly rollup backfills, so clients see 120. > [!NOTE] > > **Renamed in v0.17.5 and v0.17.6.** Eleven tools have new, descriptive names. The old names still work as aliases (same inputs, plan and output) but are no longer listed by the connector, so update saved prompts and agents to the new names: > > | New name | Old name (alias) | > | - | - | > | `pulse_trader_position_summary` | `pulse_trader_demo` | > | `pulse_exits_near_peak_favorable_move` | `pulse_perfect_exits` | > | `pulse_fee_efficiency_leaderboard` | `pulse_capital_titans` | > | `pulse_top_earners_by_coin` | `pulse_coin_kings` | > | `pulse_liquidation_rate_by_coin` | `pulse_lethal_coins` | > | `pulse_profitable_after_drawdown` | `pulse_max_pain_events` | > | `pulse_high_win_rate_low_activity_wallets` | `pulse_hidden_gems` | > | `pulse_single_month_giveback_wallets` | `pulse_one_month_wonders` | > | `pulse_coin_profit_pools` | `pulse_coin_alpha_map` | > | `pulse_cohort_recent_profit_concentration` | `pulse_cohort_recent_alpha_concentration` | > | `pulse_largest_liquidation_losses` | `pulse_backstop_events` | Every tool reads from a public API endpoint, so the [API reference](/api-reference/introduction) is where the response fields live. The **inputs are not always the endpoint's**: several tools accept shaping parameters the route itself does not take — see [Connector-side parameters](#connector-side-parameters). As of **v0.12.0** the catalog includes the [L4 order book](#l4-order-book-v0-12-0): four `book_*` tools answering a question each, rather than handing you a raw book to parse. v0.11.0 added [builder analytics](/api-reference/builders): eleven `builder_*` tools covering the leaderboard, per-builder profiles, attributed traders and fills, cohort composition, retention, audience overlap, user lifecycle, journey economics and order intent, plus the inverse per-wallet view. ## Builder analytics (v0.11.0) | Tool | Tier | What it answers | | - | - | - | | `builder_leaderboard` | Starter | Builders ranked by exact ledger revenue, with attributed volume/users and prev-window deltas | | `builder_profile` | Starter | One builder: revenue, daily series, top coins, profitable-user share | | `builder_traders` | Pro | Wallets trading via a builder, with exchange-wide cohort tiers | | `builder_fills` | Pro | Individual attributed fills through a builder (perp/spot/HIP-4) | | `builder_cohorts` | Pro | A builder's user base split by behavioral tier | | `builder_retention` | Pro | Monthly new-user retention triangle (orders plane, 12 months) | | `builder_overlap` | Pro | The other builders a builder's users also trade through | | `builder_lifecycle` | Pro | Where a builder's lifetime users stand today: active / cooling / switched / dormant / movedOn | | `builder_journey` | Pro | How fast and how unevenly a builder monetizes a new wallet — days to peak, 50% and 75% of lifetime revenue | | `builder_orders` | Pro | Placement-plane intent: action and time-in-force mix, reduce-only share, stop/TP breakdown, fill conversion | | `trader_builders` | Starter | Every builder one wallet trades through, by fees paid | | `builder_heatmap` | Pro | 7×24 UTC weekday-by-hour grid of attributed volume, fees and fills over the trailing 84 days (12 weeks). Withheld by default while its hourly rollup backfills | Every builder tool (all twelve, including `trader_builders`) carries the attribution caveat in its response (`dataNotes`): trigger-order (stop/TP) fills attribute at ledger level only until the parser upgrade completes, so attributed detail slightly undercounts exact ledger revenue. ## Discovery & taxonomy | Tool | Description | | - | - | | `list_markets` | Markets with mark price, 24h volume, funding and OI. Filter by `dex` or `search` (symbol substring). Inactive (delisted) markets are hidden unless `includeInactive=true`. 50 rows per page (max 500). | | `list_assets` | Canonical asset directory with venue breakdown. | | `list_asset` | One asset's venue breakdown (accepts synonyms). | | `pulse_cross_market_asset` | Aggregated OI / positions / bias across all venues for a canonical asset. | | `data_coverage` | Data window (start/end or latest row) and freshness for each dataset (trades, builder_ledger, census, hip4, liquidations, lifecycles, cohort_history, book), with the source route for each, plus the server's version, hidden tools and tool count. Call it before relying on a historical range. Free; some sources report a tier gate in their notes. | ## Pulse — trader & cohort analytics | Tool | Description | | - | - | | `pulse_global_stats` | Total traders, trades, volume, PnL, data coverage. | | `pulse_leaderboard` | Traders ranked by PnL (default), fill-level win rate, volume or biggest losers, over day/week/month/all-time, with a minimum-fill gate. PnL is gross closed PnL before fees. | | `pulse_high_win_rate_low_activity_wallets` | Wallets with a high win rate and positive PnL over a moderate trade count (min/max trade filters). Formerly `pulse_hidden_gems` (still accepted). | | `pulse_most_traded_coins` | Coins ranked by cumulative trade count, with unique traders and total PnL. No volume figure; use `list_markets` or `pulse_exchange_volume` for volume. | | `pulse_biggest_trades` | Biggest winning (`type: "wins"`) or losing (`type: "losses"`) trades by PnL across Hyperliquid, with an optional PnL `threshold`. | | `pulse_recent_trades` | Largest trades by absolute PnL in the last `since` window (default 10m), optionally for one coin. | | `pulse_recent_closed_positions` | Recently closed positions across all wallets. | | `pulse_token_leaderboard` | Top traders on a specific coin. | ## Pulse — single trader | Tool | Description | | - | - | | `pulse_trader_profile` | Stats, win rate, PnL, tier classification. | | `pulse_trader_performance` | Recent vs all-time performance + trend. | | `pulse_trader_trades` | Recent fills for one wallet. | | `pulse_trader_daily_stats` | Day-by-day PnL / volume history. | | `pulse_trader_token_stats` | Per-token breakdown for one wallet. | | `pulse_trader_closed_positions` | Closed positions for one wallet. | | `pulse_trader_closed_position_stats` | Aggregate closed-position stats. | | `pulse_compare` | Side-by-side lifecycle comparison of 2–5 wallets. **Starter tier.** | | `pulse_trader_trigger_orders` | Pending take-profit and stop-loss orders for this exact wallet, across markets or one `coin`. **Pro tier.** See [TP/SL trigger orders](/concepts/trigger-orders). | In clients that support MCP Apps interactive views, `pulse_trader_profile`, `pulse_trader_performance` and `pulse_trader_position_summary` render the Coinversa wallet card (90-day position stats, PnL curve, open positions); other clients receive the data as text. ## Pulse — cohorts | Tool | Tier | Description | | - | - | - | | `pulse_cohort_summary` | [See matrix](/api-reference/tiers) | All cohorts with size, PnL, win-rate medians. | | `pulse_cohort_positions` | Pro | Current positions held by a specific cohort. | | `pulse_cohort_trades` | Pro | Recent trades from one cohort. | | `pulse_cohort_history` | Pro | Cohort performance over time. | | `pulse_cohort_bias_history` | Pro | Cohort long/short bias over time. | | `pulse_cohort_performance_daily` | Pro | Daily cohort PnL / volume. | ## Sharpe ratios (v0.17.4) All four Sharpe tools are **Starter**. An annualized **realized-PnL Sharpe** — √365 × mean daily realized PnL ÷ its sample standard deviation, days without fills counted as zero, today excluded. It is a proxy, not a portfolio Sharpe: not divided by equity, and fees, funding and unrealized PnL are left out. It rewards consistency over size, so read it next to `realizedPnl`. See [Sharpe ratios](/concepts/sharpe). | Tool | Tier | What it answers | | - | - | - | | `pulse_sharpe_leaderboard` | Starter | The 50 most consistent wallets over the last 30 completed UTC days, among wallets with at least \$2,500 of stored equity that clear the activity floors `minActiveDays` (fill days in the window, 1–30, default 10) and `minPnl` (window realized PnL in USD, default 1000). Refreshed every 30 minutes | | `pulse_trader_sharpe` | Starter | One wallet's score over the last 30 completed UTC days, with realized PnL, fill count and the daily mean and standard deviation | | `pulse_trader_sharpe_interval` | Starter | The same over a window you choose: `startDay` (within the last 90 days) and `days` (1–90). Out-of-range windows are rejected, not shortened | | `pulse_trader_sharpe_monthly` | Starter | Three buckets, newest first: 3 × 30 days, or the current and two previous calendar months with `useCalendarMonths` | **Sharpe filters on cohort tools.** `live_cohort_bias`, `live_positioning_by_entry`, `pulse_cohort_positions`, `pulse_cohort_trades` and the five `pulse_cohort_recent_*` tools take optional `minRecentSharpe` (30-day score, refreshed hourly) and `minTotalSharpe` (full-history score, refreshed daily). Both are inclusive minimums, combined with AND, applied before limits and aggregation, and use each wallet's **current** score. Unlike the leaderboard they have **no activity floor**: one winning day scores about 3.49, so a lower threshold can admit one-day wallets. Each tool keeps its own tier. ## Pulse — position lifecycles Every position reconstructed open→close from on-chain fills, with MAE/MFE. See [Position lifecycles](/concepts/position-lifecycles). | Tool | Tier | Description | | - | - | - | | `pulse_trader_lifecycles` | Starter | One wallet's open→close position history (90-day window). | | `pulse_trader_lifecycle_summary` | Starter | Aggregate lifecycle stats for one wallet — win rate, avg hold, biggest win/loss. | | `pulse_lifecycle` | Free | One lifecycle by ID, with every composing fill. | | `pulse_trader_position_summary` | Free | One wallet's 90-day position summary plus its largest recent wins and losses. Formerly `pulse_trader_demo` (still accepted). | | `pulse_lifecycles_recent` | [See matrix](/api-reference/tiers) | Global feed of recently closed positions across all wallets. | ## Pulse — execution quality (MAE/MFE) · Pro | Tool | Description | | - | - | | `pulse_wallet_drawdown_curve` | Per-position drawdown (MAE) and run-up (MFE) for one wallet. | | `pulse_profitable_after_drawdown` | Closed positions that went deeply underwater and still closed in profit. Formerly `pulse_max_pain_events` (still accepted). | | `pulse_exits_near_peak_favorable_move` | Exits that captured a high share of the maximum favorable move (MFE). Formerly `pulse_perfect_exits` (still accepted). | | `pulse_largest_liquidation_losses` | The largest individual liquidations by realized loss. Formerly `pulse_backstop_events` (still accepted). | ## Pulse — trader archetypes | Tool | Tier | Description | | - | - | - | | `pulse_survivors` | Pro | Wallets that hit a deep trough then recovered to green. | | `pulse_anti_survivors` | Pro | Wallets whose cumulative realized PnL hit a deep trough and is still negative. | | `pulse_persistent_winners` | Pro | Profitable across multiple distinct months. | | `pulse_fee_efficiency_leaderboard` | Pro | Wallets ranked by realized PnL per dollar of fees paid. Formerly `pulse_capital_titans` (still accepted). | | `pulse_single_month_giveback_wallets` | Pro | One large profitable month, part of which was later given back. Formerly `pulse_one_month_wonders` (still accepted). | | `pulse_newcomer_whales` | Pro | Recent first lifecycle with large gross notional. | | `pulse_top_earners_by_coin` | Starter | Highest realized-PnL wallet(s) per coin. Formerly `pulse_coin_kings` (still accepted). | | `pulse_top_liquidators` | Starter | Wallets that execute the most liquidations: count, distinct liquidated wallets and coins, and penalty collected. The PnL field is the liquidated positions' closed PnL, not the liquidator's profit. | | `pulse_liquidation_rate_by_coin` | Pro | Coins ranked by the share of position lifecycles that ended in liquidation. Formerly `pulse_lethal_coins` (still accepted). | ## Pulse — market structure | Tool | Tier | Description | | - | - | - | | `pulse_coin_profit_pools` | Starter | Per-coin winner / loser / net profit pools. Formerly `pulse_coin_alpha_map` (still accepted). | | `pulse_hour_profitability` | Starter | Global PnL by UTC hour of close. | | `pulse_market_concentration` | Pro | Percentile profit share — how concentrated alpha is. | | `pulse_style_distribution` | Starter | HFT vs swing vs holder PnL split. | ## Pulse — refreshed cohorts (30-day rolling tier) Cohorts labelled by last-30-day tier (`pnl_tier_recent` / `size_tier_recent`) — who's printing *right now*, not all-time. All five are **Pro**. | Tool | Description | | - | - | | `pulse_cohort_recent_positions` | Live positions held by a recent-tier cohort. | | `pulse_cohort_recent_trades` | Recent trades from a recent-tier cohort. | | `pulse_cohort_recent_lifecycle_stats` | Per-wallet lifecycle stats for a recent-tier cohort. | | `pulse_cohort_recent_top_positions` | Top closed lifecycles from a recent-tier cohort. | | `pulse_cohort_recent_profit_concentration` | Profit concentration within a recent-tier cohort. Formerly `pulse_cohort_recent_alpha_concentration` (still accepted). | ## Live — real-time market + risk `live_long_short_ratio` is Free. The snapshot tools (what is true right now) are Starter. `live_positioning_by_entry` is Agent. History and whale trades are Pro. | Tool | Description | | - | - | | `live_long_short_ratio` | Long/short ratio by wallet count and notional: exchange-wide with a per-coin breakdown, one coin (`coin`, with its top 5 longs and shorts), or an hourly history (`hours`, up to 168). | | `live_cohort_bias` | Per-cohort bias for one coin. **Starter.** | | `live_cohort_bias_history` | **Pro.** Stored cohort bias snapshots for one coin, up to 90 days — normally one every 15 minutes, hourly before 10 November 2026. `tiers` fetches several series at once (e.g. Apex and Crowd); `format: "layer"` returns the chart envelope; `tierType` takes `pnl`, `pnl_recent` or `size`. | | `live_positioning_by_entry` | **Agent.** Open positions bucketed by entry price, long vs short and by cohort, with each cohort's average entry, leverage and in-profit vs underwater split. | | `live_whale_trades` | **Pro.** Largest fills by USD notional in the last 24h at most, with both counterparties' cohorts. | | `live_oi_history` | Open interest time series. **Pro.** | | `live_official_oi` | OI sourced from Hyperliquid's official feed. **Free** for the last 24 hours; **Pro** for the 7-day default and up to 30 days. | | `live_liquidation_heatmap` | Liquidation density by price level for one coin. **Starter.** | | `live_liquidation_summary` | Recent liquidation totals by side. **Starter.** | | `live_recent_liquidations` | Stream of recent liquidation events. **Starter.** | | `live_coin_risk_snapshot` | Coin-level risk metrics (now). **Starter.** | | `live_coin_risk_history` | Coin-level risk over time. **Pro.** | | `live_risk_overview` | Cross-coin risk dashboard. **Starter.** | | `live_mark_dislocations` | Mark vs. oracle deviation events. **Pro.** | In MCP Apps clients, `live_cohort_bias` renders a long-vs-short-by-tier view and `live_liquidation_heatmap` renders a liquidation price ladder; the text result is unchanged. ## Market — direct Hyperliquid passthrough | Tool | Description | | - | - | | `market_price` | Mark/index/funding/OI for a symbol. | | `market_positions` | Open positions for an address. | | `market_orderbook` | L2 orderbook for a symbol. | | `market_recent_candles` | Recent candles for a symbol. **Starter.** | | `market_historical_oi` | Historical OI series. **Pro.** | ## Interactive chart (v0.17.0) > [!NOTE] > > Released 12 Oct 2026 in connector v0.17.0; the sections below cover the chart work from v0.14.0 to v0.17.0. The interactive views appear only in clients that support MCP Apps; text-only clients get the same tool results. ### v0.14.0: price charts and bounded candle history Use **`market_recent_candles`** for a price chart; use `market_price` for a quick mark/index/funding/OI lookup. Candles require **Starter**; of the chart's Coinversa layers, the entry profile and average entries are **Agent** and Apex vs Crowd history and biggest trades are **Pro**, and on a lower plan the chart marks the gated layers with an upgrade link instead of failing. An MCP Apps client can render candlesticks, dollar volume, moving averages (EMA 21, SMA 20/50), VWAP, Bollinger Bands, RSI, RSI zone markers, MACD and Stochastic. Text-only clients retain the candle result; `indicators` selects the initial chart layers without changing those rows. | Input or result | Behavior | | - | - | | `symbol` | Native or builder-dex ticker, such as `BTC`, `ETH` or `xyz:GOLD` | | `interval` | `1m` (default), `5m`, `15m`, `1h`, `4h` or `1d` | | `limit` | Default 240; **maximum 500**. Larger requests are clamped to 500 rather than rejected | | Candle order | Newest first in the tool result | | `volume` | **USD notional**. For hourly-source candles, estimated as base quantity × `(high + low + close) / 3` before aggregation | | Unknown `symbol` | `404` naming the symbol when Hyperliquid's market list confirms it is unlisted; use `list_markets` to find the exact ticker | The limit bounds the source history too. With the current fallback aggregation, `5m` and `15m` use the latest 500 one-minute bars; `4h` and `1d` use the latest 500 hourly bars. You may therefore receive fewer than 500 aggregated candles. This is recent history, with no older-page cursor. **Market search** uses `list_markets`: `search` matches the symbol case-insensitively before pagination, and `dex` narrows the venue. For example, search for `gold`, then use the returned `xyz:GOLD` ticker. Inactive listings are hidden unless `includeInactive=true`; the connector's search and paging controls do not add parameters to the underlying API route. ### v0.15.0: explore the chart locally The chart adds a searchable market picker, remembered selections, synchronized indicator panes, candle readouts, keyboard inspection, pan/zoom, and controls to return to the latest available bars. Search typing, indicator settings and range changes use loaded data. Returning to a cached market/interval reuses its candles; **Refresh** requests candles explicitly and keeps the previous chart visible if the request fails. Liquidation levels and Apex vs The Crowd positioning load on request and refresh separately from candles. They describe **current snapshots**; each layer identifies its retrieval time and any available source measurement time. Expansion and sending an analysis prompt are available only when the host supports them; otherwise the prompt remains selectable for copying. **Standard candle VWAP** uses `sum(HLC3 × base quantity) / sum(base quantity)`, where `HLC3 = (high + low + close) / 3`. Intraday intervals reset at the UTC day; daily candles anchor to the first loaded bar. It is available only when the source supplies base quantity for the loaded candles and there is positive volume. If those weights are missing, the chart reports VWAP as unavailable instead of treating USD notional as base quantity. The volume histogram remains in dollars. ### Chart layers (v0.16.0) The chart now draws what only Coinversa has: where open positions got in, who holds them, and how the two flagship cohorts have moved. Two new tools carry the data, and both are useful without the chart: | Tool | Tier | What it answers | | - | - | - | | `live_positioning_by_entry` | Agent | Where did the money that is open right now get in? Equal-width entry-price bins (`buckets` 1–200, default 60, across `range` 1–100% of the mark, default 30), long vs short and by cohort, plus one row per cohort and side with average entry, average leverage, in-profit / underwater / flat notional and notional within 5% of liquidation. `tierType` is `pnl`, `pnl_recent` (last 30 days of PnL — who is winning now) or `size`. Empty bins are dropped unless `includeEmptyBins` is set (`binsOmitted` says how many). Profit splits and liquidation distance use Hyperliquid's live mark (`markMethod: live_mark`), or the newest stored position mark when the feed is unavailable; `markDivergencePct` shows how far the stored marks are from it, and a note flags more than 1% | | `live_whale_trades` | Pro | What were the biggest fills? Largest first by USD notional, over `since` up to **24h** (default `6h`), `minNotional` default $1M with a $100K floor, `limit` up to 200 (default 50) — with both counterparties' cohorts and what the fill did to each position. `sourceCount` / `sourceTruncated` are the API's own figures; `count` / `totalCount` / `truncated` describe the rows in this response | `live_cohort_bias_history` gains `tiers` (up to 8, either vocabulary — not together with `tier`), `format: "layer"` (the API's chart envelope with a −1..1 `netBias`, per-series `hoursPresent` — the number of snapshots returned, whatever their spacing — and provenance, returned unpaged), `tierType: "pnl_recent"` and `hours` up to **2160** (90 days). Snapshots are normally stored every 15 minutes (hourly before 10 November 2026), so a `format: "layer"` answer can be up to 8,640 points per series — pass `maxResponseTokens` or a shorter `hours` when reading it as text; a shortened answer says so in `_responseLimit`, and partial data should never be read as complete. `format: "layer"` requires `tier` or `tiers`. `tierType: "pnl_recent"` snapshots begin 2026-05-14, so nothing earlier is returned. All three are snapshots or stored snapshot series with explicit caveats — current open positions are **never history**, whale-trade cohorts are the wallets' **current** labels and the aggressor is unknown, and cohort bias history may contain reconstructed hours with today's labels, so it is not suitable for backtesting. The [chart layer endpoints](/api-reference/chart-layers) page has the fields and the reasoning. **In the chart.** Ask for a chart — *"show me the BTC 4h chart"* — and `market_recent_candles` opens the interactive view in clients that support MCP Apps. Under **Layers**, the Coinversa layers sit beside the technical indicators: | Layer | Source tool | What you see | | - | - | - | | Liquidation levels | `live_liquidation_heatmap` | Estimated current liquidation exposure as price bands; hover or tap for values | | Apex vs Crowd | `live_cohort_bias` | Current long share of open notional for each cohort | | Entry profile | `live_positioning_by_entry` | Long and short USD exposure by entry price, beside the price axis, with Apex and Crowd highlighted. Can be minimized | | Average entry lines | `live_positioning_by_entry` | Apex and Crowd average long and short entries, compared with the latest candle close (fees and funding excluded) | | Apex vs Crowd history | `live_cohort_bias_history` | Each cohort's long share over the loaded chart window, from one `format: "layer"` call capped at 2,160 hours. Missing snapshots stay gaps; labelled "possibly reconstructed" | | Biggest trades | `live_whale_trades` | **Off by default.** One call loads the latest 24h sample — up to 50 fills of \$100K or more — and Top 50 / 20 / 5 filter it locally. Split markers show the buy-side and sell-side cohort; who initiated the trade is not known | With no `indicators` passed, the view opens with RSI, the entry profile, average entry lines and liquidation levels. `indicators` accepts `ema21`, `sma20`, `sma50`, `vwap`, `bollinger`, `rsi`, `macd`, `stochastic`, `rsiMarkers` and the Coinversa layers `liquidations`, `positioning`, `entryProfile`, `averageEntries`, `cohortHistory` and `whaleTrades` to choose the initial layers. A **PnL grouping** selector switches the entry layers and history between all-time and 30-day PnL cohorts; the Apex vs Crowd snapshot and biggest-trade markers always use all-time groups. Each layer loads once per market and is cached in the view. Refreshing candles does not refresh layers — **Refresh layers** does that explicitly — and there is no polling. Every layer shows its source and as-of time, and **Data & sources** keeps the full coverage notes. What Claude sees about the chart is a concise summary per layer, never raw fills or wallet addresses. ### Image sharing (v0.17.0) **Share**, beside the price, opens a fullscreen composer. Pick a card — **Chart + inspection** (the chart as you left it, with the selected candle or trade) or **Cohort positioning** (Apex and Crowd long/short shares, open notional, wallet counts, average entries and leverage) — and a format: **X landscape** (1600 × 1200) or **Instagram portrait** (1080 × 1350). Then **Share image** hands the PNG and an editable caption to your device's share sheet where the device supports it, and **Save image** downloads it. Images are rendered locally in the view: no upload service, no account integration, and nothing is posted automatically. Each card carries its snapshot time and the footer *current positions, not a forecast* and *Market data from Hyperliquid, not investment advice*. Complete coverage notes stay in **Data & sources**. ## Entity resolution — owner-level intelligence · Pro new in 0.9 Hyperliquid traders run named sub-accounts that trade independently — per-wallet views undercount every multi-account trader. These tools resolve wallets to their owner entity and aggregate across the whole family. | Tool | Description | | - | - | | `pulse_entity_profile` | Resolve ANY wallet to its owner entity: master, named sub-accounts, each member's open book, combined positions, and a verified-vs-chain stamp. **Pro tier.** | | `pulse_entity_leaderboard` | Top entities (owners, not wallets) by combined gross open notional — a fund running 35 sub-accounts shows as one entity. **Pro tier.** | ## Exchange aggregates new in 0.9 | Tool | Description | | - | - | | `pulse_exchange_volume` | 24h volume, total and **per dex** (native `hl` plus every builder dex), with match counts and distinct traders. Builder dexes are a large share (about 30% on 2026-09-23); read `byDex` for the current split. | | `pulse_exchange_oi` | Open interest by dex with long/short notional split. | | `pulse_active_traders` | Distinct wallets that traded in the last 24h. | | `pulse_exchange_positions` | Open positions by dex + 24h flow: closes, liquidations, exchange-wide realized PnL. | | `pulse_pnl_leaders` | Today's biggest realized winners and losers (24h closed positions). **Starter tier.** | ## Plans & limits new in 0.9 | Tool | Description | | - | - | | `pulse_my_plan` | The caller's tier, effective rate limits, and every tier's limits with an upgrade link. Agents call this when a request is rejected for rate-limit reasons, or when the user asks about their plan. | ### When the plan does not include a tool Every gated tool's description ends with its plan (`Plan: Starter ($29/month) or higher.`). If a key's plan does not include the tool, the result is an ordinary tool result, not a tool error (`isError` is false), shaped like this: ```json theme={null} { "upgradeRequired": true, "tool": "live_cohort_bias", "requiredPlan": { "tier": "starter", "name": "Starter", "priceUsdMonthly": 29 }, "currentPlan": { "tier": "free", "name": "Free" }, "upgradeUrl": "https://coinversa.ai/developers#pricing", "message": "live_cohort_bias needs the Starter plan ($29/month) or higher. …", "partialAnswer": { "note": "What the Free plan can answer now. …", "results": [ { "tool": "market_price", "why": "current price", "data": { … } }, { "tool": "live_long_short_ratio", "why": "long/short wallet ratio", "data": { … } } ] } } ``` `partialAnswer` is present only when the key's plan includes a tool that answers part of the question. Examples: the current price and long/short ratio for the same coin, the Starter cohort-bias snapshot for the Agent positioning-by-entry layer, or `book_summary` for a gated book tool. Agents should state the plan and price, share `upgradeUrl` once, use the partial answer (and say which tool it came from), and not retry the gated tool. Revoked or invalid keys are still reported as errors. On REST, the same denial is the `403` described in [Authentication](/authentication). `requiredPlan` is the lowest plan that includes the tool. Plans rank `free` \< `starter` \< `agent` \< `pro` \< `enterprise`, so `requiredPlan.tier` can be `starter`, `agent`, `pro` or `enterprise` — for `live_positioning_by_entry` and `book_stop_map` it is `{ "tier": "agent", "name": "Agent", "priceUsdMonthly": 49 }`. In ChatGPT and other OpenAI clients the result is neutral: `message` says the tool is not available on the current plan, and `requiredPlan` and `upgradeUrl` are left out. ## Webhooks Five tools for the [event inbox](/webhooks/agents) — the WebSocket feeds' frames, filtered and stored in your account's [inbox](/webhooks/inbox) for the agent to pull. Creating a subscription takes **Starter** or above (Free has no subscription allowance and no inbox); the tentative subscription counts per plan are on [Webhook plan limits](/webhooks/limits). The tools are inbox-only: a subscription that POSTs to a URL is created in the [developer portal](https://developers.coinversa.ai) or over [REST](/webhooks/api#create-a-subscription). | Tool | Kind | Description | | - | - | - | | `inbox_subscribe` | Creates a subscription | Takes `type`, `args` and optional `filters` and creates one **inbox** subscription — it always sends `deliveryMode: "inbox"` and never a URL. `args.user` on the by-user types is one address or an array of 1 to 1,000; `priceCross` takes `coin`, a decimal-string `threshold` and optional `source` and `direction`; the four [cohort bias types](/webhooks/cohort-bias) take `coin` and, per type, `cohort`, `otherCohort`, `direction`, a decimal-string `points` and optional `tierType`; the four [liquidation risk types](/webhooks/liquidation-types), take exactly one `user` or a `coin` with decimal-string thresholds. Filters are exact strings or `gt` / `gte` / `lt` / `lte` bounds on decimal strings. Refused with `403` for a type above the plan or any subscription on Free, and `429` at the subscription cap. Returns a receipt with the `subscriptionId`; not retried automatically. | | `inbox_subscriptions` | Read-only | Your inbox subscriptions — id, type, normalized `args`, `filters` and disabled status — sorted by id and paged with `limit` (default 20, at most 100) and `offset`. HTTP subscriptions are excluded. | | `inbox_unsubscribe` | Destructive | Delete one inbox subscription by `subscriptionId`. Refuses an id that is not an inbox subscription of yours; no bulk delete. Stored inbox messages are kept. | | `inbox_state` | Read-only | The inbox without touching it — `GET /v1/inbox`: pending messages and bytes, your plan's capacity, and the cumulative overflow and expiry counters. | | `inbox_drain` | Destructive | Reads the oldest pending messages — `POST /v1/inbox/drain`, `count` default 10, up to 1,000 — and acknowledges exactly the complete messages it returns with `POST /v1/inbox/ack`, so anything it left out stays pending. Returns `ackStatus` and the inbox `state` as it was before the acknowledgement. There is no peek. See [Webhooks for agents](/webhooks/agents#read-the-inbox). | `inbox_subscribe`, `inbox_unsubscribe` and `inbox_drain` change only your Coinversa inbox subscriptions and inbox — the connector still never touches an exchange account, signs or trades. Inbox subscriptions have no signing secret, so nothing secret passes through a chat transcript. ## HIP-4 — outcome contracts | Tool | Tier | Description | | - | - | - | | `hip4_outcomes` | Free | Outcome contracts that traded in the last `hours` (default 24, max 168), largest notional (USDH) first, capped at `limit` (default 25, max 200). | | `hip4_outcome` | Free | Metadata for one outcome. | | `hip4_outcome_summary` | [See matrix](/api-reference/tiers) | Volume + holder stats for one outcome. | | `hip4_outcome_recent_trades` | Free | Recent fills on one outcome. | | `hip4_questions` | Free | Outcome contracts grouped by question. | | `hip4_recent_settlements` | Free | Recently settled outcomes. | | `hip4_daily_volume` | Free | Daily HIP-4 trading volume. | | `hip4_most_active` | Free | Most-traded outcomes. | | `hip4_top_traders` | Starter | Top outcome traders by volume / PnL. | | `hip4_trader_outcomes` | Starter | Outcomes one wallet has traded. | | `hip4_cross_product_overlap` | Pro | Overlap between outcome traders and perp traders. | | `hip4_perp_position_context` | Pro | Whether outcome holders have open perp positions on the underlying. | ## L4 order book (v0.12.0) Four tools over the **order-level** book — every resting order with the wallet behind it — each shaped around a question rather than returning a book to parse yourself. `book_summary` is **Starter**, `book_stop_map` is **Agent**, and `book_whales` and `book_levels` are **Pro**. | Tool | Tier | What it answers | | - | - | - | | `book_summary` | Starter | How deep and how lopsided is this book right now? Touch prices, spread in bps, and per side the size / order count / distinct-wallet count within 0.5, 1, 2, 5 and 10% of mid — plus near- and far-band imbalance and the age of orders at the touch. | | `book_stop_map` | Agent | Where are the stops, and how much size fires if price gets there? Every untriggered stop and take-profit bucketed by distance from mid in 0.25% steps, with the reduce-only share and the stop/TP split per bucket. | | `book_whales` | Pro | Who is sitting on this book, and where? The largest resting orders with wallet, price, size, distance from mid and how long they have rested — plus the biggest wallets per side by total resting size. | | `book_levels` | Pro | What does the depth ladder look like, with the detail L2 throws away? Top levels per side, each with total size, order count, **distinct wallet count** and the age of its oldest order. | **The wallet addresses join to the trader tools.** `book_whales` returns addresses that go straight into `pulse_trader_profile` or `pulse_trader_performance` — so "who is holding up this bid, and are they any good" is one follow-up call, not a research project. > [!WARNING] > > **The coin is CASE-SENSITIVE on these four tools**, unlike every other coin-taking tool. It must be the node's own spelling — `BTC`, `HYPE`, `xyz:GOLD`, `cash:TSLA`, `#28200`. `btc` returns 404 with a hint rather than being normalised, because the rollups are keyed on the node's spelling. Use `list_markets` to discover exact names. > > A correctly spelled coin outside the L4 sweep returns 404 (`BOOK_NOT_COVERED`) on all four tools, and retrying will not help; `data_coverage` lists the covered coins, and `market_orderbook` serves the L2 book. Spot pairs such as `PURR/USDC` are not addressable. Bounds: `book_stop_map` takes `within_pct` 1–10 (default 10), `book_whales` takes `limit` 1–50 (default 20), `book_levels` takes `depth` 1–100 (default 50). All three are integers — a fraction is rejected before a request is made. > [!NOTE] > > **Snapshot-derived, latest-only.** The gateway re-exports the node's full L4 book on a fixed cadence and the rollups are recomputed per coin, so there is **no history** — one row per coin, replaced each time its block height advances. Every response carries `as_of_height` (the L1 block the answer is true at) and `age_s`; check `age_s` before citing a number. A rollup older than 1,200 seconds (20 minutes) returns `503` rather than a stale book. For the aggregated L2 view with no tier gate, use `market_orderbook`. > > `data_coverage` reports a `book` dataset with coins covered, the latest height and its freshness. For the live order-by-order stream rather than a rollup, see the [`l4Book` websocket feed](/websocket/order-book). ## TP/SL trigger orders (v0.17.4) Both tools are **Pro**. `book_stop_map` (Agent) buckets stop and take-profit size by distance from mid; these two tools return the **individual orders** behind it, with the wallet on each. See [TP/SL trigger orders](/concepts/trigger-orders). | Tool | Tier | What it answers | | - | - | - | | `book_triggers` | Pro | Which stop-loss and take-profit orders are waiting on this market, and who placed them? | | `pulse_trader_trigger_orders` | Pro | Which TP/SL orders does this wallet have pending, across markets or for one `coin`? This exact wallet only, not its sub-accounts; no trader record needed | They read their **own exchange-wide snapshot** — native perps, builder dexes and HIP-4, independent of the L4 sweep — refreshed roughly every minute, latest only. A snapshot missing or older than 1,200 seconds (20 minutes) returns `503`. As with the book tools the coin is **case-sensitive** and not normalized, but an unknown coin returns an empty list rather than a 404, so an empty answer proves nothing. `side` is the order's `B`/`A` (buy/sell), not the position's direction. Paging: `limit` 1–500 (default 100), `offset` up to 100,000. For any page after the first, pass `snapshot_height` = the first page's `as_of_height`; a `409` means the snapshot changed, so restart at `offset` 0. Each result adds `count`, `hasMore`, `nextOffset` and a `note` with the value to send next. ## Connector-side parameters Several tools take shaping parameters that the connector applies **after** it fetches the endpoint — the routes themselves take none of them, and you will not find them in the [API reference](/api-reference/introduction) or the OpenAPI spec. Calling the endpoint directly returns the full payload. | Tool | Endpoint | Connector-side | Sent upstream | | - | - | - | - | | `live_risk_overview` | `/live/risk/overview` | `include`, `limit` (10, max 500), `offset` | — | | `live_coin_risk_snapshot` | `/live/risk/coins/{coin}` | `include`, `limit` (10, max 200), `offset` | `coin` (path) | | `list_assets` | `/assets` | `search`, `detail`, `limit` (25, max 500), `offset` | `crossMarketOnly` | | `hip4_questions` | `/hip4/questions` | `status`, `search`, `limit` (25, max 200), `offset` | — | | `pulse_trader_daily_stats` | `/pulse/trader/{address}/daily` | `startDate`, `endDate`, `limit` (90, max 1000), `offset` | `address` (path) | | `list_markets` | `/pulse/market-overview` | `search`, `includeInactive`, `limit` (50, max 500), `offset` | `dex` | | `live_long_short_ratio` | `/live/long-short`, `/live/coins/{coin}/long-short`, `/live/long-short/history` | `limit` (25, max 500), `offset` (global and history forms) | `coin` (path, or query with `hours`), `hours` | | `live_cohort_bias_history` | `/live/cohort-bias-history/{coin}` | `limit` (100, max 2000), `offset` | `coin` (path), `hours`, `tierType`, `tier`, `tiers`, `format` | | `pulse_cohort_bias_history` | `/pulse/cohort-bias/history` | `tierType` (pnl/size), `tier`, `limit` (100, max 2000) | `coin`, `since`, `startTime`, `endTime` | | `pulse_cohort_performance_daily` | `/pulse/cohorts/daily-stats` | `tierType`, `tier`, `limit` (100, max 2000) | `since`, `startTime`, `endTime` | | `live_mark_dislocations` | `/live/risk/coins/{coin}/history` | `resolution` (5m), `limit` (500, max 5000) | `coin` (path), `hours` | | `live_coin_risk_history` | `/live/risk/coins/{coin}/history` | `include` | `coin` (path), `hours` | | `live_positioning_by_entry` | `/live/positioning-by-entry/{coin}` | `includeEmptyBins` | `coin` (path), `tierType`, `buckets`, `range` | | `pulse_lifecycle` | `/pulse/lifecycle/{id}` | `fillsLimit` (100, max 1000), `fillsOffset` | `id` (path) | | `hip4_outcomes` | `/hip4/outcomes` | `limit` (25, max 200) | `hours` | | `hip4_trader_outcomes` | `/hip4/trader/{address}/outcomes` | `limit` (50, max 200) | `address` (path), `days` | Parenthesised numbers are the default and the maximum. Every capped response carries `totalCount`, `truncated` and a `note` naming the next `offset`, so an agent can page without guessing. Around twenty **other** tools also take `limit` and `offset`, and those are passed straight through to the route, which pages for itself. The distinction only matters if you are calling the REST API directly: for the tools above, the parameter names in the Connector-side column do not exist on the endpoint. > [!WARNING] > > Some parameters do cross the boundary — `list_assets`'s `crossMarketOnly`, and `live_cohort_bias_history`'s `hours`, `tierType`, `tier`, `tiers` and `format` are real query parameters on their routes. The paging ones are not. A route silently ignores a parameter it does not declare — `GET /assets?limit=3` returns all 415 assets, not 3 — so do not reach for these names when calling the REST API directly. > [!NOTE] > > Every tool accepts a `useToonFormat` flag (default `true`) that returns data in compact [TOON format](https://toon-format.dev) — about 50% fewer tokens than JSON for tabular data. Agents typically want this on; set to `false` if you need standard JSON. > > Every tool also accepts `maxResponseTokens` (500–30,000; complete array items are removed until the answer fits, disclosed in `_responseLimit`) and `responseTruncation` (`head` or `tail`, for unpaged arrays). Both are applied by the connector. # Pricing Source: https://docs.coinversa.ai/pricing Tier limits, what's included, and how to upgrade. All accounts start on **Free**. Upgrade in the [billing portal](https://developers.coinversa.ai/billing) when you outgrow it. ## Tiers | Tier | Rate / min | Per day | Per month | Active keys | Monthly | Yearly (\~17% off) | | - | -: | -: | -: | -: | -: | -: | | Free | 30 | 1,000 | unlimited | 1 | \$0 | — | | Starter | 120 | 2,000 | 50,000 | 3 | \$29 | \$290 | | Agent | 300 | 10,000 | 250,000 | 5 | \$49 | \$490 | | Pro | 600 | 20,000 | 500,000 | 10 | \$199 | \$1,990 | | Enterprise | 10,000+ | unlimited | unlimited | unlimited | from \$1,999 | custom quote | The websocket is metered separately, on **capacity** rather than requests — streaming never draws down the numbers above. Connections are capped **per account** (shared across all your keys), subscriptions per connection, and bandwidth is a fair-use allowance: | Tier | Websocket connections (per account) | Subscriptions per connection | Feeds | Fair-use bandwidth | | - | -: | -: | - | -: | | Free | 1 | 2 | `tradesByCoin`, `tradesByUser`, `candle`, `twapSliceFillsByUser`, `bbo`, `allMids` | 5 GB / mo | | Starter | 1 | 25 | Free's feeds plus `trades`, `tradesByUsers`, `allCandles`, `twapSliceFills`, `twapSliceFillsByUsers`, `l2Book` | 50 GB / mo | | Agent | 2 | 50 | Starter's feeds plus `liquidations`, `liquidationsByUser`, `liquidationsByUsers` | 100 GB / mo | | Pro | 5 | 100 | all 24 — Agent's feeds plus `l4Book`, leverage changes, TWAP orders and TWAP statuses | 250 GB / mo | | Enterprise | custom | custom | all 24 | 250 GB / mo | Details in [WebSocket plan limits](/websocket/limits). [Webhooks](/webhooks/overview) — the WebSocket feeds' frames, filtered and pushed to a URL you own — have their own allowance, separate from both. The numbers are **tentative**: | Tier | Webhook subscriptions (per account) | Types | | - | -: | - | | Free | 0 | Can read the definitions; cannot create a subscription | | Starter | 2 | `tradesByUser`, `twapSliceFillsByUser`, `priceCross`, the four [cohort bias types](/webhooks/cohort-bias), and the four [liquidation risk types](/webhooks/liquidation-types) | | Agent | 6 | Starter's plus `liquidations` and `liquidationsByUser` | | Pro | 10 | Agent's plus `twapStatusesByUser` | | Enterprise | 20 | Everything in Pro | Each subscription names one wallet or one market and delivers to one URL; disabled subscriptions do not count. Details in [Webhook plan limits](/webhooks/limits). ## What each tier unlocks > [accordion] Free > > * All 121 MCP tools / 124 API endpoints (tier-gated) > * 1 active key > * Public-only data (no private wallet correlation) > * [WebSocket](/websocket/overview): 1 connection, 2 subscriptions, six feeds — `tradesByCoin`, `tradesByUser`, `candle`, `twapSliceFillsByUser`, `bbo` and `allMids` > * [Webhooks](/webhooks/overview): read the subscription definitions; no subscription allowance > [accordion] Starter — \$29 / mo > > * 4× the per-minute rate > * 50k requests / month bucket > * 3 active keys (rotate without disruption) > * **Live positioning and risk, right now**: cohort bias (who is long or short, by trader tier), the liquidation heatmap, the cross-coin risk overview and per-coin risk snapshot, and recent liquidations with their summary > * The interactive **chart** (candles and indicators) and the L4 **book summary** > * [Sharpe ratios](/concepts/sharpe): any tracked wallet's realized-PnL Sharpe (30 days, a custom 1–90-day window, or three monthly buckets) and the top-50 Sharpe leaderboard > * [Builder analytics](/api-reference/builders): leaderboard, builder profiles, per-wallet builder usage > * [WebSocket](/websocket/overview): 25 subscriptions per connection, the `trades` firehose, and [multi-wallet feeds](/websocket/feeds#multi-wallet-subscriptions) following up to 1,000 wallets on one subscription > * [Webhooks](/webhooks/overview): 2 subscriptions (tentative) — a wallet's fills (`tradesByUser`), its TWAP fills (`twapSliceFillsByUser`), a price crossing (`priceCross`) or a trader cohort's net bias on a coin (the four [cohort bias types](/webhooks/cohort-bias)), filtered and signed, to your URL, or a wallet's or a market's potential liquidation exposure (the four [liquidation risk types](/webhooks/liquidation-types)) > [accordion] Agent — \$49 / mo > > For agents and bots that need more volume than Starter, plus the live positioning tools. Everything in Starter, and: > > * 10× Free's per-minute rate (300 / min), 10,000 / day > * 250k requests / month bucket > * 5 active keys > * [Positioning by entry](/api-reference/chart-layers#positioning-by-entry) — `/live/positioning-by-entry/{coin}` (`live_positioning_by_entry`): where open positions got in, by cohort. In the chart, this is the **entry profile** and the **average entry lines** > * The L4 **stop map** — `/market/book/stops/{coin}` (`book_stop_map`): untriggered stop and take-profit size bucketed by distance from mid > * [WebSocket](/websocket/overview): 2 connections, 50 subscriptions each, Starter's feeds plus the [liquidation feeds](/websocket/feeds#liquidations) (`liquidations`, `liquidationsByUser`, `liquidationsByUsers`), 100 GB fair-use bandwidth > * [Webhooks](/webhooks/overview): 6 subscriptions (tentative), Starter's types plus exchange-wide `liquidations` and one account's `liquidationsByUser` > > History, wallet deep-dives, whale trades, cohort drill-downs, the per-order L4 book tools (whales, levels), [TP/SL trigger orders](/concepts/trigger-orders) and the `l4Book` feed stay on Pro. > [accordion] Pro — \$199 / mo > > Everything in Agent, and: > > * 20× Free's per-minute rate > * 500k requests / month bucket > * 10 active keys > * Deep [builder analytics](/api-reference/builders): traders, fills, cohorts, retention, cross-builder overlap > * **History and depth** behind the Starter and Agent snapshots: cohort-bias and risk history, open-interest history, the chart's history and trade layers (Apex vs Crowd history, biggest trades), and the per-order book tools (whales, levels) > * [TP/SL trigger orders](/concepts/trigger-orders): every pending stop-loss and take-profit order, by market or by wallet > * Cohort drill-downs, archetypes and deeper analytics tools (entity resolution, HIP-4 perp-position context, etc.) > * [WebSocket](/websocket/overview): 5 concurrent connections, 100 subscriptions each, all 24 feeds (Agent's, plus `l4Book`, leverage changes, TWAP orders, TWAP statuses and their multi-wallet variants), 250 GB fair-use bandwidth > * [Webhooks](/webhooks/overview): 10 subscriptions (tentative), Agent's types plus the node's TWAP status records (`twapStatusesByUser`) > [accordion] Enterprise — custom > > * Negotiated rate / volume / SLA > * Custom historical exports beyond the standard [90-day window](/api-reference/data-windows) > * Unlimited active keys > * Priority support, custom data delivery, optional SLAs > * Email [chat@coinversa.ai](mailto:chat@coinversa.ai) to scope. ## How billing works * Subscriptions are managed by Stripe. Manage payment methods, view invoices, change plan, and cancel in the [billing portal](https://developers.coinversa.ai/billing). * Plan changes take effect immediately on upgrade (prorated) and at period end on downgrade. * If your subscription lapses (a failed renewal payment keeps access for 4 days, until you update the card), keys fall back to **Free** limits — they're not deleted, they just stop being entitled to the paid tier. * Each key is entitlement-checked on its own: a key serves the tier it was provisioned at, capped by your account's active entitlement. A Free key is never promoted by a paid key on the same account — see [how tier resolution works](/api-reference/tiers#how-tier-resolution-works). ## FAQ > [accordion] Do you have annual billing? > > Yes — Starter, Agent and Pro all have yearly cadence (\~17% cheaper than 12× monthly). Pick "Yearly" on the checkout page. > [accordion] What if I need higher per-minute limits but lower volume? > > That's Enterprise — limits are negotiated independently. Email [chat@coinversa.ai](mailto:chat@coinversa.ai). > [accordion] Are rate limits per key or per account? > > REST RPM and daily/monthly usage are shared across keys on the same account. Additional keys do not create separate allocations. Access is still evaluated using the presented key's effective tier, capped by your account's entitlement — a Free key does not inherit a paid sibling's access. > > The **websocket connection cap is also per account**, shared across every key you own — five Pro connections are five in total, however many keys hold them. See [WebSocket plan limits](/websocket/limits). > [accordion] Do MCP and direct API calls share the same limit? > > Yes. The MCP server forwards your key to the API, so both paths consume the same quota. # Quickstart Source: https://docs.coinversa.ai/quickstart Get an API key and your first response in 5 minutes. ## 1. Get an API key **1. Sign in** Go to [developers.coinversa.ai](https://developers.coinversa.ai) and sign in (Privy — email, wallet, or social). **2. Create a key** Open **Keys** in the portal sidebar and click **Create key**. Give it a name (e.g. "local-dev"). Copy the key now — it's shown once. **3. Pick a tier** All accounts start on **Free** (30 req/min, 1,000 req/day). Upgrade later in **Billing** if you need higher limits — see [pricing](/pricing). ## 2. Make your first request ```bash curl theme={null} curl https://api.coinversa.ai/api/public/v1/pulse/stats \ -H "X-API-Key: YOUR_API_KEY" ``` ```python Python theme={null} import httpx r = httpx.get( "https://api.coinversa.ai/api/public/v1/pulse/stats", headers={"X-API-Key": "YOUR_API_KEY"}, ) print(r.json()) ``` ```javascript Node theme={null} const res = await fetch("https://api.coinversa.ai/api/public/v1/pulse/stats", { headers: { "X-API-Key": process.env.COINVERSAA_API_KEY }, }); console.log(await res.json()); ``` ```go Go theme={null} req, _ := http.NewRequest("GET", "https://api.coinversa.ai/api/public/v1/pulse/stats", nil) req.Header.Set("X-API-Key", os.Getenv("COINVERSAA_API_KEY")) resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() io.Copy(os.Stdout, resp.Body) ``` You should see global market stats (total traders, total volume, data coverage period). If you get a 403, your key is missing, wrong, or inactive. If you get a 429, check the rate-limit headers — see [authentication](/authentication#rate-limit-headers). ## 3. (Optional) Wire it into your AI agent If you're building an AI agent rather than calling the API directly, the MCP server gives Claude, Cursor, and Perplexity tool access using the same key — no HTTP code on your side. Building an app, dashboard, or script instead? You're done after step 2; skip to [What's next](#whats-next). Not sure which fits? See [Choose your path](/#choose-your-path). Pick your client: > [card] [Claude.ai (web)](/mcp/setup#from-the-claude-connector-directory) > > Add the Coinversa connector (directory or custom URL), then sign in. > [card] [Claude Desktop](/mcp/setup#claude-desktop) > > Use your Claude connector, or a local config. > [card] [Cursor](/mcp/setup#cursor) > > One-click deeplink install. > [card] [Perplexity](/mcp/setup#perplexity) > > Custom connector — URL only, OAuth sign-in. ## What's next * Browse the [API reference](/api-reference/introduction) — every endpoint has a "Try it" panel. * Read [concepts](/concepts/markets) to understand symbol formats, cohort tiers, and the cross-market asset model. * See [authentication](/authentication) for rate-limit behavior, tier gates, and error shapes. # Status & reliability Source: https://docs.coinversa.ai/status Coinversa Pulse service status and reliability — live status and incident history at status.coinversa.ai, email and RSS updates, the monitored components (REST API, MCP server, live data freshness, WebSocket streams), retrying 5xx errors with backoff, and the 99.5% monthly availability target (no formal SLA yet). Live status and incident history for every Coinversa surface are on the **status page** at [status.coinversa.ai](https://status.coinversa.ai). Check it first when something looks wrong — and subscribe there to get incident updates by **email** or **RSS**. ## What is monitored | Component | What it covers | | - | - | | **REST API** | `api.coinversa.ai/api/public/v1` — every endpoint, including the x402 twins | | **MCP server** | The hosted MCP endpoint your AI client connects to | | **Live data freshness** | Whether live positions, liquidations and market data are keeping up with Hyperliquid — see [Data coverage](/concepts/data-coverage) | | **WebSocket streams** | `wss://ws.coinversa.ai` connections and feeds — see [WebSocket overview](/websocket/overview) | ## During an incident The REST API returns a **5xx** status while a component is degraded. Treat any 5xx as retryable — **retry with exponential backoff** (with jitter) rather than in a tight loop, and check the status page before you escalate. A 4xx is not an incident: it is about the request or the key — see [Authentication](/authentication). WebSocket clients should reconnect with backoff too; refused upgrades and close codes are covered in [WebSocket protocol](/websocket/protocol). ## Availability There is **no formal SLA yet**. Our target is **99.5% monthly availability**, and incidents and their resolution are published on the status page. If you need contractual commitments, [contact us](mailto:chat@coinversa.ai). # Webhooks for agents Source: https://docs.coinversa.ai/webhooks/agents Use the Coinversa Pulse event inbox from an AI agent — inbox_subscribe creates an inbox subscription from a type, args and filters, inbox_subscriptions lists them, inbox_unsubscribe deletes one, inbox_state reports what is pending and inbox_drain reads and acknowledges messages — through the MCP server, with the same plan allowances as REST. An agent connected to the [MCP server](/mcp/setup) can subscribe to events, read what they matched and unsubscribe from chat, with no server and no curl. The five tools below work on your account's [inbox](/webhooks/inbox): they create and manage **inbox subscriptions** only, act on the same account the portal and REST show, and are bound by the same plan allowance. > [!NOTE] > > The MCP tools never take a URL. A subscription created from chat always delivers to the inbox, and the tools neither list nor delete HTTP subscriptions. To have frames POSTed to a URL you own, create the subscription in the [developer portal](https://developers.coinversa.ai) or over [REST](/webhooks/api#create-a-subscription). ## Subscribe `inbox_subscribe` takes the same three things a REST create does — a `type`, its `args` and optional `filters` — and always sends `"deliveryMode": "inbox"`. Ask Claude to "watch 0x28f0…9bad's BTC fills of 1.5 or more" and it calls: ```json theme={null} { "type": "tradesByUser", "args": {"user": "0x28f0d2a7c6b3e14f9a8b7c6d5e4f3a2b1c0d9bad"}, "filters": {"coin": "BTC", "sz": {"gte": "1.5"}} } ``` * **Types** are the ones on [Subscription types](/webhooks/events): the six event types `tradesByUser`, `twapSliceFillsByUser`, `twapStatusesByUser`, `liquidations`, `liquidationsByUser` and `priceCross`, and the four [cohort bias types](/webhooks/cohort-bias) `cohortBias`, `cohortBiasFlip`, `cohortBiasOpposition` and `cohortBiasMove`. The four [liquidation risk types](/webhooks/liquidation-types) `liquidationRiskCross`, `liquidationRisk`, `liquidationExposure` and `liquidationMap` are created the same way. * **`args.user`** on the four by-user types is one address or an array of 1 to 1,000 — one subscription for all of them. `liquidations` takes no args. `priceCross` takes `coin` and a positive decimal-string `threshold`, with optional `source` (`mark` or `trade`) and `direction` (`above`, `below` or `both`). The cohort bias types take `coin` and, per type, `cohort`, `otherCohort`, `direction`, a decimal-string `points` and optional `tierType`. The two wallet liquidation risk types take **exactly one** `user` with `liquidationDistancePct` or `points`; the two market ones take `coin` with `priceMovePct` and `minNotional`, or `priceChangePct` — every number a string, `buckets` and `range` included ([arguments](/webhooks/liquidation-types#arguments)). * **`filters`** are AND-combined: exact strings (`coin`, `side`) or `gt` / `gte` / `lt` / `lte` bounds on decimal strings. Numbers are always strings, never JSON numbers. `priceCross`, `cohortBiasOpposition`, `liquidationRiskCross`, `liquidationExposure` and `liquidationMap` accept no extra filters. A cohort bias subscription is created the same way. Ask Claude to "tell me when Apex turns net short on BTC" and it calls: ```json theme={null} { "type": "cohortBiasFlip", "args": {"coin": "BTC", "cohort": "apex", "direction": "short"} } ``` Cohort positioning is a stored snapshot, normally taken every 15 minutes, so the flip reaches the inbox at the next snapshot — not when a trade happens — and the agent sees it the next time it drains. The message's `data` holds the cohort's row after the flip, with the row before it under `previous` ([`cohortBiasFlip`](/webhooks/cohort-bias#cohortbiasflip)). The service validates the type, the field names and your plan, exactly as it does for REST: a type above your plan is refused with `403`, as is any subscription on **Free**, and a full allowance with `429` ([Plan limits](/webhooks/limits)). Inbox and HTTP subscriptions share the same slots. The tool returns a compact receipt — `subscribed`, `subscriptionId`, `deliveryMode`, `disabled` — and has no signing secret to show, because an inbox subscription has none. A subscription is immutable: to change it, unsubscribe and subscribe again, which resets a price crossing's baseline and a cohort bias or liquidation risk subscription's state. Creation is never retried automatically, so after an ambiguous failure the agent should call `inbox_subscriptions` before trying again rather than risk a duplicate. There is no snapshot and no replay: a subscription collects from the moment it exists. `cohortBias` is the exception — it delivers the current state once when it is created — and `liquidationRiskCross`, `liquidationRisk` and `liquidationExposure` can deliver on their first check if the condition is already met. ## List and unsubscribe `inbox_subscriptions` lists your inbox subscriptions — id, type, normalized `args`, `filters` and whether each is disabled — sorted by id, `limit` at a time (default 20, at most 100) with `offset`, `hasMore` and `nextOffset` to continue. HTTP subscriptions are left out, so their URLs never reach a chat transcript. `inbox_unsubscribe` deletes one inbox subscription by its `subscriptionId`. It checks the id is an inbox subscription of yours first and refuses anything else; there is no bulk delete. Unsubscribing stops collection but keeps the messages already stored — they stay pending until drained or expired. ## Read the inbox `inbox_state` reports the inbox without touching it: `pendingMessages`, `pendingBytes`, your plan's `maxMessages` and `maxStoredBytes`, and the two cumulative loss counters, `overflowDroppedTotal` and `expiredTotal`. `inbox_drain` reads and **consumes**. It fetches the oldest pending messages (`count`, default 10, up to 1,000), keeps as many complete messages as fit the response budget, and acknowledges exactly those — a message it had to leave out stays pending for the next call, and a message's `data` is never split. Each message is the delivery envelope — `channel`, `seq`, `subscriptionId`, `data` — plus its `inboxId` and `receivedAt` ([the message](/webhooks/inbox#the-message)). The result carries `messages`, `count`, `hasMore`, `acknowledged`, `ackStatus` and the inbox `state` as it was **before** the acknowledgement (`stateAt: "drain"`); call `inbox_state` for the current counts. Three things follow from the tool acknowledging for you: * **A drain from chat deletes.** Unlike the REST [drain](/webhooks/inbox#drain-read-without-deleting), which is safe to repeat until you ack, the tool acks as part of the same call. There is no peek: use `inbox_state` to look without consuming. * **`ackStatus: "unconfirmed"`** means the acknowledgement did not come back. The messages are still returned, but they may reappear on the next drain — deduplicate by `inboxId`. * **Two drains at once** can return the same message. If several agents share an account, give one of them the job. The inbox is per **account**: a drain returns what every inbox subscription matched, whichever key or surface created it, and what it acknowledges is gone for the portal and REST too. Messages nobody acknowledges expire after 14 days or are evicted on overflow — see [Limits](/webhooks/inbox#limits). ## The tools | Tool | Kind | Backing route | What it does | | - | - | - | - | | `inbox_subscribe` | Creates a subscription | `POST /v1/subscriptions` | One inbox subscription from `type`, `args` and optional `filters`; never a URL | | `inbox_subscriptions` | Read-only | `GET /v1/subscriptions` | Lists your inbox subscriptions, paged; HTTP subscriptions are excluded | | `inbox_unsubscribe` | Destructive | `DELETE /v1/subscriptions/{id}` | Deletes one inbox subscription; stored messages are kept | | `inbox_state` | Read-only | `GET /v1/inbox` | Pending counts, plan capacity and loss counters | | `inbox_drain` | Destructive | `POST /v1/inbox/drain`, `POST /v1/inbox/ack` | Reads the oldest pending messages and acknowledges the ones it returns | `inbox_subscribe`, `inbox_unsubscribe` and `inbox_drain` are the tools that change anything, and what they change is your Coinversa inbox subscriptions and inbox. The connector still never touches an exchange account, never signs and never trades. ## Hosted connections The tools work the same however you connected. A connection made with **"Continue with Coinversa"** in Claude, ChatGPT or another client is authenticated for you and resolves the same account, plan and allowance as your API key; a connection made by pasting a key, and the npx package, use that key directly. ## What arrives Whatever created the subscription and wherever it delivers, the frame is the same: the raw source frame plus `subscriptionId` — stored with an `inboxId` and `receivedAt` in the inbox, signed with [Standard Webhooks](/webhooks/signatures) headers when POSTed to a URL. An agent reading it should treat `data` as the WebSocket [fill objects](/websocket/feeds#the-fill-object) they are — sizes and prices as decimal strings, `side` as `A` (sell) or `B` (buy), `closedPnl` from the node — and say what happened, not what to do about it. On a cohort bias type `data` holds [cohort rows](/webhooks/cohort-bias#the-cohort-row) instead: report the cohort's net bias and the snapshot's time, which is when the snapshot was stored, not when the positioning changed. On a liquidation risk type `data` holds a wallet's positions or a market's exposure ([delivered fields](/webhooks/liquidation-types#delivered-fields)): report it as **potential** exposure from positions as last stored, checked about once a minute — not as a liquidation that happened, and not as a forecast of one. Market data is not advice. ## Roadmap Today an agent **subscribes** and **pulls** what the subscriptions matched. Having the MCP server push an event into a running session is not something the protocol allows: the version the server speaks has no events capability. The inbox is the pull side of that: a session reads it when it is asked to, not when a fill lands. # Webhooks API Source: https://docs.coinversa.ai/webhooks/api REST reference for Coinversa Pulse webhooks at webhook.coinversa.ai — Bearer auth, GET /v1/subscriptions/definitions, POST /v1/subscriptions with deliveryMode http or inbox, args.user as one address or an array of up to 1,000, the cohort bias args and the args of the four liquidation risk types, list, delete one or all, re-enable, read the signing secret, the inbox state, drain and ack routes, the unauthenticated health route, and the 400, 401, 403, 413, 429 and 503 errors. Every route on this page is relative to one base URL and, except `/health`, authenticated: ```text theme={null} https://webhook.coinversa.ai Authorization: Bearer YOUR_API_KEY ``` Subscriptions belong to the **account**, not to a particular key: any of your keys sees and manages all of them, and they share one allowance and one [inbox](/webhooks/inbox). The same operations are in the developer portal's **Webhooks** page and, for inbox subscriptions and reading the inbox, in the [MCP tools](/webhooks/agents#the-tools). > [!NOTE] > > This API is served by `webhook.coinversa.ai`, not the data API at `api.coinversa.ai`. It takes `Authorization: Bearer`, not `X-API-Key`, and it is not in the data API's OpenAPI spec. REST auth failures are `403` on the data API; here a missing or invalid key is `401`. ## Authentication One header, the same key as REST and the WebSocket: ```text theme={null} Authorization: Bearer ``` Subscriptions and the inbox belong to the account, not to one key: sibling keys on the same account see and manage the same subscriptions and share the allowance. Connections made through the hosted MCP connector are authenticated for you; nothing to configure. Missing or invalid credentials, and unknown, revoked or suspended keys, are `401`. An auth-backend outage is `503`, never anonymous access — treat a `503` as *temporarily unavailable* and retry, not as a bad key. ## Summary Every authenticated row takes the Bearer header above. | Method | Path | Auth | What it does | | - | - | - | - | | `GET` | `/v1/subscriptions/definitions` | yes | The types your plan may create, with `args`, `filters` and `minTier` | | `POST` | `/v1/subscriptions` | yes | Create a subscription with `deliveryMode` `http` (default, returns the signing secret) or `inbox` (no `url`, no secret) | | `GET` | `/v1/subscriptions` | yes | List this account's subscriptions with their `deliveryMode` (no secrets) | | `DELETE` | `/v1/subscriptions` | yes | Delete **all** this account's subscriptions | | `DELETE` | `/v1/subscriptions/{id}` | yes | Delete one subscription | | `POST` | `/v1/subscriptions/{id}/enable` | yes | Re-enable a subscription a `410` disabled | | `GET` | `/v1/subscriptions/{id}/secret` | yes | Read the subscription's signing secret (`400` on an inbox subscription) | | `GET` | `/v1/inbox` | yes | The account inbox's `state` | | `POST` | `/v1/inbox/drain` | yes | Read up to `count` pending inbox messages within `maxBytes`, oldest first, without deleting them | | `POST` | `/v1/inbox/ack` | yes | Delete inbox messages by batch prefix or by `inboxIds` | | `GET` | `/health` | none | Liveness: `200`, with service counts in the body | ## Definitions `GET /v1/subscriptions/definitions` → `{ "types": [...], "filterLogic": "and" }`. Only the types **permitted by your tier** are listed, so Free sees the Free-tier types even though its subscription allowance is zero: feed access and subscription allowance are separate checks. The same declarations drive validation and event field extraction — this is not an arbitrary query interface. Each type carries: | Field | Meaning | | - | - | | `type` | The name you send at creation | | `args` | Scope and configuration arguments. Each declares `type`, `required`, optional `options` and optional `default`. Wallet arguments also declare `minItems: 1` and `maxItems: 1000`: they take one address or an array — or `maxItems: 1` on the two wallet [liquidation risk types](#liquidation-risk-types), which take exactly one. Three arguments also declare a numeric range: `max` on `priceMovePct`, and `min` and `max` on the integer arguments `buckets` and `range`, which are sent as strings like every other number. Other ranges, such as `points` on `cohortBiasMove`, are enforced at creation without being declared | | `filters` | Public field names. Each declares `type`, `label`, optional `unit` (`base`, `quote`, `minutes`, `ratio`, `count` or `percent`), `exact`, optional enum `options` and the allowed numeric `operators` | | `minTier` | The minimum plan, inherited from the underlying feed. `priceCross` also exports `sourceMinTiers` for its `mark` and `trade` sources | ```json theme={null} { "type": "tradesByUser", "args": {"user": {"type": "address", "required": true, "minItems": 1, "maxItems": 1000}}, "filters": { "coin": {"type": "string", "label": "Market", "exact": true}, "sz": { "type": "decimal", "label": "Size", "unit": "base", "exact": true, "operators": ["gt", "gte", "lt", "lte"] } }, "minTier": "free" } ``` The example omits the other trade fields for brevity. `minItems` and `maxItems` on `user` mean it accepts one address or an array of 1 to 1,000 ([one wallet or many](#one-wallet-or-many)). Read the endpoint rather than maintaining a client-side list. ## Create a subscription `POST /v1/subscriptions` | Body field | Type | Required | Notes | | - | - | - | - | | `type` | string | yes | A [subscription type](/webhooks/events): one of the six event types, the four [cohort bias types](/webhooks/cohort-bias) or the four [liquidation risk types](/webhooks/liquidation-types) | | `args` | object | per type | `user` for the four by-user types — one address or an array of 1 to 1,000 ([below](#one-wallet-or-many)); `coin`, `threshold`, optional `source` and `direction` for `priceCross`; none for `liquidations`; `coin` and, per type, `cohort`, `otherCohort`, `points`, `direction` and `tierType` for the cohort bias types ([below](#cohort-bias-types)); one `user` or a `coin`, with a threshold, for the liquidation risk types ([below](#liquidation-risk-types)). Wallets are normalised to lowercase | | `filters` | object | no | Exact values or `gt` / `gte` / `lt` / `lte` bounds, AND across fields — see [Filters](/webhooks/events#filters). `priceCross`, `cohortBiasOpposition`, `liquidationRiskCross`, `liquidationExposure` and `liquidationMap` take none | | `deliveryMode` | string | no | `http` (default) delivers to `url`; `inbox` stores matches in the account [inbox](/webhooks/inbox) instead | | `url` | string | for `http` | Public HTTPS on port 443. Redirects and private or reserved addresses are refused. **Omit it** on an inbox subscription | ```json theme={null} { "type": "tradesByUser", "args": {"user": "0x0123456789012345678901234567890123456789"}, "filters": {"coin": "BTC", "sz": {"gt": "1.5", "lte": "10"}}, "url": "https://example.com/hook" } ``` `args` selects and configures the source independently of the optional `filters`. The original top-level `user` spelling is still accepted, but do not send `user` both at the top level and inside `args`. ### One wallet or many On the four by-user types `args.user` is **one address string or an array of 1 to 1,000 addresses**; the definitions advertise `minItems: 1` and `maxItems: 1000` on the argument. The top-level `user` spelling accepts either form too. ```json theme={null} { "type": "tradesByUser", "args": { "user": [ "0x0123456789012345678901234567890123456789", "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" ] }, "filters": {"coin": "BTC", "sz": {"gt": "1.5", "lte": "10"}}, "url": "https://example.com/hook" } ``` * One array is **one subscription** against your allowance and one underlying processor feed; it does not change the type's minimum plan. * Addresses are lowercased; arrays are **sorted and deduplicated**. The 1,000 limit is checked before deduplication. * An **empty array**, an **invalid address** or **more than 1,000 entries** is a `400`. Creation bodies are limited to **64 KiB**. * In create and list responses a one-element array — including one left after deduplication — is returned as a **string**; the legacy top-level `user` appears only for a single-wallet scope. * Matching events from every listed wallet in a source block arrive together, in source order, in one delivery's `data`, with the same filters applied to each. Non-wallet arguments stay single-valued. ### Cohort bias types The four cohort bias types take `coin` and, depending on the type, a cohort, a second cohort, a direction or a number of points. One body per type, with every required argument: ```json theme={null} {"type": "cohortBias", "args": {"coin": "BTC"}, "url": "https://example.com/hook"} ``` ```json theme={null} {"type": "cohortBiasFlip", "args": {"coin": "BTC", "cohort": "apex", "direction": "short"}, "url": "https://example.com/hook"} ``` ```json theme={null} {"type": "cohortBiasOpposition", "args": {"coin": "BTC", "cohort": "apex", "otherCohort": "crowd"}, "url": "https://example.com/hook"} ``` ```json theme={null} {"type": "cohortBiasMove", "args": {"coin": "BTC", "cohort": "apex", "points": "10"}, "url": "https://example.com/hook"} ``` * `coin` is required on all four, matched case-insensitively, and can be a qualified symbol such as `xyz:GOLD`. * `tierType` is optional on all four: `pnl` (default), `size`, `pnl_recent` or `size_recent`. A `cohort` or `otherCohort` must belong to that classification — a cohort from the other one is a `400` — and `cohortBiasOpposition` needs two different cohorts. * `direction` on `cohortBiasFlip` is `long`, `short` or `both` (default): the side the cohort flips to. * `points` on `cohortBiasMove` is a positive decimal **string**, at most `200`: percentage points of net bias. * `cohortBias`, `cohortBiasFlip` and `cohortBiasMove` accept the `netBias`, `longNotional`, `shortNotional` and `accountCount` filters; `cohortBiasOpposition` accepts none. They are evaluated on stored snapshots, normally taken every 15 minutes, not on each trade. What each one fires on, the cohorts and the delivered rows are on [Cohort bias types](/webhooks/cohort-bias). ### Liquidation risk types The four liquidation risk types take either one wallet or one market, and a threshold. One body per type, with every required argument: ```json theme={null} {"type": "liquidationRiskCross", "args": {"user": "0x0123456789012345678901234567890123456789", "liquidationDistancePct": "5", "direction": "below"}, "url": "https://example.com/hook"} ``` ```json theme={null} {"type": "liquidationRisk", "args": {"user": "0x0123456789012345678901234567890123456789", "points": "2"}, "url": "https://example.com/hook"} ``` ```json theme={null} {"type": "liquidationExposure", "args": {"coin": "BTC", "priceMovePct": "3", "minNotional": "6000000"}, "url": "https://example.com/hook"} ``` ```json theme={null} {"type": "liquidationMap", "args": {"coin": "BTC", "priceChangePct": "1"}, "url": "https://example.com/hook"} ``` * `user` on `liquidationRiskCross` and `liquidationRisk` is **exactly one** wallet — a string or a one-element array. A second address is a `400`. There is no `coin` argument: every open position on record for the wallet is checked. * `liquidationDistancePct` on `liquidationRiskCross` is a positive decimal **string** in percent (`"5"` is 5%); `direction` is `above`, `below` or `both` (default), and `below` is closer to liquidation. * `points` on `liquidationRisk` is a positive decimal string — percentage points of distance, with no upper limit. It is the one type of the four that takes a filter: `liquidationDistancePct`. * `coin` on `liquidationExposure` and `liquidationMap` is matched case-insensitively and can be a qualified symbol such as `xyz:GOLD`. * `priceMovePct` on `liquidationExposure` is a decimal string above `0` and at most `100`; `minNotional` is a positive decimal string in quote units. `direction` is `down`, `up` or `both` (default). `resetNotional` is optional, positive and at most `minNotional`, and defaults to it. * `priceChangePct` on `liquidationMap` is a positive decimal string. `buckets` and `range` are optional **integer strings**: `"1"` to `"200"` (default `"50"`) and `"1"` to `"100"` (default `"30"`). They are evaluated about once a minute on stored positions and liquidation levels, not on each price tick. What each one fires on and the delivered fields are on [Liquidation risk types](/webhooks/liquidation-types). The response carries the subscription — `type`, the normalised `args`, the saved `filters`, its `id`, `deliveryMode`, `url` and `disabled` status — and, **on creation of an `http` subscription only**, the `whsec_…` signing secret. List responses never include it; read it later with [`GET /v1/subscriptions/{id}/secret`](#read-the-signing-secret). ### Inbox delivery Send `"deliveryMode": "inbox"` and no `url`, and matching frames are stored in your account's one inbox instead of being POSTed — the same types, `args` and `filters`, one of the same subscription slots, no signing secret, and `403` on Free. Read them with the three inbox routes [below](#inbox). The full contract is on [Inbox delivery](/webhooks/inbox). ```json theme={null} { "type": "tradesByUser", "args": {"user": "0x0123456789012345678901234567890123456789"}, "filters": {"coin": "BTC"}, "deliveryMode": "inbox" } ``` A subscription's configuration is **immutable**: delete and recreate to change it, which also resets `priceCross` crossing state and a cohort bias or liquidation risk subscription's state. If activating the underlying feed fails, creation **rolls back** and answers `503` rather than leaving a saved subscription behind. Errors: `400` (invalid format, unknown type, argument, filter or operator, impossible range, an empty or over-1,000 `user` array or an invalid address in it, a cohort outside the chosen `tierType`, `points` outside its range, more than one wallet on a liquidation risk type, `priceMovePct` above `100`, `resetNotional` above `minNotional`, `buckets` or `range` that is not an integer string in its range, a body over 64 KiB — checked before anything is saved), `403` (the type is not permitted by your tier, or an inbox subscription on Free), `429` (your account is at its subscription allowance), `503` (auth, storage or feed unavailable). | Type | `args` | Minimum plan | | - | - | - | | `tradesByUser` | required `user`: one address or 1–1,000 | Free (Free's allowance is zero) | | `twapSliceFillsByUser` | required `user`: one address or 1–1,000 | Free (Free's allowance is zero) | | `twapStatusesByUser` | required `user`: one address or 1–1,000 | Pro | | `liquidations` | none | Agent | | `liquidationsByUser` | required `user`: one address or 1–1,000 | Agent | | `priceCross` | required `coin`, `threshold`; optional `source`, `direction` | Free for both sources (Free's allowance is zero) | | `cohortBias` | required `coin`; optional `cohort`, `tierType` | Starter | | `cohortBiasFlip` | required `coin`, `cohort`; optional `direction`, `tierType` | Starter | | `cohortBiasOpposition` | required `coin`, `cohort`, `otherCohort`; optional `tierType` | Starter | | `cohortBiasMove` | required `coin`, `cohort`, `points`; optional `tierType` | Starter | | `liquidationRiskCross` | required `user` (exactly one wallet), `liquidationDistancePct`; optional `direction` | Starter | | `liquidationRisk` | required `user` (exactly one wallet), `points` | Starter | | `liquidationExposure` | required `coin`, `priceMovePct` (above `0`, at most `100`), `minNotional`; optional `direction`, `resetNotional` (at most `minNotional`) | Starter | | `liquidationMap` | required `coin`, `priceChangePct`; optional `buckets` (integer string, `1`–`200`, default `50`), `range` (integer string, `1`–`100`, default `30`) | Starter | Tier checks are **creation-time** checks, not continuous re-authorisation of saved subscriptions after an account change. ## List subscriptions `GET /v1/subscriptions` → this account's subscriptions, each with its `type`, `args`, `filters`, `id`, `deliveryMode` (`"http"` or `"inbox"`), `url` (HTTP subscriptions) and `disabled` status. No secrets. ## Delete a subscription `DELETE /v1/subscriptions/{id}` deletes one subscription you own. For `priceCross`, the cohort bias types and the liquidation risk types it also removes the stored baseline or state and any pending deliveries in the outbox. Deleting an inbox subscription stops collection but **does not delete the messages it already stored** — acknowledge those on the [inbox](/webhooks/inbox#acknowledge). ## Delete all subscriptions `DELETE /v1/subscriptions` deletes every subscription on the account. ## Re-enable a subscription `POST /v1/subscriptions/{id}/enable` re-enables a subscription that a `410` from your URL disabled. It is idempotent. It answers `429` if the account is already at its subscription allowance — a disabled subscription does not count toward it, so enabling one is a creation-time check again. ## Read the signing secret `GET /v1/subscriptions/{id}/secret` returns the subscription's `whsec_…` signing secret — the one returned at creation. There is one secret per subscription and no rotation; see [Signatures and delivery](/webhooks/signatures#one-secret-per-subscription). An **inbox** subscription has no secret, and this route answers `400` for it. ## Inbox Three routes read the account's one inbox; the semantics are on [Inbox delivery](/webhooks/inbox). | Route | Request | Response | | - | - | - | | `GET /v1/inbox` | — | `{"state": {pendingMessages, pendingBytes, maxMessages, maxStoredBytes, overflowDroppedTotal, expiredTotal}}` | | `POST /v1/inbox/drain?count=10&maxBytes=65536` | No body. `count` 1–1,000 (default 10); `maxBytes` 1,024–4,194,304 (default 65,536), a budget for the whole response | `{"batchId", "messages", "hasMore", "state"}` — oldest first, **nothing deleted**. `413` with `requiredMaxBytes` when the oldest message does not fit; an empty inbox returns an empty `batchId` | | `POST /v1/inbox/ack` | **One** of `{"batchId", "count"}` (an absolute prefix of that batch) or `{"inboxIds": [...]}` (1–1,000) | `{"acknowledged", "state"}` — `acknowledged` is what **this** request removed, so a retry returns `0`. Idempotent | A message is the delivery envelope plus `inboxId` (`msg_` + 32 hex) and `receivedAt` ([the message](/webhooks/inbox#the-message)). ## Health `GET /health` needs **no key** and answers `200` while the service is up. The body is a JSON object of counts — `subscriptions` (saved subscriptions), `feeds` (active feed subscriptions), `queued` (fresh deliveries waiting), `retrying` (retries waiting) and `outbox` (pending outbox rows). Treat the status code as the health signal and the body as informative: a build may answer `200` with an empty body, so accept both. It does not check auth or feed readiness. ## Delivery semantics What a delivery looks like is on [Signatures and delivery](/webhooks/signatures). The status codes **your** URL returns mean: | Your response | Effect | | - | - | | Any `2xx` | Acknowledged | | `410` | The subscription is **disabled** until you call [`/enable`](#re-enable-a-subscription) | | Anything else | Retried on the bounded policy — up to nine attempts over about 76 hours, respecting `Retry-After` up to 24 hours — then dropped | ## Errors | Status | Meaning | | - | - | | `400` | Invalid format; unknown type, argument, filter or operator; impossible range; an argument outside the range its definition declares (`priceMovePct` above `100`, `buckets` above `200`). Nothing is saved. Also `/secret` on an inbox subscription, bad drain parameters and a bad or expired ack receipt | | `401` | Missing or invalid credentials, in either [authentication mode](#authentication) | | `403` | The source type is not permitted by your account tier (checked at creation); an inbox subscription on Free | | `413` | Drain: the oldest pending message does not fit `maxBytes`; the body carries `requiredMaxBytes` | | `429` | The account's subscription allowance is reached — on create and on `/enable`. Disabled subscriptions do not count toward it | | `503` | Auth, storage or feed unavailable. An unknown or missing auth tier fails closed. On create, the subscription was rolled back | Error bodies are **plain text**, not JSON — `Unauthorized`, `unknown webhook type`, `endpoint must be a public HTTPS URL`, `invalid subscription JSON`, `filter "sz" has an impossible range` — so match on the status code and show the text. The tentative subscription allowances per plan are on [Plan limits](/webhooks/limits). # Cohort bias types Source: https://docs.coinversa.ai/webhooks/cohort-bias The four Coinversa Pulse cohort bias webhook types — cohortBias, cohortBiasFlip, cohortBiasOpposition and cohortBiasMove — which report a trader cohort's net long or net short positioning on one coin from stored snapshots, normally taken every 15 minutes: their args (coin, cohort, otherCohort, direction, points, tierType), the netBias, longNotional, shortNotional and accountCount filters, the delivered cohort row and a delivery example for each. Starter and above, to a URL or the inbox. Four subscription types watch how a **trader cohort** is positioned on one coin — net long or net short, and by how much. `cohortBias` delivers the cohort rows of every new snapshot. `cohortBiasFlip`, `cohortBiasOpposition` and `cohortBiasMove` deliver only when something changed between two snapshots: a cohort changed side, two cohorts took opposite sides, or a cohort's net bias moved by a number of points. All four need **Starter** or above, and deliver the way every other [subscription type](/webhooks/events) does: a signed POST to your URL, or the [inbox](/webhooks/inbox). They describe positioning — they are not a recommendation to trade. Delivery examples are illustrative: the values are made up. ## Snapshot timing Cohort positioning is a **stored snapshot**, normally taken every **15 minutes**. The service checks for a new snapshot about once a minute. So these types tell you about a change **at the next snapshot** — not when a trade happens. * A change that happens and reverses between two snapshots is not seen. * The times in a delivery — `snapshotTime` and `recordedAt` — are the snapshot's own: when it was taken and when it was stored. They are not the time the positioning changed. * A transition is the difference between the newest snapshot and the last one your subscription saw. If the service misses snapshots during an outage, the ones in between are not replayed. * A snapshot that cannot be read, or that has no rows for your coin, changes nothing: no delivery, and no flip, opposition or move. * A new subscription starts from the snapshot **already stored** when you create it. The service hands it over at its next check, about once a minute: `cohortBias` delivers it, and for the other three it only sets the starting state. The next new snapshot is the first that can produce a flip, an opposition or a move. ## The four types | Type | Fires | Required `args` | Optional `args` | Filters | | - | - | - | - | - | | [`cohortBias`](#cohortbias) | Once with the current state when you create the subscription, then on each new snapshot — even if nothing changed | `coin` | `cohort`, `tierType` | `netBias`, `longNotional`, `shortNotional`, `accountCount` | | [`cohortBiasFlip`](#cohortbiasflip) | A cohort's net bias goes from long to short, or from short to long | `coin`, `cohort` | `direction`, `tierType` | `netBias`, `longNotional`, `shortNotional`, `accountCount` | | [`cohortBiasOpposition`](#cohortbiasopposition) | Two cohorts enter opposite positioning — one net long, the other net short | `coin`, `cohort`, `otherCohort` | `tierType` | none — the condition is in `args` | | [`cohortBiasMove`](#cohortbiasmove) | A cohort's net bias has moved at least `points` percentage points since the last time you were notified | `coin`, `cohort`, `points` | `tierType` | `netBias`, `longNotional`, `shortNotional`, `accountCount` | ## Arguments | Argument | Used by | Value | | - | - | - | | `coin` | All four, required | The market. Matched **case-insensitively**, and it can be a qualified symbol such as `xyz:GOLD` | | `tierType` | All four, optional | The classification the cohort belongs to: `pnl` (default — lifetime profitability), `size`, `pnl_recent` or `size_recent` | | `cohort` | Required on `cohortBiasFlip`, `cohortBiasOpposition` and `cohortBiasMove`; optional on `cohortBias` | One cohort of that classification | | `otherCohort` | `cohortBiasOpposition`, required | The second cohort — same classification, and not the same cohort | | `direction` | `cohortBiasFlip`, optional | The side the cohort flips **to**: `long`, `short` or `both` (default) | | `points` | `cohortBiasMove`, required | A positive decimal string, at most `200` — **percentage points** of net bias, not a relative percent | The cohorts are the tiers on [Trader cohorts](/concepts/cohorts): | `tierType` | Cohorts | | - | - | | `pnl`, `pnl_recent` | `apex`, `sharps`, `grinders`, `scrapers`, `crowd`, `bleeders`, `trapped`, `blown_out` | | `size`, `size_recent` | `heavyweights`, `cruiserweights`, `middleweights`, `welterweights`, `lightweights`, `featherweights`, `flyweights`, `strawweights` | * `pnl_recent` and `size_recent` are the same cohorts on the [30-day tiers](/concepts/cohorts#all-time-vs-30-day-tiers). * A cohort from the other classification — `heavyweights` with `tierType: "pnl"` — is a `400`. So is `cohortBiasOpposition` with the same cohort twice, and `points` that is not above `0` or is above `200`. * The legacy slugs the REST API returns (`money_printer`, `exit_liquidity`, …) are accepted in `cohort` and `otherCohort` and normalised. Deliveries carry the names above. * `coin` is not checked against a list of markets when you create the subscription: a symbol with no snapshot rows is accepted and delivers nothing. ## Net bias `netBias` is the cohort's signed long-short ratio on the coin, from `-1` to `1`: ```text theme={null} netBias = (longNotional - shortNotional) / (longNotional + shortNotional) ``` Positive is **net long**, negative is **net short**, `0` is neutral. `1` means every position the cohort holds on the coin is long; `-0.4` means shorts outweigh longs by 40% of the cohort's total notional. It is delivered as a decimal string and compared with exact decimal arithmetic. ## Filters `cohortBias`, `cohortBiasFlip` and `cohortBiasMove` accept four numeric filters, applied to the cohort's **current** row: | Filter | Unit | | - | - | | `netBias` | Ratio, `-1` to `1` | | `longNotional` | Quote | | `shortNotional` | Quote | | `accountCount` | Accounts | Each takes an exact value or `gt` / `gte` / `lt` / `lte` bounds, as **decimal strings**, AND-combined — the rules on [Filters](/webhooks/events#filters). A count is a string here too: `{"accountCount": {"gte": "100"}}`. ```json theme={null} {"netBias": {"lte": "-0.2"}, "accountCount": {"gte": "100"}} ``` * On `cohortBias`, a row that does not pass is left out of `data`; if none passes, nothing is delivered for that snapshot. * On `cohortBiasFlip`, a flip is delivered only if the row **after** the flip passes. * On `cohortBiasMove`, a move whose row does not pass is not delivered and does not reset the baseline. * `cohortBiasOpposition` takes **no filters** — extra predicates are refused. ## The cohort row Every event in `data` is one cohort's row from the snapshot: | Field | Type | Meaning | | - | - | - | | `coin` | string | The market | | `tierType` | string | The classification: `pnl`, `size`, `pnl_recent` or `size_recent` | | `cohort` | string | The cohort | | `longNotional` | decimal string | The cohort's long notional on the coin | | `shortNotional` | decimal string | The cohort's short notional on the coin | | `netBias` | decimal string | [Net bias](#net-bias), `-1` to `1` | | `accountCount` | number | Accounts in the row | | `snapshotTime` | number | The snapshot's time, Unix milliseconds | | `recordedAt` | number | When the snapshot was stored, Unix milliseconds | The three transition types add fields to the row: | Type | Adds | | - | - | | `cohortBiasFlip` | `direction` (`long` or `short` — the side it flipped to) and `previous`, the cohort's full row from the snapshot before | | `cohortBiasOpposition` | `previous`, plus `other` and `previousOther` — the second cohort's current and previous rows | | `cohortBiasMove` | `previous` — the **baseline** row the move is measured from — and `changePoints`, the signed move in percentage points, as a decimal string | ## `cohortBias` A cohort's positioning on one coin, snapshot by snapshot. It delivers **once with the current state** when you create the subscription, then again on **each new snapshot** — normally every 15 minutes — even if no value changed. That first delivery is not part of the create response: it follows at the service's next check, about once a minute. Without `cohort`, `data` holds a row for every cohort of the classification that the snapshot has; with it, that cohort's row only. | | | | - | - | | `args` | `coin` (required); `cohort`: one cohort, otherwise all of them; `tierType`: `pnl` (default), `size`, `pnl_recent` or `size_recent` | | Filters | `netBias`, `longNotional`, `shortNotional`, `accountCount` | | Minimum plan | Starter | ```json Create theme={null} { "type": "cohortBias", "args": {"coin": "BTC"}, "url": "https://example.com/hook" } ``` The sample is cut to two of the eight rows: ```json Delivery theme={null} { "channel": "cohortBias", "seq": 1794301241118302, "subscriptionId": "…", "data": [ { "coin": "BTC", "tierType": "pnl", "cohort": "apex", "longNotional": "393346623.062562", "shortNotional": "940839593.891811", "netBias": "-0.4103572378967039", "accountCount": 157, "snapshotTime": 1794301200000, "recordedAt": 1794301202346 }, { "coin": "BTC", "tierType": "pnl", "cohort": "bleeders", "longNotional": "76120394.882641", "shortNotional": "58893110.447302", "netBias": "0.1275967496232273", "accountCount": 6410, "snapshotTime": 1794301200000, "recordedAt": 1794301202346 } ] } ``` ## `cohortBiasFlip` A cohort changing side: its net bias was long in one snapshot and is short in the next, or the reverse. `direction` is the side it flips **to** — `"short"` delivers long-to-short flips only. | | | | - | - | | `args` | `coin`, `cohort` (required); `direction`: `long`, `short` or `both` (default); `tierType` | | Filters | `netBias`, `longNotional`, `shortNotional`, `accountCount` — on the row after the flip | | Minimum plan | Starter | * A reading of exactly `0` is **neutral**, not a side: moving to it or from it is not a flip. * The comparison is between two consecutive snapshots your subscription saw. The one already stored when you subscribe only sets the starting state; the next new snapshot is the first that can be a flip. ```json Create theme={null} { "type": "cohortBiasFlip", "args": {"coin": "BTC", "cohort": "apex", "direction": "long"}, "url": "https://example.com/hook" } ``` ```json Delivery theme={null} { "channel": "cohortBiasFlip", "seq": 1794302139804417, "subscriptionId": "…", "data": [ { "coin": "BTC", "tierType": "pnl", "cohort": "apex", "longNotional": "702114338.905512", "shortNotional": "611902447.118306", "netBias": "0.06865353072100766", "accountCount": 159, "snapshotTime": 1794302100000, "recordedAt": 1794302102346, "previous": { "coin": "BTC", "tierType": "pnl", "cohort": "apex", "longNotional": "393346623.062562", "shortNotional": "940839593.891811", "netBias": "-0.4103572378967039", "accountCount": 157, "snapshotTime": 1794301200000, "recordedAt": 1794301202346 }, "direction": "long" } ] } ``` ## `cohortBiasOpposition` Two cohorts taking opposite sides of one coin: one is net long and the other net short. It fires on **entry** only — when the snapshot before did not have them opposed — and not again while the opposition persists. The two swapping sides while still opposed is not a new entry. | | | | - | - | | `args` | `coin`, `cohort`, `otherCohort` (required) — two different cohorts of the same classification; `tierType` | | Filters | none — extra predicates are refused | | Minimum plan | Starter | Both cohorts must be in the snapshot and in the one before it. The delivered event is the `cohort` row, with the second cohort under `other`: ```json Create theme={null} { "type": "cohortBiasOpposition", "args": {"coin": "BTC", "cohort": "apex", "otherCohort": "crowd"}, "url": "https://example.com/hook" } ``` ```json Delivery theme={null} { "channel": "cohortBiasOpposition", "seq": 1794302139804417, "subscriptionId": "…", "data": [ { "coin": "BTC", "tierType": "pnl", "cohort": "apex", "longNotional": "393346623.062562", "shortNotional": "940839593.891811", "netBias": "-0.4103572378967039", "accountCount": 157, "snapshotTime": 1794302100000, "recordedAt": 1794302102346, "previous": { "coin": "BTC", "tierType": "pnl", "cohort": "apex", "longNotional": "393346623.062562", "shortNotional": "940839593.891811", "netBias": "-0.4103572378967039", "accountCount": 157, "snapshotTime": 1794301200000, "recordedAt": 1794301202346 }, "other": { "coin": "BTC", "tierType": "pnl", "cohort": "crowd", "longNotional": "166902118.33781", "shortNotional": "139120934.118265", "netBias": "0.09078134472739624", "accountCount": 21630, "snapshotTime": 1794302100000, "recordedAt": 1794302102346 }, "previousOther": { "coin": "BTC", "tierType": "pnl", "cohort": "crowd", "longNotional": "143907522.33781", "shortNotional": "151120934.118265", "netBias": "-0.0244498848250218", "accountCount": 21544, "snapshotTime": 1794301200000, "recordedAt": 1794301202346 } } ] } ``` ## `cohortBiasMove` A cohort's net bias moving by at least `points` **percentage points** from a baseline. The baseline is the reading you were last notified about — or, before the first notification, the first reading the subscription saw. After it fires, the new value is the baseline. | | | | - | - | | `args` | `coin`, `cohort` (required); `points` (required): a positive decimal string, at most `200`; `tierType` | | Filters | `netBias`, `longNotional`, `shortNotional`, `accountCount` — on the current row | | Minimum plan | Starter | The rule is `abs(netBias - baseline netBias) * 100 >= points`. These are points of net bias, not a relative percent: with `points: "10"` and a baseline of `0.20`, readings of `0.24` and `0.28` do not fire — small moves accumulate against the same baseline — and `0.32` does, with `changePoints: "12"`. `0.32` is then the baseline. `changePoints` is signed: negative when the bias moved toward short. ```json Create theme={null} { "type": "cohortBiasMove", "args": {"coin": "BTC", "cohort": "apex", "points": "10"}, "url": "https://example.com/hook" } ``` `previous` is the baseline row, which can be several snapshots old: ```json Delivery theme={null} { "channel": "cohortBiasMove", "seq": 1794303940266031, "subscriptionId": "…", "data": [ { "coin": "BTC", "tierType": "pnl", "cohort": "apex", "longNotional": "463629710.3916446", "shortNotional": "870556506.5627283", "netBias": "-0.305", "accountCount": 157, "snapshotTime": 1794303900000, "recordedAt": 1794303902346, "previous": { "coin": "BTC", "tierType": "pnl", "cohort": "apex", "longNotional": "393346623.062562", "shortNotional": "940839593.891811", "netBias": "-0.4103572378967039", "accountCount": 157, "snapshotTime": 1794301200000, "recordedAt": 1794301202346 }, "changePoints": "10.53572378967039" } ] } ``` ## State and delivery * **The first observation seeds state.** The first snapshot a subscription sees — the one already stored when you create it, read at the service's next check — never produces a flip, an opposition or a move by itself: it is what the next one is compared with. `cohortBias` is the type that delivers on it. * **A missing cohort is unavailable, not zero.** When a cohort is absent from a snapshot and later returns, that reading starts a fresh baseline: nothing is reported against the reading before the gap. * **A snapshot is evaluated once per subscription.** One the subscription has already seen is not delivered again. * **`seq`** on these four types is the Unix time, in **microseconds**, at which the service first read that snapshot. It is not a block height and not the snapshot's own time — that is `snapshotTime` — and it is not comparable with the `seq` of any other type ([the delivered frame](/webhooks/events#the-delivered-frame)). * **Deliveries are durable**, as on `priceCross`: the subscription's state and the pending delivery — or the inbox message — commit together, and HTTP deliveries wait in the same outbox, at most **32 pending per subscription** ([Plan limits](/webhooks/limits#queues-and-the-outbox)). If a subscription's share is full, a new notification is rejected and logged, and its state does not advance. Delivery is at least once: deduplicate on `webhook-id`. * **Subscriptions are immutable.** Delete and recreate one to change it; that also clears its state, so the snapshot that is current when you recreate it seeds it again. # Subscription types Source: https://docs.coinversa.ai/webhooks/events The Coinversa Pulse webhook subscription types — the six event types tradesByUser, twapSliceFillsByUser, twapStatusesByUser, liquidations, liquidationsByUser and priceCross, and the four cohort bias types cohortBias, cohortBiasFlip, cohortBiasOpposition and cohortBiasMove — with their args (one wallet or an array of up to 1,000 per subscription), filters, minimum plan, the delivered frame shape and a delivery example for each event type; the cohort bias delivery examples are on the Cohort bias types page. Four liquidation risk types, liquidationRiskCross, liquidationRisk, liquidationExposure and liquidationMap, are summarised here, with their own Liquidation risk types page. Six event **types**, four cohort bias types and four liquidation risk types. Five of the event types deliver the frames of the WebSocket feed of the same name; `priceCross` synthesises its own. The four [cohort bias types](#cohort-bias-types) report a trader cohort's positioning from stored snapshots and have a page of their own. The four [liquidation risk types](#liquidation-risk-types) report potential liquidation exposure — one wallet's positions, or a whole market — from stored positions, and have a page of their own too. The machine-readable version of this page is `GET /v1/subscriptions/definitions`: it lists the types **your plan** may create, each with its `args`, `filters` and `minTier`, and the same declarations drive validation — so read the endpoint rather than keeping a client-side copy ([reference](/webhooks/api#definitions)). Delivery examples are illustrative: addresses, hashes and amounts are made up. ## The delivered frame Every delivery is one `POST` whose body is the **raw source frame** plus the subscription it matched: | Field | Type | Meaning | | - | - | - | | `channel` | string | The subscription type that produced the frame — `tradesByUser`, `liquidations`, `priceCross`, `cohortBiasFlip`, … | | `seq` | number | The source position. Block height on the trade and TWAP types, on `liquidations` and `liquidationsByUser`, and on `priceCross` with `source: "trade"`; the replica block's Unix **nanoseconds** on `priceCross` with `source: "mark"`; the Unix **microseconds** at which the snapshot or observation was read on the four cohort bias types and the four liquidation risk types. Never compare one kind with another | | `subscriptionId` | string | The subscription this delivery belongs to | | `data` | array | The raw matching events — **only** those that passed your filters. An empty match produces no delivery | On the six event types the objects inside `data` are exactly what the node emits, in the shape the WebSocket feed documents: `[wallet, fill]` pairs on the trade and TWAP-fill types ([the fill object](/websocket/feeds#the-fill-object)), liquidation objects on `liquidations` and `liquidationsByUser` ([liquidations](/websocket/feeds#liquidations)), TWAP status records on `twapStatusesByUser` ([TWAP statuses](/websocket/feeds#twap-statuses)), and crossing events on `priceCross` (below). Numbers keep the type and precision the node sent — sizes and prices are decimal strings. On the cohort bias types `data` holds [cohort rows](/webhooks/cohort-bias#the-cohort-row) from a stored snapshot. On the liquidation risk types it holds a wallet's positions or a market's exposure, built from stored positions ([delivered fields](/webhooks/liquidation-types#delivered-fields)). ## Filters A filter is a field name with either an **exact** value or, for numeric fields, a **bounds object**: ```json theme={null} {"coin": "BTC", "px": {"gte": "95000", "lt": "100000"}, "sz": "2.0"} ``` * All fields and all bounds combine with **AND**, per event. * Numeric values — exact ones too — are **decimal strings** compared with exact decimal arithmetic, never floating point. An optional minus sign and a decimal fraction are accepted; exponent notation, `NaN`, infinity and fractions like `1/2` are rejected. Maximum length 128 characters. * The numeric operators are `gt`, `gte`, `lt` and `lte`. There is no `eq` (use an exact value), no dollar sign, no expression tree and no arbitrary document path. * Exact text matching is **case-sensitive**: `BTC` differs from `btc`. * A missing, null, malformed or non-numeric value in the event does not satisfy a numeric filter. * Invalid fields, operators or values and **impossible ranges** return `400` before anything is saved. `{"gt": "10", "lt": "5"}` is impossible; equal endpoints are allowed only when both are inclusive (`{"gte": "10", "lte": "10"}`). * No `filters` (or `{}`) means no extra predicates. Units are the market's **base** size and **quote** price. `quote` means the market's quote denomination — not a promise of USD conversion — so there is no dollar-notional filter. The cohort bias types have numeric filters of their own — `netBias`, `longNotional`, `shortNotional` and `accountCount` — under the same rules ([cohort bias filters](/webhooks/cohort-bias#filters)). Of the liquidation risk types only `liquidationRisk` takes a filter, `liquidationDistancePct` ([liquidation risk filters](/webhooks/liquidation-types#filters)). ## One wallet or many On the four by-user types — `tradesByUser`, `twapSliceFillsByUser`, `twapStatusesByUser` and `liquidationsByUser` — `args.user` is **either one address string or an array of 1 to 1,000 addresses**. The definitions advertise this on the argument itself: `"user": {"type": "address", "required": true, "minItems": 1, "maxItems": 1000}`. ```json Create theme={null} { "type": "tradesByUser", "args": { "user": [ "0x0123456789012345678901234567890123456789", "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" ] }, "filters": {"coin": "BTC", "sz": {"gt": "1.5", "lte": "10"}}, "url": "https://example.com/hook" } ``` * One array is **one subscription** against your allowance, not one per wallet, and one underlying processor feed. It does not change the type's minimum plan. * Addresses are lowercased; an array is **sorted and deduplicated**. The 1,000 limit is checked before deduplication. * An **empty array**, an **invalid address** or **more than 1,000 entries** is a `400`. A creation body over **64 KiB** is refused. * In the response, a one-element array — including one left after deduplication — comes back as a **string**; the legacy top-level `user` field appears only for a single-wallet scope. * Matching events from every listed wallet in a source block arrive **together**, in source order, in one delivery's `data`; the same filters apply to each event. The frame shape and the type's `channel` do not change, and each `[wallet, fill]` pair names its wallet. * Non-wallet arguments (`coin`, `threshold`, `source`, `direction`) stay single-valued. * The two wallet [liquidation risk types](#liquidation-risk-types), `liquidationRiskCross` and `liquidationRisk`, are not among the four: their `user` is **exactly one** wallet, and the definitions advertise `maxItems: 1` on it. ## `tradesByUser` Every fill of one wallet — or of up to 1,000 wallets in one subscription — TWAP fills included: the same pairs the [`tradesByUser` feed](/websocket/feeds) streams, filtered. Any address on Hyperliquid, not only wallets you control. | | | | - | - | | `args` | `user` (required): one address, or an array of 1 to 1,000 addresses — lowercased, sorted and deduplicated ([one wallet or many](#one-wallet-or-many)) | | Filters | `coin`, `side` (`A` sell / `B` buy), `px`, `sz`, `closedPnl` | | Minimum plan | Free data — but Free has no subscription allowance, so Starter in practice | ```json Create theme={null} { "type": "tradesByUser", "args": {"user": "0x0123456789012345678901234567890123456789"}, "filters": {"coin": "BTC", "sz": {"gt": "1.5", "lte": "10"}}, "url": "https://example.com/hook" } ``` ```json Delivery theme={null} { "channel": "tradesByUser", "seq": 928110001, "subscriptionId": "…", "data": [ [ "0x0123456789012345678901234567890123456789", { "coin": "BTC", "px": "70000.5", "sz": "2.0", "side": "B", "time": 1788324615827, "startPosition": "0.0", "dir": "Open Long", "closedPnl": "0.0", "hash": "0xcdade62a4403e265cf2704437fc43c0201ec000fdf0701377176917d0307bc50", "oid": 533649007948, "crossed": true, "fee": "0.0245", "tid": 905724619509577, "feeToken": "USDC", "twapId": null } ] ] } ``` ## `twapSliceFillsByUser` The fills a wallet's TWAP orders executed — the same `[wallet, fill]` pairs, filtered to fills that carry a `twapId`. Group by `twapId` to follow one order. | | | | - | - | | `args` | `user` (required): one address or an array of 1 to 1,000 ([one wallet or many](#one-wallet-or-many)) | | Filters | `coin`, `side`, `px`, `sz`, `closedPnl` | | Minimum plan | Free data — Starter in practice | ```json Delivery theme={null} { "channel": "twapSliceFillsByUser", "seq": 928110001, "subscriptionId": "…", "data": [ [ "0x0123456789012345678901234567890123456789", { "coin": "BTC", "px": "70000.5", "sz": "0.01", "side": "B", "time": 1773878735890, "startPosition": "0.0", "dir": "Open Long", "closedPnl": "0.0", "hash": "0xabc1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd", "oid": 344895887371, "crossed": true, "fee": "0.0245", "tid": 111, "feeToken": "USDC", "twapId": 77738308 } ] ] } ``` ## `twapStatusesByUser` The node's **raw TWAP status records** for one wallet, or for up to 1,000 wallets in one subscription — activated, finished, terminated, an error — as the [`twapStatusesByUser` feed](/websocket/feeds#twap-statuses) forwards them. These are the node's records, not normalised lifecycle alerts. No snapshot is delivered: a webhook subscription gets status changes from the moment it is created. | | | | - | - | | `args` | `user` (required): one address or an array of 1 to 1,000 ([one wallet or many](#one-wallet-or-many)) | | Filters | `coin` (mapped from `state.coin`), `status`, `sz`, `executedSz`, `executedNtl`, `minutes` | | Minimum plan | Pro | `status` in the source is a union: a string (`activated`, `finished`, …) or an object `{"error": "reason"}`. For **filtering only**, the object form matches `"status": "error"`; the delivered record keeps its original error object and reason. Other status strings pass through unchanged, so the filter is not restricted to today's node vocabulary — the definitions describe this mapping. ```json Delivery theme={null} { "channel": "twapStatusesByUser", "seq": 1156436426, "subscriptionId": "…", "data": [ { "time": "2026-09-22T02:00:02.321152806", "twap_id": 2241180, "state": { "coin": "TAO", "user": "0x0123456789012345678901234567890123456789", "side": "B", "sz": "6.424", "executedSz": "0.0", "executedNtl": "0.0", "minutes": 58, "reduceOnly": true, "randomize": true, "timestamp": 1790042402321, "trigger": null, "stopPx": null }, "status": "activated" } ] } ``` ## `liquidations` Every liquidation on the exchange. `data` is an array of **liquidation objects** — not `[wallet, fill]` pairs — one per liquidated side of a trade, as the [`liquidations` feed](/websocket/feeds#liquidations) sends them. Use the filters to narrow it: a `sz` bound on a `coin`, for instance. | | | | - | - | | `args` | none | | Filters | `coin`, `side`, `px`, `sz`, `closedPnl` | | Minimum plan | Agent | ```json Create theme={null} { "type": "liquidations", "filters": {"coin": "BTC", "sz": {"gte": "5"}}, "url": "https://example.com/hook" } ``` ```json Delivery theme={null} { "channel": "liquidations", "seq": 928109999, "subscriptionId": "…", "data": [ { "time": 1773878735890, "liquidatedUser": "0x103c5e7a9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a", "liquidator": "0x7c66a1b2c3d4e5f60718293a4b5c6d7e8f901234", "coin": "BTC", "side": "A", "px": "68950.0", "sz": "6.2", "markPx": "68960.5", "method": "market", "hash": "0xabc1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd", "tid": 112, "penaltyFee": "1282.47", "closedPnl": "-41205.3" } ] } ``` ## `liquidationsByUser` Liquidations of one account, or of up to 1,000 accounts in one subscription. The subscription selects the **liquidated** account's side, not the liquidator's fills — a liquidator watching its own activity sees its side through `tradesByUser`. | | | | - | - | | `args` | `user` (required): the account — or an array of 1 to 1,000 accounts — whose liquidations you want ([one wallet or many](#one-wallet-or-many)) | | Filters | `coin`, `side`, `px`, `sz`, `closedPnl` | | Minimum plan | Agent | ```json Delivery theme={null} { "channel": "liquidationsByUser", "seq": 928109999, "subscriptionId": "…", "data": [ { "time": 1773878735890, "liquidatedUser": "0x0123456789012345678901234567890123456789", "liquidator": "0x7c66a1b2c3d4e5f60718293a4b5c6d7e8f901234", "coin": "ZRO", "side": "A", "px": "2.1027", "sz": "21.0", "markPx": "2.1023", "method": "market", "hash": "0xabc1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd", "tid": 111, "penaltyFee": "0.019075", "closedPnl": "-5.4747" } ] } ``` ## `priceCross` A market's price crossing a threshold. The condition lives in `args`; the type takes **no filters**. | | | | - | - | | `args` | `coin` (required); `threshold` (required, a positive decimal string); `source`: `mark` (default) or `trade`; `direction`: `above`, `below` or `both` (default) | | Filters | none — extra predicates are refused | | Minimum plan | Free data for both sources (the definitions export `sourceMinTiers` for `mark` and `trade`) — Starter in practice | ```json Create theme={null} { "type": "priceCross", "args": { "coin": "BTC", "source": "mark", "threshold": "100000", "direction": "above" }, "url": "https://example.com/hook" } ``` How a crossing is decided: * `above` fires when the previous price was at or below the threshold and the new price is above it; `below` is the inverse. Merely **touching** the threshold is not a crossing. * The **first valid observation** sets the baseline and does not notify. * Every observation within a source block is evaluated; several crossings inside one block are all kept in the delivery's `data` array. Trade observations deduplicate counterparties by market and trade id. * `mark` observations use the same replica-action price extraction as mark candles (native universe name resolution and builder marks included); `trade` observations come from execution fills. Neither uses candle closes or infers unseen intrablock movement. * Observations are **live-only**: a crossing that happened entirely during an outage cannot be reconstructed, and no initial snapshot is delivered. * Deleting the subscription removes its baseline and pending deliveries; recreating it starts a fresh baseline. The delivered frame is synthesised with `channel: "priceCross"`; each event in `data` is: ```json Delivery theme={null} { "channel": "priceCross", "seq": 1773878735123456789, "subscriptionId": "…", "data": [ { "coin": "BTC", "source": "mark", "threshold": "100000", "direction": "above", "previousPx": "99999", "px": "100001", "time": 1793923200000 } ] } ``` Unlike the trade and TWAP types, `liquidations` and `liquidationsByUser`, `priceCross` deliveries are **durable**: baseline and pending delivery commit atomically to an outbox with stable delivery ids and retry schedules that survive a restart of the service. That is at-least-once delivery, not exactly-once processing — deduplicate on `webhook-id`. The outbox holds at most **32 pending deliveries per subscription**, each at most 1 MiB; when a subscription's share is full, its observation is rejected and logged without advancing the baseline, so a saturated subscription can miss its own crossings; total disk use scales with the number of subscriptions. See [Plan limits](/webhooks/limits#queues-and-the-outbox). ## Cohort bias types Four types report how a **trader cohort** — `apex`, `crowd`, `heavyweights`, … ([Trader cohorts](/concepts/cohorts)) — is positioned on one coin: its `netBias`, from `-1` (all short) to `1` (all long). They read a **stored snapshot**, normally taken every 15 minutes, so they tell you about a change at the next snapshot — not when a trade happens. | Type | Fires | `args` | Filters | Minimum plan | | - | - | - | - | - | | `cohortBias` | Once with the current state when the subscription is created, then on each new snapshot, even if nothing changed | `coin` (required); `cohort`, `tierType` | `netBias`, `longNotional`, `shortNotional`, `accountCount` | Starter | | `cohortBiasFlip` | A cohort's net bias goes from long to short or from short to long | `coin`, `cohort` (required); `direction`, `tierType` | `netBias`, `longNotional`, `shortNotional`, `accountCount` | Starter | | `cohortBiasOpposition` | Two cohorts enter opposite positioning — on entry only, not while it persists | `coin`, `cohort`, `otherCohort` (required); `tierType` | none — the condition is in `args` | Starter | | `cohortBiasMove` | Net bias has moved at least `points` percentage points from the last notified baseline | `coin`, `cohort`, `points` (required); `tierType` | `netBias`, `longNotional`, `shortNotional`, `accountCount` | Starter | ```json Create theme={null} { "type": "cohortBiasFlip", "args": {"coin": "BTC", "cohort": "apex", "direction": "short"}, "url": "https://example.com/hook" } ``` The arguments and cohorts, how `netBias` is computed, the snapshot timing, the delivered row and a delivery example for each type are on [Cohort bias types](/webhooks/cohort-bias). ## Liquidation risk types Four types report **potential liquidation exposure** — positions that are still open, and how far the price is from their liquidation levels. Two watch one wallet's positions; two watch a whole market. They are not executed liquidations: those are [`liquidations`](#liquidations) and [`liquidationsByUser`](#liquidationsbyuser). The service checks about once a minute, using positions and liquidation levels as last stored. | Type | Fires | `args` | Filters | Minimum plan | | - | - | - | - | - | | `liquidationRiskCross` | A position's distance to its liquidation price crosses the threshold, for one wallet | `user` (exactly one wallet), `liquidationDistancePct` (required); `direction` | none — the condition is in `args` | Starter | | `liquidationRisk` | That distance has moved at least `points` percentage points from the last notified baseline, for one wallet | `user` (exactly one wallet), `points` (required) | `liquidationDistancePct` | Starter | | `liquidationExposure` | At least `minNotional` of a market's positions have liquidation levels within a `priceMovePct` move from the mark | `coin`, `priceMovePct`, `minNotional` (required); `direction`, `resetNotional` | none — the condition is in `args` | Starter | | `liquidationMap` | A market's mark has moved at least `priceChangePct` from the reference price; delivers the full liquidation map | `coin`, `priceChangePct` (required); `buckets`, `range` | none — the condition is in `args` | Starter | ```json Create theme={null} { "type": "liquidationRiskCross", "args": { "user": "0x0123456789012345678901234567890123456789", "liquidationDistancePct": "5", "direction": "below" }, "url": "https://example.com/hook" } ``` The arguments, how the distance is computed, the timing, the delivered fields and an illustrative delivery for each type are on [Liquidation risk types](/webhooks/liquidation-types). # Inbox delivery Source: https://docs.coinversa.ai/webhooks/inbox Coinversa Pulse webhook inbox — create a subscription with deliveryMode inbox and no URL, and the matching frames are stored for you to pull: GET /v1/inbox for the state, POST /v1/inbox/drain to read without deleting, POST /v1/inbox/ack by batch prefix or by inboxIds. One inbox per account, pending-message limits per plan (Starter 1,000, Agent 50,000, Pro and Enterprise 1,000,000), 2 GiB compressed, 14-day expiry, overflow evicts the oldest. An **inbox subscription** stores the frames it matches instead of POSTing them to a URL. You pull them later — from a script, a cron job or an [agent](/webhooks/agents) — with a **drain** that reads without deleting and an **ack** that deletes what you have processed. There is no receiver to host, no signature to verify and no `410` to worry about; what you give up is the push. Every account has **one implicit inbox**, shared by all its API keys and all its inbox subscriptions. Nothing creates it and nothing names it: the first inbox subscription starts filling it, and `GET /v1/inbox` reads it. Every request on this page goes to `https://webhook.coinversa.ai` with the same authentication as the rest of the [webhook API](/webhooks/api#authentication). ## Create an inbox subscription Same types, same `args`, same `filters` as an HTTP subscription — set `"deliveryMode": "inbox"` and send **no `url`**: ```bash theme={null} curl -X POST https://webhook.coinversa.ai/v1/subscriptions \ -H "Authorization: Bearer $COINVERSA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "tradesByUser", "args": {"user": "0x28f0d2a7c6b3e14f9a8b7c6d5e4f3a2b1c0d9bad"}, "filters": {"coin": "BTC"}, "deliveryMode": "inbox" }' ``` * `deliveryMode` is `http` by default — omitting it keeps the behaviour the rest of these pages describe, and then `url` is required. Create and list responses carry `deliveryMode` (`"http"` or `"inbox"`) on every subscription. * An inbox subscription takes **one of the same subscription slots** as an HTTP subscription ([Plan limits](/webhooks/limits#subscriptions-per-plan)). * It has **no signing secret**: the create response carries none, and `GET /v1/subscriptions/{id}/secret` answers `400` for it. * **Free** has no inbox: creating an inbox subscription on Free is `403`. Starter and above can. * Like every subscription it is immutable — delete and recreate to change it — and it is a creation-time tier check, not continuous re-authorisation. ## The message Each stored **message** is one delivery envelope as [the delivered frame](/webhooks/events#the-delivered-frame) describes it — `channel`, `seq`, `subscriptionId` and the filtered `data` array — with two fields added **at the same level**, not in a wrapper: ```json theme={null} { "inboxId": "msg_0123456789abcdef0123456789abcdef", "receivedAt": "2026-11-09T12:00:00Z", "channel": "tradesByUser", "subscriptionId": "sub_0123456789abcdef0123456789abcdef", "seq": 123456, "data": [ ["0x0123456789abcdef0123456789abcdef01234567", {"coin": "BTC", "px": "95000", "sz": "0.1"}] ] } ``` | Field | Meaning | | - | - | | `inboxId` | The stored message's id — `msg_` and 32 lowercase hex. Stable on every read; what you acknowledge by | | `receivedAt` | When the service **received** the frame, RFC 3339 — not the source event's time, which is inside `data` | | `channel`, `seq`, `subscriptionId`, `data` | Exactly what an HTTP delivery would have carried, filters already applied. `data` can hold several records or wallets | * Messages come back **oldest first by insertion**, not by `seq` and not by event time. `seq` values from different sources are not comparable ([sequence numbers](/websocket/protocol#sequence-numbers)). * Two subscriptions that match the same source record produce **two messages**, one per `subscriptionId`. * **Deleting a subscription stops collection but does not delete the messages it already stored.** They stay until you acknowledge them, they expire or overflow evicts them. * The sources are live-only: the inbox stores what the service saw while it was running. It is not a replay of frames missed during a service outage, and a `priceCross` crossing during an outage is not reconstructed. * The 1 MiB cap on one delivery applies to an inbox message too. Inbox messages bypass the HTTP workers, signing, retries and the outbox cap of `priceCross`, the cohort bias types and the liquidation risk types; for those types the state change and the inbox append commit together. ## State ```bash theme={null} curl https://webhook.coinversa.ai/v1/inbox \ -H "Authorization: Bearer $COINVERSA_API_KEY" ``` `GET /v1/inbox` → `{"state": {...}}`. Successful drain and ack responses carry the same snapshot under `state`: ```json theme={null} { "state": { "pendingMessages": 123, "pendingBytes": 12345, "maxMessages": 1000000, "maxStoredBytes": 2147483648, "overflowDroppedTotal": 45, "expiredTotal": 67 } } ``` | Field | Meaning | | - | - | | `pendingMessages` | Messages stored and not yet acknowledged | | `pendingBytes` | Their **compressed** payload bytes — not indexes, metadata or file size | | `maxMessages` | Your plan's pending-message limit ([below](#limits)) | | `maxStoredBytes` | The compressed-payload cap per account, 2 GiB | | `overflowDroppedTotal` | Messages evicted because a limit was hit — **cumulative**, never reset | | `expiredTotal` | Messages deleted at 14 days — **cumulative**, never reset | The two counters are account-wide and persistent, and reading does not reset them: keep your last snapshot and compare to see whether you lost anything since. Expiry and overflow are counted separately. ## Drain: read without deleting ```bash theme={null} curl -X POST "https://webhook.coinversa.ai/v1/inbox/drain?count=10&maxBytes=65536" \ -H "Authorization: Bearer $COINVERSA_API_KEY" ``` `POST /v1/inbox/drain` takes no body and two optional query parameters: | Parameter | Default | Range | Meaning | | - | -: | - | - | | `count` | 10 | 1 – 1,000 | At most this many messages, oldest first | | `maxBytes` | 65,536 | 1,024 – 4,194,304 | A budget for the **whole JSON response** — messages, receipt and state included | ```json theme={null} { "batchId": "opaque-account-bound-receipt", "messages": [], "hasMore": false, "state": {} } ``` The example elides the messages and the state. What the response means: * **Drain removes nothing.** It does not lease or lock either: a repeated or concurrent drain returns the same pending messages, and a failed response leaves everything pending. Only an [ack](#acknowledge) deletes. * `batchId` is an opaque **receipt** for this batch, bound to your account, which an ack can refer to. An empty inbox returns an empty `batchId`. * `hasMore` means more pending messages existed beyond this batch **at the time of the read** — not that the returned ones have been consumed. * Messages are never split, skipped or truncated to fit `maxBytes`. If the **oldest** pending message does not fit, the response is **`413`** with empty `messages`, an empty `batchId`, the `state`, and `requiredMaxBytes`: retry with at least that budget. * A malformed, unknown or duplicated query parameter is `400`. * Responses are `no-store`: nothing on the way caches a drain. ## Acknowledge `POST /v1/inbox/ack` deletes messages. The body is **one** of two shapes: ```json By batch prefix theme={null} {"batchId": "opaque-account-bound-receipt", "count": 5} ``` ```json By message id theme={null} {"inboxIds": ["msg_0123456789abcdef0123456789abcdef", "msg_abcdef0123456789abcdef0123456789"]} ``` ```bash theme={null} curl -X POST https://webhook.coinversa.ai/v1/inbox/ack \ -H "Authorization: Bearer $COINVERSA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"batchId": "'"$BATCH_ID"'", "count": 5}' ``` **By batch prefix.** `count` acknowledges an **absolute prefix of that batch** — the first `count` messages the drain returned — never a count against whatever is pending now. After draining ten, `count: 5` deletes the first five; sending it again deletes nothing more; a later `count: 10` on the same receipt deletes the remaining five, not ten newer messages. `count` must be between 1 and the number of messages in that batch. A receipt is bound to your account, survives a service restart and expires after **14 days**; an invalid, tampered, expired or other-account receipt is `400`. Never send a bare `count` without its `batchId`. **By message id.** `inboxIds` takes 1 to 1,000 ids. Only this account's listed messages are deleted; an id that is already acknowledged, expired, evicted, unknown or another account's has no effect and is not an error. Both forms are **idempotent**, and an old receipt cannot delete messages that replaced its batch after overflow or expiry. The response is: ```json theme={null} {"acknowledged": 5, "state": {...}} ``` `acknowledged` counts the rows **this request** removed, so a retried ack legitimately returns `0` — that is the idempotency working, not a lost ack ([troubleshooting](/webhooks/troubleshooting#acknowledged-0-on-an-ack)). ## Limits | Plan | Pending messages | | - | -: | | Free | 0 — creating an inbox subscription is `403` | | Starter | 1,000 | | Agent | 50,000 | | Pro | 1,000,000 | | Enterprise | 1,000,000 | * **2 GiB** of compressed payload per account, independent of the message count. `pendingBytes` and `maxStoredBytes` in the state are this cap. * Messages older than **14 days** are deleted — on service startup, every minute, and lazily when your inbox is read or written. They count in `expiredTotal`. * On **overflow** of either limit, the **oldest** pending messages are evicted until both hold again. They count in `overflowDroppedTotal`. * Your plan's limits are refreshed when you make an inbox request or create or re-enable an inbox subscription, and incoming messages are held to the most recently seen plan. A lower limit evicts the oldest messages at that refresh. An account that never makes another request is not re-checked. * Inbox subscriptions count against the same subscription allowance as HTTP ones ([Plan limits](/webhooks/limits)). ## For agents: drain, process, ack The inbox is what lets an agent use webhooks with no receiver. The loop is three steps, and the order matters: 1. **Drain** with a `count` and `maxBytes` sized for what you can show or process in one go. 2. **Process** the messages — read `data` as the WebSocket [fill objects](/websocket/feeds#the-fill-object), liquidation objects, TWAP status records, crossing events, [cohort rows](/webhooks/cohort-bias#the-cohort-row) or liquidation risk [positions and exposure](/webhooks/liquidation-types#delivered-fields) they are. 3. **Ack exactly what you processed**: the `inboxIds` you exposed, or the prefix `count` you exposed, against that drain's `batchId` — not the whole fetched batch if you dropped some of it on the way. Because a drain deletes nothing, a crash between steps 1 and 3 costs you nothing but a repeated read; because ack is idempotent, a retried step 3 is harmless. From chat, `inbox_subscribe` creates inbox subscriptions and `inbox_drain` runs steps 1 and 3 in one call — it acknowledges the messages it returns, so a drain from chat consumes them. See [Webhooks for agents](/webhooks/agents). ## Errors on the inbox routes | Status | Meaning | | - | - | | `400` | Bad drain parameters; an ack body that is not one of the two shapes or has a `count` outside the batch; an invalid, tampered, expired or other-account receipt; `GET /v1/subscriptions/{id}/secret` on an inbox subscription | | `401` | Missing or invalid credentials | | `403` | Inbox subscription creation on Free | | `413` | The oldest pending message does not fit `maxBytes`; `requiredMaxBytes` says what would | | `503` | Auth or storage unavailable | Errors are plain text in the body, as on the rest of the [webhook API](/webhooks/api#errors). # Webhook plan limits Source: https://docs.coinversa.ai/webhooks/limits Coinversa Pulse webhook limits by plan — tentative subscription allowances (Free 0, Starter 2, Agent 6, Pro 10, Enterprise 20), creation-time tier checks, the in-memory retry policy of nine attempts over about 76 hours, the separate 128 fresh and 128 retry delivery budgets with 16 per subscription across both, the 32-row durable outbox of priceCross, the cohort bias types and the liquidation risk types, the inbox's pending-message limits (Starter 1,000, Agent 50,000, Pro and Enterprise 1,000,000), 2 GiB and 14 days, and what a 410 does. Webhook limits are separate from REST request quotas and WebSocket capacity — receiving a delivery never draws down your API calls, and a webhook subscription is not a WebSocket subscription against your per-connection cap. ## Subscriptions per plan | | Free | Starter | Agent | Pro | Enterprise | | - | -: | -: | -: | -: | -: | | Subscriptions per account | 0 | 2 | 6 | 10 | 20 | > [!NOTE] > > These allowances are **tentative** and may change before or after launch. A tier missing from the table gets 0. * The allowance is per **account**, across every API key, and counts subscriptions of every type and both delivery modes together: an [inbox](/webhooks/inbox) subscription takes the same slot an HTTP one does. * It is checked at **creation time** — `POST /v1/subscriptions` answers `429` at the cap — and again on `POST /v1/subscriptions/{id}/enable`. Saved subscriptions are not re-authorised after an account change. * **Disabled** subscriptions do not count toward it, so re-enabling one can be refused with `429` when you are at the cap. * Free can read `GET /v1/subscriptions/definitions` and discover the Free-tier types but cannot create a subscription: feed access and subscription allowance are separate checks. ## Types per plan The type's `minTier` in the definitions is the plan it needs; a create below it is `403`. | Plan | Types it may create | | - | - | | Free | None — the allowance is zero, though `tradesByUser`, `twapSliceFillsByUser` and `priceCross` are Free-tier data. No inbox either: an inbox subscription is `403` | | Starter | `tradesByUser`, `twapSliceFillsByUser`, `priceCross` (both `mark` and `trade` sources), the four [cohort bias types](/webhooks/cohort-bias): `cohortBias`, `cohortBiasFlip`, `cohortBiasOpposition`, `cohortBiasMove`, and the four [liquidation risk types](/webhooks/liquidation-types): `liquidationRiskCross`, `liquidationRisk`, `liquidationExposure`, `liquidationMap` | | Agent | Starter's types plus `liquidations` and `liquidationsByUser` | | Pro | Agent's types plus `twapStatusesByUser` | | Enterprise | Everything in Pro, with a larger allowance | ## The inbox Inbox subscriptions store their matches in the account's one [inbox](/webhooks/inbox) instead of POSTing them. What is stored is bounded three ways: | | Free | Starter | Agent | Pro | Enterprise | | - | -: | -: | -: | -: | -: | | Pending messages | 0 | 1,000 | 50,000 | 1,000,000 | 1,000,000 | | Compressed payload | — | 2 GiB | 2 GiB | 2 GiB | 2 GiB | | Age of a message | — | 14 days | 14 days | 14 days | 14 days | * **Pending** means stored and not yet acknowledged. A message is removed by your ack, by expiry at **14 days**, or by eviction when either limit is hit — on overflow the **oldest** go first, until both the count and the **2 GiB** compressed-payload cap hold again. * `GET /v1/inbox` reports `pendingMessages`, `pendingBytes` and your `maxMessages` and `maxStoredBytes`, plus two **cumulative** loss counters, `overflowDroppedTotal` and `expiredTotal`, which never reset — compare snapshots to see what you lost ([state](/webhooks/inbox#state)). * Free's limit is zero, which is why creating an inbox subscription on Free is `403`. * A drain returns at most `count` (1–1,000) messages within `maxBytes` (1,024–4,194,304 bytes for the whole response); an ack takes at most 1,000 `inboxIds`. The 1 MiB size cap on one delivery applies to a stored message too. * Deleting a subscription does not delete the messages it stored. Your plan's inbox limits are refreshed on inbox requests and on creating or re-enabling an inbox subscription; a lower limit evicts the oldest messages at that refresh. ## Retries | | | | - | - | | Acknowledged by | Any `2xx` | | Retry policy | Bounded back-off, up to **nine attempts over about 76 hours**; your `Retry-After` is respected up to 24 hours | | Where retries live | **In memory** — lost when the service restarts, never replayed | | After the last attempt | The delivery is dropped | | Order | Not guaranteed across workers and retries; deduplicate on `webhook-id` | `priceCross`, the four cohort bias types and the four liquidation risk types are the exception: their deliveries sit in a durable outbox with stable delivery ids and retry schedules that survive a restart ([below](#queues-and-the-outbox)). ## Queues and the outbox Deliveries share one bounded in-memory queue and one pool of workers. The budgets below reduce back-off starvation; they do not guarantee tenant isolation or throughput for other subscriptions: | | | | - | - | | Fresh deliveries | A budget of **128** across all subscriptions | | Retries | A separate budget of **128** across all subscriptions | | Size of one delivery | At most **1 MiB** | | Per subscription | At most **16** deliveries across both budgets, delayed retries included | Fresh deliveries and ordinary retries have separate budgets of 128 each. A delayed retry does not hold a fresh-delivery slot; when the retry budget is full, further retries are **dropped and logged**. A subscription at its 16 drops its **own** fresh frames, with a log line. Queue capacity and workers are still shared: these bounds reduce back-off starvation, but do not guarantee tenant isolation or throughput for other subscriptions. `priceCross` deliveries use a **durable outbox** instead: at most **32 pending deliveries per subscription**, each at most 1 MiB. When a subscription's share is full, its new observation is rejected and logged without advancing the crossing baseline; observations are not retained for later replay, so a saturated subscription can miss its own crossings. Retry exhaustion still drops a delivery. Total disk use scales with the number of subscriptions. Deleting the subscription removes its baseline and pending rows. The four [cohort bias types](/webhooks/cohort-bias#state-and-delivery) and the four [liquidation risk types](/webhooks/liquidation-types#state-and-delivery) use the same outbox under the same cap of 32 pending deliveries per subscription: when a subscription's share is full, a new notification is rejected and logged and the subscription's state does not advance. ## 410 disables a subscription A `410` from your URL disables the subscription at once. It stops counting toward your allowance, deliveries stop, and frames matched meanwhile are not kept. `POST /v1/subscriptions/{id}/enable` brings it back, subject to the allowance. See [Signatures and delivery](/webhooks/signatures#410-disables-the-subscription). ## What is not limited, because it does not exist There is no monthly event budget and no delivery log: for HTTP delivery nothing is stored once a delivery is acknowledged or dropped, and the only retention anywhere is the inbox's 14 days. A subscription names one market, or one wallet or an array of up to **1,000** wallets ([one wallet or many](/webhooks/events#one-wallet-or-many); the two wallet liquidation risk types take exactly one) — that 1,000, and the 64 KiB creation body, are the only per-subscription size caps. The ceiling on how much you receive is your receiver's capacity and the queue above, or the inbox limits. Prices and the rest of each plan are on [Pricing](/pricing). # Liquidation risk types Source: https://docs.coinversa.ai/webhooks/liquidation-types The four Coinversa Pulse liquidation risk webhook types — liquidationRiskCross and liquidationRisk for one wallet's positions, liquidationExposure and liquidationMap for a whole market — which report potential liquidation exposure from stored positions and liquidation levels, checked about once a minute: their args (user, liquidationDistancePct, points, coin, priceMovePct, minNotional, resetNotional, priceChangePct, buckets, range, direction), the liquidationDistancePct filter, the delivered fields and an illustrative delivery for each. Starter and above, to a URL or the inbox. They are not executed liquidations — those are liquidations and liquidationsByUser. Four subscription types watch **potential liquidation exposure** — positions that are still open, and how far the price is from the level where they would be liquidated. Two watch **one wallet**: `liquidationRiskCross` delivers when a position's distance to its liquidation price crosses a threshold, and `liquidationRisk` when that distance has moved by a number of points. Two watch a **whole market**: `liquidationExposure` delivers when enough notional has liquidation levels within a price move from the mark, and `liquidationMap` delivers the market's full liquidation map once the mark has moved by a percentage. All four need **Starter** or above, and deliver the way every other [subscription type](/webhooks/events) does: a signed POST to your URL, or the [inbox](/webhooks/inbox). They describe exposure — they are not a recommendation to trade. Delivery examples are illustrative: the values are made up. ## Not executed liquidations [`liquidations`](/webhooks/events#liquidations) and [`liquidationsByUser`](/webhooks/events#liquidationsbyuser) deliver liquidations that **happened**. The four types on this page are about positions that have **not** been liquidated: | | `liquidations`, `liquidationsByUser` | The four liquidation risk types | | - | - | - | | What they report | Executed liquidations — one object per liquidated side of a trade | Potential exposure — open positions and their liquidation levels | | Built from | The fill stream, block by block | Stored positions and liquidation levels, checked about once a minute | | `seq` | Block height | Unix microseconds at which the observation was read | | Minimum plan | Agent | Starter | They are not predictions, and not a guarantee that a position will be liquidated. A liquidation level is the price stored for a position when its wallet was last refreshed; the position can be closed, reduced or given more margin before the price gets there. A distance is not a probability either. ## Timing The service checks **about once a minute**. Each check reads positions and liquidation levels **as last stored** — it does not follow every price tick. * A move that happens and reverses between two checks is not seen, and nothing is replayed after an outage. * The **wallet types** use the mark price and the liquidation price stored with each position when the wallet was last refreshed. The market can move before the next refresh, so a stored distance can lag it. `updatedAt` in a delivery is the time the position was stored. * The **market types** value every position at one **mark price tick** for the market, and need a tick **less than five minutes old**. Without one they send nothing — not a zero. `markTime` in a delivery is the tick's time; `positionsOldestUpdatedAt` and `positionsNewestUpdatedAt` say how old the positions behind the numbers are. * Liquidation levels are not recomputed between refreshes. A cross-margin position's level moves with the account's collateral, and that shows only after the wallet is refreshed. * A check that cannot read its data changes nothing: no delivery, and no change of state. ## The four types | Type | Watches | Fires | Required `args` | Optional `args` | Filters | | - | - | - | - | - | - | | [`liquidationRiskCross`](#liquidationriskcross) | One wallet | A position's distance to its liquidation price crosses the threshold | `user`, `liquidationDistancePct` | `direction` | none — the condition is in `args` | | [`liquidationRisk`](#liquidationrisk) | One wallet | A position's distance has moved at least `points` percentage points since the last time you were notified | `user`, `points` | — | `liquidationDistancePct` | | [`liquidationExposure`](#liquidationexposure) | One market | At least `minNotional` of positions have liquidation levels within a `priceMovePct` move from the mark | `coin`, `priceMovePct`, `minNotional` | `direction`, `resetNotional` | none — the condition is in `args` | | [`liquidationMap`](#liquidationmap) | One market | The mark has moved at least `priceChangePct` from the reference price; delivers the full map | `coin`, `priceChangePct` | `buckets`, `range` | none — the condition is in `args` | ## Arguments | Argument | Used by | Value | | - | - | - | | `user` | `liquidationRiskCross` and `liquidationRisk`, required | **Exactly one** wallet address — a string, or an array holding one address. It is lowercased. Every open position on record for the wallet is checked, each on its own; there is no `coin` argument | | `liquidationDistancePct` | `liquidationRiskCross`, required | The threshold: a positive decimal string, in percent — `"5"` is 5% | | `direction` | `liquidationRiskCross`, optional | `below` (closer to liquidation), `above` (farther away) or `both` (default) | | `points` | `liquidationRisk`, required | A positive decimal string — **percentage points** of distance. There is no upper limit | | `coin` | `liquidationExposure` and `liquidationMap`, required | The market. Matched **case-insensitively**, and it can be a qualified symbol such as `xyz:GOLD` | | `priceMovePct` | `liquidationExposure`, required | A decimal string above `0` and at most `100`, in percent — `"3"` is a 3% move from the mark | | `minNotional` | `liquidationExposure`, required | A positive decimal string, in quote units: the notional that must sit within the move | | `resetNotional` | `liquidationExposure`, optional | The level exposure must fall below before the type can fire again: positive, and at most `minNotional`. It defaults to `minNotional`, and the saved subscription shows it | | `direction` | `liquidationExposure`, optional | `down` (long positions, below the mark), `up` (short positions, above it) or `both` (default) | | `priceChangePct` | `liquidationMap`, required | A positive decimal string, in percent: how far the mark must move from the reference price | | `buckets` | `liquidationMap`, optional | An **integer string** from `"1"` to `"200"`; default `"50"` | | `range` | `liquidationMap`, optional | An integer string from `"1"` to `"100"`; default `"30"` — the map covers that percentage below and above the mark | * Every number is sent as a **string**, the two integers included: `"buckets": "50"`. * These are a `400`: more than one wallet in `user`; `priceMovePct` that is not above `0` or is above `100`; `resetNotional` above `minNotional`; `buckets` or `range` that is not a whole number in its range (`"1.5"`, `"0"`, `"201"`); and an argument the type does not declare, such as `coin` on a wallet type. * The definitions advertise the limits: `minItems: 1` and `maxItems: 1` on `user`, `max: 100` on `priceMovePct`, `min` and `max` on `buckets` and `range` ([definitions](/webhooks/api#definitions)). * `coin` is not checked against a list of markets when you create the subscription: a symbol with no recent mark price is accepted and delivers nothing. A wallet with no open positions on record is accepted too, and delivers nothing. ## Distance to liquidation The two wallet types measure one number per position, `liquidationDistancePct`: ```text theme={null} liquidationDistancePct = 100 * abs((markPx - liquidationPx) / markPx) ``` It is in **percent**: `"5"` means 5%, not 0.05. Long and short positions use the same absolute distance, and a smaller number is closer to liquidation. With a mark of `100`, a long with its liquidation price at `95` and a short with its liquidation price at `105` are both at `5`. * Thresholds, `points` and the filter are compared with exact decimal arithmetic on the stored prices. The `liquidationDistancePct` in a delivery is the same distance written with 18 decimal places. * A position without a positive mark price and a positive liquidation price has no distance. It does not fire and it is not treated as zero. * The distance is absolute, so by itself it does not say which side of the liquidation price the mark is on. ## Filters Only `liquidationRisk` takes a filter: | Filter | Unit | | - | - | | `liquidationDistancePct` | Percent | It takes an exact value or `gt` / `gte` / `lt` / `lte` bounds, as **decimal strings** — the rules on [Filters](/webhooks/events#filters). ```json theme={null} {"liquidationDistancePct": {"lt": "5"}} ``` * On `liquidationRisk`, a position that does not pass is not delivered and its baseline does not move. * `liquidationRiskCross`, `liquidationExposure` and `liquidationMap` take **no filters** — their condition is in `args`, and extra predicates are refused. ## Delivered fields The frame is the one every type uses — `channel`, `seq`, `subscriptionId`, `data` ([the delivered frame](/webhooks/events#the-delivered-frame)). Decimal values are strings; counts and times are numbers. ### Wallet types On `liquidationRiskCross` and `liquidationRisk`, `data` holds **one object**: the wallet and the positions that fired. Positions that did not fire are left out. | Field | Type | Meaning | | - | - | - | | `user` | string | The wallet, lowercase | | `positions` | array | The positions that fired, ordered by `coin` | Each position: | Field | Type | Meaning | | - | - | - | | `coin` | string | The market | | `side` | string | `long` or `short` | | `size` | decimal string | The position's size as stored. Read the direction from `side` | | `markPx` | decimal string | The mark price stored with the position | | `liquidationPx` | decimal string | The liquidation price stored with the position | | `liquidationDistancePct` | decimal string | The [distance](#distance-to-liquidation), with 18 decimal places | | `updatedAt` | number | When the position was last stored, Unix **microseconds** | | `initial` | boolean | `true` when there is no earlier reading to compare with — a position's first observation on `liquidationRiskCross`, its first notification on `liquidationRisk`; absent otherwise | | `direction` | string | `liquidationRiskCross` only. `below` or `above`: the side the distance is on for an initial notification, the direction it crossed afterwards | | `previous` | object | Absent on an initial notification. On `liquidationRiskCross`, the position as it was observed before the crossing; on `liquidationRisk`, the **baseline** position the move is measured from | | `changePoints` | decimal string | `liquidationRisk` only, absent on an initial notification. The signed move in percentage points — negative when the position moved closer to liquidation. Written with up to 128 decimal places, trailing zeros removed | ### `liquidationExposure` events One event per direction that fired, so with `direction: "both"` one delivery can hold two. | Field | Type | Meaning | | - | - | - | | `coin` | string | The market, in its canonical spelling | | `currentPrice` | decimal string | The mark price tick the check used | | `markTime` | number | That tick's time, Unix milliseconds | | `positionsOldestUpdatedAt` | number | The oldest stored time among the market's positions that have a liquidation level, Unix **microseconds**; `0` when there are none | | `positionsNewestUpdatedAt` | number | The newest of those times, Unix microseconds; `0` when there are none | | `targetPrice` | decimal string | `currentPrice` moved by `priceMovePct` in this direction | | `notionalAtRisk` | decimal string | Notional of the positions with a liquidation level between `currentPrice` and `targetPrice`, in quote units | | `positions` | number | How many positions that is | | `direction` | string | `down` or `up` | | `side` | string | `long` for `down`, `short` for `up` | | `priceMovePct` | decimal string | Your `priceMovePct` | | `minNotional` | decimal string | Your `minNotional` | | `resetNotional` | decimal string | Your `resetNotional`, or `minNotional` if you did not set one | | `initial` | boolean | `true` when the subscription's first observation fired; absent otherwise | | `timestamp` | number | When the service evaluated the check, Unix milliseconds | ### `liquidationMap` events One event: the whole map. | Field | Type | Meaning | | - | - | - | | `coin`, `currentPrice`, `markTime`, `positionsOldestUpdatedAt`, `positionsNewestUpdatedAt` | | As on `liquidationExposure` | | `range` | number | Your `range`: the map covers this percentage below and above `currentPrice` | | `buckets` | array | Every bucket, ordered by ascending price — empty ones included | | `totalLongAtRisk` | decimal string | Long notional across the map | | `totalShortAtRisk` | decimal string | Short notional across the map | | `previousPrice` | decimal string | The reference price the move is measured from: the mark of the last map sent, or the first observation's mark | | `changePct` | decimal string | The signed move from `previousPrice` to `currentPrice`, in percent. It is written with up to 128 decimal places, trailing zeros removed, so it can be long | | `timestamp` | number | When the service evaluated the check, Unix milliseconds | Each bucket uses the field names of the REST API's liquidation heatmap: | Field | Type | Meaning | | - | - | - | | `priceLow`, `priceHigh` | decimal string | The bucket's price bounds | | `longPositions`, `shortPositions` | number | Positions with a liquidation level in the bucket | | `longNotionalAtRisk`, `shortNotionalAtRisk` | decimal string | Their notional, by side | | `totalNotionalAtRisk` | decimal string | Both sides together | | `cumulativeLongNotional` | decimal string | Long notional summed from the bucket at the mark **downward** to this bucket | | `cumulativeShortNotional` | decimal string | Short notional summed from the bucket at the mark **upward** to this bucket | On both market types notional is `abs(size) * currentPrice` — the stored size valued at the check's mark, not a realised loss. Positions without a liquidation level are left out, and so are levels the mark has already reached or that are on the wrong side of it. ## `liquidationRiskCross` A position's distance to its liquidation price crossing a threshold. `direction` picks the crossing you want: `below` is the position getting **closer** to liquidation, `above` is it moving away. | | | | - | - | | `args` | `user` (required): exactly one wallet; `liquidationDistancePct` (required): a positive decimal string, in percent; `direction`: `below`, `above` or `both` (default) | | Filters | none — extra predicates are refused | | Minimum plan | Starter | * `below` fires when the previous distance was at or above the threshold and the new one is below it; `above` is the inverse. Merely **reaching** the threshold is not a crossing: with a threshold of `"5"`, a distance of exactly `5` fires nothing, and `4` does. * A position's **first valid observation** fires if the distance is already strictly on the side you asked for — with `initial: true` and no `previous`. With `both`, either side qualifies; exactly at the threshold does not. * Staying on the same side does not repeat, however often the position is refreshed. * Each position is followed on its own. One that closes, changes side or loses its prices starts over: its next valid observation is a first observation again. ```json Create theme={null} { "type": "liquidationRiskCross", "args": { "user": "0x0123456789012345678901234567890123456789", "liquidationDistancePct": "5", "direction": "below" }, "url": "https://example.com/hook" } ``` A crossing from 5.5% to 4%: ```json Delivery theme={null} { "channel": "liquidationRiskCross", "seq": 1794562260118302, "subscriptionId": "…", "data": [ { "user": "0x0123456789012345678901234567890123456789", "positions": [ { "coin": "BTC", "side": "long", "size": "1.5", "markPx": "66150", "liquidationPx": "63504", "liquidationDistancePct": "4.000000000000000000", "updatedAt": 1794562201537000, "previous": { "coin": "BTC", "side": "long", "size": "1.5", "markPx": "67200", "liquidationPx": "63504", "liquidationDistancePct": "5.500000000000000000", "updatedAt": 1794562140412000 }, "direction": "below" } ] } ] } ``` ## `liquidationRisk` A position's distance to its liquidation price moving by at least `points` **percentage points** from a baseline. The baseline is the reading you were last notified about. | | | | - | - | | `args` | `user` (required): exactly one wallet; `points` (required): a positive decimal string, no upper limit | | Filters | `liquidationDistancePct` — on the current position | | Minimum plan | Starter | * The **first observation** of a position that passes the filter fires, with `initial: true`, and becomes that position's baseline. Without a filter, that is the first valid observation. * After that the rule is `abs(distance - baseline distance) >= points`, and the position must still pass the filter. Small moves accumulate against the same baseline, in either direction: with `points: "2"`, readings of `4`, `3.5`, `3` and `2` fire at `4` (initial) and again at `2`, with `changePoints: "-2"`. * Only a notification moves the baseline. A reading the filter rejects does not, and neither does a notification about another position. * Each position has its own baseline. One that closes, changes side or loses its prices starts over. ```json Create theme={null} { "type": "liquidationRisk", "args": { "user": "0x0123456789012345678901234567890123456789", "points": "2" }, "filters": {"liquidationDistancePct": {"lt": "5"}}, "url": "https://example.com/hook" } ``` `previous` is the baseline, which can be many checks old: ```json Delivery theme={null} { "channel": "liquidationRisk", "seq": 1794563160284117, "subscriptionId": "…", "data": [ { "user": "0x0123456789012345678901234567890123456789", "positions": [ { "coin": "BTC", "side": "long", "size": "1.5", "markPx": "64800", "liquidationPx": "63504", "liquidationDistancePct": "2.000000000000000000", "updatedAt": 1794563104220000, "previous": { "coin": "BTC", "side": "long", "size": "1.5", "markPx": "66150", "liquidationPx": "63504", "liquidationDistancePct": "4.000000000000000000", "updatedAt": 1794562201537000 }, "changePoints": "-2" } ] } ] } ``` ## `liquidationExposure` How much notional on a market has liquidation levels within a price move from the mark. It fires when that amount reaches `minNotional`. | | | | - | - | | `args` | `coin`, `priceMovePct`, `minNotional` (required); `direction`: `down`, `up` or `both` (default); `resetNotional`: positive, at most `minNotional`, defaults to `minNotional` | | Filters | none — extra predicates are refused | | Minimum plan | Starter | * `down` sums **long** positions with `targetPrice <= liquidationPx < currentPrice`; `up` sums **short** positions with `currentPrice < liquidationPx <= targetPrice`. `targetPrice` is the mark moved by `priceMovePct`. * It is the total along the whole move, not the content of one map bucket. * It fires when exposure **becomes** at least `minNotional` — on the first observation if that one already qualifies — and not again at every check while it stays there. A price move or a change in positions can both cause it. * To fire again, exposure must first fall **strictly below** `resetNotional`; reaching it is not enough. Set `resetNotional` lower than `minNotional` to stop repeats when exposure hovers around the threshold. There is no cooldown. * With `both`, each direction keeps its own state, and both can fire in one delivery. ```json Create theme={null} { "type": "liquidationExposure", "args": { "coin": "BTC", "priceMovePct": "3", "minNotional": "6000000", "direction": "down" }, "url": "https://example.com/hook" } ``` This asks for at least 6 million of long notional with liquidation levels along a 3% fall from the mark. A first observation that already qualifies: ```json Delivery theme={null} { "channel": "liquidationExposure", "seq": 1794562260118302, "subscriptionId": "…", "data": [ { "coin": "BTC", "currentPrice": "66150", "markTime": 1794562258000, "positionsOldestUpdatedAt": 1794561011093000, "positionsNewestUpdatedAt": 1794562247350000, "targetPrice": "64165.5", "notionalAtRisk": "7412570.55", "positions": 41, "direction": "down", "side": "long", "priceMovePct": "3", "minNotional": "6000000", "resetNotional": "6000000", "initial": true, "timestamp": 1794562260431 } ] } ``` ## `liquidationMap` The market's full liquidation map — notional by price bucket, below and above the mark — sent when the mark has moved at least `priceChangePct` from a **reference price**. | | | | - | - | | `args` | `coin`, `priceChangePct` (required); `buckets`: an integer string `"1"` to `"200"`, default `"50"`; `range`: an integer string `"1"` to `"100"`, default `"30"` | | Filters | none — extra predicates are refused | | Minimum plan | Starter | * The **first observation only records the reference price**. No map is sent then. * A later check sends the map when `100 * abs(currentPrice - referencePrice) / referencePrice >= priceChangePct`. The reference then becomes that send's mark. * With `priceChangePct: "1"` and a first mark of `100`, marks of `100.4` and `100.8` send nothing and `101` sends a map. A later fall to `99.99` sends another: it is 1% below `101`. * The move is measured from the reference — not between two consecutive checks, not as a candle change and not over a rolling window. A change in positions without a price move sends nothing. * The map covers `range` percent below and above the mark, cut into `buckets` equal price bands. Every bucket is sent, empty ones included. ```json Create theme={null} { "type": "liquidationMap", "args": {"coin": "BTC", "priceChangePct": "3", "buckets": "4", "range": "10"}, "url": "https://example.com/hook" } ``` Four buckets keep the sample short; the default is 50: ```json Delivery theme={null} { "channel": "liquidationMap", "seq": 1794565860118302, "subscriptionId": "…", "data": [ { "coin": "BTC", "currentPrice": "66000", "markTime": 1794565858000, "positionsOldestUpdatedAt": 1794564611093000, "positionsNewestUpdatedAt": 1794565847350000, "range": 10, "buckets": [ { "priceLow": "59400", "priceHigh": "62700", "longPositions": 3, "shortPositions": 0, "longNotionalAtRisk": "3300000", "shortNotionalAtRisk": "0", "totalNotionalAtRisk": "3300000", "cumulativeLongNotional": "11220000", "cumulativeShortNotional": "0" }, { "priceLow": "62700", "priceHigh": "66000", "longPositions": 5, "shortPositions": 0, "longNotionalAtRisk": "7920000", "shortNotionalAtRisk": "0", "totalNotionalAtRisk": "7920000", "cumulativeLongNotional": "7920000", "cumulativeShortNotional": "0" }, { "priceLow": "66000", "priceHigh": "69300", "longPositions": 0, "shortPositions": 4, "longNotionalAtRisk": "0", "shortNotionalAtRisk": "5280000", "totalNotionalAtRisk": "5280000", "cumulativeLongNotional": "0", "cumulativeShortNotional": "5280000" }, { "priceLow": "69300", "priceHigh": "72600", "longPositions": 0, "shortPositions": 2, "longNotionalAtRisk": "0", "shortNotionalAtRisk": "1980000", "totalNotionalAtRisk": "1980000", "cumulativeLongNotional": "0", "cumulativeShortNotional": "7260000" } ], "totalLongAtRisk": "11220000", "totalShortAtRisk": "7260000", "previousPrice": "64000", "changePct": "3.125", "timestamp": 1794565860431 } ] } ``` ## State and delivery * **Each subscription keeps its own state** — per position on the wallet types, per direction on `liquidationExposure`, one reference price on `liquidationMap`. A check that shows nothing new changes nothing and repeats nothing. * **Unavailable is not zero.** A wallet type skips a position without usable prices; a market type sends nothing without a recent mark price tick. A wallet with no open positions on record delivers nothing — which is not proof that the wallet exists or that its data is fresh. * **`seq`** on these four types is the Unix time, in **microseconds**, at which the service first read that observation. It is not a block height, and it is not comparable with the `seq` of any other type ([the delivered frame](/webhooks/events#the-delivered-frame)). * **Deliveries are durable**, as on `priceCross`: the subscription's state and the pending delivery — or the inbox message — commit together, and HTTP deliveries wait in the same outbox, at most **32 pending per subscription** ([Plan limits](/webhooks/limits#queues-and-the-outbox)). If a subscription's share is full, a new notification is rejected and logged, and its state does not advance. Delivery is at least once: deduplicate on `webhook-id`. * **Subscriptions are immutable.** Delete and recreate one to change it; that also clears its state. A recreated wallet or `liquidationExposure` subscription can fire again on its first observation, and a recreated `liquidationMap` records a new reference price first. # Webhooks overview Source: https://docs.coinversa.ai/webhooks/overview Coinversa Pulse webhooks — subscribe to a Hyperliquid wallet's fills, TWAP fills or TWAP statuses, to exchange-wide or per-wallet liquidations, to a price crossing a level, or to a trader cohort's net long or short bias on a coin, and receive the frames as Standard Webhooks-signed HTTPS POSTs to your URL, or store them in your account's inbox to pull later. Six event types, four cohort bias types and four liquidation risk types, exact decimal filters, Bearer auth with your API key. **Webhooks** push the same data the [WebSocket](/websocket/overview) streams, to a URL you own, so you do not have to hold a socket open. You create a **subscription** — a **type** (which feed), its `args` (which wallet — or up to 1,000 wallets — or which market), optional `filters` (which frames you want) and the `url` to deliver to — and every matching frame is POSTed to that URL, signed with the subscription's own **signing secret**. A subscription with `"deliveryMode": "inbox"` and no URL stores its matches in your account's **[inbox](/webhooks/inbox)** instead, for you or an agent to pull. What arrives is the **raw source frame** — the same `channel`, `seq` and `data` the WebSocket sends — plus the `subscriptionId` it matched, with `data` cut down to the events that passed your filters. There is no envelope, no summary and no derived fields: a client that already reads the WebSocket feeds reads a webhook body unchanged. `priceCross`, the four cohort bias types and the four liquidation risk types are the exception: they build their own events, in the same frame ([below](#how-it-relates-to-the-websocket-feeds)). ## Who it is for * **Servers and bots** that would rather be called than poll or hold a connection — a Lambda, a Cloud Run service, a Zapier / Make / n8n catch hook. * **Alerting**: a wallet's fills above a size, a liquidation on a watched account, a price crossing a level, a trader cohort changing side on a coin. * **Agents** that subscribe from chat through the [MCP tools](/webhooks/agents) and read what the subscriptions matched from the inbox, with no server at all. ## The types Six event types: | Type | What it delivers | `args` | Filters | Minimum plan | | - | - | - | - | - | | `tradesByUser` | Every fill of one wallet, or of up to 1,000 wallets, TWAP fills included | `user` | `coin`, `side`, `px`, `sz`, `closedPnl` | Free data\* | | `twapSliceFillsByUser` | The fills a wallet's TWAP orders executed | `user` | `coin`, `side`, `px`, `sz`, `closedPnl` | Free data\* | | `twapStatusesByUser` | The node's raw TWAP status records for one wallet or up to 1,000 | `user` | `coin`, `status`, `sz`, `executedSz`, `executedNtl`, `minutes` | Pro | | `liquidations` | Every liquidation on the exchange | none | `coin`, `side`, `px`, `sz`, `closedPnl` | Agent | | `liquidationsByUser` | Liquidations of one account, or of up to 1,000 (the liquidated side) | `user` | `coin`, `side`, `px`, `sz`, `closedPnl` | Agent | | `priceCross` | A market's mark or trade price crossing a threshold | `coin`, `threshold`, `source`, `direction` | none — the condition is in `args` | Free data\* | \* Free-tier data, but Free's subscription allowance is **zero**, so creating one takes Starter or above. Feed access and the subscription allowance are separate checks — see [Plan limits](/webhooks/limits). On the four by-user types `user` is one address or an array of 1 to 1,000 addresses — one subscription, one allowance slot, for many wallets ([one wallet or many](/webhooks/events#one-wallet-or-many)). And four **cohort bias** types, which report how a [trader cohort](/concepts/cohorts) is positioned on one coin — its net bias, from `-1` (all short) to `1` (all long): | Type | What it delivers | `args` | Filters | Minimum plan | | - | - | - | - | - | | `cohortBias` | The cohort rows of each new snapshot, and the current state once when the subscription is created | `coin`, `cohort`, `tierType` | `netBias`, `longNotional`, `shortNotional`, `accountCount` | Starter | | `cohortBiasFlip` | A cohort's net bias going from long to short, or from short to long | `coin`, `cohort`, `direction`, `tierType` | `netBias`, `longNotional`, `shortNotional`, `accountCount` | Starter | | `cohortBiasOpposition` | Two cohorts entering opposite positioning | `coin`, `cohort`, `otherCohort`, `tierType` | none — the condition is in `args` | Starter | | `cohortBiasMove` | A cohort's net bias moving at least a number of percentage points | `coin`, `cohort`, `points`, `tierType` | `netBias`, `longNotional`, `shortNotional`, `accountCount` | Starter | Cohort positioning is a stored snapshot, normally taken every 15 minutes, so these four tell you about a change **at the next snapshot** — not when a trade happens. See [Cohort bias types](/webhooks/cohort-bias). And four **liquidation risk** types, which report potential liquidation exposure — two for one wallet's positions, two for a whole market. | Type | What it delivers | `args` | Filters | Minimum plan | | - | - | - | - | - | | `liquidationRiskCross` | A position of one wallet whose distance to its liquidation price crosses a threshold | `user`, `liquidationDistancePct`, `direction` | none — the condition is in `args` | Starter | | `liquidationRisk` | A position of one wallet whose distance to its liquidation price has moved at least a number of percentage points | `user`, `points` | `liquidationDistancePct` | Starter | | `liquidationExposure` | A market where at least a set notional has liquidation levels within a price move from the mark | `coin`, `priceMovePct`, `minNotional`, `direction`, `resetNotional` | none — the condition is in `args` | Starter | | `liquidationMap` | A market's full liquidation map, after the mark has moved by a percentage | `coin`, `priceChangePct`, `buckets`, `range` | none — the condition is in `args` | Starter | These are positions that are still open — not executed liquidations, which are `liquidations` and `liquidationsByUser` above. The service checks about once a minute, using positions and liquidation levels as last stored. On the two wallet types `user` is exactly one wallet. See [Liquidation risk types](/webhooks/liquidation-types). Every type, its arguments and filters are on [Subscription types](/webhooks/events), with a delivery example for each event type; the cohort bias delivery examples are on [Cohort bias types](/webhooks/cohort-bias) and the liquidation risk ones on [Liquidation risk types](/webhooks/liquidation-types). The machine-readable version is `GET /v1/subscriptions/definitions`, which lists the types **your** plan may create with their `args`, `filters` and `minTier` — read it instead of hard-coding this table ([reference](/webhooks/api#definitions)). ## How it relates to the WebSocket feeds Same data, pushed to a URL. A `tradesByUser` subscription delivers the frames a `tradesByUser` WebSocket subscription would stream, filtered; `liquidations` and `liquidationsByUser` deliver liquidation objects; `twapStatusesByUser` delivers the node's status records. `priceCross` has no WebSocket twin: it watches a market's mark or trade price and synthesises its own `channel: "priceCross"` frame when the price crosses your threshold. The four cohort bias types do not come from the fill stream at all: they are built from stored cohort positioning snapshots, and their `data` holds [cohort rows](/webhooks/cohort-bias#the-cohort-row) in the same `channel`, `seq`, `subscriptionId`, `data` frame. The four liquidation risk types are built the same way, from stored positions and liquidation levels ([delivered fields](/webhooks/liquidation-types#delivered-fields)). Two differences from the socket. A webhook body carries **`subscriptionId`**, which a WebSocket data frame does not, so one receiver can tell its subscriptions apart. And `data` holds **only the events that matched your filters** — a frame with no match is not delivered at all. Treat `seq` as a per-source position, as on the socket: trade prices use the block height, mark prices use the replica's Unix nanoseconds — never compare the two ([sequence numbers](/websocket/protocol#sequence-numbers)). The cohort bias and liquidation risk types use a third kind: the Unix microseconds at which the snapshot or observation was read. ## Delivery model Each delivery is one `POST` to the subscription's `url`, signed the **[Standard Webhooks](https://www.standardwebhooks.com)** way: `webhook-id`, `webhook-timestamp` and `webhook-signature` headers, `v1` HMAC-SHA256 over `id.timestamp.body`, verified by the off-the-shelf `standardwebhooks` library for your language ([Signatures and delivery](/webhooks/signatures)). * Any **2xx** acknowledges. Anything else is retried on a bounded back-off, respecting your `Retry-After` up to 24 hours, for up to **nine attempts over about 76 hours**. * Retries are kept **in memory**: a restart of the service drops them. Only `priceCross`, cohort bias and liquidation risk deliveries sit in a durable outbox that survives restarts. * Delivery is **at least once**, and order across deliveries and retries is not guaranteed. Deduplicate on `webhook-id`. * A **410** from your URL disables the subscription until you re-enable it with `POST /v1/subscriptions/{id}/enable`. * The URL must be public **HTTPS on port 443**; redirects and private or reserved addresses are refused when you create the subscription. Nothing is stored after an HTTP delivery is acknowledged or gives up: there is no delivery history, no replay and no test send. If you need to see what your receiver got, log it on your side. ## Or pull from the inbox If you have no server to receive a POST, create the subscription with `"deliveryMode": "inbox"` and **no `url`**. The frames it matches are stored in your account's one **inbox** — the same envelope, plus an `inboxId` and the time it was received — and you read them with `POST /v1/inbox/drain`, which deletes nothing, then `POST /v1/inbox/ack` for the ones you have processed. An inbox subscription takes the same slot as an HTTP one and has no signing secret; pending messages are capped per plan (Starter 1,000, Agent 50,000, Pro and Enterprise 1,000,000, Free none), kept for 14 days under a 2 GiB cap, with the oldest evicted on overflow. It is the delivery mode the [MCP tools](/webhooks/agents) use by default. See [Inbox delivery](/webhooks/inbox). ## Subscriptions are immutable A subscription's `type`, `args`, `filters`, `deliveryMode` and `url` cannot be edited. To change one, delete it and create it again — which also resets a `priceCross` subscription's crossing baseline and a cohort bias or liquidation risk subscription's state. Each HTTP subscription has one signing secret, returned once at creation and readable later with `GET /v1/subscriptions/{id}/secret`; an inbox subscription has none. Subscriptions belong to your **account**, not to the API key that created them: any of your keys can list, delete or re-enable them. Your plan caps how many you can have — see [Plan limits](/webhooks/limits). ## Where to manage it * The **developer portal** at [developers.coinversa.ai](https://developers.coinversa.ai). * The **REST API** at `https://webhook.coinversa.ai` with `Authorization: Bearer ` — see the [API reference](/webhooks/api). * The **MCP server** — tools to create, list and delete inbox subscriptions and to read the inbox from chat; see [Webhooks for agents](/webhooks/agents). > [card] [Quickstart](/webhooks/quickstart) > > Read the definitions, create a subscription, verify one delivery, delete it. > [card] [Subscription types](/webhooks/events) > > Every type with its arguments, filters and plan, and delivery examples for the six event types. # Webhooks quickstart Source: https://docs.coinversa.ai/webhooks/quickstart Set up a Coinversa Pulse webhook in four steps — read the subscription definitions, create a tradesByUser subscription with a coin and size filter over curl with Bearer auth, receive and verify one Standard Webhooks-signed delivery, and delete the subscription. Four steps: read the definitions, create a subscription, receive and verify one delivery, delete it. You need an API key from [developers.coinversa.ai](https://developers.coinversa.ai) on a **Starter** plan or above — Free can read the definitions but has no subscription allowance — and a public **HTTPS** URL on port 443 that can receive a POST. Every request below goes to `https://webhook.coinversa.ai` with your key as a Bearer token. > [!NOTE] > > This is the same API key as REST and the WebSocket. Here it travels in the `Authorization: Bearer` header, as on the WebSocket upgrade — not in `X-API-Key`, which is the REST data API's header. ## 1. Read the definitions ```bash theme={null} curl https://webhook.coinversa.ai/v1/subscriptions/definitions \ -H "Authorization: Bearer $COINVERSA_API_KEY" ``` The response lists the **types your plan may create**, each with its `args`, its `filters` — field, type, unit, whether it matches exactly, its options or its numeric operators — and its `minTier`. The `tradesByUser` entry looks like this — the other trade filters (`side`, `px`, `closedPnl`) are omitted here for brevity: ```json theme={null} { "type": "tradesByUser", "args": {"user": {"type": "address", "required": true, "minItems": 1, "maxItems": 1000}}, "filters": { "coin": {"type": "string", "label": "Market", "exact": true}, "sz": { "type": "decimal", "label": "Size", "unit": "base", "exact": true, "operators": ["gt", "gte", "lt", "lte"] } }, "minTier": "free" } ``` Build your request from this, not from a list you keep yourself: the same declarations drive validation, so a filter the definitions do not list is a `400`. `minItems` and `maxItems` on `user` say that it takes one address or an array of 1 to 1,000 — one subscription for many wallets. ## 2. Create a subscription This one delivers every BTC fill of one wallet with a size of at least 1 BTC: ```bash theme={null} curl -X POST https://webhook.coinversa.ai/v1/subscriptions \ -H "Authorization: Bearer $COINVERSA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "tradesByUser", "args": {"user": "0x28f0d2a7c6b3e14f9a8b7c6d5e4f3a2b1c0d9bad"}, "filters": {"coin": "BTC", "sz": {"gte": "1"}}, "url": "https://example.com/hooks/coinversa" }' ``` The response carries the subscription — its `id`, `type`, the normalised `args` (wallets are lowercased), the saved `filters`, the `url` and its `disabled` status — and, **only on creation**, the `whsec_…` signing secret: ```json theme={null} { "id": "…", "type": "tradesByUser", "args": {"user": "0x28f0d2a7c6b3e14f9a8b7c6d5e4f3a2b1c0d9bad"}, "filters": {"coin": "BTC", "sz": {"gte": "1"}}, "url": "https://example.com/hooks/coinversa", "disabled": false, "secret": "whsec_…" } ``` > [!WARNING] > > Store the secret in your receiver's secret store, not in source control. It is not in list responses; if you lose it, read it again with `GET /v1/subscriptions/{id}/secret`. A few things to know about the body: * Numeric filter values are **decimal strings** (`"1"`, `"95000.5"`), compared with exact decimal arithmetic. The operators are `gt`, `gte`, `lt` and `lte`; an exact value is a plain string. All fields combine with AND. * Text matching is case-sensitive: `BTC` is not `btc`. * Impossible ranges (`"gt": "10", "lt": "5"`), unknown fields and unknown operators are refused with `400` before anything is saved. * The URL must be public HTTPS on port 443. Redirects and private or reserved addresses are refused. No server to point at? Send `"deliveryMode": "inbox"` and no `url` instead, and pull the matches from your account's [inbox](/webhooks/inbox). * To watch **many wallets** with one subscription, make `args.user` an array of 1 to 1,000 addresses. They are lowercased, sorted and deduplicated; a one-element array comes back as a string. An empty array, an invalid address or more than 1,000 entries is a `400`, and the body may not exceed 64 KiB. One array is one subscription against your allowance ([one wallet or many](/webhooks/events#one-wallet-or-many)). * The subscription is **immutable**. To change it, delete it and create it again. * If your plan does not include the type you get `403`; if you are at your plan's subscription cap, `429` ([Plan limits](/webhooks/limits)). ## 3. Receive and verify a delivery The next matching frame is POSTed to your URL. The body is the raw `tradesByUser` frame — `channel`, `seq` and `data` as the [WebSocket feed](/websocket/feeds#the-fill-object) sends them — plus `subscriptionId`, with `data` cut down to the fills that passed your filters: ```json theme={null} { "channel": "tradesByUser", "seq": 928110001, "subscriptionId": "…", "data": [ [ "0x28f0d2a7c6b3e14f9a8b7c6d5e4f3a2b1c0d9bad", { "coin": "BTC", "px": "70000.5", "sz": "1.25", "side": "B", "time": 1788324615827, "startPosition": "0.0", "dir": "Open Long", "closedPnl": "0.0", "hash": "0xcdade62a4403e265cf2704437fc43c0201ec000fdf0701377176917d0307bc50", "oid": 533649007948, "crossed": true, "fee": "0.0245", "tid": 905724619509577, "feeToken": "USDC", "twapId": null } ] ] } ``` It is signed the [Standard Webhooks](https://www.standardwebhooks.com) way: `webhook-id`, `webhook-timestamp` and `webhook-signature: v1,`, an HMAC-SHA256 over `webhook-id + "." + webhook-timestamp + "." + rawBody` keyed with your secret. A `standardwebhooks` library checks all of it. Verify against the **raw** request body — parsing and re-serialising the JSON changes the bytes. ```javascript Node (Express) theme={null} import express from "express"; import { Webhook } from "standardwebhooks"; // npm install standardwebhooks const app = express(); const wh = new Webhook(process.env.COINVERSA_WEBHOOK_SECRET); // the whsec_… from step 2 app.post("/hooks/coinversa", express.raw({ type: "application/json" }), (req, res) => { let frame; try { frame = wh.verify(req.body.toString("utf8"), req.headers); // throws on a bad signature or stale timestamp } catch (err) { return res.status(400).send("bad signature"); } // Deduplicate on req.headers["webhook-id"], then hand frame.data off to a queue. res.sendStatus(200); }); ``` Any **2xx** acknowledges the delivery; anything else is retried. Return `410` only if you mean it — it disables the subscription until you re-enable it. Python and Go libraries and a known-answer test vector are on [Signatures and delivery](/webhooks/signatures). ## 4. Delete the subscription ```bash theme={null} curl -X DELETE https://webhook.coinversa.ai/v1/subscriptions/$SUB_ID \ -H "Authorization: Bearer $COINVERSA_API_KEY" ``` Deleting removes the subscription and, for `priceCross`, the cohort bias types and the liquidation risk types, the stored baseline or state and any pending deliveries in the outbox. `GET /v1/subscriptions` lists what you still have (without secrets); `DELETE /v1/subscriptions` removes them all. ## Before production 1. **Signature verified against the test vector.** Your verifier returns true for the [known-answer vector](/webhooks/signatures#known-answer-test-vector) with a fixed clock, and false when you change one byte of the body. 2. **Raw body.** The route reads the body as bytes before any JSON parser — `express.raw`, `request.body()`, `request.get_data()`, `io.ReadAll`. 3. **Clock in sync.** The libraries reject a `webhook-timestamp` more than five minutes from your clock. Run NTP. 4. **Deduplicate on `webhook-id`.** Delivery is at least once and retries reuse the id. 5. **Answer, then process.** Return `2xx` as soon as the frame is verified and queued; do the work afterwards. 6. **Return `410` only on purpose.** It disables the subscription; `POST /v1/subscriptions/{id}/enable` brings it back. 7. **Expect gaps after a restart.** Retries are in memory and are lost when the service restarts; nothing is replayed. If you need every fill, read the wallet's history from the [REST API](/quickstart) when you detect a gap. When something goes wrong, [Troubleshooting](/webhooks/troubleshooting) is ordered by symptom. ## What's next > [card] [Subscription types](/webhooks/events) > > Every type, its arguments, filters and plan, and a delivery example for each of the six event types. > [card] [Signatures and delivery](/webhooks/signatures) > > Standard Webhooks libraries and verifiers; retries, 410, transport rules. > [card] [API reference](/webhooks/api) > > Every route, body and error code. > [card] [Plan limits](/webhooks/limits) > > Subscriptions per plan, retries, queue slots. # Signatures and delivery Source: https://docs.coinversa.ai/webhooks/signatures How Coinversa Pulse signs and delivers webhooks — Standard Webhooks headers (webhook-id, webhook-timestamp, webhook-signature), v1 HMAC-SHA256 over id.timestamp.body, one signing secret per subscription readable over the API, a known-answer test vector, the standardwebhooks libraries for Node, Python and Go, acknowledgement, retries, 410 and the transport rules. Every delivery is a signed `POST` of one frame, signed the **[Standard Webhooks](https://www.standardwebhooks.com)** way — an open specification with verifiers for most languages, so an off-the-shelf `standardwebhooks` library verifies it in three lines. Verify the signature, deduplicate on `webhook-id`, answer `2xx`, and do the real work after you answer. ## The request ```http theme={null} POST /hooks/coinversa HTTP/1.1 Content-Type: application/json webhook-id: … webhook-timestamp: 1762179668 webhook-signature: v1,Hn1Yv8m2dQ4pX0k7Jf3sR9tW6bL5cE1aZ8uN2yG4oPs= ``` | Header | Meaning | | - | - | | `webhook-id` | The delivery's id, stable across retries of the same delivery. **Your idempotency key** | | `webhook-timestamp` | Unix seconds when this attempt was signed | | `webhook-signature` | `v1,` — the HMAC-SHA256 below | The body is the [delivered frame](/webhooks/events#the-delivered-frame): the raw source frame plus `subscriptionId`. Route on `subscriptionId` — the `channel` alone does not tell two subscriptions of the same type apart. ## What is signed ```text theme={null} signed_content = webhook-id + "." + webhook-timestamp + "." + raw_body signature = "v1," + base64( HMAC-SHA256( key, signed_content ) ) ``` * `key` comes from the subscription's signing secret, the `whsec_…` value returned when you created it. Hand that string, as you received it, to a Standard Webhooks library: the library handles the key, so you do not compute the HMAC yourself. * `raw_body` is the request body **exactly as received**. Read it as bytes before any JSON parser touches it — parsing and re-serialising changes the bytes and the signature will not match. A request is authentic when `webhook-signature` equals the signature you computed, compared in **constant time**, and `webhook-timestamp` is close to your clock — the libraries enforce a five-minute tolerance by default. Keep that check: it is what stops a captured delivery from being replayed at you later. ### Known-answer test vector Check your verifier against these exact Standard Webhooks inputs before you point it at live traffic. The timestamp is in 2023, so a verifier that enforces the tolerance against the real clock will reject it — pass a fixed "now" of `1700000000` in your test. | Input | Value | | - | - | | Secret | `whsec_MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=` | | `webhook-id` | `msg_p5jXN8AQM9LWL0o4reCVkeDbYk` | | `webhook-timestamp` | `1700000000` | | Body | `{"ok":true}` | | Signed content | `msg_p5jXN8AQM9LWL0o4reCVkeDbYk.1700000000.{"ok":true}` | | **`webhook-signature`** | **`v1,L3ItB2kRQK8HKNbwA+otrQh1dHwBG7Oe8kEGy3vmr8g=`** | ## Verify with a library The Standard Webhooks project publishes verifiers for most languages. Each takes the full `whsec_…` secret, the raw body and the request headers, checks the timestamp tolerance and the `v1` signature, and throws or returns an error on a mismatch. ```javascript Node theme={null} // npm install standardwebhooks import { Webhook } from "standardwebhooks"; const wh = new Webhook(process.env.COINVERSA_WEBHOOK_SECRET); // "whsec_…" export function verifyCoinversaWebhook(rawBody, headers) { // headers: an object with lowercase keys, e.g. Express req.headers // Returns the parsed frame, or throws WebhookVerificationError. return wh.verify(rawBody, { "webhook-id": headers["webhook-id"], "webhook-timestamp": headers["webhook-timestamp"], "webhook-signature": headers["webhook-signature"], }); } ``` ```python Python theme={null} # pip install standardwebhooks import os from typing import Optional from standardwebhooks.webhooks import Webhook, WebhookVerificationError wh = Webhook(os.environ["COINVERSA_WEBHOOK_SECRET"]) # "whsec_…" def verify_coinversa_webhook(raw_body: bytes, headers: dict) -> Optional[dict]: try: return wh.verify(raw_body, headers) # the parsed frame except WebhookVerificationError: return None ``` ```go Go theme={null} // go get github.com/standard-webhooks/standard-webhooks/libraries/go package webhooks import ( "net/http" standardwebhooks "github.com/standard-webhooks/standard-webhooks/libraries/go" ) func NewVerifier(secret string) (*standardwebhooks.Webhook, error) { return standardwebhooks.NewWebhook(secret) // "whsec_…" } // VerifyCoinversaWebhook returns nil when the request is authentic. func VerifyCoinversaWebhook(wh *standardwebhooks.Webhook, rawBody []byte, h http.Header) error { return wh.Verify(rawBody, h) } ``` Hand the library the raw bytes: `express.raw({ type: "application/json" })` on the webhook route in Express (as in the [quickstart](/webhooks/quickstart#3-receive-and-verify-a-delivery)), `await request.body()` in FastAPI/Starlette, `request.get_data()` in Flask, `io.ReadAll(r.Body)` in Go. Reject the request with a `4xx` when verification fails and never log the secret. ## One secret per subscription Each subscription has **its own** signing secret, generated when it is created and returned in the create response only. Read it again at any time with `GET /v1/subscriptions/{id}/secret` ([reference](/webhooks/api#read-the-signing-secret)); it is never in list responses. There is no rotation: a subscription's secret lives as long as the subscription does. To change it, delete the subscription and create it again — the new one gets a new secret. If one receiver serves several subscriptions, look up the secret by the body's `subscriptionId` — or, simpler, give each subscription its own URL path. An [inbox](/webhooks/inbox) subscription has **no** secret: nothing is POSTed, so nothing is signed, and `GET /v1/subscriptions/{id}/secret` answers `400` for it. You read its messages over the authenticated API instead of verifying them. ## Acknowledgement and retries A delivery **succeeds** on any **2xx**. Anything else — another status, a timeout, a refused connection — is a failure and is retried on a bounded back-off, up to **nine attempts over about 76 hours**. A `Retry-After` header on your response is respected, up to 24 hours. When the attempts run out the delivery is dropped. Two things follow from how retries are kept: * Ordinary deliveries and their retries live **in memory**. A restart of the service loses them, and nothing is replayed — see [no delivery after a restart](/webhooks/troubleshooting#nothing-arrived-and-the-service-restarted). Only `priceCross`, cohort bias and liquidation risk deliveries use a durable outbox that survives restarts. * The queue is **bounded**: 128 fresh deliveries plus 128 waiting retries across all subscriptions, each at most 1 MiB, and at most 16 slots for any one subscription across both pools. A retry waits in its own pool, so a failing receiver's back-off never holds a slot a fresh delivery could use; when a pool is full, further retries are dropped and logged, and a saturated subscription drops its own frames without taking another subscription's share. The numbers are on [Plan limits](/webhooks/limits#queues-and-the-outbox). Delivery is **at least once**, and order across workers and retries is **not guaranteed**: a retry can arrive after a newer frame. Deduplicate on `webhook-id` and order by `seq` within one source if order matters. ## 410 disables the subscription A **`410 Gone`** response disables the subscription at once: deliveries stop and it shows `disabled: true` in `GET /v1/subscriptions`. Frames matched while it is disabled are not kept. Re-enable it with `POST /v1/subscriptions/{id}/enable`, which is idempotent and answers `429` if the account is already at its subscription allowance — a disabled subscription does not count toward the allowance, so enabling one can put you over it. Return `410` only when you mean to stop the subscription. ## Transport rules * **Public HTTPS on port 443.** Nothing else is accepted when you create the subscription. * **No redirects.** A `3xx` is refused; register the final URL. * **No private or reserved addresses.** Loopback, private, link-local and similar ranges are refused at creation. * Answer first, then process: push the frame onto your own queue and return `200`. There is no replay, so a slow handler that times out costs you a retry at best and a dropped delivery at worst. # Webhook troubleshooting Source: https://docs.coinversa.ai/webhooks/troubleshooting Fix Coinversa Pulse webhook problems by symptom — 400 on an impossible filter range, 403 on a type above your plan or an inbox subscription on Free, 429 at the subscription cap, a subscription disabled by a 410 and the enable route, deliveries missing after a service restart, a URL refused for a private address, a redirect or a non-443 port, a liquidation risk subscription that delivers nothing, Standard Webhooks signature mismatches, 413 on an inbox drain, acknowledged 0 on an ack, and 400 on /secret for an inbox subscription. Start from what you see. There is no delivery log on our side — nothing is stored after an HTTP delivery — so the places to look are `GET /v1/subscriptions` ([reference](/webhooks/api#list-subscriptions)), `GET /v1/inbox` for inbox subscriptions ([reference](/webhooks/inbox#state)), the unauthenticated `GET /health` ([reference](/webhooks/api#health)) and your own receiver's logs. ## `400` when creating a subscription The body failed validation and nothing was saved. The usual causes: 1. **Impossible range.** `{"gt": "10", "lt": "5"}` can never match. Equal endpoints are allowed only when both are inclusive: `{"gte": "10", "lte": "10"}` is fine, `{"gt": "10", "lte": "10"}` is not. 2. **Unknown filter or operator.** Only the fields the type declares in `GET /v1/subscriptions/definitions` and only `gt`, `gte`, `lt`, `lte` are accepted — no `eq`, no `$gt`, no nested paths. `priceCross`, `cohortBiasOpposition`, `liquidationRiskCross`, `liquidationExposure` and `liquidationMap` take no filters at all. 3. **A number that is not a decimal string.** `1.5` must be `"1.5"`; exponent notation, `NaN`, infinity and `1/2` are rejected; the maximum length is 128 characters. 4. **Unknown type or argument.** Check the spelling against the definitions; `user` sent both at the top level and inside `args` is also a `400`. 5. **A missing required argument.** `user` on the four by-user types, `coin` and `threshold` on `priceCross` (a positive decimal string), `coin` on the four cohort bias types, plus `cohort` on `cohortBiasFlip`, `cohortBiasOpposition` and `cohortBiasMove`, `otherCohort` on `cohortBiasOpposition` and `points` on `cohortBiasMove`. On the liquidation risk types: `user` and `liquidationDistancePct` on `liquidationRiskCross`, `user` and `points` on `liquidationRisk`, `coin`, `priceMovePct` and `minNotional` on `liquidationExposure`, `coin` and `priceChangePct` on `liquidationMap`. 6. **A cohort bias argument out of range.** A `cohort` that does not belong to the chosen `tierType` (`heavyweights` with `pnl`), the same cohort twice on `cohortBiasOpposition`, or `points` that is not a decimal string above `0` and at most `200` ([arguments](/webhooks/cohort-bias#arguments)). 7. **A liquidation risk argument out of range.** `priceMovePct` that is not above `0` or is above `100`; `resetNotional` above `minNotional`; `buckets` that is not an integer string from `"1"` to `"200"`, or `range` that is not one from `"1"` to `"100"` — `"1.5"` and `"0"` are refused; a threshold that is not a positive decimal string ([arguments](/webhooks/liquidation-types#arguments)). 8. **A bad wallet array.** `args.user` may be one address or an array of 1 to 1,000; an empty array, an invalid address or more than 1,000 entries is refused, as is a creation body over 64 KiB. On `liquidationRiskCross` and `liquidationRisk` it is exactly one wallet: a second address is refused. ## `403` when creating a subscription The type is above your plan: `liquidations` and `liquidationsByUser` need **Agent**, `twapStatusesByUser` needs **Pro**. The definitions endpoint only lists what your plan may create, so a type you did not see there will be refused. See [Types per plan](/webhooks/limits#types-per-plan). The other cause is an **inbox subscription on Free**: `"deliveryMode": "inbox"` needs Starter or above, because Free's inbox holds zero messages ([the inbox](/webhooks/limits#the-inbox)). ## `429` when creating or enabling Your account is at its subscription allowance — tentatively 2 on Starter, 6 on Agent, 10 on Pro, 20 on Enterprise, and **0 on Free**. Delete a subscription you no longer need (`GET /v1/subscriptions` to find it), or move up a plan. A disabled subscription does not count toward the allowance, which is why `POST /v1/subscriptions/{id}/enable` can be refused with `429` too. See [Plan limits](/webhooks/limits). ## Deliveries stopped and the subscription shows `disabled: true` Your URL answered **`410 Gone`** to a delivery. That disables the subscription at once; frames matched while it is disabled are not kept. Fix whatever returned the `410`, then: ```bash theme={null} curl -X POST https://webhook.coinversa.ai/v1/subscriptions/$SUB_ID/enable \ -H "Authorization: Bearer $COINVERSA_API_KEY" ``` The call is idempotent. If it answers `429`, you are at your allowance with the disabled one re-counted — delete another subscription first. A framework that answers `410` for an unknown route, or a proxy that does during a deploy, is the usual cause; make the route answer `404` or `503` instead for anything but a deliberate stop. ## Nothing arrived, and the service restarted Ordinary deliveries and their retries are kept **in memory**. When the webhook service restarts — a deploy, a crash — whatever was queued or waiting to retry is lost, and nothing is replayed afterwards. Your subscription is still saved and starts delivering again on the next matching frame. If your receiver was down at the same time, the frames it missed are gone from the webhook side: read the wallet's fills from the [REST API](/quickstart) or the [WebSocket](/websocket/overview) to fill the gap. `priceCross` behaves differently: its deliveries sit in a durable outbox and survive a restart, though a crossing that happened entirely during an outage of the **source** cannot be reconstructed. The four cohort bias types use the same outbox; after an outage they compare the newest snapshot with the last one they saw, and the snapshots in between are not replayed. The four liquidation risk types use it too; what happened between two checks, or during an outage, is not replayed either. ## Nothing arrives, and the service did not restart 1. **Is the subscription there and enabled?** `GET /v1/subscriptions`. A `disabled: true` means a `410` — see above. 2. **Do the filters match?** Exact text is case-sensitive (`BTC`, not `btc`); `side` is `A` for sell and `B` for buy; sizes are in the market's base unit and prices in its quote, so a `sz` bound of `"100000"` on BTC never matches. A missing or null field never satisfies a numeric filter, so a `closedPnl` bound only matches fills that carry one. 3. **Is it the right wallet?** `liquidationsByUser` selects the **liquidated** account, not the liquidator's fills; `twapSliceFillsByUser` only carries fills with a `twapId`. 4. **Is it a cohort bias type?** These read a stored snapshot, normally taken every 15 minutes. The first delivery of a `cohortBias` subscription follows its creation at the service's next check, about once a minute; after it, nothing arrives before the next snapshot. `cohortBiasFlip`, `cohortBiasOpposition` and `cohortBiasMove` deliver only on a change between two snapshots: the snapshot already stored when you subscribe only sets the starting state, so the next new snapshot is the first that can fire; a cohort that stays on one side never fires a flip. `coin` is not checked against a list of markets, so a symbol with no snapshot rows is accepted and delivers nothing ([snapshot timing](/webhooks/cohort-bias#snapshot-timing)). 5. **Is it a liquidation risk type?** Those have their own list, [below](#a-liquidation-risk-subscription-delivers-nothing). 6. **Is your receiver acknowledging?** Only a `2xx` counts. A `200` after a long handler may already have timed out on our side and been retried; answer first, process after. 7. **Is the receiver's queue share full?** A subscription holds at most 16 slots across the fresh and retry pools; a failing receiver saturates its own share and its newest frames are dropped. Fix the receiver and the subscription resumes on its own. 8. **Is the service healthy?** `GET /health` answers `200` while the service is up, with service counts in the body ([reference](/webhooks/api#health)). ## A liquidation risk subscription delivers nothing You subscribed to `liquidationRiskCross`, `liquidationRisk`, `liquidationExposure` or `liquidationMap` and received nothing. Go through the checks [above](#nothing-arrives-and-the-service-did-not-restart) first, then these: 1. **Has a check run yet?** The service checks about once a minute, using positions and liquidation levels as last stored. It does not follow every price tick, and a move that happens and reverses between two checks is not seen. 2. **Is the condition met?** Nothing is sent while it is not: * `liquidationRiskCross` needs the distance to **cross** the threshold. Reaching it exactly is not a crossing, and a position that stays on one side fires at most once — on its first observation, if it is already on the side you asked for. * `liquidationRisk` fires on the first observation of a position that passes your `liquidationDistancePct` filter — without a filter, its first valid observation. After that it needs a move of at least `points` percentage points from the last notified reading, with the filter still passing. * `liquidationExposure` needs at least `minNotional` within the move. After it fires, exposure must fall strictly below `resetNotional` before it can fire again. * `liquidationMap` needs the mark to move at least `priceChangePct` from the reference price. 3. **Is it the first observation of a `liquidationMap` subscription?** That one only records the reference price — no map is sent. The first map follows a later check where the mark is at least `priceChangePct` away from it. 4. **Is there a recent mark price tick?** `liquidationExposure` and `liquidationMap` need a tick for the market that is less than five minutes old. Without one they send nothing — not a zero — and the check is skipped until one arrives. 5. **Is the wallet or the market on record?** `coin` is not checked against a list of markets, and a wallet is not checked for positions, when you create the subscription. A symbol with no recent mark price, or a wallet with no open positions on record, is accepted and delivers nothing. A position without a usable mark or liquidation price is skipped. 6. **Still nothing?** If the conditions above hold and nothing arrives, email [chat@coinversa.ai](mailto:chat@coinversa.ai) with the subscription id and what you expected. What each type fires on, and its timing, are on [Liquidation risk types](/webhooks/liquidation-types). ## The URL was refused The `url` must be **public HTTPS on port 443**, reached without a redirect. Refused at creation: | Cause | Fix | | - | - | | A private, loopback, link-local or otherwise reserved address — `localhost`, `127.0.0.1`, `10.x`, `192.168.x`, a host that resolves to one | Expose a public host. There is no `http://` dev-tunnel option; use a tunnel that terminates TLS publicly | | `http://` | Use `https://` | | A port other than 443 — `https://example.com:8443/hook` | Put the receiver behind a proxy on 443 | | A redirect — the URL answers `3xx` | Register the final URL | ## `400` reading a subscription's secret `GET /v1/subscriptions/{id}/secret` answers `400` for an **inbox** subscription, because it has no signing secret: nothing is POSTed, so nothing is signed. Check `deliveryMode` in `GET /v1/subscriptions` — `"inbox"` subscriptions are read with [`POST /v1/inbox/drain`](/webhooks/inbox#drain-read-without-deleting), not verified. If you need both a URL and the inbox for the same wallet, create two subscriptions; each takes a slot. ## `413` on an inbox drain The **oldest** pending message does not fit the `maxBytes` budget you gave `POST /v1/inbox/drain` — the budget covers the whole JSON response, receipt and state included, and messages are never split or skipped to fit. The `413` body carries the state and `requiredMaxBytes`; retry with at least that value (the parameter accepts up to 4,194,304). A message is at most 1 MiB, so a budget at the maximum always fits. Nothing was deleted or skipped by the failed call. See [Drain](/webhooks/inbox#drain-read-without-deleting). ## `acknowledged: 0` on an ack Usually nothing is wrong. `acknowledged` counts the rows **this** request removed, and acknowledgements are idempotent, so a retried `{"batchId", "count"}` or `{"inboxIds"}` that already succeeded returns `0` — the messages are gone, which is what you wanted. Three other ways to get `0`: 1. **The prefix was already acknowledged.** `count` is an absolute prefix of that batch: after `count: 5`, another `count: 5` on the same receipt is a no-op, and `count: 10` deletes only the next five. 2. **The messages expired or were evicted** before your ack: they are counted in `expiredTotal` or `overflowDroppedTotal` in the returned `state`, not in `acknowledged`. An old receipt cannot delete the messages that replaced them. 3. **The ids are not this account's**, or are unknown. Explicit `inboxIds` only ever delete your own messages; others are ignored, not errors. A `400` is different: the receipt is invalid, tampered, expired (14 days) or belongs to another account, or `count` is outside 1 to the batch size. Drain again for a fresh `batchId`. See [Acknowledge](/webhooks/inbox#acknowledge). ## The inbox is filling up, or messages disappeared Compare two `GET /v1/inbox` snapshots. A rising `expiredTotal` means messages sat unacknowledged for 14 days; a rising `overflowDroppedTotal` means you hit your plan's pending-message limit or the 2 GiB cap and the oldest were evicted. Both counters are cumulative and never reset. Drain and ack more often, ack what you have processed rather than leaving it, or move up a plan ([the inbox](/webhooks/limits#the-inbox)). Deleting a subscription does **not** clear its stored messages — acknowledge them if you no longer want them. ## Signature mismatch Check your verifier against the [known-answer test vector](/webhooks/signatures#known-answer-test-vector) first — it isolates your code from your framework. Then, in order of how often each is the cause: 1. **The body was re-serialised.** You verified `JSON.stringify(req.body)`, not the bytes received. Use `express.raw`, `await request.body()`, `request.get_data()` or `io.ReadAll(r.Body)` on the webhook route. 2. **Wrong signed content.** It is `webhook-id + "." + webhook-timestamp + "." + body` — the id first. 3. **Wrong secret.** Each subscription has its own; if one receiver serves several, look the secret up by the body's `subscriptionId`. `GET /v1/subscriptions/{id}/secret` returns the current one. 4. **A hand-rolled HMAC.** Verify with a `standardwebhooks` library for your language; it takes the `whsec_…` secret as you received it and handles the key. 5. **Hex instead of base64.** The signature is standard base64, after the `v1,` prefix. 6. **Clock skew.** The libraries reject a `webhook-timestamp` more than five minutes from your clock. Run NTP. ## Duplicate deliveries Expected: delivery is **at least once**, and order is not guaranteed across workers and retries. A retry follows any failure we observed, including a timeout after your handler already succeeded. Deduplicate on `webhook-id`, which is stable across the retries of one delivery, and order by `seq` within one source if order matters. If two different ids carry the same fill, check whether two of your subscriptions match it — each delivers on its own. ## Still stuck Email [chat@coinversa.ai](mailto:chat@coinversa.ai) with the subscription id, the `webhook-id` of a delivery if you have one, and what you expected. Never send your signing secret. # Feeds and the fill object Source: https://docs.coinversa.ai/websocket/feeds The twenty-four websocket feeds — the Hyperliquid fill firehose, one coin, one wallet, a list of up to 1,000 wallets, liquidations, leverage and margin changes, OHLC candles per coin or across every market, TWAP slice fills, TWAP order lifecycle, TWAP status with a live-set snapshot, the L4 order book, and the derived quote feeds — best bid/offer, aggregated depth and every native perp mid — which plans include each, and every field on a streamed fill. Twenty-four raw feeds today: four stream fills, three stream liquidations, three stream leverage and isolated-margin changes, two stream OHLC candles, three stream the fills a TWAP order executed, three stream the TWAP orders themselves, two stream the node's own TWAP state machine, one streams a coin's full order book, and three stream **derived quotes** off that book — [`bbo`, `l2Book` and `allMids`](#derived-order-book-quotes). Five are **multi-wallet** list feeds that follow up to 1,000 addresses on one subscription — [below](#multi-wallet-subscriptions). Six deliver **state on subscribe** before the live stream starts: `l4Book`, `bbo`, `allMids`, `l2Book`, `twapStatuses` and `twapStatusesByUser`. Each is a separate subscription, and you can hold as many as your plan's per-connection cap allows on one socket. Every frame carries a monotonic `seq` — see [sequence numbers](/websocket/protocol#sequence-numbers) for what the number means on each feed. | Feed | Argument | What arrives | Plans | | - | - | - | - | | `trades` | — | **The firehose** — every fill on every Hyperliquid dex, native perps, builder dexes and spot alike, in block order. | Starter and above | | `tradesByCoin` | `coin` | Fills for one market. Takes native tickers (`BTC`, `HYPE`) and builder-dex symbols (`xyz:GOLD`, `cash:TSLA`) alike — see [Markets & symbols](/concepts/markets). | Every plan | | `tradesByUser` | `user` | Fills for one address — **any** address on Hyperliquid, not only wallets you control. | Every plan | | `tradesByUsers` | `users` | Fills for **a list of up to 1,000 addresses** on one subscription — the same pairs `tradesByUser` carries, filtered to any wallet in the set. [Below](#multi-wallet-subscriptions). | Starter and above | | `liquidations` | — | **Every liquidation**, as it happens — the liquidated account, the coin, the penalty fee and the realized loss. [Below](#liquidations). | Agent and above | | `liquidationsByUser` | `user` | Liquidations of one account. The filter is the **liquidated** side only. | Agent and above | | `liquidationsByUsers` | `users` | Liquidations of any account in a list of up to 1,000. Filtered on the **liquidated** side, as the singular feed is. [Below](#multi-wallet-subscriptions). | Agent and above | | `leverageUpdates` | — | **Accepted leverage and isolated-margin changes** — who moved their leverage, on what market, to what. [Below](#leverage-and-margin). | Pro and above | | `leverageUpdatesByUser` | `user` | Leverage and margin changes for one account. | Pro and above | | `leverageUpdatesByUsers` | `users` | Leverage and margin changes for any account in a list of up to 1,000. [Below](#multi-wallet-subscriptions). | Pro and above | | `candle` | `coin`, `interval`, optional `source` | **Live OHLC candles** for one market on one of 14 intervals. Trade-based by default, like Hyperliquid's own `candle`; `source: "mark"` builds the same shape from mark prices instead. [Below](#candles). | Every plan | | `allCandles` | `interval`, optional `source` | The same candles for **every market at once** on one subscription. [Below](#candles). | Starter and above | | `twapSliceFills` | — | **Every fill a TWAP order executed**, network-wide — the node's own `[wallet, fill]` pairs, filtered to fills carrying a `twapId`. [Below](#twap-slice-fills). | Starter and above | | `twapSliceFillsByUser` | `user` | TWAP slice fills for one account. | Every plan | | `twapSliceFillsByUsers` | `users` | TWAP slice fills for any account in a list of up to 1,000. [Below](#multi-wallet-subscriptions). | Starter and above | | `twapOrders` | — | **TWAP placements, refusals and cancellations** — the order's terms, and the refusals that leave no other trace. [Below](#twap-orders). | Pro and above | | `twapOrdersByUser` | `user` | TWAP order lifecycle for one account. | Pro and above | | `twapOrdersByUsers` | `users` | TWAP order lifecycle for any account in a list of up to 1,000. [Below](#multi-wallet-subscriptions). | Pro and above | | `twapStatuses` | — | **The node's own TWAP state machine** — activated, finished, terminated, stopped, waiting on a trigger, or refused — network-wide, opening with a **snapshot of the TWAPs live right now**. [Below](#twap-statuses). | Pro and above | | `twapStatusesByUser` | `user` | TWAP status events for one account, with a snapshot of that account's live TWAPs. There is **no `twapStatusesByUsers`** — [below](#multi-wallet-subscriptions). | Pro and above | | `l4Book` | `coin` | **The full L4 order book** of one market — every resting order with its wallet, plus untriggered stop and take-profit orders — as one snapshot followed by a diff message per block. Its own page: [Order book (L4)](/websocket/order-book). | Pro and above | ```json theme={null} {"method":"subscribe","subscription":{"type":"trades"}} {"method":"subscribe","subscription":{"type":"tradesByCoin","coin":"xyz:GOLD"}} {"method":"subscribe","subscription":{"type":"tradesByUser","user":"0xf3f4…8a2c"}} {"method":"subscribe","subscription":{"type":"tradesByUsers","users":["0x9bad…1f07","0x28f0…4c19"]}} {"method":"subscribe","subscription":{"type":"liquidations"}} {"method":"subscribe","subscription":{"type":"liquidationsByUser","user":"0xf3f4…8a2c"}} {"method":"subscribe","subscription":{"type":"twapSliceFillsByUsers","users":["0x9bad…1f07","0x28f0…4c19"]}} {"method":"subscribe","subscription":{"type":"allCandles","interval":"1m"}} {"method":"subscribe","subscription":{"type":"twapSliceFills"}} {"method":"subscribe","subscription":{"type":"twapOrders"}} {"method":"subscribe","subscription":{"type":"twapStatuses"}} {"method":"subscribe","subscription":{"type":"twapStatusesByUser","user":"0xf3f4…8a2c"}} {"method":"subscribe","subscription":{"type":"leverageUpdates"}} {"method":"subscribe","subscription":{"type":"leverageUpdatesByUser","user":"0xf3f4…8a2c"}} {"method":"subscribe","subscription":{"type":"candle","coin":"BTC","interval":"1m","source":"trade"}} {"method":"subscribe","subscription":{"type":"l4Book","coin":"BTC"}} ``` The `type` is **case-sensitive** — `tradesByCoin` works, `TRADESBYCOIN` answers `unknown subscription type`. Argument **values** are case-insensitive almost everywhere — including `candle`'s `coin`, which folds like any other market name. Two kinds of argument are the exception, and both are hashed exactly as sent: * **The `coin` on `l4Book`, `bbo` and `l2Book`** must be the node's own spelling of the market — `BTC`, `xyz:GOLD`, `#28200` — because `btc` names no market there. All three key into the same book export, so the rule is the same for each; see [subscribing to the book](/websocket/order-book#subscribing) and [derived quotes](#derived-order-book-quotes). * **`candle`'s and `allCandles`' `interval`** bites hardest: `1m` is **one minute** and `1M` is **30 days**. Both are valid, so upper-casing it does not produce an error — it produces a working subscription delivering candles 43,200× wider than you asked for. `2m` is not an interval at all and answers `invalid argument interval`. A candle's `coin` is *not* in that list. It folds — `btc` and `BTC` are one subscription and one feed group — and the frame answers both with `"s":"BTC"`, so `s` is always a market name that exists. Send only the arguments a type declares: an unrecognised extra field is **refused**, not ignored and not folded into the subscription id, so `{"type":"trades","note":"x"}` answers `{"channel":"error","data":"unknown argument note"}` and subscribes nothing — no stream starts and no slot is spent. `sequence` and `snapshot` are the exception: they are recognised control data and steer the subscribe without changing its id, and `candle`'s optional `source` is a declared argument that is filled in with its default **before** the id is hashed, so omitting it changes nothing — see [reconnecting](/websocket/protocol#reconnecting). Re-subscribing to something you already hold is idempotent for an **identical** subscription object — the same `id` comes back, no second stream starts, and nothing is charged against your cap. > [!NOTE] > > `tradesByUser`, `liquidationsByUser`, `leverageUpdatesByUser`, `twapSliceFillsByUser`, `twapOrdersByUser` and `twapStatusesByUser` accept any address, and so do the five `…ByUsers` list variants. So does Hyperliquid's own websocket — it has no authentication at all — but it allows **at most ten unique users across every user-specific subscription per IP**, and that ceiling is the thing these feeds exist to lift: here one subscription follows [up to 1,000 wallets](#multi-wallet-subscriptions). `trades`, `tradesByUsers`, `allCandles`, `twapSliceFills`, `twapSliceFillsByUsers` and `l2Book` answer `feed not in tier` below Starter, the three liquidation feeds answer it below Agent, and the leverage, TWAP-order, TWAP-status and `l4Book` feeds — list variants included — answer it below Pro. Check `connected.data.limits.feeds` for what your key may subscribe to. ## Data frames This is the frame shape on the seven fill feeds — `trades`, `tradesByCoin`, `tradesByUser`, `tradesByUsers`, `twapSliceFills`, `twapSliceFillsByUser` and `twapSliceFillsByUsers`. The liquidation, leverage, TWAP-order and TWAP-status feeds carry the same envelope with their own object in `data` — [below](#liquidations). `l4Book` frames carry `data` as an **object** — a snapshot or a block of diffs — and are described on [their own page](/websocket/order-book#the-snapshot). A `twapStatuses` **snapshot** frame also carries `data` as an object and adds `"snapshot": true` — [below](#the-snapshot-on-subscribe); its live frames are ordinary arrays. `candle` frames also carry `data` as a single **object**, not an array: a client that reaches straight for `data.forEach` or `data[0]` breaks on them — [below](#candles). `channel` is the subscription type that produced the frame. `data` is an array of `[wallet, fill]` pairs — one entry per fill, with the address that made it in the first position. A single frame can carry many fills; both sides of a trade are separate fills, so most frames carry at least two pairs. The only top-level keys are `channel`, `seq` and `data` — **there is no subscription id on a data frame**, which matters as soon as you hold two subscriptions on one channel; see [sequence numbers](/websocket/protocol#sequence-numbers). ```json theme={null} { "channel": "tradesByCoin", "seq": 1146772196, "data": [ [ "0x9f3781a54303ce694e47f7b6b694c87b87983216", { "coin": "BTC", "px": "77571.0", "sz": "0.00013", "side": "B", "time": 1788324615827, "startPosition": "-0.68901", "dir": "Close Short", "closedPnl": "0.093951", "hash": "0xcdade62a4403e265cf2704437fc43c0201ec000fdf0701377176917d0307bc50", "oid": 533649007948, "crossed": true, "fee": "0.004537", "tid": 905724619509577, "feeToken": "USDC", "twapId": null } ] ] } ``` ## The fill object The fill is passed through as Hyperliquid's node produced it — nothing is added or renamed, and `closedPnl` and `startPosition` **come from the node**, not from our own accounting. Fields marked always appear on every fill; the rest appear only when the order carried them (a census of 2,066 live fills). | Field | Type | Present | Meaning | | - | - | - | - | | `coin` | string | always | Market symbol. Native ticker (`BTC`), builder-dex symbol (`xyz:AAPL`), spot index (`@256`), or numeric market id (`#13460`). | | `px` | string | always | Fill price, as a decimal string. | | `sz` | string | always | Fill size in base units, as a decimal string. | | `side` | string | always | `B` for buy, `A` for sell. | | `time` | number | always | Fill timestamp, milliseconds since the Unix epoch. | | `startPosition` | string | always | Signed position size in this coin immediately before the fill. | | `dir` | string | always | Direction in words — `Open Long`, `Close Short`, `Buy`, `Sell`, and so on. | | `closedPnl` | string | always | Realized PnL from the closing portion of this fill. `0.0` when the fill opened rather than closed. | | `hash` | string | always | L1 transaction hash. Some fills — TWAP children among them — carry the zero hash. | | `oid` | number | always | Order id the fill belongs to. | | `crossed` | boolean | always | True when this side crossed the spread and took liquidity. | | `fee` | string | always | Fee paid on the fill. Negative values are maker rebates. | | `feeToken` | string | always | Token the fee was denominated in (`USDC`, `USDH`, and others on builder dexes). | | `tid` | number | always | Unique id for this fill. | | `twapId` | number or null | always | Parent TWAP order id, or `null` when the fill was not part of a TWAP. | | `cloid` | string | sometimes | Client order id, when the order carried one. | | `builder` | string | sometimes | Builder address credited with builder fees, when the order was routed through a [builder code](/concepts/builder-attribution). | | `builderFee` | string | sometimes | Builder fee taken out of this fill, as a decimal string. Travels with `builder` — the fee is on top of `fee`, not inside it. | | `deployerFee` | string | sometimes | Fee paid to the deployer of a builder-dex market. Only on builder-dex fills. | | `priorityGas` | string | sometimes | Priority gas paid to jump the queue on this order. Absent when none was paid. | ## Liquidations `liquidations`, `liquidationsByUser` and `liquidationsByUsers` are filtered out of the same fill stream, so they sequence on the source block height exactly as the trade feeds do. `data` is an array of **liquidation objects** — not `[wallet, fill]` pairs — one per liquidated side of a trade. ```json theme={null} { "channel": "liquidations", "seq": 928109999, "data": [ { "time": 1773878735890, "liquidatedUser": "0x103c…", "liquidator": "0x7c66…", "coin": "ZRO", "side": "A", "px": "2.1027", "sz": "21.0", "markPx": "2.1023", "method": "market", "hash": "0xabc…", "tid": 111, "penaltyFee": "0.019075", "closedPnl": "-5.4747" } ] } ``` | Field | Type | Present | Meaning | | - | - | - | - | | `time` | number | always | Liquidation timestamp, milliseconds since the Unix epoch. | | `liquidatedUser` | string | always | The account that was liquidated. This is what `liquidationsByUser` filters on. | | `liquidator` | string | sometimes | The counterparty that took the other side. Matched from the paired fill in the same block; **absent when no counterparty fill matched**. | | `coin` | string | always | Market the position was in. | | `side` | string | always | `B` or `A` — the side of the *liquidating* fill, not of the position that was closed. | | `px` | string | always | Price the liquidation filled at. | | `sz` | string | always | Size closed, in base units. | | `markPx` | string | sometimes | Mark price at the moment of liquidation. | | `method` | string | always | How it was closed — `market` and `backstop` are the ones you will see. | | `hash` | string | always | L1 transaction hash. | | `tid` | number | sometimes | Unique id of the underlying fill. | | `penaltyFee` | string | sometimes | The liquidation penalty, taken from the liquidated account. | | `closedPnl` | string | sometimes | Realized PnL on the closed portion — negative on a liquidation. | Numeric values keep the JSON type and precision the node sent. The filter on `liquidationsByUser` and `liquidationsByUsers` is **the liquidated account only** — a liquidator watching its own activity sees its side of the trade through `tradesByUser`. ## Leverage and margin `leverageUpdates`, `leverageUpdatesByUser` and `leverageUpdatesByUsers` carry **accepted** leverage and isolated-margin state changes, read from the node's replica-command stream rather than from fills. Three action types share the feed; `update_type` selects the variant. > [!WARNING] > > This feed does **not** sequence on block height. Its `seq` is the replica block's Unix timestamp in **nanoseconds**, because the replica stream does not expose its height outside the JSON payload. The number still only increases, and it is still your reconnect cursor — but never compare a `leverageUpdates` `seq` against one from a fill or book feed. See [sequence numbers](/websocket/protocol#sequence-numbers). ```json theme={null} { "channel": "leverageUpdates", "seq": 1773878735123456789, "data": [ { "update_type": "leverage", "time": 1773878735123, "user": "0x9bad…", "asset": 170003, "tx_index": 1, "is_cross": false, "leverage": 9 } ] } ``` | Field | Type | Present | Meaning | | - | - | - | - | | `update_type` | string | always | `leverage`, `isolated_margin`, or `top_up_isolated_margin`. Selects which of the fields below are present. | | `time` | number | always | Block timestamp, milliseconds since the Unix epoch. | | `user` | string | always | The account the change applied to. This is what `leverageUpdatesByUser` filters on. | | `asset` | number | always | The node's **numeric** asset id, builder-dex encoded ids included. Not a ticker — see the note below. | | `tx_index` | number | always | Position of the action within its block, for ordering changes inside one `seq`. | | `is_cross` | boolean | `leverage` | True for cross margin, false for isolated. | | `leverage` | number | `leverage` | The leverage the account moved to. | | `is_buy` | boolean | `isolated_margin` | Side of the isolated position the margin was adjusted on. | | `ntli` | string | `isolated_margin` | Notional transferred to or from isolated margin, as a decimal string. Converted from the node's integer millionths of USD. | | `target_leverage` | string | `top_up_isolated_margin` | Leverage the top-up targets, as the node's own decimal string. | **`asset` is a number, not a coin name.** The feed does not guess a ticker without a matching metadata snapshot, so resolve it yourself against [Markets & symbols](/concepts/markets) if you need a symbol. **Rejected actions never appear.** Requests are paired with the block's `resps.Full` by bundle hash and action index, and `user` is taken from the *accepted response* rather than from the broadcaster — which is also what `leverageUpdatesByUsers` matches its list against — which matters because the broadcaster can be an agent wallet acting for the account. A missing, malformed, hash-mismatched or cardinality-mismatched response fails closed for that whole block rather than reporting a request as an applied change. ## Candles `candle` streams live OHLC candles for one market on one interval. It is on **every plan**, and it takes three arguments: `coin`, `interval`, and an optional `source`. ```json theme={null} {"method":"subscribe","subscription":{"type":"candle","coin":"BTC","interval":"1m","source":"trade"}} ``` `source` defaults to `trade`, so omitting it resolves to exactly the subscription above — same stream, same `id`. The ack echoes your own bytes back, which means an omitted `source` stays omitted in the echo even though the subscription it created is the explicit one: ```json theme={null} ← {"channel":"subscriptionResponse","data":{"method":"subscribe","subscription":{"type":"candle","coin":"BTC","interval":"1m"},"id":"<16 hex>"}} ``` A `source` that is neither `trade` nor `mark` answers `{"channel":"error","data":"invalid argument source"}`. ### Trade candles — `source: "trade"` (the default) Built from fills, the way Hyperliquid's own `candle` channel is: `o`/`h`/`l`/`c` are traded prices, `v` is traded base volume and `n` is the number of trades. `seq` is the **source block height**, the same number the fill and book feeds carry. ```json theme={null} {"channel":"candle","seq":11338421,"data":{"t":1773878700000,"T":1773878759999,"s":"BTC","i":"1m","o":"70250.1","c":"70250.1","h":"70250.1","l":"70250.1","v":"0.5","n":1}} ``` That frame is one 0.5 BTC trade. Both sides of a trade arrive as separate fills carrying the same `tid`, and the counterparty fill is in that same block — `v` is `"0.5"` and `n` is `1` because volume is counted **once per `tid`**, not once per fill. A client summing `sz` over the raw fill feed itself would read `1.0` there and be exactly double Hyperliquid. ### Mark candles — `source: "mark"` Built from the mark prices in the node's replica-command stream rather than from fills. The frame shape is identical, but two fields do not mean what they mean above. > [!WARNING] > > **On `source: "mark"`, `v` is always the string `"0"` and `n` is not a trade count.** A mark-price update carries no traded size, so there is no volume to report, and `n` counts mark-price **observations** in the bucket. Nothing errors: Hyperliquid client code ported onto a mark candle compiles, runs, and quietly produces zeros in volume and a wrong VWAP. If you want volume, use the default `trade` source. ```json theme={null} {"channel":"candle","seq":1773878735123456789,"data":{"t":1773878700000,"T":1773878759999,"s":"BTC","i":"1m","o":"70250.1","c":"70250.1","h":"70250.1","l":"70250.1","v":"0","n":1}} ``` > [!WARNING] > > Mark candles do **not** sequence on block height. Their `seq` is the replica block's Unix timestamp in **nanoseconds**, exactly as on [`leverageUpdates`](#leverage-and-margin) — a trade candle on the same coin and interval carries a block height instead. Never compare the two, and never hold one "last seq" across both. See [sequence numbers](/websocket/protocol#sequence-numbers). ### The candle object | Field | Type | Meaning | | - | - | - | | `t` | number | Open time of the bucket, milliseconds since the Unix epoch. | | `T` | number | Close time of the bucket, inclusive — one millisecond before the next bucket's `t`. | | `s` | string | The market, as the **data** spells it — not as you subscribed. A subscribe to `btc` is answered with `"s":"BTC"`. | | `i` | string | The interval, as you subscribed to it. | | `closed` | boolean | Present and `true` only on a **sealed** candle — the bucket's final republish once its interval closed. Absent on every open candle, so a client that ignores it sees what it always did. Hyperliquid's own channel has no such flag; this is an addition. | | `o` | string | Open — the first price in the bucket, as a decimal string at the node's own precision. | | `c` | string | Close — the most recent price in the bucket. Updates as the bucket fills. | | `h` | string | High. | | `l` | string | Low. | | `v` | string | Traded base volume, counted once per `tid`. Always `"0"` on `source: "mark"`. | | `n` | number | Trade count on `source: "trade"`; mark-price observation count on `source: "mark"`. | Prices and volume stay **decimal strings** at the precision the node sent, never JSON numbers — the same rule as the fill object. ### Intervals Fourteen, case-sensitive, and `interval` is mandatory: `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `8h`, `12h`, `1d`, `3d`, `1w`, `1M` Anything else answers `invalid argument interval`. Note `1m` (one minute) against `1M` (30 days). ### Live only There is no historical snapshot: a subscription starts delivering the bucket that is open when it starts, so the first candle you receive is **partial** — it carries only what happened after you subscribed, not the whole interval. The same is true across a processor restart. Treat the first frame you receive as incomplete rather than as a closed candle; for candles that already closed, the REST API's `/pulse/market/candles/recent/{symbol}` is the passthrough to use. ## Multi-wallet subscriptions Five of the six by-user feeds have a **list variant** that follows a set of wallets on one subscription. It carries exactly what its singular feed carries — the same `[wallet, fill]` pairs, liquidation objects or replica updates, under the same `seq` — filtered to any wallet in the list. A copy-trading bot, a whale-alert channel or a builder front-end streaming fills for all of its users holds **one** subscription rather than one per wallet. The singular feeds are unchanged. | Singular feed | List variant | Plans | | - | - | - | | `tradesByUser` | `tradesByUsers` | Starter and above | | `twapSliceFillsByUser` | `twapSliceFillsByUsers` | Starter and above | | `liquidationsByUser` | `liquidationsByUsers` | Agent and above | | `leverageUpdatesByUser` | `leverageUpdatesByUsers` | Pro and above | | `twapOrdersByUser` | `twapOrdersByUsers` | Pro and above | | `twapStatusesByUser` | **none — there is no `twapStatusesByUsers`** | — | > [!WARNING] > > **`twapStatuses` is the one wallet-scoped family with no list variant.** Five families have one; this sixth does not, and `{"type":"twapStatusesByUsers","users":[…]}` answers `unknown subscription type` — it is not a type the server knows, so nothing is subscribed and no slot is spent. To follow a set of wallets' TWAP state today, either hold one `twapStatusesByUser` subscription per wallet against your [subscription cap](/websocket/limits), or subscribe to the unfiltered `twapStatuses` and filter on `state.user` yourself. The unfiltered feed is the same Pro tier, so the second option reaches nothing the first could not. The list is the required `users` argument, sent as a **JSON array of strings** — not a comma-separated string — and matched case-insensitively like every other wallet argument. A bare string is accepted too and becomes a one-item list. ```json theme={null} → {"method":"subscribe","subscription":{"type":"tradesByUsers","users":["0x9bad…1f07","0x28f0…4c19","0x103c…77a5"]}} ← {"channel":"tradesByUsers","seq":928110001,"data":[["0x28f0…4c19",{"coin":"BTC","px":"70000.5","sz":"0.01","side":"B","time":1788324615827,"startPosition":"0.0","dir":"Open Long","closedPnl":"0.0","hash":"0xcdade62a…07bc50","oid":533649007948,"crossed":true,"fee":"0.0245","tid":905724619509577,"feeToken":"USDC","twapId":null}],["0x9bad…1f07",{"coin":"BTC","px":"70000.5","sz":"0.01","side":"A","time":1788324615827,"startPosition":"1.4","dir":"Close Long","closedPnl":"12.4","hash":"0xcdade62a…07bc50","oid":533649007949,"crossed":false,"fee":"0.0070","tid":905724619509578,"feeToken":"USDC","twapId":null}]]} ``` ### The list is a set The subscription id is hashed from the **sorted, case-folded, deduplicated** list, so `["0xb","0xa"]`, `["0xA","0xb"]` and `["0xa","0xb","0xa"]` are one subscription. Re-sending the list in another order acks the same `id`, holds no second slot against your cap and never duplicates a frame. The ack echoes the list **as you sent it**, not as the server normalised it — match on the `id`, not on the echo. An unsubscribe with the same set in any order releases it. To change the set, unsubscribe the old list and subscribe the new one: a list that differs by one wallet is a different subscription. Every matched event appears **once**, in block order, however many listed wallets it involves. When two listed wallets are counterparties on one trade, the `data` array carries that trade's two fills — one per wallet, as the node reports them — each exactly once. ### Telling two lists apart You cannot. A data frame carries `channel`, `seq` and `data` and **no subscription id**, and the wallet in the first entry changes from frame to frame — so the [per-stream keying recipe](/websocket/protocol#sequence-numbers) the singular feeds use has nothing stable to key on here, and two `tradesByUsers` lists on one connection are indistinguishable. Hold **at most one subscription of a given list feed per connection**; put a second list of the same type on a second connection, within your [connection cap](/websocket/limits). With one list per channel, the channel is the stream key and `seq` tracking works as on every other feed. ### The cap, and what it costs you A list holds at most **1,000 distinct wallets**, on every plan. Deduplication happens before the cap is checked, so repeated entries do not count against it. **One subscription of 1,000 wallets is one subscription against your per-connection cap.** That is the point of these feeds: the 1,000-wallet ceiling is the same on every tier, so a plan buys you more *lists*, not longer ones. The per-connection subscription cap is not the same on every tier — it is 2 on Free, 25 on Starter, 50 on Agent and 100 on Pro; on Enterprise it is set per account (100 unless your contract says otherwise), and the [`connected` frame](/websocket/overview#the-first-frame) reports yours; see [plan limits](/websocket/limits). Each list variant sits at or above the tier of the unfiltered firehose it filters, so a list never delivers a client more than its tier could already stream. A wallet has to be listed in the form the feed matches on — the fill's wallet for `tradesByUsers` and `twapSliceFillsByUsers`, the liquidated account for `liquidationsByUsers`, and the accepted response's `user` for `leverageUpdatesByUsers` and `twapOrdersByUsers` — exactly as on the singular feeds. Nothing validates that an entry is an address; an entry matching no wallet simply never matches. ### When a list is refused Nothing is subscribed when any of these fires, and each arrives as `{"channel":"error","data":""}` on the open socket: | `data` | Cause | | - | - | | `too many values for argument users` | More than 1,000 **distinct** wallets after deduplication. | | `missing argument users` | The `users` key is absent — **or present as an empty array**. | | `empty argument users` | Any entry in the list is an empty string. The check is per item. | | `bad request` | `users` is neither a string nor an array of strings — a number, an object, a nested array. | | `feed not in tier` | The list variant is above your plan. See the table above. | See the [wire protocol](/websocket/protocol#errors-on-an-open-socket) for the rest. ## Derived order-book quotes Three feeds read the same in-memory resting book the [`l4Book`](/websocket/order-book) feed is built from, and publish a **derived view** of it rather than the raw orders. Two of them — `bbo` and `allMids` — are on **every plan**, including Free. | Feed | Tier | Argument | What it carries | | - | - | - | - | | `bbo` | Free | `coin` | Best bid and ask only, with total resting size and order count at each price | | `allMids` | Free | none | Every native perp mid, as one map | | `l2Book` | Starter | `coin` | Up to 20 aggregated price levels per side | `bbo` and `l2Book` take the coin in the **node's own spelling, case-sensitively** — `BTC`, `xyz:GOLD`, `#28200` — the same rule as `l4Book`, because they key into the same book export. ### `bbo` — top of book ```json theme={null} → {"method":"subscribe","subscription":{"type":"bbo","coin":"BTC"}} ← {"channel":"bbo","seq":123,"snapshot":true,"data":{"coin":"BTC","time":1780000000000,"bbo":[{"px":"70000","sz":"1.2","n":3},{"px":"70001","sz":"0.8","n":2}]}} ``` `bbo` is a two-element array — **bid first, then ask**. An empty side is `null`, so check for it before reading `px`. `sz` is the total resting size at that price and `n` is how many orders make it up. After the first frame, a message is sent **only when the top of book changes** — a quiet market is a quiet subscription. There is no mid in the frame. Average the two prices yourself when both sides exist. ### `l2Book` — aggregated depth ```json theme={null} → {"method":"subscribe","subscription":{"type":"l2Book","coin":"BTC"}} ← {"channel":"l2Book","seq":123,"snapshot":true,"data":{"coin":"BTC","time":1780000000000,"levels":[[{"px":"70000","sz":"1.2","n":3}],[{"px":"70001","sz":"0.8","n":2}]]}} ``` `levels` is `[bids, asks]`, best first, up to **20 levels a side**. > [!WARNING] > > Every `l2Book` frame **replaces** the whole top-20 for that coin. These are not incremental diffs, and applying them as diffs — the way `l4Book` updates are applied — corrupts the book. If a price you were tracking is absent from the newest frame, it has left the top 20. ### `allMids` — every native perp mid ```json theme={null} → {"method":"subscribe","subscription":{"type":"allMids"}} ← {"channel":"allMids","seq":123,"snapshot":true,"data":{"time":1780000000000,"mids":{"BTC":"70000.5","ETH":"3000"}}} ``` Each frame replaces the **entire** map, and one is sent whenever any mid moves. > [!NOTE] > > **This is an initial version, and it is narrower than Hyperliquid's own `allMids`.** It covers **native perpetual markets only** — no spot, no builder dexes, and no builder-dex selector. There is no fall back to the last trade when a book side is empty: a coin missing either a bid or an ask is **omitted from the map entirely**, so a coin's absence means one-sided or empty, not zero. Code written against Hyperliquid's `allMids` will see a smaller universe here. ### Warming up These three share one book per coin, and a fresh subscription can arrive before that book is ready. **Your subscribe is acknowledged at once.** The ack is queued on the control channel, which jumps ahead of data, before the server starts building anything — so a quote subscribe is accepted in milliseconds like any other. **What waits is the first data frame.** The server re-requests the snapshot every 250 ms behind that ack and sends you nothing in the meantime, so the gap is between the ack and the `snapshot:true` frame. It gives up at a bound: | Feed | The server keeps trying for | | - | -: | | `bbo`, `l2Book` | 2 minutes | | `allMids` | 5 minutes | `allMids` gets longer because it initializes the whole native perp universe rather than one coin's book. Only when that deadline passes, instead of a snapshot, do you receive: ```json theme={null} ← {"channel":"error","data":"quote book warming up"} ``` **By then the server has already retried for two or five minutes**, so an immediate client-side retry is unlikely to fare better — wait before trying again. The error is not fatal and says nothing about your key, your coin spelling or your plan. > [!WARNING] > > **Do not time out waiting for the first frame sooner than the bound.** A client that waits for the *ack* gets it immediately and is fine; a client that gives up after ten seconds of no *data* abandons a subscription the server is still working on, and will do it every time on a cold book. The two timeouts are different, and only the second one matters here. A broken chain or a partial block suspends derived updates until the book is rebuilt. Existing subscribers are not dropped: the next frame they receive carries `snapshot:true` again and replaces their state. `seq` on all three is the **source book height**, and it **skips blocks** — a block that changed nothing visible produces no frame and no `seq`. Do not treat a gap as loss. ## TWAP slice fills `twapSliceFills`, `twapSliceFillsByUser` and `twapSliceFillsByUsers` carry every fill the node attributes to a TWAP order, filtered out of the same fills stream by the fill's `twapId`. `data` is the node's own **`[wallet, fill]` pairs**, byte for byte the objects the trade feeds send — a client that already reads `trades` reads these unchanged — so [the fill object](#the-fill-object) above documents every field. ```json theme={null} {"channel":"twapSliceFills","seq":928110001,"data":[["0x9bad…",{"coin":"BTC","px":"70000.5","sz":"0.01","side":"B","time":1773878735890,"startPosition":"0.0","dir":"Open Long","closedPnl":"0.0","hash":"0xabc…","oid":344895887371,"crossed":true,"fee":"0.0245","tid":111,"feeToken":"USDC","twapId":77738308}]]} ``` One TWAP order produces many slices over its run. **Group by `twapId`** to follow one order, and sum `sz` to track its executed size. `twapSliceFillsByUser` takes a required `user`, matched case-insensitively like the trade feeds, and filters to the wallet the slice filled *for* — `twapSliceFillsByUsers` does the same over [a list of up to 1,000](#multi-wallet-subscriptions) — the counterparty of a slice is an ordinary fill with `twapId: null` and stays on the trade feeds. A fill with no `twapId` key at all is never a slice. > [!NOTE] > > This feed reports **execution only**. A TWAP that never fills a slice never appears here, and there is no placed or cancelled event — those are on [`twapOrders`](#twap-orders), and the order's own lifecycle is on [`twapStatuses`](#twap-statuses). `twapId` here equals `twap_id` on both of those, so subscribing and joining on it gives you an order's terms, its state and its executions side by side. ## TWAP orders `twapOrders`, `twapOrdersByUser` and `twapOrdersByUsers` carry TWAP **placements, refusals and cancellations**, read from the node's replica-command stream. `update_type` selects the variant: | `update_type` | Meaning | Carries | | - | - | - | | `placed` | The node started the TWAP | `twap_id`, plus `is_buy`, `sz`, `reduce_only`, `minutes`, `randomize` | | `rejected` | The node refused it | the order's terms and the node's reason in `error`; **no `twap_id`** | | `cancelled` | A `twapCancel` the node applied | `twap_id` | | `cancel_rejected` | A `twapCancel` the node refused | `twap_id` and `error` | Every variant carries `time`, `user`, `asset` and `tx_index`. ```json theme={null} {"channel":"twapOrders","seq":1789772402886963614,"data":[{"update_type":"placed","time":1789772402886,"user":"0x28f0…","asset":159,"tx_index":0,"twap_id":2230681,"is_buy":false,"sz":"12","reduce_only":false,"minutes":14,"randomize":true},{"update_type":"rejected","time":1789772402886,"user":"0x4613…","asset":130008,"tx_index":1,"is_buy":true,"sz":"20000.0","reduce_only":false,"minutes":15,"randomize":false,"error":"Trading is halted."}]} ``` **Refusals are emitted, not dropped**, because a refused TWAP leaves no other trace anywhere on the network. Filter on `update_type` if you only want orders that ran. `asset` is the node's **numeric** asset id, builder-dex encoded ids included, as on [leverage and margin](#leverage-and-margin) — no coin name is guessed. `twap_id` is the join key to [`twapSliceFills`](#twap-slice-fills), whose fills carry it as `twapId`. `twapOrdersByUser` takes a required `user` — and `twapOrdersByUsers` [a list of up to 1,000](#multi-wallet-subscriptions) — matched against the **accepted response's** account, so an agent-signed action reaches the account it applied to rather than the broadcaster. > [!WARNING] > > **The node answers a refused TWAP with an outer status of `ok`.** Acceptance is read from the inner `response.data.status` — `{"running":{"twapId":N}}` or `{"error":"…"}` — never from the outer status alone. A client reimplementing this against the raw node output and checking only the outer status will report TWAPs as started that never ran. An action whose outer status is `err` never reached the block and is omitted here; an inner status this server does not recognise fails the whole block closed rather than guessing. This feed **cannot see a TWAP finish or be terminated by the node** — it reports what an account asked for and whether the node took it, and nothing after that. Those states are on [`twapStatuses`](#twap-statuses), which carries the node's own state machine and joins here on `twap_id`; executed size is on [`twapSliceFills`](#twap-slice-fills). The `twapCancel` response shapes follow Hyperliquid's exchange-endpoint documentation and have not yet been confirmed against a captured block; the `twapOrder` shapes have. ## TWAP statuses `twapStatuses` and `twapStatusesByUser` carry the **node's own TWAP state machine** — the third and last view of one TWAP. A subscription opens with a **snapshot of the TWAPs that are live right now** and then streams every status change as its block lands. ```json theme={null} → {"method":"subscribe","subscription":{"type":"twapStatuses"}} → {"method":"subscribe","subscription":{"type":"twapStatusesByUser","user":"0x6365…2441"}} ``` `user` is required on `twapStatusesByUser` and matched **case-insensitively**, like every wallet argument on this socket. It is matched against the event's own `state.user`. ### The three views of one TWAP | Feed | What it sees | What it cannot see | | - | - | - | | [`twapOrders`](#twap-orders) | **Placement and refusal** — the terms an account asked for, the node's acceptance or its reason for refusing, and cancellations it applied. | Anything after the order started. It never reports a finish, a termination or executed size. | | [`twapSliceFills`](#twap-slice-fills) | **Execution** — every slice the TWAP actually filled, with real `px`, `sz` and `fee`. | A TWAP that fills nothing. It has no placement, no end and no reason for either. | | `twapStatuses` | **State** — activation, waiting on a trigger, finishing, termination, a stop firing, and mid-run node errors, with running `executedSz` and `executedNtl`. | The slices themselves: it reports cumulative execution on the order, not individual fills, and no `px` or `fee`. | All three join on the **same node id**, and only the spelling differs: it is `twap_id` on `twapStatuses` and on `twapOrders`, and `twapId` inside the fill object on `twapSliceFills` (`data[i][1].twapId`). Treat it as an opaque number — this server never re-encodes it on any of the three. One join does not exist: a `twapOrders` event with `update_type: "rejected"` carries **no `twap_id` at all**, because a refused order never got one. A refusal is visible only on `twapOrders` and can be joined to nothing. ### The live frame `channel` is the subscribed type, `seq` is the source block height, and `data` is an array of status events — one frame per block that carried at least one matching event. Events are forwarded as the node wrote them; the only field this server reads is `state.user`, for the by-user filter. ```json theme={null} { "channel": "twapStatuses", "seq": 1156436426, "data": [ { "time": "2026-09-22T02:00:02.321152806", "twap_id": 2241180, "state": { "coin": "TAO", "user": "0x636573f05d5b582a357e0250e5624b1832b92441", "side": "B", "sz": "6.424", "executedSz": "0.0", "executedNtl": "0.0", "minutes": 58, "reduceOnly": true, "randomize": true, "timestamp": 1790042402321, "trigger": null, "stopPx": null }, "status": "activated" } ] } ``` | Field | Type | Meaning | | - | - | - | | `time` | **string** | The node's nanosecond wall-clock stamp for the event — `2026-09-22T02:00:02.321152806`, not a number. | | `twap_id` | number | The TWAP this event is about. The join key to `twapOrders` and `twapSliceFills`. | | `state` | object | The TWAP's terms and its running execution, below. | | `status` | string **or object** | What happened. A string on an ordinary transition, an object on a refusal — see [status is a union](#status-is-a-union). | The `state` object: | Field | Type | Meaning | | - | - | - | | `coin` | string | The market, in **the node's own spelling** — a ticker for a perp (`TAO`, `ZEC`) and `@` for a spot pair (`@142`). It is *not* the numeric `asset` id `twapOrders` carries, and nothing may assume a ticker. | | `user` | string | The account the TWAP belongs to. This is what `twapStatusesByUser` filters on. | | `side` | string | `B` for buy, `A` for sell. | | `sz` | string | Total size the TWAP was placed for, as a decimal string. | | `executedSz` | string | Base size executed so far, as a decimal string. | | `executedNtl` | string | Notional executed so far, as a decimal string. It can carry the node's own float artefact — `"1471151.6673000001"` — and is forwarded exactly as written. | | `minutes` | number | The TWAP's duration in minutes. **Not bounded by a day**: 10,080 (seven days) has been observed, so a client-side sanity cap below that drops real TWAPs. | | `reduceOnly` | boolean | Whether the order may only reduce a position. | | `randomize` | boolean | Whether slice timing is randomised. | | `timestamp` | number | Placement time, milliseconds since the Unix epoch. See the warning below — it is not an activation time on a triggered TWAP. | | `trigger` | null or object | `null`, or `{"px":"84168.0","above":}` on a TWAP waiting for a price. | | `stopPx` | null or string | `null`, or the stop price as a decimal string. | Sizes are **decimal strings** and `minutes` is a **number**, always — the same rule as the fill object. > [!WARNING] > > **`state.timestamp` is placement, not activation.** On a triggered TWAP it can be days stale: a captured `terminated` record carried a `timestamp` about 71 hours before the event with `minutes` of 30. Never derive an end time from `timestamp + minutes` for a triggered TWAP — only the node's own terminal event says when a waiting TWAP ended. ### Status is a union `status` is a string on an ordinary transition and an **object** on a refusal: | `status` | Live or terminal | Meaning | | - | - | - | | `"waitingForTrigger"` | live | Placed, waiting on its trigger price. Its clock has not started. | | `"activated"` | live | Running. Slices execute from here. | | `"finished"` | terminal | Ran to completion — `executedSz` equals `sz`. | | `"terminated"` | terminal | Ended by the node before completion. | | `"stopped"` | terminal | `stopPx` fired. | | `{"error":""}` | terminal | The node refused to continue. Observed reasons: `Insufficient margin to place order.`, `Reduce only order would increase position.`, `Insufficient spot balance`. | > [!WARNING] > > **Code that types `status` as a string breaks on refusals.** An error status is a JSON **object**, not a string, and it can arrive mid-run on an already-activated TWAP that has partial `executedSz`. Check the JSON type before you compare. The server validates nothing here — it reads only `state.user` — so the vocabulary is the node's to extend, and a status this page does not list is forwarded unchanged rather than dropping the block. ### The snapshot on subscribe A fresh subscribe answers with a **snapshot of the live TWAP set** before any live frame. It carries `"snapshot": true`, and `data` is an **object** rather than an array: ```json theme={null} ← {"channel":"subscriptionResponse","data":{"method":"subscribe","subscription":{"type":"twapStatuses"},"id":"<16 hex>"}} ← {"channel":"twapStatuses","snapshot":true,"seq":1156436426,"data":{"complete":false,"coverage_from_ms":1789940000000,"twaps":[{"time":"2026-09-22T02:00:02.321152806","twap_id":2241180,"state":{…},"status":"activated"}]}} ← {"channel":"twapStatuses","seq":1156436431,"data":[{…}]} ``` `channel` is the type you subscribed to, so a `twapStatusesByUser` snapshot says `twapStatusesByUser` and its `twaps` are that account's alone. | Field | Type | Meaning | | - | - | - | | `complete` | boolean | The gateway's own verdict on whether its coverage reaches back far enough to hold every TWAP that activated inside the longest window a running TWAP can span. This server forwards the flag verbatim and computes nothing — the rule behind it is the gateway's, so treat `coverage_from_ms` as the fact and `complete` as its summary. | | `coverage_from_ms` | number | The oldest block time the gateway has applied, in milliseconds. This is the honest bound in both cases — read it rather than `complete` alone. | | `twaps` | array | The gateway's live TWAP set, one entry per `twap_id`, each entry a status event byte-identical in shape to an element of a live frame's `data` — so one applier handles both. This server copies each entry through untouched and only checks that it is valid JSON; it does not deduplicate by `twap_id` or verify the set itself. | > [!WARNING] > > **Handle `complete: false` — do not assume the snapshot is the whole live population.** When it is false the gateway is telling you its coverage is shorter than the window it would need, so **a TWAP that activated before `coverage_from_ms` may be missing from the set**. Keep the snapshot and apply the stream on top of it. How often it is false depends on how long the gateway has been running, so code for both values rather than for the one you happen to observe. > > This holds even when `complete` is true: a `waitingForTrigger` TWAP placed before `coverage_from_ms` and not yet activated is invisible to the snapshot until it activates or ends, because a waiting TWAP has no duration bound to age out of. So **a `twap_id` the stream later names that is not in your set is expected, not an error** — insert it rather than discarding the event. The maintenance rule is one line: apply each stream event onto the entry with the same `twap_id`, inserting one you have not seen, and drop the entry when its status is terminal. `snapshot` and `sequence` steer the subscribe exactly as they do elsewhere — omitting both sends a snapshot, `"snapshot": false` skips it, a `sequence` cursor implies no snapshot, and the two together are refused. See [reconnecting](/websocket/protocol#reconnecting). > [!NOTE] > > Unlike `l4Book`, these feeds have **no buffer warm-up**: the subscribe ack is sent first and the snapshot follows essentially immediately, rather than after the server has collected a span of blocks. Frames buffered above the snapshot's `seq` are released after it, so there is no hole between the two. If the snapshot cannot be produced, **the subscription is removed** after its ack and a plain `{"channel":"error","data":""}` follows — subscribe again rather than waiting. The reasons are listed with [the other error strings](/websocket/protocol#errors-on-an-open-socket). ### Sequence > [!WARNING] > > **`twapStatuses` sequences on the source block height — not on nanoseconds.** Its sibling `twapOrders` carries the replica block's Unix timestamp in nanoseconds instead, so the two halves of the TWAP product sequence on **different scales**: never hold one cursor across them and never compare their `seq`. A height is around 1.1 × 10⁹ and a nanosecond stamp around 1.79 × 10¹⁸, so a capture tells them apart at a glance. See [sequence numbers](/websocket/protocol#sequence-numbers). A frame is sent only for a block that carried a matching event, so `seq` increases strictly but skips heights — on `twapStatusesByUser` it will skip a great many. Across a reconnect the server drops any block at or below the last height it published, so a gateway that resumes behind the cursor replays nothing. That guard is deliberately released in one case: when the gateway reports the resume position as **pruned**, the server clears its last-applied height and rejoins live, and monotonicity then rests on the gateway resuming ahead of where it left off rather than on the guard. ## Hyperliquid compatibility The frame shapes — `subscribe` / `unsubscribe` with a `subscription` object, `subscriptionResponse` acks that echo it, `ping` / `pong`, and a fill object identical to Hyperliquid's — are deliberately Hyperliquid's own, so client code written against their websocket is familiar here. The differences are the ones the product exists for: * **Authentication on the upgrade.** Hyperliquid's socket has none; ours needs your key, in a header or the `bearer` subprotocol. * **Position context on a market-wide feed.** Their `trades` carries `users` — both sides' addresses — but not `dir`, `closedPnl`, `startPosition` or `fee`. Those live on `userFills`, which is per-user and subject to the ten-user ceiling below. Every feed here carries all of them. * **Liquidations and leverage changes are feeds of their own**, not something you filter per account — and both take any address. * **`seq` on every data frame** — a monotonic source position, and your reconnect cursor. ### What each socket is for Hyperliquid's websocket is built to watch **your own account and a few markets**, and it is free, unauthenticated and closer to the matching engine than anything downstream of it can be. It also carries [far more market-data channels](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions) than this one — mids, BBO, asset contexts, order updates, ledger and TWAP events among them. (Candles are no longer one of them: `candle` here is trade-based on the same field names as theirs.) This socket is built to watch **everyone at once**. That is the whole of the difference: | | Hyperliquid | Coinversa | | - | - | - | | Liquidations | inside `userEvents`, one account at a time | `liquidations` — every one, unfiltered | | Leverage and margin changes | none; margin state only in per-user `clearinghouseState` snapshots | `leverageUpdates` | | Order book | `l2Book`, aggregated to price levels | `l4Book` — every resting order with its wallet | | Candles | `candle` — trade-based, real volume | `candle` — trade-based and field-for-field the same by default; `source: "mark"` opts into mark-price candles, where `v` is always `"0"` | | TWAP placement, execution and state | per-account TWAP channels only | `twapOrders`, `twapSliceFills` and `twapStatuses` — three views of one TWAP, each available unfiltered as well as per account | | Every fill, market-wide | none; `trades` is one coin, `userFills` is one account | `trades` | | Unique accounts you may watch | **ten per IP** | Starter and above: 1,000 per [multi-wallet subscription](#multi-wallet-subscriptions), as many of those as your plan's subscription cap allows. Free has no list feed, so it watches one account per subscription — two in total | | Fill context | `users` on `trades`; the rest only on `userFills` | `dir`, `closedPnl`, `startPosition`, `fee` on every feed | Hyperliquid's own limits are [1,000 websocket subscriptions and ten unique users per IP](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/rate-limits-and-user-limits). The ten-user ceiling is the one that decides things: tracking wallets past that number is not slow on their socket, it is not possible. Enriched cohort feeds are coming. They are not available yet, and this page will document them when they are. (Replaying what you missed after a disconnect is already here — that is the [`sequence`](/websocket/protocol#reconnecting) cursor, not a future feed.) # WebSocket plan limits Source: https://docs.coinversa.ai/websocket/limits Websocket capacity by plan — concurrent connections per account, subscriptions per connection, which of the twenty-four feeds each tier includes, multi-wallet lists against the subscription cap, fair-use bandwidth — and how the connection cap is shared across your API keys. Websocket access is **capacity-based**: you are limited by how many connections and concurrent subscriptions your plan allows and by a fair-use bandwidth allowance, never by how many messages you receive. Streaming does not draw down your REST request quota, and REST rate limits say nothing about it — REST requests and streaming capacity are measured separately. ## By plan | Plan | Connections per account | Subscriptions per connection | Feeds | Fair-use bandwidth per month | | - | -: | -: | - | -: | | Free | 1 | 2 | `tradesByCoin`, `tradesByUser`, `candle`, `twapSliceFillsByUser`, `bbo`, `allMids` | 5 GB | | Starter | 1 | 25 | Free's feeds plus `trades` (the firehose), `tradesByUsers`, `allCandles`, `twapSliceFills`, `twapSliceFillsByUsers` and `l2Book` | 50 GB | | Agent | 2 | 50 | Starter's feeds plus [liquidations](/websocket/feeds#liquidations): `liquidations`, `liquidationsByUser` and `liquidationsByUsers` | 100 GB | | Pro | 5 | 100 | All 24: Agent's feeds plus `l4Book` ([order book](/websocket/order-book)), [leverage changes](/websocket/feeds#leverage-and-margin), [TWAP orders](/websocket/feeds#twap-orders) and [TWAP statuses](/websocket/feeds#twap-statuses), with their single-wallet and [list variants](/websocket/feeds#multi-wallet-subscriptions) | 250 GB | | Enterprise | custom | custom | all 24 | 250 GB | Keep these capacity scopes distinct: * **The connection cap is per account, shared across every key.** Five Pro connections are five in total, however many keys you spread them over. An indexer on one key, a staging box on another and a tab left open on a third are three of them. REST request quotas are also [shared across account keys](/pricing#faq), but are separate from WebSocket capacity. * **The subscription cap is per connection.** Each socket may hold that many distinct subscriptions; opening another connection (within the cap) gets you another set. * **A multi-wallet list is one subscription.** A [`…ByUsers` subscription](/websocket/feeds#multi-wallet-subscriptions) carrying 1,000 wallets spends **one** slot, not 1,000. The 1,000-wallet ceiling is the same on every plan; what differs between plans is how many such lists you may hold at once. And one cap is specific to the order book: * **`l4Book` subscriptions count against the subscription cap above like any other** — there is no separate book-only limit. Going over is refused with `too many subscriptions`. Unsubscribing frees the slot immediately, and so does a book subscription that the server [drops](/websocket/order-book#when-a-book-subscription-is-dropped). A Pro trial account has Pro's websocket limits for the length of the trial. ## Resolved limits, not the table Limits are resolved per account: every key on the account connects with the highest plan held by any of its active, entitled keys (with enterprise overrides applied). A Free key on an account that also has an entitled Pro key connects with Pro limits. Revoked and suspended keys cannot connect and do not count toward the account's plan. The [`connected` frame](/websocket/overview#the-first-frame) reports what **your account** may do, with enterprise overrides already applied. Enterprise numbers are negotiated per account and can sit above or below the Pro row, so read the frame rather than this table when it matters. The same resolved numbers back the meters on the portal's [Usage page](https://developers.coinversa.ai/usage). ## Fair use Bandwidth is measured as the payload bytes of data frames written to your connections, rolled up per hour, and shown against your allowance on the [Usage page](https://developers.coinversa.ai/usage). It is a **soft cap**: nothing is cut off at the line, and the counts are at-least-once analytics rather than a billing record. The firehose is where it goes — roughly a hundred and thirty fills a second across every market — so an indexer left running on `trades` is the case the allowance exists for. An order-book snapshot is a data frame written to your connection, so **its bytes count too**: about 30 MB for every subscribe to `l4Book` on `BTC` (about 15 MB on `HYPE`, 11 MB on `ETH`, and about 5 KB for the median coin), then the per-block diffs. A client that resubscribes on every reconnect — which is the [correct behaviour](/websocket/order-book#the-client-rule) — pays the snapshot again each time. The [TWAP status snapshot](/websocket/feeds#the-snapshot-on-subscribe) is a data frame on the same terms, though it carries one entry per live TWAP rather than a whole book. ## When you hit a limit | Limit | How it shows up | | - | - | | Connection cap | The upgrade is refused: `HTTP 429` for header clients, close code `4429` for browser clients. No `Retry-After`; a connection that died silently frees its slot within about 40 seconds. | | Subscription cap | `{"channel":"error","data":"too many subscriptions"}` on the open socket. Unsubscribe one and the slot frees immediately. | | Order-book cap | None of its own: `l4Book` subscriptions spend slots from the general per-connection cap. | | Feed not in plan | `{"channel":"error","data":"feed not in tier"}` on the open socket — `trades`, `tradesByUsers`, `allCandles`, `twapSliceFills`, `twapSliceFillsByUsers` and `l2Book` below Starter, `liquidations`, `liquidationsByUser` and `liquidationsByUsers` below Agent, and `l4Book`, `leverageUpdates`, `leverageUpdatesByUser`, `leverageUpdatesByUsers`, `twapOrders`, `twapOrdersByUser`, `twapOrdersByUsers`, `twapStatuses` and `twapStatusesByUser` below Pro. | | Wallets in one list | `{"channel":"error","data":"too many values for argument users"}` — over 1,000 distinct wallets on one `…ByUsers` subscription. Nothing is subscribed. Duplicates are removed before the count. | | Fair-use bandwidth | Nothing on the wire. The Usage page shows consumption against the allowance. | See the [wire protocol](/websocket/protocol#errors-on-an-open-socket) for the full error list and the [overview](/websocket/overview#when-the-handshake-is-refused) for refusals. ## Watching your usage The portal's [Usage page](https://developers.coinversa.ai/usage) shows connections and subscriptions open right now against your caps — a snapshot the connection manager reports once a minute, so normally under a minute old; if no snapshot has arrived for two minutes the meters are hidden rather than guessed — plus bytes delivered against fair use, frames delivered, and connections opened over the period. "Connections opened" counts every successful connect, reconnects included; it is not how many are open. # Order book (L4) Source: https://docs.coinversa.ai/websocket/order-book The l4Book websocket feed — Hyperliquid's full L4 order book for one coin, every resting order with its wallet plus untriggered stop and take-profit orders, as one snapshot followed by per-block diffs. Pro and above. `l4Book` streams the **full L4 order book of one coin** — every resting order with the wallet address behind it, plus the trigger orders (stops and take-profits) resting but not yet triggered — as one snapshot followed by a per-block stream of the diffs that apply to it. The server holds no book: the snapshot and every event are the node's own bytes, split per coin and forwarded. **The book lives in your process.** ```json theme={null} → {"method":"subscribe","subscription":{"type":"l4Book","coin":"BTC"}} ← {"channel":"subscriptionResponse","data":{"method":"subscribe","subscription":{"coin":"BTC","type":"l4Book"},"id":"7d1e4c9a2f5b8306"}} ← {"channel":"l4Book","coin":"BTC","snapshot":true,"height":100,"time_ms":1757815848097,"seq":100,"data":{"book_orders":[[…],[…]],"untriggered_orders":[…]}} ← {"channel":"l4Book","coin":"BTC","seq":101,"height":101,"prev":100,"time_ms":1757815848173,"partial":false,"data":{"raw_book_diffs":[…],"order_statuses":[…]}} ``` ## Who gets it `l4Book` is included on **Pro and above**. Below that, a subscribe answers `feed not in tier` on the `error` channel. The [`connected` frame](/websocket/overview#the-first-frame) lists `l4Book` in `limits.feeds` when your account may subscribe — read that rather than assuming from the plan table, since enterprise limits are resolved per account. ```json theme={null} ← {"channel":"connected","data":{"tier":"pro","limits":{"connections":5,"subscriptions":100,"feeds":["trades","tradesByCoin","tradesByUser","tradesByUsers","liquidations","liquidationsByUser","liquidationsByUsers","leverageUpdates","leverageUpdatesByUser","leverageUpdatesByUsers","candle","allCandles","l4Book","bbo","allMids","l2Book","twapSliceFills","twapSliceFillsByUser","twapSliceFillsByUsers","twapOrders","twapOrdersByUser","twapOrdersByUsers","twapStatuses","twapStatusesByUser"]}}} ``` ## Subscribing One argument, `coin`, and it is **case-sensitive** — one of only [two argument values on this socket that are](/websocket/protocol#subscribe), the other being a candle's `interval`. It must be the market exactly as the node spells it, builder-dex prefix and case included, because that is the only name the node's book export answers to: ```json theme={null} {"method":"subscribe","subscription":{"type":"l4Book","coin":"BTC"}} {"method":"subscribe","subscription":{"type":"l4Book","coin":"xyz:GOLD"}} {"method":"subscribe","subscription":{"type":"l4Book","coin":"#28200"}} ``` `btc` is not normalised to `BTC`: it names no market, and the subscription is [dropped](#when-a-book-subscription-is-dropped) with `unknown coin`. Take the spelling from the node's own market list. Every `l4Book` message echoes the coin **as you sent it**, and the subscription `id` hashes it as sent. > [!WARNING] > > **Each subscription starts with the whole book as one message.** BTC's snapshot is about **30 MB**; HYPE's and ETH's are about 15 and 11 MB; the median coin is about 5 KB. Set your library's read limit accordingly before you subscribe — there is no depth option, and the [generated clients](/websocket/quickstart#order-book) raise it for you. `l4Book` subscriptions count against the tier's per-connection [subscription cap](/websocket/limits) like any other; there is no separate book-only limit. Going over answers `too many subscriptions`. Unsubscribing frees the slot immediately, and a book subscription that ends in an error frees it too. ## The snapshot Exactly one per subscription, first, sent only to the subscriber. It is fetched when you subscribe, after the subscribe ack. ```json theme={null} {"channel":"l4Book","coin":"BTC","snapshot":true,"height":H,"time_ms":T,"seq":H,"data":{"book_orders":[bids,asks],"untriggered_orders":[…]}} ``` | Field | Meaning | | - | - | | `channel` | `l4Book`. | | `coin` | The coin, spelled as you sent it. | | `snapshot` | `true`. Only the snapshot carries this key. | | `height` | The block the snapshot reflects, **inclusive**: the book is the state after block `H`. | | `time_ms` | That block's time, milliseconds since the Unix epoch. | | `seq` | Equal to `height` — see [seq versus prev](#seq-versus-prev). | | `data` | The node's `l4Snapshots` export for the coin, compacted (whitespace removed) and otherwise untouched. | Inside `data`: * `book_orders[0]` is every **bid**, `book_orders[1]` every **ask**. * `untriggered_orders` is the resting **trigger orders** — stops and take-profits waiting on their trigger price. * Every entry in all three is a positional **`[wallet, {order}]` pair**. Wallet addresses are always included. * The order object is passed through as the node writes it — nothing is added, renamed or reordered. Read its fields from the node's export rather than from a mapping of ours; there is none. The snapshot is the node's most recent export, which is normally some blocks — up to about a minute's worth — **behind the live stream**. The server closes that distance before it sends you anything: it buffers live updates until they span a run of blocks wide enough to join a snapshot onto (**105 source blocks**, roughly 7.6 s), then fetches the snapshot and discards the buffered updates at or before it. What you read is **one unbroken chain from `H+1`** with nothing lost and nothing repeated. **This is why the first message takes a while.** One interval is about 10 seconds of chain, and attempt *N* waits for *N* intervals — so a cold subscription commonly waits **10–60 seconds** before the snapshot lands, and up to about **100 seconds** if all ten attempts are needed. That is expected, not a stall. You pay it only on a **cold** coin. The buffer belongs to the feed group, not to you: if anyone else is already subscribed to that coin — or was within the last 60 seconds — the group is already buffered and your subscription passes straight through to the snapshot. Two different errors end the wait, and they mean different things: * `snapshot buffer did not fill` — one attempt waited 3 minutes and the source never produced enough blocks. The feed has stalled. * `snapshot is older than retained history` — all ten attempts ran and the snapshot still predated the buffer. The node's export is further behind than the server is willing to bridge. You never receive a second snapshot for a subscription: a snapshot is always the first message, and only the first. ## Updates Then one message per block, on the same channel, **whether or not the block touched this coin**. ```json theme={null} {"channel":"l4Book","coin":"BTC","seq":N,"height":H+k,"prev":H+k-1,"time_ms":T,"partial":false,"data":{"raw_book_diffs":[…],"order_statuses":[…]}} ``` | Field | Meaning | | - | - | | `seq` | The source block height — the same value as `height` on this feed. | | `height` | The block this update is for — the node's `block_number`. | | `prev` | The height of the block the node produced this one after — the node's `prev_block_number`, as the gateway sequenced them. **Not** the last message you happened to receive, so a block missing anywhere between the node and you is visible in `prev` without counting messages. | | `time_ms` | The block's time. | | `partial` | `true` marks a block for which the node delivered only one of the two event streams; the other array is `[]`. | | `data.raw_book_diffs` | This coin's diff events for the block, each `{"user","oid","coin","side","px","raw_book_diff":…}` where `raw_book_diff` is one of `{"new":{…}}`, `{"update":{…}}` or `"remove"`. | | `data.order_statuses` | This coin's status events for the block, each `{"time","user","hash","builder","status","order":{"coin",…}}`. | Both arrays are the node's event bytes exactly, in the node's order. A block with nothing for this coin carries **two empty arrays** — the height still advances, so silence is detectable. A subscription therefore reads, in order (`data` elided) — `seq` and `height` agree on every line, snapshot included: ```json theme={null} {"channel":"l4Book","coin":"BTC","snapshot":true,"height":100,"time_ms":1757815848097,"seq":100,"data":{…}} {"channel":"l4Book","coin":"BTC","seq":101,"height":101,"prev":100,"time_ms":1757815848173,"partial":false,"data":{…}} {"channel":"l4Book","coin":"BTC","seq":102,"height":102,"prev":101,"time_ms":1757815848249,"partial":false,"data":{"raw_book_diffs":[],"order_statuses":[]}} {"channel":"l4Book","coin":"BTC","seq":103,"height":103,"prev":102,"time_ms":1757815848325,"partial":false,"data":{…}} {"channel":"l4Book","coin":"BTC","seq":104,"height":104,"prev":103,"time_ms":1757815848401,"partial":false,"data":{…}} ``` ## seq versus prev They answer different questions. * **`seq`** is the source block height every feed carries, and your [reconnect cursor](/websocket/protocol#reconnecting). On this feed it equals `height`, so it says the same thing `height` does. * **`prev`** is the chain of blocks: it names the **exact predecessor**, so a `prev` you have not applied means a block is missing anywhere between the node and you, whatever the cause — a dropped frame, a server-side reconnect, a frame the node could not split. **Gate on `prev`.** `seq` tells you where you are; `prev` tells you whether you got there without skipping anything, which is the question a book has to answer. Keep the last `seq` you applied anyway — it is what you pass back to resume after a disconnect. ## The client rule From the wire contract, verbatim: > Apply an update only if its `prev` equals the last applied height; on any mismatch, or `partial:true` when attribution matters, reconnect with the last successfully applied `seq`. If that cursor is no longer retained, subscribe without it to rebuild from a fresh snapshot. The first update after the snapshot has `prev == H`, whether it was replayed or live; you cannot tell the two apart by `prev`, and need not. A server-side reconnect that could not resume where it left off shows up the same way, as a `prev` you have not applied. The generated [order-book clients](/websocket/quickstart#order-book) implement the rule. ## When a book subscription is dropped A book subscription that cannot be started, or cannot be kept, is **dropped** — and you are told on the ordinary [`error` channel](/websocket/protocol#errors-on-an-open-socket): ```json theme={null} {"channel":"error","data":"unknown coin"} ``` > [!WARNING] > > The frame does **not** name the coin. A connection holding several `l4Book` subscriptions cannot tell which one ended from the frame alone — re-check every book you hold, or keep one book per connection if attribution matters. | `data` | What it means | | - | - | | `unknown coin` | The node has no such market, or you spelled it in the wrong case. **Do not retry as is.** | | `gateway busy`, `gateway unavailable`, `snapshot timed out`, `cancelled` | Transient. Retry with backoff. | | `book gateway not configured` | The feed is off on this server. | | `snapshot buffer did not fill` | One attempt waited 3 minutes and the source never produced enough blocks to join a snapshot onto. The feed has stalled. | | `snapshot is older than retained history` | All ten attempts ran and the node's export still predated the buffer. | | `snapshot failed: ` | Any other gRPC status code from the gateway, named. | | `snapshot failed` | The gateway's bytes were not a book. | The subscription is gone, it releases its slot under the per-connection cap, and the subscribe ack you already received no longer stands. Any snapshot already sent for it should be **discarded**. An `unsubscribe` while the snapshot is in flight is honoured silently. The refusals that never start a subscription at all arrive on the same channel: `feed not in tier` below Pro, `missing argument coin`, and `too many subscriptions` when the connection is at its cap. ## What it is not * **No history to seek into.** There is no arbitrary start height to ask for. The snapshot is the node's most recent export, and the only cursor you can resume from is one you were actually sent. * **Resume is bounded, not unlimited.** Passing the last applied `seq` back on resubscribe replays what you missed with no snapshot — but only within the retained window (10,000 messages per feed, and 60 seconds of warmth once a group empties). Past that you get `sequence is not retained` and a fresh snapshot is the only way back; see [reconnecting](/websocket/protocol#reconnecting). * **No book is held anywhere but in your process.** The server splits and forwards the node's bytes; applying diffs, and deciding when to throw the book away and start over, is your client's job. # WebSocket API Source: https://docs.coinversa.ai/websocket/overview Stream every Hyperliquid fill in real time over wss://ws.coinversa.ai — authenticate with your API key on the upgrade, subscribe to a coin, a wallet, a list of up to 1,000 wallets, or the firehose, and read fills as they land. Coinversa streams **every fill on Hyperliquid** — native perps, the builder dexes, spot — over one websocket at block cadence, with the wallet attached to each fill and `closedPnl`, `dir` and `startPosition` already on it. Frame shapes mirror Hyperliquid's own websocket API, so existing Hyperliquid client code is familiar. Twenty-four feeds are live today, five of them [multi-wallet lists](/websocket/feeds#multi-wallet-subscriptions) that follow up to 1,000 addresses on a single subscription, and three of them [derived quote feeds](/websocket/feeds#derived-order-book-quotes) — best bid/offer, aggregated depth, and every native perp mid — two of which are on **every plan**. Live **OHLC candles** for any coin on any of 14 intervals are on [every plan](/websocket/feeds#candles). Agent accounts and above can stream [every liquidation](/websocket/feeds#liquidations) as it happens. Pro accounts can also stream the **full L4 order book** of any coin — every resting order with its wallet, as one snapshot followed by per-block diffs — through the [`l4Book` feed](/websocket/order-book), plus [every accepted leverage and isolated-margin change](/websocket/feeds#leverage-and-margin), and the node's own [TWAP state machine](/websocket/feeds#twap-statuses), which opens with a snapshot of the TWAPs running right now. It is the third way into the same data, beside the [REST API](/api-reference/introduction) and the [MCP server](/mcp/setup), and it uses the **same API key**. It is also a different protocol with its own rules: auth travels on the upgrade rather than in an `X-API-Key` header, refusals are HTTP statuses or close codes rather than problem details, and limits are **capacity** — connections and subscriptions — never per message. This section states those rules in full; the REST pages point here rather than repeating them. **Endpoint:** `wss://ws.coinversa.ai` **Reference in the portal:** [developers.coinversa.ai/websockets](https://developers.coinversa.ai/websockets) ## Connecting Open the socket with your key on the HTTP upgrade, then send one `subscribe` frame per feed you want. The server acknowledges each and pushes a data frame whenever matching fills land in a block. Nothing is polled, and by default nothing is replayed on connect — you receive fills from the moment you subscribe onward. Pass a [`sequence`](/websocket/protocol#reconnecting) to resume where a dropped connection left off instead. **Every connection needs a key, including Free.** There is no anonymous tier and no auth frame to send once the socket is open. The request path is ignored — `/`, `/ws` and `/stream` all upgrade the same. ## Authentication The key goes out **with the upgrade request**, so the socket is already authenticated by the time it opens. There are two places it can travel, and which one you use is decided by your runtime, not by preference. > [card] Servers: Authorization header > > Node, Python, Go, and anything else that can set request headers sends > `Authorization: Bearer cvsa_...` on the upgrade. The `Bearer` scheme token is case-sensitive. > [card] Browsers: bearer subprotocol > > A browser `WebSocket` cannot set headers, so it offers the key as the second subprotocol after the literal `bearer`: > `new WebSocket(url, ['bearer', key])`. The server selects and echoes `bearer`; the key is never echoed. ```http theme={null} → GET / HTTP/1.1 Host: ws.coinversa.ai Connection: Upgrade Upgrade: websocket Sec-WebSocket-Version: 13 Sec-WebSocket-Key: <16 random bytes, base64> Authorization: Bearer cvsa_your_api_key ← HTTP/1.1 101 Switching Protocols upgrade: websocket connection: upgrade sec-websocket-accept: ← {"channel":"connected","data":{"tier":"pro","limits":{"connections":5, "subscriptions":100,"feeds":["trades","tradesByCoin","tradesByUser","tradesByUsers","liquidations","liquidationsByUser","liquidationsByUsers","leverageUpdates","leverageUpdatesByUser","leverageUpdatesByUsers","candle","allCandles","l4Book","bbo","allMids","l2Book","twapSliceFills","twapSliceFillsByUser","twapSliceFillsByUsers","twapOrders","twapOrdersByUser","twapOrdersByUsers","twapStatuses","twapStatusesByUser"]}}} ``` Whichever input is present decides on its own. A bad `Authorization` header is refused even if a valid subprotocol rides beside it; the subprotocol is read only when the header is absent. The key is **never** accepted in the URL — `?token=`, `?apiKey=` and `?key=` are refused exactly like no key at all, and a key in a URL is a key in every access log between you and us. > [!WARNING] > > A key shipped to other people's browsers is a key you have published. The subprotocol path is for **your own** dashboards and tools. For anything served to other users, hold the socket on a server you control and relay what the page needs over your own transport. ## The first frame The first frame on every live connection is `connected`, and its `limits` are what **this account** may do: how many connections it may hold in total, how many concurrent subscriptions per connection, and which feeds its tier includes. They are the account's **resolved** numbers — enterprise overrides already applied — so read them back rather than hard-coding your plan. The tier is fixed for the life of the socket; moving to another key or plan means reconnecting. ## When the handshake is refused A refused key is **fatal to the connection**: the upgrade never completes, no socket exists, and nothing you write in a message handler will run. This is a different code path from the `error` channel, and it is the one most clients get wrong. | Header clients see | Browser clients see | Meaning | | - | - | - | | `HTTP 401`, body `invalid or missing bearer token` | close code `4401` | No usable key: missing, malformed, unknown, revoked or suspended. Not retryable; fix the key. | | `HTTP 429`, body `too many connections` | close code `4429` | Your account already holds every connection its plan allows. Close one you own, or retry with backoff. | | `HTTP 503`, body `authentication unavailable` | close code `4503` | The entitlement lookup behind the handshake could not be reached. Nothing is wrong with your key; retry with backoff. | A browser cannot read the status of a refused upgrade, so for a subprotocol client the handshake completes and the socket is closed at once with the verdict as a close code — the HTTP status plus 4000 — and the same reason text. **These close codes are a public wire contract**; match on them. A `1006` with no reason is the browser saying the handshake itself failed or the link dropped, and it will not say which. No `Retry-After` comes with a 429, and a connection that died silently can hold its slot until keepalive notices — roughly 40 seconds. Client libraries that hide the response surface a refused upgrade as close code `1002`, reason `Expected 101 status code`, with zero frames received; pick an API that hands you the status. ## Where to go next > [card] [Quickstart](/websocket/quickstart) > > A complete client in Browser, Node, Python or Go — reconnect, resubscribe, sequence ordering, heartbeat. > [card] [Feeds and the fill object](/websocket/feeds) > > The firehose, one coin, one wallet, a list of wallets, liquidations, leverage changes, candles, the order book, the three TWAP views — and every field on a fill. > [card] [Wire protocol](/websocket/protocol) > > Every frame, the exact error strings, and how sequence numbers work. > [card] [Plan limits](/websocket/limits) > > Connections per account, subscriptions per connection, fair-use bandwidth. # Wire protocol Source: https://docs.coinversa.ai/websocket/protocol Every frame on the Coinversa websocket — subscribe and unsubscribe acks, multi-wallet `users` lists and how they hash, ping, data frames carrying a monotonic source position as `seq`, the order-book snapshot, update and error frames, and the exact error strings the server sends. Every frame is a single JSON object. Client frames carry a `method`; server frames carry a `channel`. The error strings on this page are **exact** — match them verbatim; they will not change. ## Subscribe The acknowledgement echoes your subscription back and adds a 16-character hex `id` identifying that subscription on this connection. ```json theme={null} → {"method":"subscribe","subscription":{"type":"tradesByCoin","coin":"BTC"}} ← {"channel":"subscriptionResponse","data":{"method":"subscribe","subscription":{"coin":"BTC","type":"tradesByCoin"},"id":"bc0de255be1a5311"}} ``` The `id` is stable: the same type and arguments always hash to the same `id`. It is the first 16 hex characters of a SHA-256 over the type and its arguments, not a full digest. On the fill feeds argument values are matched **case-insensitively** and case-folded before hashing, so `BTC` and `btc` are one subscription. The `coin` on `l4Book`, `bbo` and `l2Book` is one exception — **case-sensitive**, hashed as sent, and it must be the node's own spelling (`BTC`, `xyz:GOLD`, `#28200`), because all three key into the same book export; see [Order book (L4)](/websocket/order-book#subscribing) and [derived quotes](/websocket/feeds#derived-order-book-quotes). `candle`'s and `allCandles`' `interval` is the other: it is hashed as sent, so `1m` and `1M` are two different subscriptions carrying two different intervals — one minute and 30 days. A candle's `coin` is **not** an exception; it folds like any other market name, and the frame's `s` echoes the market as the data spells it. `candle` also takes an optional `source`, which defaults to `trade` **before** the id is hashed, so omitting it and sending `"source":"trade"` are one subscription with one `id`, not two. Arguments are strings or arrays of strings. The five [multi-wallet feeds](/websocket/feeds#multi-wallet-subscriptions) declare `users` as a list of up to 1,000; every other argument accepts at most one value. A `users` list is hashed as a **set** — sorted, case-folded and deduplicated — so `["0xb","0xa"]`, `["0xA","0xb"]` and `["0xa","0xb","0xa"]` all produce one `id` and one subscription. A one-element list hashes identically to the same argument sent as a bare string, which is also how a bare string is accepted: it becomes a one-item list. ```json theme={null} → {"method":"subscribe","subscription":{"type":"tradesByUsers","users":["0x9bad…1f07","0x28f0…4c19"]}} ← {"channel":"subscriptionResponse","data":{"method":"subscribe","subscription":{"type":"tradesByUsers","users":["0x9bad…1f07","0x28f0…4c19"]},"id":"<16 hex>"}} ``` The ack echoes your subscription object **verbatim**, so the list comes back in the order you sent it rather than in the normalised order that produced the `id`. ## Unsubscribe Send the same subscription object back with `"method":"unsubscribe"`. The acknowledgement carries the **same** `id` the subscribe returned, so you can match the teardown to the setup. The slot frees immediately. Because a `users` list is a set, an unsubscribe listing the same wallets in any order releases the subscription. ```json theme={null} → {"method":"unsubscribe","subscription":{"type":"tradesByCoin","coin":"BTC"}} ← {"channel":"subscriptionResponse","data":{"method":"unsubscribe","subscription":{"coin":"BTC","type":"tradesByCoin"},"id":"bc0de255be1a5311"}} ``` ## Ping An application-level heartbeat, independent of the protocol-level ping frames your client library may already send. It is the only liveness probe a browser has. ```json theme={null} → {"method":"ping"} ← {"channel":"pong"} ``` ## Data frames `channel` is the subscription type, `seq` is a monotonic source position — the block height on every feed but the `leverageUpdates` and `twapOrders` families and mark-source `candle` — and `data` is an array of `[wallet, fill]` pairs on the fill feeds. The liquidation, leverage, TWAP-order and TWAP-status feeds put their own objects in `data`, `candle` puts a single OHLC object there, `allCandles` an array of them, and the derived quote feeds (`bbo`, `l2Book`, `allMids`) put an object carrying the whole current view — each frame **replaces** the last rather than amending it; see [feeds and the fill object](/websocket/feeds#data-frames) for every shape. There is no subscription id on a data frame. ## Order book frames `l4Book` speaks two frames of its own, both on channel `l4Book` and both carrying the `coin` as you sent it. The full contract — field meanings, the `data` layout, and the client rule — is on [Order book (L4)](/websocket/order-book). **Snapshot** — exactly one, first, with `seq` equal to its `height`; `data` is the node's export of the whole book: ```json theme={null} ← {"channel":"l4Book","coin":"BTC","snapshot":true,"height":100,"time_ms":1757815848097,"seq":100,"data":{"book_orders":[[…],[…]],"untriggered_orders":[…]}} ``` **Update** — one per block after the snapshot, whether or not the block touched the coin; `height` and `prev` chain the blocks, and `seq` equals `height` on every one: ```json theme={null} ← {"channel":"l4Book","coin":"BTC","seq":103,"height":103,"prev":102,"time_ms":1757815848325,"partial":false,"data":{"raw_book_diffs":[…],"order_statuses":[…]}} ``` `l4Book` has no error frame of its own. A book subscription that is dropped is reported on the ordinary `error` channel, **without the coin on it** — see [when a book subscription is dropped](/websocket/order-book#when-a-book-subscription-is-dropped): ```json theme={null} ← {"channel":"error","data":"unknown coin"} ``` ## TWAP status frames `twapStatuses` and `twapStatusesByUser` speak two frames. The full contract — the event shape, the `status` union and the client rule for keeping the set — is on [TWAP statuses](/websocket/feeds#twap-statuses). **Snapshot** — at most one, first, carrying `"snapshot": true` and `data` as an **object**. `seq` is the block height the gateway built it at, and `channel` is the type you subscribed to, so a by-user snapshot says `twapStatusesByUser`: ```json theme={null} ← {"channel":"twapStatuses","snapshot":true,"seq":1156436426,"data":{"complete":false,"coverage_from_ms":1789940000000,"twaps":[{"time":"2026-09-22T02:00:02.321152806","twap_id":2241180,"state":{…},"status":"activated"}]}} ``` Each element of `twaps` is the last status event for one live `twap_id`, identical in shape to an element of a live frame's `data`. `complete` says whether the gateway's coverage reaches back far enough to hold every activated TWAP; `coverage_from_ms` is the oldest block time it has applied. A `false` here is not an error — see [the snapshot on subscribe](/websocket/feeds#the-snapshot-on-subscribe). **Live** — one per block that carried a matching event, with `data` as an **array** of status events: ```json theme={null} ← {"channel":"twapStatuses","seq":1156436431,"data":[{"time":"2026-09-22T02:04:11.887431002","twap_id":2241180,"state":{…},"status":"finished"}]} ``` The subscribe ack is sent **before** the snapshot, and these feeds have no buffer warm-up, so the snapshot follows the ack immediately. Frames buffered above the snapshot's `seq` are released after it, leaving no gap. If the snapshot fails, the subscription is **removed** after its ack and one `{"channel":"error","data":""}` follows; resubscribe. The reasons are [below](#errors-on-an-open-socket). ## Sequence numbers `seq` is a **monotonic source position** — the place in the source stream the frame was produced from. It does not restart on reconnect, it is not per subscription, and it does not start at 1. What the number *is* depends on the feed: | Feeds | `seq` is | | - | - | | `trades`, `tradesByCoin`, `tradesByUser`, `tradesByUsers`, `liquidations`, `liquidationsByUser`, `liquidationsByUsers`, `twapSliceFills`, `twapSliceFillsByUser`, `twapSliceFillsByUsers`, `twapStatuses`, `twapStatusesByUser`, `l4Book`, `bbo`, `l2Book`, `allMids`, `candle` and `allCandles` on `source: "trade"` | The **source block height** — the height of the block the frame was produced from. The same number across all of them. On `bbo`, `l2Book` and `allMids` it is the **source book height**, which skips blocks that changed nothing visible — a gap there is not loss. | | `leverageUpdates`, `leverageUpdatesByUser`, `leverageUpdatesByUsers`, `twapOrders`, `twapOrdersByUser`, `twapOrdersByUsers`, `candle` and `allCandles` on `source: "mark"` | The replica block's **Unix timestamp in nanoseconds**, because the replica-command stream does not expose its height outside the JSON payload. | > [!WARNING] > > **The two halves of the TWAP product are on different scales.** `twapStatuses` and `twapStatusesByUser` carry the **source block height**, taken from the gateway's own block number — while `twapOrders` and its variants carry a **nanosecond** replica timestamp. They describe the same TWAPs and join on `twap_id`, but their `seq` values are about **nine orders of magnitude** apart and belong to different streams. Never hold one cursor across the pair, and never compare their numbers. This is the easiest fact on this page to get backwards. `candle` and `allCandles` appear in both rows: they are the only feeds whose `seq` depends on an argument. Its default `source: "trade"` is built from fills and carries a block height; `source: "mark"` is built from the replica-command stream and carries a nanosecond timestamp. Two candle subscriptions on one connection can therefore be sequencing on different kinds of number **on the same `candle` channel**, and data frames carry no subscription id to tell them apart — see [candles](/websocket/feeds#candles). Both only ever increase, and both are valid reconnect cursors for their own feed. What you must not do is compare one against the other, or hold a single "last seq" across a mixture of the two — a nanosecond timestamp is about nine orders of magnitude larger than a block height (a height is around 1.1 × 10⁹, a nanosecond stamp around 1.79 × 10¹⁸), so a shared counter would read every fill frame after a leverage frame as a replay. > [!WARNING] > > This changed. `seq` used to be a per-subscription counter that started at 1 and incremented by one per frame. A client that checks `seq === last + 1` now reports almost every frame on a filtered feed as a lost message. Check that `seq` **increases**, not that it increases by one. A filtered feed sends no frame for a block that matched nothing, so `tradesByCoin` on a quiet coin legitimately skips hundreds of numbers between frames. That is the feed working. What is broken is `seq` going **backwards**: the chain only moves forward, so a value below the last one you applied means frames were replayed or reordered. > [!WARNING] > > **`candle` is the one feed that legitimately repeats a `seq`.** A `source: "trade"` block that crosses an interval boundary emits **two frames on the same `seq`** — the sealed candle carrying `"closed": true`, then the newly opened one. The server declares this in the catalog (`repeatedSequence`), and it is the only feed that does. A client that treats any repeat as a fault will flag every sealed candle. Treat a repeat as a fault on every other feed; on `candle`, apply both frames in the order they arrive. Because a data frame carries no subscription id, key any per-stream tracking on what the frame itself identifies: the `channel` plus the coin or wallet of its first fill. Two `tradesByCoin` subscriptions on one connection both arrive on channel `tradesByCoin`, and because `seq` is now a shared source position they will both report the same number for the same block — so tracking on the `channel` alone sees that as a **repeat**, which is exactly the fault this page tells you to act on. Key per subscription, not per channel. That recipe works on the by-coin and by-user feeds, where every frame on one subscription carries the same coin or the same wallet. It does **not** work on the [multi-wallet feeds](/websocket/feeds#multi-wallet-subscriptions): on a `…ByUsers` subscription the wallet in the first entry changes from frame to frame, so keying on it manufactures a new stream almost every frame and never catches a rewind. Nothing in a frame distinguishes two `tradesByUsers` lists sharing a connection. So **hold at most one subscription of a given list feed per connection** — then the channel *is* the stream key for it and the ordinary rule applies. A second list of the same type belongs on a second connection, within your [connection cap](/websocket/limits). `seq` is also your **reconnect cursor** — record the last one you applied and pass it back on resubscribe; see [Reconnecting](#reconnecting). On `l4Book`, `seq` equals `height` on the snapshot and on every update, so the two agree. Gate the book on `prev` all the same: it names the exact predecessor block, which `seq` alone does not — see [seq versus prev](/websocket/order-book#seq-versus-prev). ## Reconnecting Add `sequence` to the subscription and the server replays what you missed instead of starting you over: ```json theme={null} → {"method":"subscribe","subscription":{"type":"tradesByCoin","coin":"BTC","sequence":123456}} ``` The server sends **no snapshot**, replays every retained message with `seq` greater than yours, then continues live. `sequence` is control data: it steers the subscribe without being hashed into the subscription id, so reconnecting with a cursor resumes the same subscription rather than opening a second one. The same is true of `snapshot`. Retention is **10,000 messages per feed** per connection manager, and an empty feed group stays warm for **60 seconds**. Past either, the subscription is dropped: | `data` | What it means | | - | - | | `sequence is not retained` | The feed group is holding nothing to replay — usually because it had gone cold and was dropped. | | `sequence is older than retained history` | The cursor predates the oldest message still held. | | `sequence and snapshot cannot be combined` | `snapshot: true` with a `sequence`. Pick one. | In every case, subscribe again **without** `sequence` to rebuild from a fresh snapshot. ## Starting without a snapshot To begin at live updates and skip initial state, pass `"snapshot": false`: ```json theme={null} → {"method":"subscribe","subscription":{"type":"l4Book","coin":"BTC","snapshot":false}} ``` Messages that arrive while you are joining are held until your subscribe ack is queued, then released with no snapshot ahead of them. On `l4Book` this gives you raw diffs, which **do not constitute a book** unless you already hold compatible state for that coin. On `twapStatuses` and `twapStatusesByUser` it gives you state changes with no live set under them, so you learn about a TWAP only when it next changes state. Omitting `snapshot` defaults to sending one, unless you supplied a `sequence`. Six feeds have state to send — `l4Book`, `bbo`, `allMids`, `l2Book`, `twapStatuses` and `twapStatusesByUser`; on every other feed a subscribe starts at the next matching block either way. ## Errors on an open socket `{"channel":"error","data":""}` arrives **on an open socket** and never closes it — the connection keeps serving whatever it was already serving. This is the opposite of a [refused handshake](/websocket/overview#when-the-handshake-is-refused), which ends the connection before it exists. | `data` | What it means | | - | - | | `bad request` | The frame did not parse as the server expects — malformed JSON, a non-string `type`, or an argument value that is neither a string nor an array of strings. A well-formed frame the server merely cannot act on gets one of the strings below. | | `unknown method` | `method` is not `subscribe`, `unsubscribe` or `ping`. The retired `{"method":"auth"}` frame lands here: authentication happens on the upgrade, not in a frame. | | `unknown subscription type` | `type` is not in the catalog. The type is case-sensitive — `tradesByCoin` works, `TRADESBYCOIN` does not. A subscribe carrying no `subscription` object, or a `subscription` with no `type`, never reaches this check and answers `bad request` instead. | | `unknown argument ` | The subscription carried an argument this feed does not declare, naming it. | | `missing argument ` | A required argument was absent or empty, naming it: `missing argument coin`, `missing argument user`. An **empty `users` array** lands here, not on `empty argument users`. | | `empty argument ` | The argument was present but its value — or one item of its list — is the empty string. The check is per item. | | `too many values for argument ` | More values than the argument accepts. Only `users` accepts more than one, and its ceiling is **1,000 distinct wallets** after deduplication; every other argument is scalar. | | `invalid argument ` | The argument was present but its value is not one this feed accepts, naming it. Today only `candle` and `allCandles` declare allowed values, so this is `invalid argument interval` for anything outside the [14 intervals](/websocket/feeds#intervals) — `{"type":"candle","coin":"BTC","interval":"2m"}` answers it — and `invalid argument source` for a `source` that is neither `trade` nor `mark`. | | `too many subscriptions` | This connection is at its per-connection subscription cap. The cap counts distinct subscriptions, so a repeat of one you already hold is free, and a `users` list of 1,000 wallets counts as **one**; unsubscribe one and the slot frees immediately. | | `quote book warming up` | A `bbo`, `l2Book` or `allMids` subscribe arrived before its shared book was ready. The subscribe itself is **acked immediately**; what waits is the first data frame. The server re-requests the snapshot every 250 ms behind that ack and sends nothing in the meantime, so a cold subscribe is **acked then silent**, not refused, until it gives up — after **2 minutes** on `bbo` and `l2Book`, **5 minutes** on `allMids`, which initializes the whole native perp universe. By the time you see this the server has already retried for that long, so do not retry immediately, and do not time out waiting for the first frame sooner than the bound — a client waiting on the ack alone will never see this. Nothing is wrong with the key, the coin or the plan. | | `server at subscription capacity` | A service-wide bound on unique subscriptions. Joining a subscription that already exists still works. | | `feed not in tier` | That subscription type is not included in your tier — the firehose, the Starter list feeds and `l2Book` on Free; the three liquidation feeds below Agent; `l4Book`, the leverage, TWAP-order and TWAP-status feeds and their list variants below Pro. `bbo` and `allMids` are on every plan and never answer this. Check `connected.data.limits.feeds`. | | `snapshot buffer did not fill` | The server could not collect enough consecutive blocks to join a snapshot onto before giving up. The source has stalled; subscribe again. | | `invalid sequence` / `invalid snapshot` | `sequence` was not a number, or `snapshot` was not a boolean. | A `twapStatuses` or `twapStatusesByUser` subscription whose **snapshot** fails is dropped the same way, after its ack, with one of these on the `error` channel. The frame names no feed, so a connection holding both TWAP-status subscriptions cannot tell which one ended from the frame alone: | `data` | What it means | | - | - | | `twap gateway not configured` | This deployment has no TWAP gateway connection. Not retryable on your side. | | `subscription not active` | The subscription had not reached the publisher within a second of the request. Subscribe again. | | `snapshot timed out` | The gateway did not answer within the snapshot deadline. | | `gateway busy` | The gateway refused the request under load. Back off and subscribe again. | | `gateway unavailable` | The gateway could not be reached. | | `cancelled` | The request was cancelled before it completed — usually the connection going away. | | `snapshot failed: ` / `snapshot failed` | Any other gateway failure, with the gRPC status code when there is one. | | `snapshot is older than retained history` | The snapshot landed behind the oldest frame still buffered, so the two could not be joined without a hole. Subscribe again. | In every case **the subscription no longer exists** — nothing is retried for you and no live frames follow. Subscribe again rather than waiting. A book subscription that starts and then fails — an unknown coin, a snapshot that could not be fetched, a buffer that never filled — is **dropped** and reported here, on the ordinary `error` channel, as `{"channel":"error","data":""}`. The frame does not name the coin, so a connection holding several books cannot tell which one ended from the frame alone. The reasons are listed under [when a book subscription is dropped](/websocket/order-book#when-a-book-subscription-is-dropped). ## Closing Close the socket from your side with a normal closure (`1000`); the connection is returned to your account's pool at once. A silent disconnect — a laptop lid, a dropped network — holds its slot until keepalive notices, roughly 40 seconds, which is why a fast reconnect after a crash can meet a `429` briefly. # WebSocket quickstart Source: https://docs.coinversa.ai/websocket/quickstart Copy-and-run websocket clients for Hyperliquid fills and the L4 order book in Node, Python, Go and the browser — connect with your API key, subscribe, reconnect with backoff, and check sequence ordering. Put your key in `COINVERSA_API_KEY` and run any of these as it stands (the Browser client takes the key in a placeholder instead, because a page cannot read the environment). There is no unauthenticated mode to fall back on — without the key the upgrade is refused before a socket exists, which every client below handles. Each client is a **working subscriber, not a connect line**: it reconnects with jittered backoff and resubscribes, resets the backoff once the `connected` frame lands, checks [sequence ordering](/websocket/protocol#sequence-numbers) per stream, sends a heartbeat ping, and tells the three [handshake refusals](/websocket/overview#when-the-handshake-is-refused) apart from a drop — never retrying an invalid key. They subscribe to **two coins on one connection** deliberately, because that is the case where gap detection keyed on `channel` alone quietly falls apart. ## Check your key in one command Before writing code, prove the handshake with a raw upgrade. A `101` means the key was accepted; a `401`, `429` or `503` is the [refusal](/websocket/overview#when-the-handshake-is-refused) it names. ```bash curl theme={null} curl -i -N --max-time 3 https://ws.coinversa.ai/ \ -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Sec-WebSocket-Version: 13" \ -H "Sec-WebSocket-Key: $(openssl rand -base64 16)" \ -H "Authorization: Bearer $COINVERSA_API_KEY" ``` > [!NOTE] > > Test the browser path **from a browser** or with the raw handshake above. Bun's WebSocket client (observed on 1.2.2) closes a correctly negotiated `bearer` handshake with `1002 Mismatch client protocol`; it is a client quirk, not a refusal, and a Bun or Node process should send the `Authorization` header anyway. ## Clients These four are generated from one module — the same one the developer portal exports from — and are re-synced by `scripts/sync-websocket-samples.mjs`. They are not edited by hand. ```javascript Browser theme={null} // Browser client for tradesByCoin BTC, tradesByCoin ETH — generated by the Coinversa developer portal. // // A browser WebSocket cannot set headers, so the key goes in the subprotocol // list: the literal 'bearer' first, the key second. It is still a request // header (Sec-WebSocket-Protocol), never part of the URL. A key shipped to // other people's browsers is a key you have published — use this for your own // dashboards and tools; for anything served to others, hold the socket on a // server (see the Node, Python and Go clients). const URL = "wss://ws.coinversa.ai"; const apiKey = 'cvsa_...'; // paste your key here; never commit it const SUBSCRIPTIONS = [ { type: "tradesByCoin", coin: "BTC" }, { type: "tradesByCoin", coin: "ETH" }, ]; // Reconnect with backoff: 1 s doubling to 30 s, plus jitter so a fleet of // clients does not reconnect in lockstep. Reset once a connection is live. const BACKOFF = { baseMs: 1000, maxMs: 30000, jitterMs: 500 }; const PING_MS = 30000; let attempt = 0; let stopped = false; // seq is the SOURCE BLOCK HEIGHT, the same on every feed. A filtered feed // skips numbers whenever a block matches nothing, so a jump is normal and // only a repeat or a rewind is a fault. A data frame carries no subscription // id, so key the check on the stream you can identify from the frame itself: // channel plus the coin or wallet of its first fill. const streamKey = (msg) => { const [, fill] = msg.data?.[0] || []; if (msg.channel === 'tradesByCoin' && fill?.coin) return `tradesByCoin:${fill.coin}`; if (msg.channel === 'tradesByUser' && msg.data?.[0]?.[0]) return `tradesByUser:${msg.data[0][0]}`; return msg.channel; }; function connect() { if (stopped) return; const lastSeq = new Map(); // per connection; seq is a block height, so it only moves forward const ws = new WebSocket(URL, ['bearer', apiKey]); let heartbeat = null; ws.addEventListener('open', () => { // The socket is open but not yet proven: the 'connected' frame is the // server's confirmation. Subscribe now; the server queues nothing before. for (const subscription of SUBSCRIPTIONS) { ws.send(JSON.stringify({ method: 'subscribe', subscription })); } heartbeat = setInterval(() => { if (ws.readyState === WebSocket.OPEN) ws.send(JSON.stringify({ method: 'ping' })); }, PING_MS); }); ws.addEventListener('message', (event) => { const msg = JSON.parse(event.data); if (msg.channel === 'connected') { attempt = 0; // live: the next disconnect starts backoff from the beginning const { tier, limits } = msg.data; console.log(`connected on ${tier}: ${limits.connections} connections, ${limits.subscriptions} subscriptions`); return; } if (msg.channel === 'subscriptionResponse') { console.log('ack', msg.data.method, msg.data.id); return; } if (msg.channel === 'error') { console.error('server error:', msg.data); return; } if (msg.channel === 'pong') return; const key = streamKey(msg); const previous = lastSeq.get(key); // seq must INCREASE, not increase by one: a filtered feed skips the // blocks that matched nothing. Going backwards or repeating is the fault. if (previous != null && msg.seq <= previous) { console.warn(`${key}: sequence went ${msg.seq === previous ? 'nowhere' : 'backwards'} ${previous} -> ${msg.seq} — frames replayed or reordered`); } lastSeq.set(key, msg.seq); for (const [wallet, fill] of msg.data) { console.log(wallet, fill.coin, fill.side, fill.sz, '@', fill.px, fill.dir, 'pnl', fill.closedPnl); } }); // In a browser a refused handshake arrives as a CLOSE, not a status: 4401 // invalid or missing key (not retryable — fix the key), 4429 your account // is at its connection cap, 4503 entitlement lookup unavailable. Anything // else, including 1006, is a drop: reconnect. ws.addEventListener('close', (event) => { clearInterval(heartbeat); if (event.code === 4401) { console.error('refused: invalid or missing key — not retrying'); stopped = true; return; } if (event.code === 4429) console.warn('refused: connection cap reached — retrying with backoff'); else if (event.code === 4503) console.warn('refused: entitlement lookup unavailable — retrying with backoff'); else console.warn(`closed (${event.code}${event.reason ? ' ' + event.reason : ''}) — reconnecting`); const delay = Math.min(BACKOFF.maxMs, BACKOFF.baseMs * 2 ** attempt) + Math.random() * BACKOFF.jitterMs; attempt += 1; setTimeout(connect, delay); }); } connect(); ``` ```javascript Node theme={null} // Node client for tradesByCoin BTC, tradesByCoin ETH — generated by the Coinversa developer portal. // npm install ws (Node's built-in WebSocket cannot set headers; use ws.) import WebSocket from 'ws'; // The key goes out with the HTTP upgrade, so the socket is authenticated by // the time it opens. Read it from the environment; never commit it. const URL = "wss://ws.coinversa.ai"; const apiKey = process.env.COINVERSA_API_KEY; if (!apiKey) { console.error('set COINVERSA_API_KEY'); process.exit(1); } const SUBSCRIPTIONS = [ { type: "tradesByCoin", coin: "BTC" }, { type: "tradesByCoin", coin: "ETH" }, ]; // Reconnect with backoff: 1 s doubling to 30 s, plus jitter so a fleet of // clients does not reconnect in lockstep. Reset once a connection is live. const BACKOFF = { baseMs: 1000, maxMs: 30000, jitterMs: 500 }; const PING_MS = 30000; let attempt = 0; let stopped = false; // seq is the SOURCE BLOCK HEIGHT, the same on every feed. A filtered feed // skips numbers whenever a block matches nothing, so a jump is normal and // only a repeat or a rewind is a fault. A data frame carries no subscription // id, so key the check on the stream you can identify from the frame itself: // channel plus the coin or wallet of its first fill. const streamKey = (msg) => { const [, fill] = msg.data?.[0] || []; if (msg.channel === 'tradesByCoin' && fill?.coin) return `tradesByCoin:${fill.coin}`; if (msg.channel === 'tradesByUser' && msg.data?.[0]?.[0]) return `tradesByUser:${msg.data[0][0]}`; return msg.channel; }; function scheduleReconnect(why) { if (stopped) return; const delay = Math.min(BACKOFF.maxMs, BACKOFF.baseMs * 2 ** attempt) + Math.random() * BACKOFF.jitterMs; attempt += 1; console.warn(`${why} — reconnecting in ${Math.round(delay)} ms`); setTimeout(connect, delay); } function connect() { if (stopped) return; const lastSeq = new Map(); // per connection; seq is a block height, so it only moves forward const ws = new WebSocket(URL, { headers: { Authorization: `Bearer ${apiKey}` } }); let heartbeat = null; let refused = false; // A refused upgrade is an HTTP status, not a frame — no socket ever opens, // so it never reaches 'message'. 401 invalid or missing key (not retryable: // fix the key), 429 your account is at its connection cap, 503 entitlement // lookup unavailable — both retried with backoff. ws.on('unexpected-response', (request, response) => { refused = true; request.destroy(); if (response.statusCode === 401) { console.error('refused: HTTP 401 invalid or missing key — not retrying'); stopped = true; process.exitCode = 1; // a supervisor must see this as a failure, not success return; } scheduleReconnect(`refused: HTTP ${response.statusCode}`); }); ws.on('open', () => { for (const subscription of SUBSCRIPTIONS) { ws.send(JSON.stringify({ method: 'subscribe', subscription })); } heartbeat = setInterval(() => { if (ws.readyState === WebSocket.OPEN) ws.send(JSON.stringify({ method: 'ping' })); }, PING_MS); }); ws.on('message', (raw) => { const msg = JSON.parse(raw.toString()); if (msg.channel === 'connected') { attempt = 0; // live: the next disconnect starts backoff from the beginning const { tier, limits } = msg.data; console.log(`connected on ${tier}: ${limits.connections} connections, ${limits.subscriptions} subscriptions`); return; } if (msg.channel === 'subscriptionResponse') { console.log('ack', msg.data.method, msg.data.id); return; } if (msg.channel === 'error') { console.error('server error:', msg.data); return; } if (msg.channel === 'pong') return; const key = streamKey(msg); const previous = lastSeq.get(key); // seq must INCREASE, not increase by one: a filtered feed skips the // blocks that matched nothing. Going backwards or repeating is the fault. if (previous != null && msg.seq <= previous) { console.warn(`${key}: sequence went ${msg.seq === previous ? 'nowhere' : 'backwards'} ${previous} -> ${msg.seq} — frames replayed or reordered`); } lastSeq.set(key, msg.seq); for (const [wallet, fill] of msg.data) { console.log(wallet, fill.coin, fill.side, fill.sz, '@', fill.px, fill.dir, 'pnl', fill.closedPnl); } }); ws.on('error', (err) => { if (!refused) console.error('socket error:', err.message); }); ws.on('close', (code, reason) => { clearInterval(heartbeat); if (refused) return; // unexpected-response already decided scheduleReconnect(`closed (${code}${reason?.length ? ' ' + reason.toString() : ''})`); }); } connect(); ``` ```python Python theme={null} # Python client for tradesByCoin BTC, tradesByCoin ETH — generated by the Coinversa developer portal. # pip install websockets (15.x; on websockets < 14 the header kwarg is # extra_headers= and the exception below is InvalidStatusCode with .status_code) import asyncio import json import os import random import websockets URL = "wss://ws.coinversa.ai" # The key goes out with the HTTP upgrade, so the socket is authenticated by # the time it opens. Read it from the environment; never commit it. API_KEY = os.environ["COINVERSA_API_KEY"] SUBSCRIPTIONS = [ {"type": "tradesByCoin", "coin": "BTC"}, {"type": "tradesByCoin", "coin": "ETH"}, ] # Reconnect with backoff: 1 s doubling to 30 s, plus jitter so a fleet of # clients does not reconnect in lockstep. Reset once a connection is live. BACKOFF_BASE = 1.0 BACKOFF_MAX = 30.0 BACKOFF_JITTER = 0.5 PING_SECONDS = 30.0 def stream_key(msg): # seq is the SOURCE BLOCK HEIGHT, the same on every feed. A filtered feed # skips numbers whenever a block matches nothing, so a jump is normal and # only a repeat or a rewind is a fault. A data frame carries no # subscription id, so key the check on the stream the frame itself # identifies: channel plus the coin or wallet of its first fill. entry = (msg.get("data") or [[None, {}]])[0] wallet, fill = entry if isinstance(entry, list) and len(entry) == 2 else (None, entry if isinstance(entry, dict) else {}) if msg["channel"] == "tradesByCoin" and fill.get("coin"): return "tradesByCoin:" + fill["coin"] if msg["channel"] == "tradesByUser" and wallet: return "tradesByUser:" + wallet return msg["channel"] async def heartbeat(ws): while True: await asyncio.sleep(PING_SECONDS) await ws.send(json.dumps({"method": "ping"})) async def session(attempt_reset): # One connection: subscribe, then read until it drops. Returns why it ended. headers = {"Authorization": "Bearer " + API_KEY} async with websockets.connect(URL, additional_headers=headers) as ws: for subscription in SUBSCRIPTIONS: await ws.send(json.dumps({"method": "subscribe", "subscription": subscription})) pinger = asyncio.create_task(heartbeat(ws)) last_seq = {} # per connection; seq is a block height, so it only moves forward try: async for raw in ws: msg = json.loads(raw) channel = msg.get("channel") if channel == "connected": attempt_reset() # live: the next disconnect starts backoff from the beginning limits = msg["data"]["limits"] print(f'connected on {msg["data"]["tier"]}:', f'{limits["connections"]} connections,', f'{limits["subscriptions"]} subscriptions') continue if channel == "subscriptionResponse": print("ack", msg["data"]["method"], msg["data"]["id"]) continue if channel == "error": print("server error:", msg["data"]) continue if channel == "pong": continue key = stream_key(msg) seq = msg["seq"] previous = last_seq.get(key) # seq must INCREASE, not increase by one: a filtered feed # skips the blocks that matched nothing. if previous is not None and seq <= previous: went = "nowhere" if seq == previous else "backwards" print(f"{key}: sequence went {went} {previous} -> {seq} - frames replayed or reordered") last_seq[key] = seq # .get(): a fill that lacks a field must not take the client down. for wallet, fill in msg["data"]: print(wallet, fill.get("coin"), fill.get("side"), fill.get("sz"), "@", fill.get("px"), fill.get("dir"), "pnl", fill.get("closedPnl")) finally: pinger.cancel() reason = f" {ws.close_reason}" if ws.close_reason else "" return f"closed ({ws.close_code}{reason})" async def main(): attempt = 0 def reset(): nonlocal attempt attempt = 0 while True: try: why = await session(reset) except websockets.exceptions.InvalidStatus as exc: # A refused upgrade is an HTTP status, not a frame - no socket ever # opens. 401 invalid or missing key (not retryable: fix the key), # 429 account at its connection cap, 503 entitlements down. status = exc.response.status_code if status == 401: print("refused: HTTP 401 invalid or missing key - not retrying") raise SystemExit(1) # a supervisor must see this as a failure, not success why = f"refused: HTTP {status}" except websockets.exceptions.ConnectionClosed as exc: why = f"closed ({exc.rcvd.code if exc.rcvd else 'no close frame'})" except OSError as exc: why = f"network error: {exc}" delay = min(BACKOFF_MAX, BACKOFF_BASE * (2 ** attempt)) + random.random() * BACKOFF_JITTER attempt += 1 print(f"{why} - reconnecting in {delay:.1f}s") await asyncio.sleep(delay) asyncio.run(main()) ``` ```go Go theme={null} // Go client for tradesByCoin BTC, tradesByCoin ETH — generated by the Coinversa developer portal. // go get github.com/coder/websocket package main import ( "context" "encoding/json" "errors" "fmt" "log" "math" "math/rand" "net/http" "os" "time" "github.com/coder/websocket" ) const wsURL = "wss://ws.coinversa.ai" // Reconnect with backoff: 1 s doubling to 30 s, plus jitter so a fleet of // clients does not reconnect in lockstep. Reset once a connection is live. const ( backoffBase = 1000 * time.Millisecond backoffMax = 30000 * time.Millisecond backoffJitter = 500 * time.Millisecond pingEvery = 30000 * time.Millisecond ) var subscriptions = []map[string]string{ {"type": "tradesByCoin", "coin": "BTC"}, {"type": "tradesByCoin", "coin": "ETH"}, } type frame struct { Channel string `json:"channel"` Seq int64 `json:"seq"` Data json.RawMessage `json:"data"` } type fill struct { Coin string `json:"coin"` Side string `json:"side"` Px string `json:"px"` Sz string `json:"sz"` Dir string `json:"dir"` ClosedPnl string `json:"closedPnl"` } // streamKey: seq is the SOURCE BLOCK HEIGHT, the same on every feed, so a // forward jump is a block that matched nothing rather than a lost frame. A // data frame carries no subscription id, so the check is keyed on what the // frame itself identifies: channel plus the coin or wallet of its first fill. func streamKey(f frame, pairs [][2]json.RawMessage) string { if len(pairs) == 0 { return f.Channel } var wallet string var first fill _ = json.Unmarshal(pairs[0][0], &wallet) _ = json.Unmarshal(pairs[0][1], &first) switch { case f.Channel == "tradesByCoin" && first.Coin != "": return "tradesByCoin:" + first.Coin case f.Channel == "tradesByUser" && wallet != "": return "tradesByUser:" + wallet } return f.Channel } // session runs one connection until it drops. It returns errNotRetryable for // a refusal that retrying cannot fix. var errNotRetryable = errors.New("not retryable") func session(ctx context.Context, apiKey string, live func()) error { // The key goes out with the HTTP upgrade, so the socket is authenticated // by the time it opens. A refused upgrade is an HTTP status, not a frame: // 401 invalid or missing key, 429 account at its connection cap, 503 // entitlement lookup unavailable. header := http.Header{} header.Set("Authorization", "Bearer "+apiKey) conn, resp, err := websocket.Dial(ctx, wsURL, &websocket.DialOptions{HTTPHeader: header}) if err != nil { if resp != nil { if resp.StatusCode == http.StatusUnauthorized { return fmt.Errorf("refused: HTTP 401 invalid or missing key — not retrying: %w", errNotRetryable) } return fmt.Errorf("refused: HTTP %d", resp.StatusCode) } return err } defer conn.CloseNow() conn.SetReadLimit(1 << 20) for _, sub := range subscriptions { body, _ := json.Marshal(map[string]any{"method": "subscribe", "subscription": sub}) if err := conn.Write(ctx, websocket.MessageText, body); err != nil { return err } } pingCtx, stopPing := context.WithCancel(ctx) defer stopPing() go func() { t := time.NewTicker(pingEvery) defer t.Stop() for { select { case <-pingCtx.Done(): return case <-t.C: _ = conn.Write(pingCtx, websocket.MessageText, []byte(`{"method":"ping"}`)) } } }() lastSeq := map[string]int64{} // per connection; seq is a block height, so it only moves forward for { _, raw, err := conn.Read(ctx) if err != nil { return err } var f frame if err := json.Unmarshal(raw, &f); err != nil { log.Printf("unparsable frame: %v", err) continue } switch f.Channel { case "connected": live() // the next disconnect starts backoff from the beginning var d struct { Tier string `json:"tier"` Limits struct { Connections int `json:"connections"` Subscriptions int `json:"subscriptions"` } `json:"limits"` } _ = json.Unmarshal(f.Data, &d) log.Printf("connected on %s: %d connections, %d subscriptions", d.Tier, d.Limits.Connections, d.Limits.Subscriptions) continue case "subscriptionResponse": var ack struct { Method string `json:"method"` ID string `json:"id"` } _ = json.Unmarshal(f.Data, &ack) log.Printf("ack %s %s", ack.Method, ack.ID) continue case "error": log.Printf("server error: %s", string(f.Data)) continue case "pong": continue } var pairs [][2]json.RawMessage if err := json.Unmarshal(f.Data, &pairs); err != nil { continue } key := streamKey(f, pairs) // seq must INCREASE, not increase by one: a filtered feed skips the // blocks that matched nothing. Backwards or repeated is the fault. if previous, ok := lastSeq[key]; ok && f.Seq <= previous { went := "backwards" if f.Seq == previous { went = "nowhere" } log.Printf("%s: sequence went %s %d -> %d — frames replayed or reordered", key, went, previous, f.Seq) } lastSeq[key] = f.Seq for _, pair := range pairs { var wallet string var fl fill _ = json.Unmarshal(pair[0], &wallet) _ = json.Unmarshal(pair[1], &fl) log.Printf("%s %s %s %s @ %s %s pnl %s", wallet, fl.Coin, fl.Side, fl.Sz, fl.Px, fl.Dir, fl.ClosedPnl) } } } func main() { apiKey := os.Getenv("COINVERSA_API_KEY") if apiKey == "" { log.Fatal("set COINVERSA_API_KEY") } ctx := context.Background() attempt := 0 for { err := session(ctx, apiKey, func() { attempt = 0 }) if errors.Is(err, errNotRetryable) { log.Fatal(err) // exits 1: a supervisor must see this as a failure, not success } if code := websocket.CloseStatus(err); code != -1 { var ce websocket.CloseError _ = errors.As(err, &ce) err = fmt.Errorf("closed (%d %s)", code, ce.Reason) } delay := time.Duration(math.Min(float64(backoffMax), float64(backoffBase)*math.Pow(2, float64(attempt)))) + time.Duration(rand.Int63n(int64(backoffJitter))) attempt++ log.Printf("%v — reconnecting in %s", err, delay.Round(time.Millisecond)) time.Sleep(delay) } } ``` ## What each client does * **Authenticates on the upgrade.** Node, Python and Go send `Authorization: Bearer`; the Browser client offers `['bearer', key]` as the subprotocol. Neither ever puts the key in the URL. * **Subscribes after `open`**, one frame per subscription, and re-sends them on every reconnect. * **Checks that `seq` increases.** On the feeds these clients subscribe to, `seq` is the source block height, so a forward jump is a block that matched nothing, not a lost frame. A value at or below the last one means frames were replayed or reordered — the only real fault. A data frame carries no subscription id, so per-stream tracking keys on the channel plus the coin or wallet of the frame's first fill. * **Reconnects with backoff** — 1 s doubling to 30 s, with jitter so a fleet does not reconnect in lockstep — and resets once live. An invalid key is never retried, and the process exits non-zero on it so a supervisor sees a failure. * **Sends a heartbeat** every 30 seconds, which keeps an idle connection warm and doubles as a liveness check. > [!WARNING] > > Three things in the generated code are true of the feeds it subscribes to and **not of the catalog as a whole**. Adjust all three before you point a client at another feed. > > * The comment reading `seq is the SOURCE BLOCK HEIGHT, the same on every feed` holds for `tradesByCoin` and `l4Book`. It does not hold for `leverageUpdates`, `twapOrders`, their by-user and list variants, or `candle`/`allCandles` on `source: "mark"`: there `seq` is the replica block's Unix timestamp in **nanoseconds** — around 1.79 × 10¹⁸ against a height's 1.1 × 10⁹, about nine orders of magnitude larger. Never hold one cursor across both kinds — see [sequence numbers](/websocket/protocol#sequence-numbers). > * `streamKey` branches on `tradesByCoin` and `tradesByUser` and falls through to `msg.channel` for everything else, which is exactly the keying the protocol page warns against when two subscriptions share a channel. Add a branch for whatever you subscribe to. > * **The fill loop assumes `data` is an array of `[wallet, fill]` pairs** — `for (const [wallet, fill] of msg.data)` and its Python and Go equivalents. That shape is the fill feeds' alone. On [`candle`](/websocket/feeds#candles) and on a [`twapStatuses` snapshot](/websocket/feeds#the-snapshot-on-subscribe) `data` is an **object**, and a live [`twapStatuses`](/websocket/feeds#twap-statuses) frame is an array of bare status events rather than of pairs — so the loop throws or mis-destructures on the very first frame. Read the feed's own `data` shape before reusing the handler. ## Following a list of wallets The generated clients subscribe to two coins, but the change to follow a set of wallets is one frame. The [five `…ByUsers` feeds](/websocket/feeds#multi-wallet-subscriptions) take a `users` **JSON array of strings** — never a comma-separated string — of up to 1,000 distinct wallets, and the whole list counts as **one** subscription against your cap. `tradesByUsers` and `twapSliceFillsByUsers` are Starter and above, `liquidationsByUsers` is Agent and above, and the leverage and TWAP-order lists are Pro. ```json theme={null} {"method":"subscribe","subscription":{"type":"tradesByUsers","users":["0x9bad…1f07","0x28f0…4c19"]}} ``` Swap that in for the two `tradesByCoin` frames a client sends on `open`. Two things then differ from the samples as generated: * **`streamKey` needs a branch for it**, and it cannot be the wallet: the wallet in the first entry changes from frame to frame. Hold at most one list subscription of a given type per connection and key it on `msg.channel` alone — [why](/websocket/feeds#telling-two-lists-apart). * **Reconnect resubscribes the same set.** The list is hashed as a set, so re-sending it in any order rejoins the same subscription and the `sequence` cursor you recorded still applies. ## Order book The [`l4Book` feed](/websocket/order-book) needs one thing the fill clients do not: a handler that keeps the book's height and **gates every update on `prev`**. These four are the same generator with that handler spliced in — a fills-only client is byte-for-byte what it was — and they are re-synced by the same script. They subscribe to `ZEC` rather than `BTC` on purpose: the first message on a book subscription is the whole book, and ZEC's snapshot is small (about 1.4 MB) where BTC's is about 30 MB. Swap the coin once you have seen it work, spelling it [as the node does](/websocket/order-book#subscribing). The feed is Pro and above. ```javascript Browser theme={null} // Browser client for l4Book ZEC — generated by the Coinversa developer portal. // // A browser WebSocket cannot set headers, so the key goes in the subprotocol // list: the literal 'bearer' first, the key second. It is still a request // header (Sec-WebSocket-Protocol), never part of the URL. A key shipped to // other people's browsers is a key you have published — use this for your own // dashboards and tools; for anything served to others, hold the socket on a // server (see the Node, Python and Go clients). const URL = "wss://ws.coinversa.ai"; const apiKey = 'cvsa_...'; // paste your key here; never commit it const SUBSCRIPTIONS = [ { type: "l4Book", coin: "ZEC" }, ]; // Reconnect with backoff: 1 s doubling to 30 s, plus jitter so a fleet of // clients does not reconnect in lockstep. Reset once a connection is live. const BACKOFF = { baseMs: 1000, maxMs: 30000, jitterMs: 500 }; const PING_MS = 30000; let attempt = 0; let stopped = false; // seq is the SOURCE BLOCK HEIGHT, the same on every feed. A filtered feed // skips numbers whenever a block matches nothing, so a jump is normal and // only a repeat or a rewind is a fault. A data frame carries no subscription // id, so key the check on the stream you can identify from the frame itself: // channel plus the coin or wallet of its first fill. const streamKey = (msg) => { const [, fill] = msg.data?.[0] || []; if (msg.channel === 'tradesByCoin' && fill?.coin) return `tradesByCoin:${fill.coin}`; if (msg.channel === 'tradesByUser' && msg.data?.[0]?.[0]) return `tradesByUser:${msg.data[0][0]}`; return msg.channel; }; // Order book (l4Book). The server holds no book: the first message on the // subscription is the whole book as ONE frame — about 30 MB for BTC (HYPE ~15 // MB, ETH ~11 MB, the median coin ~5 KB) — and every block after it is a // frame of diffs. A browser WebSocket has no message-size limit, so there is // nothing to configure, but expect JSON.parse to take a moment on the snapshot. // // The client rule, from the protocol reference: "Apply an update only if its prev equals the last applied height; on any mismatch, or partial:true when attribution matters, reconnect with the last successfully applied seq. If that cursor is no longer retained, subscribe without it to rebuild from a fresh snapshot." // // This client takes the rule's FALLBACK path: it resubscribes without a // cursor, which costs a fresh snapshot (~30 MB on BTC, 10-70 s). Passing // {"sequence": } on the resubscribe resumes instead, with // no snapshot — add it if that cost matters, and fall back to this path when // the server answers "sequence is not retained". // // A book subscription that fails after it starts — unknown coin, the gateway // unreachable, the snapshot buffer never filling — is dropped and reported on // the ordinary error channel as {"channel":"error","data":""}. That // frame does NOT name the coin, so with more than one l4Book subscription on // a socket you cannot tell which one died from the frame alone; treat an // error frame as a reason to re-check every book you hold. const bookHeight = new Map(); // coin -> last applied height function resubscribeBook(ws, coin, why) { console.warn(`l4Book ${coin}: ${why} — resubscribing for a fresh snapshot`); bookHeight.delete(coin); const subscription = { type: 'l4Book', coin }; ws.send(JSON.stringify({ method: 'unsubscribe', subscription })); ws.send(JSON.stringify({ method: 'subscribe', subscription })); } function onBookFrame(ws, msg) { if (msg.snapshot) { const [bids, asks] = msg.data.book_orders; bookHeight.set(msg.coin, msg.height); // Build your book from bids, asks and msg.data.untriggered_orders here: // every entry is a [wallet, order] pair. The book is the state after // block msg.height. console.log(`l4Book ${msg.coin}: snapshot at height ${msg.height} — ${bids.length} bids, ${asks.length} asks, ${msg.data.untriggered_orders.length} triggers`); return; } const last = bookHeight.get(msg.coin); if (last == null) return; // nothing to apply it to: no snapshot yet, or the subscription ended if (msg.prev !== last) { resubscribeBook(ws, msg.coin, `prev ${msg.prev} is not the last applied height ${last}`); return; } if (msg.partial) { resubscribeBook(ws, msg.coin, `block ${msg.height} is partial`); return; } // Apply msg.data.raw_book_diffs, then msg.data.order_statuses, to your book here. bookHeight.set(msg.coin, msg.height); console.log(`l4Book ${msg.coin}: height ${msg.height} — ${msg.data.raw_book_diffs.length} diffs, ${msg.data.order_statuses.length} statuses`); } function connect() { if (stopped) return; const lastSeq = new Map(); // per connection; seq is a block height, so it only moves forward bookHeight.clear(); // fresh per connection: a new socket starts with a new snapshot const ws = new WebSocket(URL, ['bearer', apiKey]); let heartbeat = null; ws.addEventListener('open', () => { // The socket is open but not yet proven: the 'connected' frame is the // server's confirmation. Subscribe now; the server queues nothing before. for (const subscription of SUBSCRIPTIONS) { ws.send(JSON.stringify({ method: 'subscribe', subscription })); } heartbeat = setInterval(() => { if (ws.readyState === WebSocket.OPEN) ws.send(JSON.stringify({ method: 'ping' })); }, PING_MS); }); ws.addEventListener('message', (event) => { const msg = JSON.parse(event.data); if (msg.channel === 'connected') { attempt = 0; // live: the next disconnect starts backoff from the beginning const { tier, limits } = msg.data; console.log(`connected on ${tier}: ${limits.connections} connections, ${limits.subscriptions} subscriptions`); return; } if (msg.channel === 'subscriptionResponse') { console.log('ack', msg.data.method, msg.data.id); return; } if (msg.channel === 'error') { console.error('server error:', msg.data); return; } if (msg.channel === 'pong') return; if (msg.channel === 'l4Book') { onBookFrame(ws, msg); return; } // gated on prev, not seq const key = streamKey(msg); const previous = lastSeq.get(key); // seq must INCREASE, not increase by one: a filtered feed skips the // blocks that matched nothing. Going backwards or repeating is the fault. if (previous != null && msg.seq <= previous) { console.warn(`${key}: sequence went ${msg.seq === previous ? 'nowhere' : 'backwards'} ${previous} -> ${msg.seq} — frames replayed or reordered`); } lastSeq.set(key, msg.seq); for (const [wallet, fill] of msg.data) { console.log(wallet, fill.coin, fill.side, fill.sz, '@', fill.px, fill.dir, 'pnl', fill.closedPnl); } }); // In a browser a refused handshake arrives as a CLOSE, not a status: 4401 // invalid or missing key (not retryable — fix the key), 4429 your account // is at its connection cap, 4503 entitlement lookup unavailable. Anything // else, including 1006, is a drop: reconnect. ws.addEventListener('close', (event) => { clearInterval(heartbeat); if (event.code === 4401) { console.error('refused: invalid or missing key — not retrying'); stopped = true; return; } if (event.code === 4429) console.warn('refused: connection cap reached — retrying with backoff'); else if (event.code === 4503) console.warn('refused: entitlement lookup unavailable — retrying with backoff'); else console.warn(`closed (${event.code}${event.reason ? ' ' + event.reason : ''}) — reconnecting`); const delay = Math.min(BACKOFF.maxMs, BACKOFF.baseMs * 2 ** attempt) + Math.random() * BACKOFF.jitterMs; attempt += 1; setTimeout(connect, delay); }); } connect(); ``` ```javascript Node theme={null} // Node client for l4Book ZEC — generated by the Coinversa developer portal. // npm install ws (Node's built-in WebSocket cannot set headers; use ws.) import WebSocket from 'ws'; // The key goes out with the HTTP upgrade, so the socket is authenticated by // the time it opens. Read it from the environment; never commit it. const URL = "wss://ws.coinversa.ai"; const apiKey = process.env.COINVERSA_API_KEY; if (!apiKey) { console.error('set COINVERSA_API_KEY'); process.exit(1); } const SUBSCRIPTIONS = [ { type: "l4Book", coin: "ZEC" }, ]; // Reconnect with backoff: 1 s doubling to 30 s, plus jitter so a fleet of // clients does not reconnect in lockstep. Reset once a connection is live. const BACKOFF = { baseMs: 1000, maxMs: 30000, jitterMs: 500 }; const PING_MS = 30000; let attempt = 0; let stopped = false; // seq is the SOURCE BLOCK HEIGHT, the same on every feed. A filtered feed // skips numbers whenever a block matches nothing, so a jump is normal and // only a repeat or a rewind is a fault. A data frame carries no subscription // id, so key the check on the stream you can identify from the frame itself: // channel plus the coin or wallet of its first fill. const streamKey = (msg) => { const [, fill] = msg.data?.[0] || []; if (msg.channel === 'tradesByCoin' && fill?.coin) return `tradesByCoin:${fill.coin}`; if (msg.channel === 'tradesByUser' && msg.data?.[0]?.[0]) return `tradesByUser:${msg.data[0][0]}`; return msg.channel; }; // Order book (l4Book). The server holds no book: the first message on the // subscription is the whole book as ONE frame — about 30 MB for BTC (HYPE ~15 // MB, ETH ~11 MB, the median coin ~5 KB) — and every block after it is a // frame of diffs. ws has no message-size limit by default, so there is // nothing to configure, but expect JSON.parse to take a moment on the snapshot. // // The client rule, from the protocol reference: "Apply an update only if its prev equals the last applied height; on any mismatch, or partial:true when attribution matters, reconnect with the last successfully applied seq. If that cursor is no longer retained, subscribe without it to rebuild from a fresh snapshot." // // This client takes the rule's FALLBACK path: it resubscribes without a // cursor, which costs a fresh snapshot (~30 MB on BTC, 10-70 s). Passing // {"sequence": } on the resubscribe resumes instead, with // no snapshot — add it if that cost matters, and fall back to this path when // the server answers "sequence is not retained". // // A book subscription that fails after it starts — unknown coin, the gateway // unreachable, the snapshot buffer never filling — is dropped and reported on // the ordinary error channel as {"channel":"error","data":""}. That // frame does NOT name the coin, so with more than one l4Book subscription on // a socket you cannot tell which one died from the frame alone; treat an // error frame as a reason to re-check every book you hold. const bookHeight = new Map(); // coin -> last applied height function resubscribeBook(ws, coin, why) { console.warn(`l4Book ${coin}: ${why} — resubscribing for a fresh snapshot`); bookHeight.delete(coin); const subscription = { type: 'l4Book', coin }; ws.send(JSON.stringify({ method: 'unsubscribe', subscription })); ws.send(JSON.stringify({ method: 'subscribe', subscription })); } function onBookFrame(ws, msg) { if (msg.snapshot) { const [bids, asks] = msg.data.book_orders; bookHeight.set(msg.coin, msg.height); // Build your book from bids, asks and msg.data.untriggered_orders here: // every entry is a [wallet, order] pair. The book is the state after // block msg.height. console.log(`l4Book ${msg.coin}: snapshot at height ${msg.height} — ${bids.length} bids, ${asks.length} asks, ${msg.data.untriggered_orders.length} triggers`); return; } const last = bookHeight.get(msg.coin); if (last == null) return; // nothing to apply it to: no snapshot yet, or the subscription ended if (msg.prev !== last) { resubscribeBook(ws, msg.coin, `prev ${msg.prev} is not the last applied height ${last}`); return; } if (msg.partial) { resubscribeBook(ws, msg.coin, `block ${msg.height} is partial`); return; } // Apply msg.data.raw_book_diffs, then msg.data.order_statuses, to your book here. bookHeight.set(msg.coin, msg.height); console.log(`l4Book ${msg.coin}: height ${msg.height} — ${msg.data.raw_book_diffs.length} diffs, ${msg.data.order_statuses.length} statuses`); } function scheduleReconnect(why) { if (stopped) return; const delay = Math.min(BACKOFF.maxMs, BACKOFF.baseMs * 2 ** attempt) + Math.random() * BACKOFF.jitterMs; attempt += 1; console.warn(`${why} — reconnecting in ${Math.round(delay)} ms`); setTimeout(connect, delay); } function connect() { if (stopped) return; const lastSeq = new Map(); // per connection; seq is a block height, so it only moves forward bookHeight.clear(); // fresh per connection: a new socket starts with a new snapshot const ws = new WebSocket(URL, { headers: { Authorization: `Bearer ${apiKey}` } }); let heartbeat = null; let refused = false; // A refused upgrade is an HTTP status, not a frame — no socket ever opens, // so it never reaches 'message'. 401 invalid or missing key (not retryable: // fix the key), 429 your account is at its connection cap, 503 entitlement // lookup unavailable — both retried with backoff. ws.on('unexpected-response', (request, response) => { refused = true; request.destroy(); if (response.statusCode === 401) { console.error('refused: HTTP 401 invalid or missing key — not retrying'); stopped = true; process.exitCode = 1; // a supervisor must see this as a failure, not success return; } scheduleReconnect(`refused: HTTP ${response.statusCode}`); }); ws.on('open', () => { for (const subscription of SUBSCRIPTIONS) { ws.send(JSON.stringify({ method: 'subscribe', subscription })); } heartbeat = setInterval(() => { if (ws.readyState === WebSocket.OPEN) ws.send(JSON.stringify({ method: 'ping' })); }, PING_MS); }); ws.on('message', (raw) => { const msg = JSON.parse(raw.toString()); if (msg.channel === 'connected') { attempt = 0; // live: the next disconnect starts backoff from the beginning const { tier, limits } = msg.data; console.log(`connected on ${tier}: ${limits.connections} connections, ${limits.subscriptions} subscriptions`); return; } if (msg.channel === 'subscriptionResponse') { console.log('ack', msg.data.method, msg.data.id); return; } if (msg.channel === 'error') { console.error('server error:', msg.data); return; } if (msg.channel === 'pong') return; if (msg.channel === 'l4Book') { onBookFrame(ws, msg); return; } // gated on prev, not seq const key = streamKey(msg); const previous = lastSeq.get(key); // seq must INCREASE, not increase by one: a filtered feed skips the // blocks that matched nothing. Going backwards or repeating is the fault. if (previous != null && msg.seq <= previous) { console.warn(`${key}: sequence went ${msg.seq === previous ? 'nowhere' : 'backwards'} ${previous} -> ${msg.seq} — frames replayed or reordered`); } lastSeq.set(key, msg.seq); for (const [wallet, fill] of msg.data) { console.log(wallet, fill.coin, fill.side, fill.sz, '@', fill.px, fill.dir, 'pnl', fill.closedPnl); } }); ws.on('error', (err) => { if (!refused) console.error('socket error:', err.message); }); ws.on('close', (code, reason) => { clearInterval(heartbeat); if (refused) return; // unexpected-response already decided scheduleReconnect(`closed (${code}${reason?.length ? ' ' + reason.toString() : ''})`); }); } connect(); ``` ```python Python theme={null} # Python client for l4Book ZEC — generated by the Coinversa developer portal. # pip install websockets (15.x; on websockets < 14 the header kwarg is # extra_headers= and the exception below is InvalidStatusCode with .status_code) import asyncio import json import os import random import websockets URL = "wss://ws.coinversa.ai" # The key goes out with the HTTP upgrade, so the socket is authenticated by # the time it opens. Read it from the environment; never commit it. API_KEY = os.environ["COINVERSA_API_KEY"] SUBSCRIPTIONS = [ {"type": "l4Book", "coin": "ZEC"}, ] # Reconnect with backoff: 1 s doubling to 30 s, plus jitter so a fleet of # clients does not reconnect in lockstep. Reset once a connection is live. BACKOFF_BASE = 1.0 BACKOFF_MAX = 30.0 BACKOFF_JITTER = 0.5 PING_SECONDS = 30.0 # A book snapshot is one message of about 30 MB for BTC; the library's default # limit is 1 MiB and would close the socket on it. BOOK_MAX_SIZE = 64 * 1024 * 1024 def stream_key(msg): # seq is the SOURCE BLOCK HEIGHT, the same on every feed. A filtered feed # skips numbers whenever a block matches nothing, so a jump is normal and # only a repeat or a rewind is a fault. A data frame carries no # subscription id, so key the check on the stream the frame itself # identifies: channel plus the coin or wallet of its first fill. entry = (msg.get("data") or [[None, {}]])[0] wallet, fill = entry if isinstance(entry, list) and len(entry) == 2 else (None, entry if isinstance(entry, dict) else {}) if msg["channel"] == "tradesByCoin" and fill.get("coin"): return "tradesByCoin:" + fill["coin"] if msg["channel"] == "tradesByUser" and wallet: return "tradesByUser:" + wallet return msg["channel"] # Order book (l4Book). The server holds no book: the first message on the # subscription is the whole book as ONE message (about 30 MB for BTC, HYPE # ~15 MB, ETH ~11 MB, the median coin ~5 KB), then one message of diffs per # block. BOOK_MAX_SIZE above lets it through. # # The client rule, from the protocol reference: "Apply an update only if its prev equals the last applied height; on any mismatch, or partial:true when attribution matters, reconnect with the last successfully applied seq. If that cursor is no longer retained, subscribe without it to rebuild from a fresh snapshot." # # # This client takes the rule's FALLBACK path: it resubscribes without a # cursor, which costs a fresh snapshot (~30 MB on BTC, 10-70 s). Passing # {"sequence": } on the resubscribe resumes instead, with # no snapshot — add it if that cost matters, and fall back to this path when # the server answers "sequence is not retained". # # A book subscription that fails after it starts - unknown coin, the gateway # unreachable, the snapshot buffer never filling - is dropped and reported on # the ordinary error channel as {"channel":"error","data":""}. That # frame does NOT name the coin, so with more than one l4Book subscription on # a socket you cannot tell which one died from the frame alone; treat an # error frame as a reason to re-check every book you hold. BOOK_HEIGHT = {} # coin -> last applied height async def resubscribe_book(ws, coin, why): print(f"l4Book {coin}: {why} - resubscribing for a fresh snapshot") BOOK_HEIGHT.pop(coin, None) subscription = {"type": "l4Book", "coin": coin} await ws.send(json.dumps({"method": "unsubscribe", "subscription": subscription})) await ws.send(json.dumps({"method": "subscribe", "subscription": subscription})) async def on_book_frame(ws, msg): coin = msg.get("coin") data = msg.get("data") or {} if msg.get("snapshot"): bids, asks = data.get("book_orders") or ([], []) BOOK_HEIGHT[coin] = msg["height"] # Build your book from bids, asks and data["untriggered_orders"] here: # every entry is a [wallet, order] pair. The book is the state after # block msg["height"]. print(f'l4Book {coin}: snapshot at height {msg["height"]} -', f'{len(bids)} bids, {len(asks)} asks, {len(data.get("untriggered_orders") or [])} triggers') return last = BOOK_HEIGHT.get(coin) if last is None: return # nothing to apply it to: no snapshot yet, or the subscription ended if msg.get("prev") != last: await resubscribe_book(ws, coin, f'prev {msg.get("prev")} is not the last applied height {last}') return if msg.get("partial"): await resubscribe_book(ws, coin, f'block {msg["height"]} is partial') return # Apply data["raw_book_diffs"], then data["order_statuses"], to your book here. BOOK_HEIGHT[coin] = msg["height"] print(f'l4Book {coin}: height {msg["height"]} -', f'{len(data.get("raw_book_diffs") or [])} diffs, {len(data.get("order_statuses") or [])} statuses') async def heartbeat(ws): while True: await asyncio.sleep(PING_SECONDS) await ws.send(json.dumps({"method": "ping"})) async def session(attempt_reset): # One connection: subscribe, then read until it drops. Returns why it ended. headers = {"Authorization": "Bearer " + API_KEY} async with websockets.connect(URL, additional_headers=headers, max_size=BOOK_MAX_SIZE) as ws: for subscription in SUBSCRIPTIONS: await ws.send(json.dumps({"method": "subscribe", "subscription": subscription})) pinger = asyncio.create_task(heartbeat(ws)) last_seq = {} # per connection; seq is a block height, so it only moves forward BOOK_HEIGHT.clear() # fresh per connection: a new socket starts with a new snapshot try: async for raw in ws: msg = json.loads(raw) channel = msg.get("channel") if channel == "connected": attempt_reset() # live: the next disconnect starts backoff from the beginning limits = msg["data"]["limits"] print(f'connected on {msg["data"]["tier"]}:', f'{limits["connections"]} connections,', f'{limits["subscriptions"]} subscriptions') continue if channel == "subscriptionResponse": print("ack", msg["data"]["method"], msg["data"]["id"]) continue if channel == "error": print("server error:", msg["data"]) continue if channel == "pong": continue if channel == "l4Book": await on_book_frame(ws, msg) # gated on prev, not seq continue key = stream_key(msg) seq = msg["seq"] previous = last_seq.get(key) # seq must INCREASE, not increase by one: a filtered feed # skips the blocks that matched nothing. if previous is not None and seq <= previous: went = "nowhere" if seq == previous else "backwards" print(f"{key}: sequence went {went} {previous} -> {seq} - frames replayed or reordered") last_seq[key] = seq # .get(): a fill that lacks a field must not take the client down. for wallet, fill in msg["data"]: print(wallet, fill.get("coin"), fill.get("side"), fill.get("sz"), "@", fill.get("px"), fill.get("dir"), "pnl", fill.get("closedPnl")) finally: pinger.cancel() reason = f" {ws.close_reason}" if ws.close_reason else "" return f"closed ({ws.close_code}{reason})" async def main(): attempt = 0 def reset(): nonlocal attempt attempt = 0 while True: try: why = await session(reset) except websockets.exceptions.InvalidStatus as exc: # A refused upgrade is an HTTP status, not a frame - no socket ever # opens. 401 invalid or missing key (not retryable: fix the key), # 429 account at its connection cap, 503 entitlements down. status = exc.response.status_code if status == 401: print("refused: HTTP 401 invalid or missing key - not retrying") raise SystemExit(1) # a supervisor must see this as a failure, not success why = f"refused: HTTP {status}" except websockets.exceptions.ConnectionClosed as exc: why = f"closed ({exc.rcvd.code if exc.rcvd else 'no close frame'})" except OSError as exc: why = f"network error: {exc}" delay = min(BACKOFF_MAX, BACKOFF_BASE * (2 ** attempt)) + random.random() * BACKOFF_JITTER attempt += 1 print(f"{why} - reconnecting in {delay:.1f}s") await asyncio.sleep(delay) asyncio.run(main()) ``` ```go Go theme={null} // Go client for l4Book ZEC — generated by the Coinversa developer portal. // go get github.com/coder/websocket package main import ( "context" "encoding/json" "errors" "fmt" "log" "math" "math/rand" "net/http" "os" "time" "github.com/coder/websocket" ) const wsURL = "wss://ws.coinversa.ai" // Reconnect with backoff: 1 s doubling to 30 s, plus jitter so a fleet of // clients does not reconnect in lockstep. Reset once a connection is live. const ( backoffBase = 1000 * time.Millisecond backoffMax = 30000 * time.Millisecond backoffJitter = 500 * time.Millisecond pingEvery = 30000 * time.Millisecond ) var subscriptions = []map[string]string{ {"type": "l4Book", "coin": "ZEC"}, } type frame struct { Channel string `json:"channel"` Seq int64 `json:"seq"` Data json.RawMessage `json:"data"` } type fill struct { Coin string `json:"coin"` Side string `json:"side"` Px string `json:"px"` Sz string `json:"sz"` Dir string `json:"dir"` ClosedPnl string `json:"closedPnl"` } // bookFrame is an l4Book message: the snapshot that opens a subscription, an // update per block after it, or the error that ends it. Orders and events are // left raw: build your book from them. type bookFrame struct { Coin string `json:"coin"` Snapshot bool `json:"snapshot"` Height int64 `json:"height"` Prev int64 `json:"prev"` Partial bool `json:"partial"` Data struct { BookOrders [][]json.RawMessage `json:"book_orders"` UntriggeredOrders []json.RawMessage `json:"untriggered_orders"` RawBookDiffs []json.RawMessage `json:"raw_book_diffs"` OrderStatuses []json.RawMessage `json:"order_statuses"` } `json:"data"` } // streamKey: seq is the SOURCE BLOCK HEIGHT, the same on every feed, so a // forward jump is a block that matched nothing rather than a lost frame. A // data frame carries no subscription id, so the check is keyed on what the // frame itself identifies: channel plus the coin or wallet of its first fill. func streamKey(f frame, pairs [][2]json.RawMessage) string { if len(pairs) == 0 { return f.Channel } var wallet string var first fill _ = json.Unmarshal(pairs[0][0], &wallet) _ = json.Unmarshal(pairs[0][1], &first) switch { case f.Channel == "tradesByCoin" && first.Coin != "": return "tradesByCoin:" + first.Coin case f.Channel == "tradesByUser" && wallet != "": return "tradesByUser:" + wallet } return f.Channel } // Order book (l4Book). The server holds no book: the first message on the // subscription is the whole book as ONE message — about 30 MB for BTC (HYPE // ~15 MB, ETH ~11 MB, the median coin ~5 KB) — then one message of diffs per // block. The read limit in session lets it through. // // The client rule, from the protocol reference: "Apply an update only if its prev equals the last applied height; on any mismatch, or partial:true when attribution matters, reconnect with the last successfully applied seq. If that cursor is no longer retained, subscribe without it to rebuild from a fresh snapshot." // // This client takes the rule's FALLBACK path: it resubscribes without a // cursor, which costs a fresh snapshot (~30 MB on BTC, 10-70 s). Passing // {"sequence": } on the resubscribe resumes instead, with // no snapshot — add it if that cost matters, and fall back to this path when // the server answers "sequence is not retained". // // A book subscription that fails after it starts — unknown coin, the gateway // unreachable, the snapshot buffer never filling — is dropped and reported on // the ordinary error channel as {"channel":"error","data":""}. That // frame does NOT name the coin, so with more than one l4Book subscription on // a socket you cannot tell which one died from the frame alone; treat an // error frame as a reason to re-check every book you hold. func resubscribeBook(ctx context.Context, conn *websocket.Conn, height map[string]int64, coin, why string) { log.Printf("l4Book %s: %s — resubscribing for a fresh snapshot", coin, why) delete(height, coin) sub := map[string]string{"type": "l4Book", "coin": coin} for _, method := range []string{"unsubscribe", "subscribe"} { body, _ := json.Marshal(map[string]any{"method": method, "subscription": sub}) _ = conn.Write(ctx, websocket.MessageText, body) } } func onBookFrame(ctx context.Context, conn *websocket.Conn, height map[string]int64, raw []byte) { var b bookFrame if err := json.Unmarshal(raw, &b); err != nil { log.Printf("unparsable l4Book frame: %v", err) return } if b.Snapshot { bids, asks := 0, 0 if len(b.Data.BookOrders) == 2 { bids, asks = len(b.Data.BookOrders[0]), len(b.Data.BookOrders[1]) } height[b.Coin] = b.Height // Build your book from b.Data.BookOrders[0] (bids), [1] (asks) and // b.Data.UntriggeredOrders here: every entry is a [wallet, order] // pair. The book is the state after block b.Height. log.Printf("l4Book %s: snapshot at height %d — %d bids, %d asks, %d triggers", b.Coin, b.Height, bids, asks, len(b.Data.UntriggeredOrders)) return } last, ok := height[b.Coin] if !ok { return // nothing to apply it to: no snapshot yet, or the subscription ended } if b.Prev != last { resubscribeBook(ctx, conn, height, b.Coin, fmt.Sprintf("prev %d is not the last applied height %d", b.Prev, last)) return } if b.Partial { resubscribeBook(ctx, conn, height, b.Coin, fmt.Sprintf("block %d is partial", b.Height)) return } // Apply b.Data.RawBookDiffs, then b.Data.OrderStatuses, to your book here. height[b.Coin] = b.Height log.Printf("l4Book %s: height %d — %d diffs, %d statuses", b.Coin, b.Height, len(b.Data.RawBookDiffs), len(b.Data.OrderStatuses)) } // session runs one connection until it drops. It returns errNotRetryable for // a refusal that retrying cannot fix. var errNotRetryable = errors.New("not retryable") func session(ctx context.Context, apiKey string, live func()) error { // The key goes out with the HTTP upgrade, so the socket is authenticated // by the time it opens. A refused upgrade is an HTTP status, not a frame: // 401 invalid or missing key, 429 account at its connection cap, 503 // entitlement lookup unavailable. header := http.Header{} header.Set("Authorization", "Bearer "+apiKey) conn, resp, err := websocket.Dial(ctx, wsURL, &websocket.DialOptions{HTTPHeader: header}) if err != nil { if resp != nil { if resp.StatusCode == http.StatusUnauthorized { return fmt.Errorf("refused: HTTP 401 invalid or missing key — not retrying: %w", errNotRetryable) } return fmt.Errorf("refused: HTTP %d", resp.StatusCode) } return err } defer conn.CloseNow() conn.SetReadLimit(64 << 20) // a book snapshot is one message of about 30 MB for BTC; the library default is 32 KiB for _, sub := range subscriptions { body, _ := json.Marshal(map[string]any{"method": "subscribe", "subscription": sub}) if err := conn.Write(ctx, websocket.MessageText, body); err != nil { return err } } pingCtx, stopPing := context.WithCancel(ctx) defer stopPing() go func() { t := time.NewTicker(pingEvery) defer t.Stop() for { select { case <-pingCtx.Done(): return case <-t.C: _ = conn.Write(pingCtx, websocket.MessageText, []byte(`{"method":"ping"}`)) } } }() lastSeq := map[string]int64{} // per connection; seq is a block height, so it only moves forward // fresh per connection too: a new socket starts with a new snapshot bookHeight := map[string]int64{} for { _, raw, err := conn.Read(ctx) if err != nil { return err } var f frame if err := json.Unmarshal(raw, &f); err != nil { log.Printf("unparsable frame: %v", err) continue } switch f.Channel { case "connected": live() // the next disconnect starts backoff from the beginning var d struct { Tier string `json:"tier"` Limits struct { Connections int `json:"connections"` Subscriptions int `json:"subscriptions"` } `json:"limits"` } _ = json.Unmarshal(f.Data, &d) log.Printf("connected on %s: %d connections, %d subscriptions", d.Tier, d.Limits.Connections, d.Limits.Subscriptions) continue case "subscriptionResponse": var ack struct { Method string `json:"method"` ID string `json:"id"` } _ = json.Unmarshal(f.Data, &ack) log.Printf("ack %s %s", ack.Method, ack.ID) continue case "error": log.Printf("server error: %s", string(f.Data)) continue case "pong": continue case "l4Book": onBookFrame(ctx, conn, bookHeight, raw) // gated on prev, not seq continue } var pairs [][2]json.RawMessage if err := json.Unmarshal(f.Data, &pairs); err != nil { continue } key := streamKey(f, pairs) // seq must INCREASE, not increase by one: a filtered feed skips the // blocks that matched nothing. Backwards or repeated is the fault. if previous, ok := lastSeq[key]; ok && f.Seq <= previous { went := "backwards" if f.Seq == previous { went = "nowhere" } log.Printf("%s: sequence went %s %d -> %d — frames replayed or reordered", key, went, previous, f.Seq) } lastSeq[key] = f.Seq for _, pair := range pairs { var wallet string var fl fill _ = json.Unmarshal(pair[0], &wallet) _ = json.Unmarshal(pair[1], &fl) log.Printf("%s %s %s %s @ %s %s pnl %s", wallet, fl.Coin, fl.Side, fl.Sz, fl.Px, fl.Dir, fl.ClosedPnl) } } } func main() { apiKey := os.Getenv("COINVERSA_API_KEY") if apiKey == "" { log.Fatal("set COINVERSA_API_KEY") } ctx := context.Background() attempt := 0 for { err := session(ctx, apiKey, func() { attempt = 0 }) if errors.Is(err, errNotRetryable) { log.Fatal(err) // exits 1: a supervisor must see this as a failure, not success } if code := websocket.CloseStatus(err); code != -1 { var ce websocket.CloseError _ = errors.As(err, &ce) err = fmt.Errorf("closed (%d %s)", code, ce.Reason) } delay := time.Duration(math.Min(float64(backoffMax), float64(backoffBase)*math.Pow(2, float64(attempt)))) + time.Duration(rand.Int63n(int64(backoffJitter))) attempt++ log.Printf("%v — reconnecting in %s", err, delay.Round(time.Millisecond)) time.Sleep(delay) } } ``` What the book handler adds, on top of everything above: * **Raises the read limit** where the library has one — Python's `max_size` and Go's `SetReadLimit` go to 64 MiB, since their defaults (1 MiB and 32 KiB) would close the socket on the snapshot. A browser `WebSocket` has no limit; Node's `ws` defaults to 100 MiB, which a 30 MB snapshot fits. Expect `JSON.parse` to take a moment on a large book. * **Applies the [client rule](/websocket/order-book#the-client-rule)**: the snapshot sets the height, each update is applied only if its `prev` is the last applied height, and any mismatch — or `partial: true` — unsubscribes and resubscribes for a fresh snapshot rather than jumping to live. * **Leaves [book failures](/websocket/order-book#when-a-book-subscription-is-dropped) to the ordinary error channel.** A dropped book subscription arrives as `{"channel":"error","data":""}` with no coin on it, so the client cannot attribute it when several books share a socket — the generated handler logs it and leaves the decision to you. `unknown coin` is a spelling problem and must not be retried as is. * **Forgets the book on every new connection**, because a new socket starts with a new snapshot, and dispatches `l4Book` frames before the `seq` tracking that the fill feeds use.