# Struct Docs ## Docs - [Global analytics candles (per-bucket deltas)](https://docs.struct.to/api-reference/analytics/global-analytics-candles-per-bucket-deltas.md): Returns per-bucket deltas (volume, traders, fees etc. that happened *during* each bucket). Use for bar-chart visualisations of activity over time. - [Global analytics pct change](https://docs.struct.to/api-reference/analytics/global-analytics-pct-change.md): Returns % change for each metric over the requested lookback window. `null` fields mean the window predates the available data. - [Global analytics snapshot](https://docs.struct.to/api-reference/analytics/global-analytics-snapshot.md): Returns the latest cumulative analytics metrics across all of Polymarket: volume, traders, txn counts, fees, yes/no splits, and buy distribution. - [Global analytics timeseries (cumulative)](https://docs.struct.to/api-reference/analytics/global-analytics-timeseries-cumulative.md): Returns cumulative analytics values at the end of each bucket. Use for running-total line charts of global volume, traders, fees over time. - [Get Asset Price History](https://docs.struct.to/api-reference/assets/get-asset-price-history.md): Returns historical price data for supported crypto assets from Polymarket API - [Get bonds](https://docs.struct.to/api-reference/bonds/get-bonds.md): Retrieve bond markets with sorting, probability range filter, and deterministic keyset pagination. - [All tags with builder-attributed activity](https://docs.struct.to/api-reference/builders/all-tags-with-builder-attributed-activity.md): Returns every tag that has builder-routed activity, with metrics aggregated across all builders. `distinct_builders` is exact; other `unique_*` columns sum per-builder uniques and may slightly over-count traders active under multiple builders. - [Bucketed top-N with 'other' builder composition](https://docs.struct.to/api-reference/builders/bucketed-top-n-with-other-builder-composition.md): Bucketed timeseries for stacked-bar / area charts. For each bucket in the range, returns up to `top_n` plus one rows: one per top-N builder plus an `other` aggregate. Top-N is fixed across the whole window so chart legends stay stable. - [Builder analytics deltas (per-bucket change)](https://docs.struct.to/api-reference/builders/builder-analytics-deltas-per-bucket-change.md): Returns the change within each bucket for one builder. Use for bar/candle charts. - [Builder analytics timeseries (cumulative)](https://docs.struct.to/api-reference/builders/builder-analytics-timeseries-cumulative.md): Returns cumulative values at the end of each bucket for one builder. Use for running-total charts over time. - [Builder percentage change over a lookback window](https://docs.struct.to/api-reference/builders/builder-percentage-change-over-a-lookback-window.md): Per-metric percentage change over the requested window for one builder. - [Cohort retention for a builder](https://docs.struct.to/api-reference/builders/cohort-retention-for-a-builder.md): For each cohort day in the requested window, returns the cohort size and the share of traders that came back on day +1, +7, and +30. - [Cumulative bucket timeseries across all builders](https://docs.struct.to/api-reference/builders/cumulative-bucket-timeseries-across-all-builders.md) - [Cumulative stats across all builders](https://docs.struct.to/api-reference/builders/cumulative-stats-across-all-builders.md): Returns one snapshot summing every builder-attributed trade over the chosen window. - [Get a builder's display metadata](https://docs.struct.to/api-reference/builders/get-a-builders-display-metadata.md): Returns name, website, twitter, icon URL, and description for the given builder code. Returns 200 with `null` body when no metadata has been registered for the code. - [Get a single builder's cumulative stats](https://docs.struct.to/api-reference/builders/get-a-single-builders-cumulative-stats.md): Returns cumulative stats for one builder over the chosen window. - [Get builder fee rate history](https://docs.struct.to/api-reference/builders/get-builder-fee-rate-history.md): Returns the history of rate changes for the given builder code, newest first. - [Get builder fee rates](https://docs.struct.to/api-reference/builders/get-builder-fee-rates.md): Returns the maker and taker fee rates (in basis points) for the given builder code. - [List builder metadata](https://docs.struct.to/api-reference/builders/list-builder-metadata.md): Paginated list of all builders with registered display metadata, ordered alphabetically by name. - [List builders ranked by activity](https://docs.struct.to/api-reference/builders/list-builders-ranked-by-activity.md): Returns the top builders by the chosen metric over the chosen window. Use `sort` to choose the ranking metric and `timeframe` to choose the window. - [Per-bucket deltas across all builders](https://docs.struct.to/api-reference/builders/per-bucket-deltas-across-all-builders.md) - [Per-builder breakdown for a tag](https://docs.struct.to/api-reference/builders/per-builder-breakdown-for-a-tag.md): Returns the top builders that have routed activity into this tag, ranked by the chosen metric over the chosen window. - [Per-tag breakdown for a builder](https://docs.struct.to/api-reference/builders/per-tag-breakdown-for-a-builder.md): Returns the top tags this builder has routed activity into, ranked by the chosen metric over the chosen window. - [Percentage change across all builders over a lookback window](https://docs.struct.to/api-reference/builders/percentage-change-across-all-builders-over-a-lookback-window.md) - [Search builders by name or code](https://docs.struct.to/api-reference/builders/search-builders-by-name-or-code.md): Returns builder metadata rows matching the query. Matches against `name` and `builder_code` (the `0x` prefix is optional). Results are sorted alphabetically by name and paginated. - [Top traders for a builder](https://docs.struct.to/api-reference/builders/top-traders-for-a-builder.md): Returns the highest-volume (or highest-fee / highest-txn) traders that have routed through this builder over the requested window. - [Trader-volume concentration for a builder](https://docs.struct.to/api-reference/builders/trader-volume-concentration-for-a-builder.md): How much of the builder's window volume is concentrated in its top traders. Returns total volume + total trader count + top-1/10/100/1k/10k volume and share. - [Event analytics candles (per-bucket deltas)](https://docs.struct.to/api-reference/events/event-analytics-candles-per-bucket-deltas.md): Returns per-bucket deltas for a specific event (what happened during each bucket). - [Event analytics pct change](https://docs.struct.to/api-reference/events/event-analytics-pct-change.md): Per-metric % change over the requested lookback window for a specific event. - [Event analytics timeseries (cumulative)](https://docs.struct.to/api-reference/events/event-analytics-timeseries-cumulative.md): Returns cumulative analytics values for a specific event at the end of each bucket. - [Get event by ID or slug](https://docs.struct.to/api-reference/events/get-event-by-id-or-slug.md): Retrieve a single event by its numeric ID or slug with optional nested tags, markets, and metrics - [Get event by slug](https://docs.struct.to/api-reference/events/get-event-by-slug.md): Retrieve a single event by its slug with optional nested tags, markets, and metrics - [Get event chart](https://docs.struct.to/api-reference/events/get-event-chart.md): Retrieve price data over time for up to 4 markets with highest YES outcome (outcome_index 0) prices in an event. Perfect for rendering multi-line charts showing price movement across top markets. TradingView-style: resolution parameter determines both candle size and implicit lookback period. - [Get event market outcomes](https://docs.struct.to/api-reference/events/get-event-market-outcomes.md): Returns the winning outcome name for each resolved market in an event, keyed by market slug. Useful for quickly checking which outcomes won across a series. - [Get event metrics](https://docs.struct.to/api-reference/events/get-event-metrics.md): Retrieve volume, transaction, and trader metrics for an event. Supports single timeframe (e.g., '1m'), multiple timeframes (e.g., '1m,5m,1h'), or 'all' to get all available timeframes. - [Get events](https://docs.struct.to/api-reference/events/get-events.md): Retrieve a paginated list of events with filtering, sorting, and optional nested tags/markets - [Get top traders for an event](https://docs.struct.to/api-reference/events/get-top-traders-for-an-event.md): Top traders ranked by realized PnL for a given event. - [Getting Started](https://docs.struct.to/api-reference/getting-started.md): Authentication, base URL, and your first API call. - [Get market holders](https://docs.struct.to/api-reference/holders/get-market-holders.md): Retrieve holders of a market grouped by outcome, sorted by shares held. Identify the market with either `condition_id` or `market_slug` — exactly one must be provided. Set `include_pnl=true` to include a nested holder `pnl` object. Uses cursor-based pagination. - [Get market holders history](https://docs.struct.to/api-reference/holders/get-market-holders-history.md): Retrieve historical holder count snapshots for a market over a time range. Identify the market with either `condition_id` or `market_slug` — exactly one must be provided. - [Get position holders](https://docs.struct.to/api-reference/holders/get-position-holders.md): Retrieve holders of a specific position (ERC1155 token), sorted by shares held. Set `include_pnl=true` to include nested holder PnL. Uses cursor-based pagination for efficient traversal. - [Get position holders history](https://docs.struct.to/api-reference/holders/get-position-holders-history.md): Retrieve historical holder count snapshots for a position over a time range - [JWT Public Key Auth](https://docs.struct.to/api-reference/jwt-auth.md): Authenticate end users directly to the Struct API using JWTs from any auth provider. - [Detect price jumps](https://docs.struct.to/api-reference/market/detect-price-jumps.md): Scan candles for significant price movements. Returns jumps with from/to timestamps in milliseconds, directly usable as trades API time range parameters to identify traders who traded before or during the movement. - [Get market by condition ID](https://docs.struct.to/api-reference/market/get-market-by-condition-id.md): Retrieve one or more markets by condition ID. Supports batch lookups via query params. Returns an array of MarketResponse objects. - [Get market by slug](https://docs.struct.to/api-reference/market/get-market-by-slug.md): Retrieve one or more markets by slug. Supports batch lookups via query params. Returns an array of MarketResponse objects. - [Get market candlesticks by condition_id](https://docs.struct.to/api-reference/market/get-market-candlesticks-by-condition_id.md): Retrieve OHLCV candlestick data for a market by its condition_id - [Get market chart](https://docs.struct.to/api-reference/market/get-market-chart.md): Retrieve price data over time for up to 4 position outcomes in a market condition. TradingView-style: resolution parameter determines both candle size and implicit lookback period. Auto-selects the 4 most active outcomes if position_ids not specified. - [Get market metrics](https://docs.struct.to/api-reference/market/get-market-metrics.md): Retrieve volume, transaction, and trader metrics for a market. Supports single timeframe (e.g., '1m'), multiple timeframes (e.g., '1m,5m,1h'), or 'all' to get all available timeframes. - [Get market trades](https://docs.struct.to/api-reference/market/get-market-trades.md): Retrieve trades for one or more markets, with filtering by trader, side, price, amount, and time range - [Get market volume chart](https://docs.struct.to/api-reference/market/get-market-volume-chart.md): Retrieve volume breakdown by YES/NO outcome over time for a prediction market - [Get markets](https://docs.struct.to/api-reference/market/get-markets.md): Retrieve a paginated list of markets with filtering, sorting, and optional nested tags/events/metrics - [Get position candlesticks by position_id](https://docs.struct.to/api-reference/market/get-position-candlesticks-by-position_id.md): Retrieve OHLCV candlestick data for a specific position by its position_id - [Get position metrics](https://docs.struct.to/api-reference/market/get-position-metrics.md): Retrieve volume, transaction, and trader metrics for a specific position. Supports single timeframe (e.g., '1m'), multiple timeframes (e.g., '1m,5m,1h'), or 'all' to get all available timeframes. - [Get position volume chart](https://docs.struct.to/api-reference/market/get-position-volume-chart.md): Retrieve volume over time for a specific position with buy/sell breakdown - [Get top traders for a market](https://docs.struct.to/api-reference/market/get-top-traders-for-a-market.md): Top traders ranked by realized PnL for a given market (condition_id or market_slug). - [Get top traders for a position id / outcome](https://docs.struct.to/api-reference/market/get-top-traders-for-a-position-id-outcome.md): Top traders ranked by realized PnL on a specific position (ERC1155 outcome token). - [List oracle events](https://docs.struct.to/api-reference/market/list-oracle-events.md): Retrieve on-chain oracle lifecycle events (resolutions, disputes, assertions, emergency resolutions). Filter by `condition_ids` or `event_types` and paginate with `limit`/`pagination_key`. - [Market analytics candles (per-bucket deltas)](https://docs.struct.to/api-reference/market/market-analytics-candles-per-bucket-deltas.md): Returns per-bucket deltas for a specific market (what happened during each bucket). - [Market analytics pct change](https://docs.struct.to/api-reference/market/market-analytics-pct-change.md): Per-metric % change over the requested lookback window for a specific market. - [Market analytics timeseries (cumulative)](https://docs.struct.to/api-reference/market/market-analytics-timeseries-cumulative.md): Returns cumulative analytics values for a specific market at the end of each bucket. - [Get order book](https://docs.struct.to/api-reference/order-book/get-order-book.md): Returns the latest CLOB orderbook snapshot for a position, including derived metrics (best bid/ask, mid price, spread, liquidity depth). Data is sourced from the real-time Polymarket WebSocket feed. `bids` and `asks` are arrays of `{"p": price, "s": size}` objects, sorted best-first. - [Get order book history](https://docs.struct.to/api-reference/order-book/get-order-book-history.md): Paginated history of raw CLOB orderbook snapshots including full bids/asks levels and derived metrics. Default limit 20, max 200. `bids` and `asks` are arrays of `{"p": price, "s": size}` objects, sorted best-first. - [Get order books for a market](https://docs.struct.to/api-reference/order-book/get-order-books-for-a-market.md): Returns the latest orderbook snapshot for every position (outcome) in a market. Accepts condition_id or market_slug. `bids` and `asks` are arrays of `{"p": price, "s": size}` objects, sorted best-first. - [Get spread history](https://docs.struct.to/api-reference/order-book/get-spread-history.md): Lightweight time series of derived orderbook metrics (best bid/ask, mid price, spread, liquidity depth) without raw bids/asks — ideal for charting. Default limit 20, max 200. - [Response Format](https://docs.struct.to/api-reference/response-format.md): Understand how all API responses are structured. - [Search events, markets, traders, and builders](https://docs.struct.to/api-reference/search/search-events-markets-traders-and-builders.md): Search across markets, events, traders, and builders. Use `type` to limit which categories are searched. Trader search supports wallet address lookup or name search; builder search matches against builder name and builder_code. Results for each category are independently paginated. Only requested ca… - [Get series events](https://docs.struct.to/api-reference/series/get-series-events.md): Returns a paginated list of events belonging to a specific Polymarket series, with full market data for each event. - [Get series market outcomes](https://docs.struct.to/api-reference/series/get-series-market-outcomes.md): Returns the winning outcome name for each resolved market across all events in a series, keyed by market slug. Useful for checking historical results across recurring series (e.g., btc-updown-5m). - [List or get series](https://docs.struct.to/api-reference/series/list-or-get-series.md): Retrieve series. Use `id` or `series_slug` for single lookup, `series_ids` or `series_slugs` (comma-separated, max 250, mutually exclusive) for multi-lookup, or paginate with `active_only`. - [Get tag by slug](https://docs.struct.to/api-reference/tags/get-tag-by-slug.md): Retrieve a single tag by its ID or slug. Pass `include_metrics=true` to attach analytics metrics (volume_usd, txn_count, unique_traders, fees_usd) — adds +1 credit. Use `timeframe` to select the window; defaults to `1d`. - [Get tags](https://docs.struct.to/api-reference/tags/get-tags.md): Retrieve all available event tags/categories. Default listing is alphabetical (cursor-paginated). If either `sort` or `timeframe` is provided, the listing is ranked by the chosen metric+window (offset-paginated): sort defaults to `volume` when only `timeframe` is set, timeframe defaults to `24h` whe… - [Tag analytics candles (per-bucket deltas)](https://docs.struct.to/api-reference/tags/tag-analytics-candles-per-bucket-deltas.md): Returns per-bucket deltas for a specific tag (what happened during each bucket). - [Tag analytics pct change](https://docs.struct.to/api-reference/tags/tag-analytics-pct-change.md): Per-metric % change over the requested lookback window for a specific tag. - [Tag analytics timeseries (cumulative)](https://docs.struct.to/api-reference/tags/tag-analytics-timeseries-cumulative.md): Returns cumulative analytics values for a specific tag at the end of each bucket. - [Get global leaderboard](https://docs.struct.to/api-reference/trader/get-global-leaderboard.md): Retrieve the global PnL leaderboard ranked by profit and loss. Uses cursor-based pagination for efficient traversal of large datasets. - [Get multiple trader profiles](https://docs.struct.to/api-reference/trader/get-multiple-trader-profiles.md): Retrieve profiles for multiple traders in a single request. Returns an array of profiles. - [Get trader event PnL](https://docs.struct.to/api-reference/trader/get-trader-event-pnl.md): Retrieve event-level PnL breakdown for a trader - [Get trader leaderboard](https://docs.struct.to/api-reference/trader/get-trader-leaderboard.md): Global trader leaderboard ranked by PnL or volume over the selected timeframe. Each entry carries the trader's identity, ranking score (`pnl`), and the full set of Struct trading metrics (volumes split by side, markets_won / markets_lost, win rate, average PnL per market and per trade, average hold… - [Get trader market PnL](https://docs.struct.to/api-reference/trader/get-trader-market-pnl.md): Retrieve market-level PnL breakdown for a trader - [Get trader overview](https://docs.struct.to/api-reference/trader/get-trader-overview.md): Retrieve a trader's profile including stats and trading history summary - [Get trader PnL calendar](https://docs.struct.to/api-reference/trader/get-trader-pnl-calendar.md): Retrieve raw per-day PnL. Each entry is the realized PnL for that calendar day. Paginate backwards using the pagination key. - [Get trader PnL candles](https://docs.struct.to/api-reference/trader/get-trader-pnl-candles.md): Retrieve PnL candles for charting a trader's equity curve over time. - [Get trader PnL summary](https://docs.struct.to/api-reference/trader/get-trader-pnl-summary.md): Retrieve a trader's overall profit and loss summary - [Get trader position PnL](https://docs.struct.to/api-reference/trader/get-trader-position-pnl.md): Retrieve per-outcome-token lifetime PnL for a trader. Includes open/closed state, win/loss outcome, redemption payouts, and share quantities. Filter by status and won/lost to segment portfolio views. - [Get trader trades](https://docs.struct.to/api-reference/trader/get-trader-trades.md): Retrieve trade history for a specific trader across all markets - [Get trader volume chart](https://docs.struct.to/api-reference/trader/get-trader-volume-chart.md): Retrieve volume breakdown by buy/sell over time for a specific trader - [Trader analytics candles (per-bucket deltas)](https://docs.struct.to/api-reference/trader/trader-analytics-candles-per-bucket-deltas.md): Returns per-bucket deltas for a specific trader address (what happened during each bucket). - [Trader analytics pct change](https://docs.struct.to/api-reference/trader/trader-analytics-pct-change.md): Per-metric % change over the requested lookback window for a specific trader address. - [Trader analytics timeseries (cumulative)](https://docs.struct.to/api-reference/trader/trader-analytics-timeseries-cumulative.md): Returns cumulative analytics values for a specific trader address at the end of each bucket. - [Asset price tick callback](https://docs.struct.to/api-reference/webhook-callbacks/asset-price-tick-callback.md): Fired when the price of a tracked crypto asset updates (BTC, ETH, SOL, XRP, DOGE, BNB, HYPE). Use `asset_symbols` to restrict to specific assets (empty = all). - [Asset price window update callback](https://docs.struct.to/api-reference/webhook-callbacks/asset-price-window-update-callback.md): Fired at the start and end of each price candle for tracked crypto assets (BTC, ETH, SOL, XRP, DOGE, BNB, HYPE). Payload includes `update_type` (`"open"` or `"close"`) indicating whether the candle is opening or closing. Use `asset_symbols` to restrict to specific assets. Use `timeframes` to restric… - [Close to bond callback](https://docs.struct.to/api-reference/webhook-callbacks/close-to-bond-callback.md): Fired when a trade occurs at a near-certain-outcome price. **At least one of `min_probability` or `max_probability` is required.** Use `min_probability` (e.g. `0.95`) to trigger when YES is near-certain; use `max_probability` (e.g. `0.05`) for NO near-certain. Optional filters: `position_outcome_ind… - [Event metrics callback](https://docs.struct.to/api-reference/webhook-callbacks/event-metrics-callback.md): Fired when an event's volume or transaction metrics cross a configured threshold. Use `timeframes` to restrict to specific windows (valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`). - [Event pnl callback](https://docs.struct.to/api-reference/webhook-callbacks/event-pnl-callback.md): Fired when a trader's event-level PnL crosses a configured threshold - [Event volume milestone callback](https://docs.struct.to/api-reference/webhook-callbacks/event-volume-milestone-callback.md): Fired when an event's trading volume crosses a milestone threshold in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds. Optional `event_slu… - [Event volume spike callback](https://docs.struct.to/api-reference/webhook-callbacks/event-volume-spike-callback.md): Fired when an event's aggregated trading volume grows by a multiple of `spike_ratio` within a timeframe. Requires `spike_ratio` (> 1.0, e.g. `2.0` fires when volume doubles). Optional `window_secs` sets the observation window in seconds (max 600). Optional `timeframes` and `event_slugs` to narrow sc… - [First trade callback](https://docs.struct.to/api-reference/webhook-callbacks/first-trade-callback.md): Fired when a tracked trader executes their first trade on Polymarket - [Global pnl callback](https://docs.struct.to/api-reference/webhook-callbacks/global-pnl-callback.md): Fired when a trader's global PnL crosses a configured threshold - [Market created callback](https://docs.struct.to/api-reference/webhook-callbacks/market-created-callback.md): Fired when a new prediction market is created on Polymarket. Filterable by `tags` and `event_slugs`. - [Market metrics callback](https://docs.struct.to/api-reference/webhook-callbacks/market-metrics-callback.md): Fired when a market's volume or transaction metrics cross a configured threshold. Use `timeframes` to restrict to specific windows (valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`). - [Market pnl callback](https://docs.struct.to/api-reference/webhook-callbacks/market-pnl-callback.md): Fired when a trader's market-level PnL crosses a configured threshold - [Market volume milestone callback](https://docs.struct.to/api-reference/webhook-callbacks/market-volume-milestone-callback.md): Fired when a market's trading volume crosses a milestone threshold in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds (e.g. `[10000, 10000… - [Market volume spike callback](https://docs.struct.to/api-reference/webhook-callbacks/market-volume-spike-callback.md): Fired when a market's trading volume grows by a multiple of `spike_ratio` within a timeframe. Requires `spike_ratio` (> 1.0, e.g. `2.0` fires when volume doubles). Optional `window_secs` sets the observation window in seconds (max 600). Optional `timeframes` — valid values: `1m`, `5m`, `30m`, `1h`,… - [New market entry callback](https://docs.struct.to/api-reference/webhook-callbacks/new-market-entry-callback.md): Fired when a trader places their first trade in a specific market/condition (fires once per trader+market pair) - [New trade callback](https://docs.struct.to/api-reference/webhook-callbacks/new-trade-callback.md): Fired on fill-style trades only (`OrderFilled`, `OrdersMatched`). Use `wallet_addresses` to watch specific traders, `min_usd_value` to filter by size, and `min_probability`/`max_probability` to restrict to a probability range. - [Oracle events callback](https://docs.struct.to/api-reference/webhook-callbacks/oracle-events-callback.md): Fired on every on-chain oracle event. Use `oracle_event_types` to restrict to specific kinds — valid values: `AssertionMade`, `AssertionDisputed`, `AssertionSettled`, `RequestPrice`, `ProposePrice`, `DisputePrice`, `Settle`, `QuestionResolved`, `QuestionEmergencyResolved`, `QuestionReset`, `Question… - [Position metrics callback](https://docs.struct.to/api-reference/webhook-callbacks/position-metrics-callback.md): Fired when a position's volume or transaction metrics cross a configured threshold. Use `timeframes` to restrict to specific windows (valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`). - [Position volume milestone callback](https://docs.struct.to/api-reference/webhook-callbacks/position-volume-milestone-callback.md): Fired when a position's trading volume crosses a milestone threshold in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds. Optional `positio… - [Position volume spike callback](https://docs.struct.to/api-reference/webhook-callbacks/position-volume-spike-callback.md): Fired when a position's trading volume grows by a multiple of `spike_ratio` within a timeframe. Requires `spike_ratio` (> 1.0, e.g. `2.0` fires when volume doubles). Optional `window_secs` sets the observation window in seconds (max 600). Optional `position_ids`, `condition_ids`, `outcomes`, and `ti… - [Price spike callback](https://docs.struct.to/api-reference/webhook-callbacks/price-spike-callback.md): Fired when a position's price moves significantly. Use `min_price_change_pct` to set the minimum move (e.g. `10` for 10%). Use `window_secs` to observe moves within a specific time window. Use `spike_direction` (`"up"` | `"down"` | `"both"`) — defaults to `"up"` when not provided. Filter by `positio… - [Probability spike callback](https://docs.struct.to/api-reference/webhook-callbacks/probability-spike-callback.md): Fired when a position's probability moves significantly. Use `min_probability_change_pct` to set the minimum move (e.g. `10` for 10%). Use `window_secs` to observe moves within a specific time window (e.g. `60` for 60 seconds). Use `spike_direction` (`"up"` | `"down"` | `"both"`) — defaults to `"up"… - [Typed trade event callback](https://docs.struct.to/api-reference/webhook-callbacks/typed-trade-event-callback.md): Fired on every confirmed prediction trade. Payload is a tagged union of trade-type variants. - [Whale trade callback](https://docs.struct.to/api-reference/webhook-callbacks/whale-trade-callback.md): Fired when a trade meets the configured criteria. Use `min_usd_value` to filter by minimum trade size (optional, defaults to 0 — matches all trades), and `min_probability`/`max_probability` to restrict to a probability range. - [Create webhook](https://docs.struct.to/api-reference/webhooks/create-webhook.md): Create a new webhook subscription for real-time event notifications - [Delete webhook](https://docs.struct.to/api-reference/webhooks/delete-webhook.md): Permanently delete a webhook subscription - [Get webhook](https://docs.struct.to/api-reference/webhooks/get-webhook.md): Retrieve details of a specific webhook by its ID - [List event types](https://docs.struct.to/api-reference/webhooks/list-event-types.md): Retrieve all available webhook event types with descriptions, categories, credits cost, and applicable filter fields - [List webhooks](https://docs.struct.to/api-reference/webhooks/list-webhooks.md): Retrieve a paginated list of your webhook subscriptions with optional filtering - [Rotate webhook secret](https://docs.struct.to/api-reference/webhooks/rotate-webhook-secret.md): Generate a new HMAC secret for a webhook. The new secret is returned once — store it securely - [Test webhook](https://docs.struct.to/api-reference/webhooks/test-webhook.md): Send a test payload to the webhook URL to verify connectivity - [Update webhook](https://docs.struct.to/api-reference/webhooks/update-webhook.md): Update an existing webhook's URL, filters, or status - [Backend](https://docs.struct.to/changelog/backend.md): Updates on Struct APIs, webhooks, websockets or other services - [Account](https://docs.struct.to/dashboard/account.md): Manage your Struct account settings and profile. - [AI Chat](https://docs.struct.to/dashboard/ai-chat.md): Chat with StructBot to explore prediction markets, analyze trades, and detect insider activity. - [API Keys](https://docs.struct.to/dashboard/api-keys.md): Generate and manage API keys for authenticating with Struct APIs. - [Automations](https://docs.struct.to/dashboard/automations.md): Create event-driven workflows that react to Polymarket activity in real time. - [Template Syntax](https://docs.struct.to/dashboard/automations-syntax.md): Write dynamic templates using Handlebars syntax with built-in formatters and helpers. - [Automation Templates](https://docs.struct.to/dashboard/automations-templates.md): Get started quickly with pre-built automation templates. - [Billing](https://docs.struct.to/dashboard/billing.md): Monitor usage, manage your plan, and configure payment methods. - [JWT Public Keys](https://docs.struct.to/dashboard/jwt-keys.md): Let your end users authenticate directly to the Struct API using JWTs from their own auth provider. - [Organisations](https://docs.struct.to/dashboard/organisations.md): Create and manage organisations to collaborate with your team. - [Playground](https://docs.struct.to/dashboard/playground.md): Test Struct API endpoints directly from your browser. - [Ranking markets by CLOB rewards](https://docs.struct.to/guides/clob-liquidity-markets-dashboard.md): Surface markets currently paying CLOB rewards, sorted by combined daily rate, for makers shopping for liquidity programs. - [Mirroring a trader from the mempool](https://docs.struct.to/guides/copy-trading-pending-or-confirmed-trades.md): Mirror a target trader's order flow in real time using the trades room's status filter for mempool (pending) detection or block-confirmed signals. - [Tracking Crypto Up/Down resolutions](https://docs.struct.to/guides/crypto-up-down-feed.md): Build a feed of past, live, and upcoming Crypto Up/Down market windows using window open and close events, live asset ticks, and historical window results. - [Fetching trades by builder code](https://docs.struct.to/guides/fetching-trades-by-builder-code.md): Filter trades on a Polymarket builder code to surface order flow attributed to a specific app or integrator. - [Building a live trending feed](https://docs.struct.to/guides/real-time-trending-events-and-markets.md): Build a trending feed that seeds from the events or markets list and stays warm via the events stream and markets stream rooms. - [Showing a trader's open and closed positions](https://docs.struct.to/guides/trader-open-and-closed-positions.md): Render a trader's portfolio (held vs exited) using the trader outcome PnL endpoint, then keep it live via the trader positions room. - [Getting Started](https://docs.struct.to/indexing/getting-started.md): Backfill historical Polymarket data and set up realtime streams to keep your database in sync. - [Work with AI](https://docs.struct.to/introduction/ai-first.md): Use Struct with AI agents, coding assistants, and autonomous workflows. - [Concepts](https://docs.struct.to/introduction/concepts.md): Key terms and entities in the Struct Polymarket data model. - [Pricing & Ratelimits](https://docs.struct.to/introduction/pricing.md): Plans, credits, and rate limits for the Struct API - [Welcome to Struct](https://docs.struct.to/introduction/welcome.md): Structured data APIs for prediction markets. - [Alerts WS](https://docs.struct.to/sdk/alerts.md): Typed subscriptions on the alerts websocket with StructAlertsWebSocket. - [Authentication](https://docs.struct.to/sdk/authentication.md): API key and JWT public key auth with the SDK. - [Configuration](https://docs.struct.to/sdk/configuration.md): Configure the StructClient with auth, timeouts, retries, and hooks. - [Errors](https://docs.struct.to/sdk/errors.md): The SDK error hierarchy and how to handle failures. - [Getting Started](https://docs.struct.to/sdk/getting-started.md): Install the @structbuild/sdk TypeScript SDK and make your first call. - [Pagination](https://docs.struct.to/sdk/pagination.md): Iterate through every page of a list endpoint with the paginate helper. - [REST API](https://docs.struct.to/sdk/rest-api.md): Every REST namespace and method exposed by StructClient. - [Trade Types](https://docs.struct.to/sdk/trade-types.md): Narrow on trade_type to work with the Trade discriminated union. - [Managing Webhooks](https://docs.struct.to/sdk/webhooks.md): Create, update, test, rotate, and delete webhook subscriptions from the SDK. - [Rooms WS](https://docs.struct.to/sdk/websockets.md): Stream rooms in real time with the StructWebSocket client. - [AI Agents](https://docs.struct.to/use-cases/ai-agents.md): Power autonomous agents that research, monitor, and trade on prediction markets. - [Analytics & Research](https://docs.struct.to/use-cases/analytics-research.md): Build dashboards, run quantitative research, and analyze prediction market data at scale. - [Trading Platforms](https://docs.struct.to/use-cases/trading-platforms.md): Build prediction market trading interfaces powered by real-time Polymarket data. - [Getting Started](https://docs.struct.to/webhooks/getting-started.md): Receive real-time notifications when events happen on Polymarket via webhooks. - [Pricing](https://docs.struct.to/webhooks/pricing.md): How webhook usage is billed in credits. - [Response Format](https://docs.struct.to/webhooks/response-format.md): Understand how webhook payloads are structured. - [Use Cases](https://docs.struct.to/webhooks/use-cases.md): Why use webhooks and what you can do with them. - [Asset Price Tick](https://docs.struct.to/websockets/alerts/asset-price-tick.md): Get notified on every raw Chainlink price tick for tracked crypto assets. - [Asset Price Window Update](https://docs.struct.to/websockets/alerts/asset-price-window-update.md): Get notified when a crypto asset candle opens or closes. - [Close to Bond](https://docs.struct.to/websockets/alerts/close-to-bond.md): Get notified when a trade occurs at a near-certain-outcome price. - [Condition Metrics](https://docs.struct.to/websockets/alerts/condition-metrics.md): Get notified when a market's volume or transaction metrics cross a threshold. - [Event Metrics](https://docs.struct.to/websockets/alerts/event-metrics.md): Get notified when an event's aggregated metrics cross a threshold. - [Event Volume Milestone](https://docs.struct.to/websockets/alerts/event-volume-milestone.md): Get notified when an event's aggregated volume crosses a USD milestone. - [Event Volume Spike](https://docs.struct.to/websockets/alerts/event-volume-spike.md): Get notified when an event's aggregated volume exceeds its baseline by a configured ratio. - [Getting Started](https://docs.struct.to/websockets/alerts/getting-started.md): Receive webhook-style events over a websocket connection. - [Market Created](https://docs.struct.to/websockets/alerts/market-created.md): Get notified when a new prediction market is detected on-chain. - [Market Volume Milestone](https://docs.struct.to/websockets/alerts/market-volume-milestone.md): Get notified when a market's trading volume crosses a USD milestone. - [Market Volume Spike](https://docs.struct.to/websockets/alerts/market-volume-spike.md): Get notified when a market's volume exceeds its baseline by a configured ratio. - [Oracle Events](https://docs.struct.to/websockets/alerts/oracle-events.md): Typed UMA oracle lifecycle alerts for Polymarket markets. - [Position Metrics](https://docs.struct.to/websockets/alerts/position-metrics.md): Get notified when a position's volume or price metrics cross a threshold. - [Position Volume Milestone](https://docs.struct.to/websockets/alerts/position-volume-milestone.md): Get notified when a position's trading volume crosses a USD milestone. - [Position Volume Spike](https://docs.struct.to/websockets/alerts/position-volume-spike.md): Get notified when a position's volume exceeds its baseline by a configured ratio. - [Price Spike](https://docs.struct.to/websockets/alerts/price-spike.md): Get notified when a position's raw trade price changes rapidly. - [Probability Spike](https://docs.struct.to/websockets/alerts/probability-spike.md): Get notified when a position's probability changes rapidly within a short timeframe. - [Trader Event PnL](https://docs.struct.to/websockets/alerts/trader-event-pnl.md): Get notified when a trader's per-event PnL crosses a configured threshold. - [Trader First Trade](https://docs.struct.to/websockets/alerts/trader-first-trade.md): Get notified when a trader executes their first-ever trade on Polymarket. - [Trader Global PnL](https://docs.struct.to/websockets/alerts/trader-global-pnl.md): Get notified when a trader's global PnL crosses a configured threshold. - [Trader Market PnL](https://docs.struct.to/websockets/alerts/trader-market-pnl.md): Get notified when a trader's per-market PnL crosses a configured threshold. - [Trader New Market](https://docs.struct.to/websockets/alerts/trader-new-market.md): Get notified when a trader places their first trade in a specific market. - [Trader New Trade](https://docs.struct.to/websockets/alerts/trader-new-trade.md): Get notified on every order-filled trade with optional filters. - [Trader Trade Event](https://docs.struct.to/websockets/alerts/trader-trade-event.md): Typed trade-event alert covering every confirmed prediction trade variant. - [Trader Whale Trade](https://docs.struct.to/websockets/alerts/trader-whale-trade.md): Get notified when a trade exceeds a configured size threshold. - [Getting Started](https://docs.struct.to/websockets/getting-started.md): Stream real-time Polymarket data over websockets. - [Pricing](https://docs.struct.to/websockets/pricing.md): How websocket usage is billed in credits. - [Accounts](https://docs.struct.to/websockets/rooms/accounts.md): Stream share balance, USDCe, pUSD, and MATIC updates for tracked wallets. - [Asset Prices](https://docs.struct.to/websockets/rooms/asset-prices.md): Stream real-time crypto asset price ticks. - [Asset Window Updates](https://docs.struct.to/websockets/rooms/asset-window-updates.md): Stream crypto asset candle open and close events. - [CLOB Rewards](https://docs.struct.to/websockets/rooms/clob-rewards.md): Stream CLOB reward changes for markets. - [Event Metrics](https://docs.struct.to/websockets/rooms/event-metrics.md): Stream aggregated event-level metric updates. - [Events Stream](https://docs.struct.to/websockets/rooms/events-stream.md): Stream real-time Polymarket event rows with filter or ids mode and configurable cadence. - [Market Metrics](https://docs.struct.to/websockets/rooms/market-metrics.md): Stream real-time volume, fees, and transaction metrics per market. - [Markets Stream](https://docs.struct.to/websockets/rooms/markets-stream.md): Stream real-time Polymarket market rows with filter or ids mode and configurable cadence. - [Oracle Events](https://docs.struct.to/websockets/rooms/oracle-events.md): Stream typed UMA oracle lifecycle events for Polymarket markets. - [Order Book](https://docs.struct.to/websockets/rooms/order-book.md): Stream CLOB order book snapshots. - [Position Metrics](https://docs.struct.to/websockets/rooms/position-metrics.md): Stream OHLC, volume, and probability metrics for individual outcome positions. - [Trader PnL](https://docs.struct.to/websockets/rooms/trader-pnl.md): Stream global, market, and event PnL updates for tracked traders. - [Trader Positions](https://docs.struct.to/websockets/rooms/trader-positions.md): Stream full position snapshots for tracked traders. - [Trades](https://docs.struct.to/websockets/rooms/trades.md): Stream real-time Polymarket trades. ## OpenAPI Specs - [webhookopenapi](https://api.struct.to/webhookopenapi.json) - [openapi](https://docs.struct.to/api-reference/openapi.json)