> ## Documentation Index
> Fetch the complete documentation index at: https://docs.struct.to/llms.txt
> Use this file to discover all available pages before exploring further.

# Backend

> Updates on Struct APIs, webhooks, websockets or other services

<Update label="Jul 13, 2026" tags={["Update"]}>
  ## v0.6.4: WebSocket Compression & Firehose Mode

  Two connection-level additions to the [Rooms websocket](/websockets/getting-started): opt-in zstd compression for high-throughput sockets, and a `subscribe_all` firehose flag that turns most rooms into a full, unfiltered stream. No changes to existing subscriptions, filters, or payloads.

  * **zstd compression.** Negotiate once at the WebSocket upgrade with the `X-Ws-Compression: zstd` header, or the `?compression=zstd` query fallback for browser clients that can't set headers. When enabled, room envelopes arrive as binary frames of zstd-compressed JSON; decompress and `JSON.parse` as usual. Omit both for the default uncompressed text frames. See [Compression](/websockets/compression).
  * **Firehose (`subscribe_all`).** Most rooms now accept `subscribe_all: true` on the subscribe message to receive every update on the stream instead of a targeted subset. Targeting filters (`condition_ids`, `traders`, `wallets`, and so on) are ignored while it's set, while secondary filters like `timeframes`, `dirty_kinds`, and `reasons` still apply. `polymarket_order_book` delivers its firehose as conflated `order_book_batch` envelopes every 50ms. Billing is still per message, so firehose subscriptions can be high volume. See [Firehose](/websockets/firehose).
  * **Playground support.** The [dashboard websockets playground](https://www.struct.to/dashboard/websockets) exposes both: a compression toggle on the connection card and the `subscribe_all` switch per room.
</Update>

<Update label="Jul 12, 2026" tags={["Update"]}>
  ## v0.6.3: Faster Trades WebSocket

  A plumbing rework of the confirmed [`polymarket_trades`](/websockets/rooms/trades) path shortens the hop from a confirmed block to a socket push, so fills land on your socket sooner with no change to the subscription, filters, or payload.

  * **Confirmed feed now leads Polymarket's RTDS.** On the default `confirmed` status, trades surface a median of \~0.5s ahead of Polymarket's public RTDS activity feed, leading on roughly 85 to 90 percent of matched fills, even though both paths wait for the same on-chain block.
  * **Mempool feed still further ahead.** `status: "pending"` continues to read the Polygon mempool and lead RTDS by a median of 2.6s on 100 percent of matched trades. Use `status: "all"` to receive both the pending and confirmed sighting of each trade from a single subscription.
  * **No integration changes.** Same room, same filters, same fields. Existing subscribers get the speedup for free.
  * **Benchmark**: full method and per-window numbers across \~15,000 live trades in [Polymarket RTDS vs Struct Trades WS](https://www.struct.to/blog/polymarket-rtds-vs-struct-trades-ws). The harness is open source and reproducible with a free API key.
</Update>

<Update label="Jun 16, 2026" tags={["Update"]}>
  ## v0.6.2: Liquidity Streams & Price-based Filters

  Three new [Websocket rooms](/websockets/rooms/liquidity) stream real-time USD order-book liquidity: `polymarket_position_liquidity` (per outcome token), `polymarket_market_liquidity` (per market), and `polymarket_event_liquidity` (per event). Filter by id or omit for a firehose. Billed at 0.001 credits per message.

  Trade-driven webhook and alert filters now gate on price instead of probability, and the standalone `probability_spike` event has been retired.

  * **`min_price` / `max_price` replace `min_probability` / `max_probability`.** The bound filters on `close_to_bond`, `price_spike`, `price_threshold`, and the trader events (`trader_first_trade`, `trader_new_market`, `trader_new_trade`, `trader_trade_event`, `trader_whale_trade`) now take `min_price` and `max_price` on a `0.0`–`1.0` scale. Subscriptions using the old field names must be updated.
  * **`probability_spike` removed.** Use [`price_spike`](/webhooks/price-spike) instead. It fires on the same moves and carries the same payload fields.
  * **`min_probability_change_pct` is unchanged.** The `position_metrics` percentage-change filter keeps its name.
</Update>

<Update label="Jun 14, 2026" tags={["Update"]}>
  ## v0.6.1: Threshold Crossings, Resolution & Dispute Events, Taxonomy Filters

  Three new webhook and alert events, plus market-taxonomy scoping across the trade-driven alerts.

  * **`price_threshold`**: an edge-triggered alert that fires once when an outcome's price crosses a target level. Set `min_probability` for an upward target or `max_probability` for a downward one. `one_shot` deletes the subscription after its first delivery, and `fire_if_already_past` fires immediately when the first observed price is already past the target. Available as a [webhook](/webhooks/price-threshold) and an [alert](/websockets/alerts/price-threshold).
  * **`market_resolved`**: fires once when a market reaches a terminal resolution, collapsing the underlying oracle events (`QuestionResolved`, `QuestionEmergencyResolved`, `ConditionResolution`, `NegRiskOutcomeReported`) into a single deduplicated delivery carrying the winning outcome and, when available, the settled price. Available as a [webhook](/webhooks/market-resolved) and an [alert](/websockets/alerts/market-resolved).
  * **`market_disputed`**: fires when a proposed resolution is challenged on-chain (`DisputePrice` or `AssertionDisputed`), carrying the disputer, the proposer, and the disputed outcome. Available as a [webhook](/webhooks/market-disputed) and an [alert](/websockets/alerts/market-disputed).
  * **Taxonomy filters on trade-driven events**: `probability_spike`, `price_spike`, and `close_to_bond` now accept `tags` (matches a market's own tags or its category) and `series_slugs` (matches the market's parent series). Both are case-insensitive, so you can scope deliveries to a topic without listing individual condition IDs.
  * **Fire-and-delete (`one_shot`)**: every webhook event now accepts `one_shot`, which deletes the subscription after its first successful delivery. It fires exactly once, test deliveries never consume it, and a failed delivery leaves the subscription in place. See [Fire-and-Delete](/webhooks/fire-and-delete).
</Update>

<Update label="Jun 12, 2026" tags={["Launch"]}>
  ## v0.6: PnL v3, Mark-to-Market

  A complete rebuild of how Struct calculates, stores, and serves PnL. v3 switches from cost-basis to mark-to-market accounting at the block level, so a position's value reflects on-chain reality the moment you buy, with no sell or resolution required. Twenty new REST endpoints across three namespaces, new Websocket rooms, and an updated TypeScript SDK.

  <Info>
    **No migration required.** v3 is a drop-in update. Every existing v2 PnL endpoint is automatically upgraded: same routes, same response shape, no fields removed. v3 only adds new fields on top, so existing integrations keep working and get the improved calculation for free.
  </Info>

  * **Mark-to-market accounting**: PnL is now current market value of your shares minus what you paid, recomputed on every block. Realized and unrealized are tracked separately, realized settling on every sell, merge, or redemption, and unrealized updating per block. Merges, splits, neg-risk conversions, redemptions, fees, rebates, rewards, and yield are all folded into the number, so the figure is the actual economic outcome of holding a position, not just price-times-shares minus cost.
  * **Trader PnL namespace**: `/trader/pnl/{address}` returns the headline summary (realized PnL, open-position value, volume, win rate, profit factor, avg win/loss, best/worst trade, avg hold time, fees, and a full breakdown of merges/splits/conversions/redemptions/rebates/rewards/yield). Companion endpoints expose `/pnl/{address}/candles` (OHLC for total PnL and portfolio value, block-tagged), `/pnl/{address}/exits` (closed-position markers with `reason` of `resolved_win` / `resolved_loss` / `sold_win` / `sold_loss`), `/pnl/{address}/periods` (best/worst day, week, month), `/pnl/{address}/changes` (per-window deltas in one call), and `/pnl/{address}/risk` (max drawdown, current drawdown, max runup).
  * **Trader breakdowns** (`/positions`, `/markets`, `/events`, `/categories`): every tab of a trader profile from one namespace. `/positions` takes a required `status=open|closed` filter and returns current price, shares balance, average entry/exit, realized PnL, percent return, and `redeemable` / `mergeable` flags; `/markets`, `/events`, and `/categories` roll the same activity up a level.
  * **Leaderboards**: five PnL-ranked endpoints at different scopes, all sharing fields, sort options, and pagination: `/trader/global_pnl` (every tracked trader), `/events/top-traders`, `/market/top-traders`, `/market/position/top-traders`, and `/tags/top-traders`.
  * **Biggest wins** (`/trader/top_trades_markets`): ranks every market by aggregate realized PnL across all traders over 1d, 7d, 30d, or lifetime.
  * **Top holders**: live top-holder lists for any market or position. Pass `include_pnl=true` for each holder's full PnL breakdown, plus holder-count time series at event, market, and position level.
  * **Real-time PnL over Websocket**: subscribe to `polymarket_trader_pnl` (global, market, event, and category granularities, pushed typically within 50ms of block confirmation) with price-driven, trade-driven-only, or window-rollover trigger modes. Two position rooms cover the lifecycle: `polymarket_trader_positions` (`trader_position_lifetime_update` on every PnL change) and `polymarket_trader_position_resolved` (fires once on resolution with `won` and final realized PnL).
  * **Explorer and SDK**: every surface on [explorer.struct.to/traders](https://explorer.struct.to/traders) (trader profiles, leaderboards, holder views, PnL charts) now runs on v3, and the [TypeScript SDK](https://www.npmjs.com/package/@structbuild/sdk) is fully updated.
</Update>

<Update label="May 31, 2026" tags={["Update"]}>
  ## v0.5.3: OHLC Candles & Webhook Logs

  * **OHLC candles for Up/Down assets**: new `/v1/polymarket/asset-history/candlestick` endpoint returns OHLC price bars per asset at TradingView resolutions (`1S`, `1`, `5`, `15`, `30`, `60`, `240`, `D`, `1D`).
  * **Webhook delivery logs**: inspect delivered webhook payloads in the dashboard or via the [delivery logs API](/api-reference/webhooks/get-webhook-delivery-logs).
  * **Documentation**: expanded pagination, authentication, and Crypto Up/Down guides.
</Update>

<Update label="May 9, 2026" tags={["Update"]}>
  ## v0.5.2: Tag Metrics & Builder Attribution

  Builder analytics extended down into the real-time metric streams, plus a new tag-level rollup and a cleaner trade-event taxonomy for protocol payouts.

  <Info>
    **Volume on Polymarket vs. Struct.** Polymarket's UI reports "volume" as notional (the count of shares or contracts traded), which corresponds to `shares_volume` in Struct payloads. `usd_volume` is the dollar value of those trades. Use `shares_volume` to match figures shown on Polymarket and `usd_volume` for true USD throughput.
  </Info>

  * **Tag metrics streams**: new `polymarket_tag_metrics` Websocket room, new `tag_metrics` alert event, and new `tag_metrics` webhook. Subscribe by tag label or slug to receive aggregated volume, fees, transactions, and unique-trader counts across the standard timeframes (`1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`).
  * **Builder-attributed metric fields**: every metric payload (market, event, position, condition, tag) now ships builder-attributed counterparts: `builder_usd_volume`, `builder_shares_volume`, `builder_fees`, `builder_txns`, and `unique_builder_traders`. Position metrics additionally split builder activity by side (`builder_usd_buy_volume` / `builder_usd_sell_volume`, `builder_shares_buy_volume` / `builder_shares_sell_volume`, `builder_buys` / `builder_sells`).
  * **Shares volume across metrics**: every metric event now includes a top-level `shares_volume` (decimal string on rooms, number on alerts and webhooks) alongside `usd_volume`, with matching breakdowns on position metrics (`shares_buy_volume`, `shares_sell_volume`).
  * **Position-metric trade sizing**: position-metric payloads now include `avg_trade_shares`, `avg_buy_shares`, and `avg_sell_shares` so you can track average ticket size per window without computing it client-side.
  * **Trades stream payout credits**: `MakerRebate`, `Reward`, and `Yield` join the trades discriminator for pUSD credits paid directly to trader wallets, replacing the previous `Approval` variant. The three variants share one payload shape (`taker` is the payout distributor, `shares_amount` / `price` / fees are always `0`).
  * **`image_url` on trade variants**: `OrderFilled`, `OrdersMatched`, `Redemption`, `Merge`, `Split`, `Cancelled`, `RegisterToken`, and oracle lifecycle events on `polymarket_trades` now carry `image_url` so you can render trade cards without a follow-up market lookup.
</Update>

<Update label="Apr 28, 2026" tags={["Update"]}>
  ## v0.5.1: Builder Analytics

  * **Builders namespace** (`/v1/polymarket/builders`): query any Polymarket builder by code with latest metrics, deltas / changes / timeseries analytics across the same bucket resolutions as the analytics API, current fee rate and full fee history, cohort retention, tag breakdowns, top traders, and concentration.
  * **Global builder rollups**: aggregate stats, bucketed composition, and tag distribution across all builders via `/builders/global`, `/builders/global/tags`, and `/builders/tags/{tag}` for ranking builders within a category.
  * **Builder metadata**: list and look up builder display info (name, image, links) via `/builders/metadata` and `/builders/{builder_code}/metadata`.
  * **Webhook payload enrichments**: spike webhooks (volume, probability, price) now carry `question`, `market_slug`, `event_slug`, `image_url` (and `event_title` on event-scoped events) so you can render alerts without a follow-up lookup.
</Update>

<Update label="Apr 25, 2026" tags={["Launch"]}>
  ## v0.5: CLOB v2, Analytics, and Oracle Events

  Polymarket's CLOB v2 cutover lands April 28. v0.5 ships three days early with full v2 support, plus a brand-new analytics API and an oracle events stream.

  <Info>
    **No breaking changes.** Every integration built on Struct continues to work without modification. CLOB v2 is wired in transparently behind the existing surfaces. Order, trade, and account fields are additive, not replaced. You do not need to update your code to keep running.
  </Info>

  * **CLOB v2 ready**: order, trade, and account surfaces now reflect the v2 schema. New `builder_fee` and `builder_code` on trades, `CTFExchangeV2` and `NegRiskExchangeV2` on the `exchange` discriminator, and a new `pusd_update` event on the accounts websocket alongside the existing `usdce_update` and `matic_update`.
  * **Analytics namespace** (`/v1/polymarket/analytics`): a dedicated analytics API with three query modes (deltas, changes, timeseries) across five scopes (global, event, market, tag, trader). Bucket resolutions span 60m, 4h, 1d, 1w, 1mo. Includes merge/split volume tracking, a buy-distribution histogram (under $10 through $50k+), and distinct-address counters at every scope.
  * **Oracle events stream**: a new websocket room (`polymarket_oracle_events`) and webhook event covering 16 UMA assertion lifecycle events including `AssertionMade`, `AssertionDisputed`, `AssertionSettled`, `ProposePrice`, `DisputePrice`, `QuestionResolved`, `QuestionEmergencyResolved`, and `NegRiskOutcomeReported`. Pending events appear from the mempool before chain confirmation, with confirmed events following once the block lands.
  * **Top traders endpoints**: rank traders by realized PnL on events, markets, and positions over 1d, 7d, 30d, or lifetime windows.
  * **Tag and bond sorting**: sort tags by volume, txns, unique traders/makers/takers, or fees over 1h through 1y windows, and bond markets by APY, liquidity, volume, or end date.
  * **Expanded room and alert filters**: websocket subscriptions and webhook filters got broad expansion, especially around oracle metadata and trader scoping.
  * **Docs**: see the [API Reference](/api-reference/getting-started) for the new analytics endpoints, and the [Polymarket CLOB v2 migration guide](https://docs.polymarket.com/v2-migration) for context on the v2 cutover.
</Update>

<Update label="Apr 14, 2026" tags={["Update"]}>
  ## v0.4.1

  * **New trade event webhook**: receive structured events for every trade type (fills, splits, merges, redemptions, conversions) without parsing raw payloads. Ships as the new `TradeEvent` webhook under the Trader category.
  * **Struct CDN**: market and event images are now served from the Struct CDN, so `image_url`.
  * **CLOB rewards streaming**: track reward-earning markets in real time through a new rewards Websocket room, plus `sort_by=rewards` and reward filters on the market API.
</Update>

<Update label="Apr 11, 2026" tags={["Launch"]}>
  ## v0.4: WebSockets

  Websockets are now generally available. Stream real-time Polymarket data directly to your application over two endpoints, authenticated with the same `X-API-Key` you use for REST.

  * **Rooms (`wss://api.struct.to/ws`)**: subscribe to topic-based data streams for trades, asset prices and candle windows, market / event / position metrics, trader PnL and positions, accounts, order books, and CLOB rewards. Each room exposes its own filters (condition IDs, market slugs, wallet addresses, asset symbols, timeframes, and more) so you only receive the messages you care about.
  * **Alerts (`wss://api.struct.to/ws/alerts`)**: receive the full catalog of webhook events (whale trades, PnL crossings, probability and volume spikes, milestones, and more) pushed over a persistent Websocket connection, with no public HTTP endpoint to host.
  * **Per-message credit billing**: pay only for messages actually delivered to your connection, with a 1 credit hold on connect and per-room rates starting at 0.01 credits per message.
  * **Docs**: see [WebSockets → Getting Started](/websockets/getting-started) for your first connection, the [Rooms catalog](/websockets/rooms) for every available stream and its filters, [Alerts](/websockets/alerts) for the webhook-over-Websocket endpoint, and [Pricing](/websockets/pricing) for per-room rates.
</Update>

<Update label="Apr 2, 2026" tags={["Bug Fix"]}>
  * Fixed Websocket trade serialization to send numeric fields as strings and return null for 'side' field on non-fill trade types (Redemption, Merge, Split)
</Update>

<Update label="Mar 30, 2026" tags={["Improvement","Update"]}>
  * Added wallet tracking webhook and new Websocket event types for market trades, asset prices, and candle data updates
  * Enhanced position and market metrics with granular timeframe-based analytics
</Update>

<Update label="Mar 29, 2026" tags={["Bug Fix","Update"]}>
  * Fixed position title display and search to use market title as fallback when position title is missing, and improved position search to match against both position and market titles
  * Fixed position ID conversion from hexadecimal to decimal format for consistent position identifiers
  * Removed 'worst\_trade' sort option from global PnL leaderboard API and fixed worst trade calculation to only consider closed market positions
  * Added min\_shares filter to trader position PnL endpoint to exclude dust positions
</Update>

<Update label="Mar 28, 2026" tags={["Update","Improvement"]}>
  * Added current\_shares\_balance and image\_url fields to trader positions and trades with real-time Websocket updates
  * Expanded REST API with comprehensive market analysis endpoints including trader PnL tracking, order book data, trades, price movements, metrics, volume charts, spread history, and position data
  * Added offset-based pagination to trader trades and P\&L endpoints, with offset taking precedence over cursor-based pagination
  * Search endpoint now supports type filtering and optional trader PnL data enrichment with dynamic credit pricing
  * API endpoints now return empty results instead of 404 errors when data is not found; PnL endpoints default to lifetime calculations; renamed pnl\_usd to realized\_pnl\_usd for clarity across REST and Websocket APIs
</Update>

<Update label="Mar 27, 2026" tags={["Update","Improvement"]}>
  * Updated PnL data types and tracking system to V2 versions across all PnL-related APIs and data streams, including timestamp field on trader PnL candle data for improved data freshness tracking
</Update>

<Update label="Mar 24, 2026" tags={["Update","Improvement","Bug Fix"]}>
  * Added comprehensive PnL tracking with position-level and market-level metrics, enriched candle and calendar endpoints with multiple timeframe options (1d, 7d, 30d, lifetime), and pagination support
  * Enhanced webhook system with wallet address allowlist filtering, timeframe filtering for PnL events, condition ID and sell volume filtering, new trade execution notifications, and spike webhooks now include previous and current probability/price values with 10-second deduplication across subscriptions
  * Positions API now includes market slug and image URL for each position with market\_slug as a filterable query parameter, and renamed buy/sell USD fields to total\_buy\_usd and total\_sell\_usd for clarity
</Update>

<Update label="Mar 16, 2026" tags={["Update","Improvement"]}>
  * Renamed query parameters ('start'/'end' to 'from'/'to') and standardized response field names across order book, PnL candles, and Websocket chart data endpoints
  * Added support for DOGE, BNB, and HYPE asset symbols in price history queries, webhooks, Websocket filters, and asset price API with validation for unsupported symbols
  * Added realized\_pnl\_usd sorting option for positions with automatic win rate and average PnL metrics calculation
</Update>

<Update label="Mar 15, 2026" tags={["Update","Improvement","Bug Fix"]}>
  * Added comprehensive Order Book APIs with real-time Websocket streams, historical snapshots, and spread time-series data with filtering by market, condition, and position ID
  * Added support for 4-hour (4h) interval in asset price history across all APIs and webhooks
  * Improved Polymarket market search with relevance scoring and enhanced validation for character counting and timeframe parameters
  * Improved orderbook parsing to support both object and array formats for bid/ask levels
  * Fixed orderbook metrics calculation, market endpoints to return proper 404 responses, and eliminated duplicate history records from redundant Websocket connections
</Update>

<Update label="Mar 12, 2026" tags={["Update","Improvement","Bug Fix"]}>
  * Added 24-hour volume data to AI market responses and introduced an AI credit system with automatic billing for API, Websocket, and webhook usage
  * Added `exclude_shortterm_markets` boolean flag to webhook filtering options
  * Implemented connection and message rate limiting (30 connections per 60 seconds, 30 messages per second per organization) with improved error handling and validation to ensure clients join rooms before messaging
  * Reduced Websocket ping timeout from 30 minutes to 30 seconds for faster detection of inactive connections
  * Fixed credit tracking and webhook suspension logic to prevent negative balances and duplicate suspensions
</Update>

<Update label="Mar 11, 2026" tags={["Improvement","Update"]}>
  * Enhanced price-spike and volume-spike webhooks with configurable thresholds, time windows, and deduplication to detect market movements with reduced latency and false positives
  * Webhook management enforces plan-based limits with automatic deletion or suspension on subscription changes
  * Removed min\_usd\_value filter from asset price tick webhooks; use asset\_symbols to filter tracked crypto assets instead
  * Purchased credits now persist when changing subscription plans, with add-on credits consumed after plan credits are exhausted
</Update>

<Update label="Mar 10, 2026" tags={["Update","Improvement","Bug Fix"]}>
  * Added comprehensive event data including 24-hour volume, credit usage tracking, AI-optimized API response formats, and new webhook event types (Close to Bond, Market Created, Asset Price Ticks, Window Updates, Condition/Event/Position Metrics, Volume/Probability Milestones, and Volume Spikes)
  * Introduced subscription filters for webhook events, enabling filtering by market, event, trader, position, and other criteria
  * Improved Websocket price feeds with immediate updates on new candle periods and enhanced webhook performance through rate limiting and stricter validation
  * Updated market webhook payloads to use server timestamps, enriched events with Gamma API category metadata, and now include all markets regardless of metadata availability
  * Fixed whale trade webhooks to only trigger for actual OrderFilled trades and corrected partial updates validation
</Update>

<Update label="Mar 9, 2026" tags={["Update","Improvement","Bug Fix"]}>
  * Webhooks now support per-endpoint event queue limits with enhanced delivery analytics tracking all attempts, failures, and error details
  * Search API now returns markets and traders alongside events with independent pagination, new sorting parameters, and increased base credits from 2 to 3
  * Added support for NegRisk contract adapter with new trade types (Split, Merge, Redemption, PositionsConverted) and enriched metadata
  * Market data processing now automatically recovers from service crashes and replays pending updates on startup
  * Trades stream payload includes updated confirmation timestamps with improved accuracy and deduplication logic
  * Fixed trader PnL data accuracy, API cache separation between public and authenticated requests, and catchup buffer deduplication
</Update>

<Update label="Mar 8, 2026" tags={["Update","Improvement"]}>
  * Added comprehensive webhook events for trader transactions, market entries, volume spikes, probability spikes, and real-time asset price updates with customizable timeframes, thresholds, and asset symbol filtering, plus 24-hour credit usage tracking with analytics
  * Enhanced data reliability across trader PnL candles, condition metrics, event metrics, holder stats, and liquidity streams with exactly-once delivery guarantees and improved consumer catchup with non-blocking ack signal draining
  * Improved Polymarket event and market search performance with optimized title-based search and faster indexing
  * Removed price and probability open/close/high/low fields from Polymarket event and condition metrics
</Update>

<Update label="Mar 6, 2026" tags={["Update","Improvement","Bug Fix"]}>
  * Added `ai=true` query parameter to API endpoints for optimized AI agent responses with truncated JSON payloads
  * Webhook events API now includes category, credits cost, and applicable filter fields for each event type, with validation for webhook filters and subscriptions to enforce required fields at creation time
  * Webhook delivery logging now visible by default with info-level logs for successful deliveries and warning-level logs for failures, including delivery ID, status code, and duration
  * Fixed webhook credit deduction to use per-event costs instead of a global rate, eliminating silent webhook drops
</Update>

<Update label="Mar 5, 2026" tags={["Update"]}>
  * Added price jumps detection API endpoint (/v1/polymarket/market/price-jumps) that identifies significant price movements (configurable threshold, default 10%) within configurable candle windows (1, 5, 15, 30, 60, 240 minutes), with support for condition\_id or market\_slug lookup and millisecond timestamps for direct compatibility with the trades API
</Update>

<Update label="Mar 3, 2026" tags={["Bug Fix","Update"]}>
  * Trader PnL now displays accurate average hold time for lifetime statistics
  * Webhooks API endpoints updated to `/v1/webhooks` and now support both API key and bearer token authentication methods
</Update>

<Update label="Mar 2, 2026" tags={["Improvement","Update"]}>
  * Websocket price updates now only trigger when candles are fully settled, preventing mid-candle close price changes and duplicate data during reconnections
  * Added new webhook event types (market\_created, volume\_spike, volume\_milestone, probability\_spike, position\_metrics, first\_trade, new\_market, whale\_trade, close\_to\_bond, and PnL tracking) with customizable filters, 6-hour deduplication, concurrent execution support, and 7-day/30-day metrics periods
  * Webhook subscriptions now use a single `event` field per subscription; migrated API endpoints from /frontend/webhooks/\* to /v1/webhook/\* with volume testing endpoints to estimate delivery costs
  * Added webhook management endpoints (list\_events, rotate\_secret) and improved Websocket PING/PONG handling for more reliable connection management
  * Asset history now returns null for incomplete time windows, webhook outcomes properly zero out incomplete candle data, and token account data on Polygon filters to Polymarket-relevant collateral tokens (USDC and USDe)
</Update>

<Update label="Mar 1, 2026" tags={["Update","Improvement"]}>
  * Added trader PnL statistics including average PnL per market, average PnL per trade, and average hold time
  * Implemented webhook deduplication to prevent duplicate webhooks with the same URL and event configuration
</Update>

<Update label="Feb 28, 2026" tags={["Update","Improvement"]}>
  * Webhook API restructured with organization-based authentication, new event listing endpoint, and secret rotation capability
  * FirstTradePayload webhook schema updated with improved numeric precision (f64 with 6 decimal places), removed unnecessary fields, and renamed slug to market\_slug
  * Removed 'All' event variant from webhook subscriptions and failure tracking fields for more precise event filtering and cleaner responses
</Update>

<Update label="Feb 27, 2026" tags={["Update","Improvement","Bug Fix"]}>
  * Market images now included in trade results and position queries across all APIs
  * Asset price history query time bounds extended by 1 day to include in-progress candles with immediate queryability upon candle opening
  * Real-time price updates now powered by Chainlink Websocket integration for improved accuracy and reliability
  * Price change percentage automatically computed from open and close prices for better data consistency
  * Fixed asset price history data alignment across Websocket, REST API, and backfill sources, with improved candle initialization and correct handling of price conflicts and invalid values
</Update>

<Update label="Feb 26, 2026" tags={["Update","Improvement","Bug Fix"]}>
  * Added market and event chart endpoints with TradingView-style resolutions (1H, 6H, 1D, 1W, 1M, ALL) with 2-3x faster queries via pre-aggregated data
  * Extended markets and outcomes endpoints with new fields: series\_slug, accepting\_orders, uma\_resolution\_status, liquidity\_usd, and liquidity\_updated\_at
  * Added asset price history API endpoint for BTC, ETH, XRP, and SOL across multiple timeframes with cursor-based pagination using Chainlink price data
  * Enhanced trader profile batch endpoint with lifetime timeframe support and ability to retrieve winning outcomes for resolved markets
  * Improved Websocket and Kafka resilience with automatic reconnection, sharded connections with redundancy, and exponential backoff retries
  * Fixed trader PnL candles API response and improved chart query performance by \~75% for 1-week resolution
</Update>

<Update label="Feb 25, 2026" tags={["Update","Improvement","Bug Fix"]}>
  * API now uses explicit field names (market\_slug, event\_slug, created\_time, start\_time, end\_time) with full backwards compatibility
  * Added real-time Polymarket CLOB Websocket streaming with market price feeds, sports updates, user order/trade channels, and automatic reconnection
  * Added position-level PnL tracking and querying across 1d, 7d, 30d, and lifetime timeframes with filtering and sorting options
  * Market responses enhanced with resolution source, CLOB rewards, individual outcome prices, lifetime metrics, detailed PnL analytics, and full outcome details including outcome\_index and MarketStatus 'all' filter support
  * Improved data quality by filtering invalid trades, protocol contract activities, fixing market outcome prices, correcting trade fees, and determining market closed status from Gamma metadata
</Update>

<Update label="Feb 24, 2026" tags={["Update","Improvement","Bug Fix"]}>
  * Added shares\_usd field to event holder endpoints and expanded metrics API with new trading volume, fees, and trader count endpoints across multiple timeframes
  * Improved Trader Positions endpoint with sorting by shares, USD value, PnL, and price, plus event slug filtering and increased limits to 50/200
  * Enhanced market tracking with accepting\_orders and uma\_resolution\_status fields, Cancelled trade type, and accurate UMA assertion state tracking; improved dispute tracking for UMA oracle markets with clear status distinction between disputed and settled outcomes
  * Updated API responses to use typed enums instead of integers, numeric volume metrics, and Unix epoch format for timestamps; standardized end\_time field naming and increased recommended markets endpoint limit to 250
  * Added cursor-based pagination support to candlestick, volume chart, and trader endpoints for better time-series data handling
  * Fixed market status API mapping and Websocket URL configuration for Polygon chain; fixed UMA resolution status and market status updates to correctly handle out-of-order events and prevent data loss
</Update>

<Update label="Feb 23, 2026" tags={["Update","Improvement","Bug Fix"]}>
  * Market metrics API now returns nested metrics organized by multiple timeframes (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d) with volume, fees, transaction count, unique traders, and open interest change
  * Added real-time PnL tracking across multiple timeframes for traders at market, event, and global levels with best/worst trade statistics and enhanced leaderboard sorting
  * Restructured trader positions API with clearer field names and nested market-level PnL data under pnl field, plus market metadata in responses
  * Simplified PnL data in holder responses with a single realized\_pnl\_usd field across event, market, and position holders
  * Fixed share balance scaling issue in market holders, position holders, and trader positions endpoints
  * Improved performance of holder and position queries through SQL refactoring with subquery patterns
</Update>

<Update label="Feb 22, 2026" tags={["Update","Improvement"]}>
  * Added 7-day and 30-day metrics timeframes to events and markets with optional include\_metrics parameter; market metrics now include volume, fees, transaction counts, trader counts, and open interest across all timeframes (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d)
  * Added ability to fetch up to 50 events by ID or slug using comma-separated lists with enhanced sorting options (title, relevance, creation\_date, start\_date, EndTime, StartTime, CreatedTime)
  * Implemented cursor-based pagination for event and market listing with up to 100 items per page, using base64-encoded pagination\_key parameter
  * Enhanced market filtering with advanced options including volume, liquidity, holders, tags, and status, plus bulk search across multiple fields
  * Market API now returns granular time fields (created\_time, start\_time, game\_start\_time, closed\_time, end\_time) instead of end\_date and resolution\_date across REST and Websocket APIs, and market status is now returned as a string ("open"/"closed") instead of a number
  * Events with a future start\_date now return status "upcoming" instead of "open", with added support for filtering by status and improved event status logic to distinguish between upcoming, open, and closed events; added show\_market\_images field to event list responses
</Update>
