@structbuild/sdk 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -548,7 +548,7 @@ export interface webhooks {
548
548
  put?: never;
549
549
  /**
550
550
  * Probability spike callback
551
- * @description Fired when a market's YES 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"` when not provided. Filter by `position_ids` or `outcomes` to narrow scope. Optional `min_probability`/`max_probability` gate the YES probability band, `min_txns`/`min_volume_usd` require a minimum number of trades or USD volume in the observation window.
551
+ * @description Fired when a market's YES 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"` when not provided. Filter by `position_ids` or `outcomes` to narrow scope. Scope by market taxonomy with `tags` (matches a market's tags or category) and `series_slugs` (matches its parent series). Optional `min_probability`/`max_probability` gate the YES probability band, `min_txns`/`min_volume_usd` require a minimum number of trades or USD volume in the observation window.
552
552
  */
553
553
  post: operations["probability-spike"];
554
554
  delete?: never;
@@ -568,7 +568,7 @@ export interface webhooks {
568
568
  put?: never;
569
569
  /**
570
570
  * Price spike callback
571
- * @description 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 `position_ids` or `outcomes` to narrow scope. Optional `min_probability`/`max_probability` gate the price band, `min_txns`/`min_volume_usd` require a minimum number of trades or USD volume in the observation window.
571
+ * @description 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 `position_ids` or `outcomes` to narrow scope. Scope by market taxonomy with `tags` (matches a market's tags or category) and `series_slugs` (matches its parent series). Optional `min_probability`/`max_probability` gate the price band, `min_txns`/`min_volume_usd` require a minimum number of trades or USD volume in the observation window.
572
572
  */
573
573
  post: operations["price-spike"];
574
574
  delete?: never;
@@ -648,7 +648,7 @@ export interface webhooks {
648
648
  put?: never;
649
649
  /**
650
650
  * Close to bond callback
651
- * @description 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_indices` — restrict by outcome index (`0` = Yes/Up, `1` = No); `condition_ids` — restrict to specific markets; `position_ids` — restrict to specific outcome tokens; `outcomes` — restrict by outcome name (e.g. `"Yes"`, `"No"`); `event_slugs` — restrict to specific events.
651
+ * @description 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_indices` — restrict by outcome index (`0` = Yes/Up, `1` = No); `condition_ids` — restrict to specific markets; `position_ids` — restrict to specific outcome tokens; `outcomes` — restrict by outcome name (e.g. `"Yes"`, `"No"`); `event_slugs` — restrict to specific events. Scope by market taxonomy with `tags` (matches a market's tags or category) and `series_slugs` (matches its parent series).
652
652
  */
653
653
  post: operations["close-to-bond"];
654
654
  delete?: never;
@@ -657,6 +657,66 @@ export interface webhooks {
657
657
  patch?: never;
658
658
  trace?: never;
659
659
  };
660
+ "price-threshold": {
661
+ parameters: {
662
+ query?: never;
663
+ header?: never;
664
+ path?: never;
665
+ cookie?: never;
666
+ };
667
+ get?: never;
668
+ put?: never;
669
+ /**
670
+ * Price threshold crossing callback
671
+ * @description Fired when an outcome's price/probability crosses a target level (edge-triggered, fires once per crossing). **At least one of `min_probability` or `max_probability` is required.** Use `min_probability` (e.g. `0.75`) to fire when the price crosses *up* to ≥ that level; use `max_probability` (e.g. `0.25`) to fire when it crosses *down* to ≤ that level. Set `one_shot` to delete the subscription after the first delivery (requires `position_ids` or `condition_ids`). Set `fire_if_already_past` to fire immediately when the first observed price is already past the target. Optional scope filters: `condition_ids`, `position_ids`, `outcomes`, `position_outcome_indices` (`0` = Yes/Up, `1` = No), `event_slugs`, `tags` (a market's tags or category), `series_slugs` (parent series).
672
+ */
673
+ post: operations["price-threshold"];
674
+ delete?: never;
675
+ options?: never;
676
+ head?: never;
677
+ patch?: never;
678
+ trace?: never;
679
+ };
680
+ "market-resolved": {
681
+ parameters: {
682
+ query?: never;
683
+ header?: never;
684
+ path?: never;
685
+ cookie?: never;
686
+ };
687
+ get?: never;
688
+ put?: never;
689
+ /**
690
+ * Market resolved callback
691
+ * @description Fired once when a market reaches a terminal resolution. Collapses the underlying oracle events (`QuestionResolved`, `QuestionEmergencyResolved`, `ConditionResolution`, `NegRiskOutcomeReported`) into a single notification carrying the winning outcome and, when available, the settled price. Optional filters: `condition_ids`, `event_slugs`, `outcomes` (only fire when the winning outcome matches, e.g. `"Yes"`), `exclude_shortterm_markets`.
692
+ */
693
+ post: operations["market-resolved"];
694
+ delete?: never;
695
+ options?: never;
696
+ head?: never;
697
+ patch?: never;
698
+ trace?: never;
699
+ };
700
+ "market-disputed": {
701
+ parameters: {
702
+ query?: never;
703
+ header?: never;
704
+ path?: never;
705
+ cookie?: never;
706
+ };
707
+ get?: never;
708
+ put?: never;
709
+ /**
710
+ * Market disputed callback
711
+ * @description Fired when a proposed market resolution is challenged on-chain (`DisputePrice` or `AssertionDisputed`) — the resolution is now contested and delayed. Carries the disputer, the proposer, and the disputed/proposed outcome when available. Optional filters: `condition_ids`, `event_slugs`, `exclude_shortterm_markets`.
712
+ */
713
+ post: operations["market-disputed"];
714
+ delete?: never;
715
+ options?: never;
716
+ head?: never;
717
+ patch?: never;
718
+ trace?: never;
719
+ };
660
720
  "market-created": {
661
721
  parameters: {
662
722
  query?: never;
@@ -826,6 +886,11 @@ export interface components {
826
886
  };
827
887
  /** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
828
888
  AssetPriceTickFilters: {
889
+ /**
890
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
891
+ * successful delivery. Applies to any webhook event.
892
+ */
893
+ one_shot?: boolean | null;
829
894
  /** @description Restrict to these crypto assets. Empty = all assets. */
830
895
  asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
831
896
  };
@@ -846,6 +911,11 @@ export interface components {
846
911
  };
847
912
  /** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
848
913
  AssetPriceWindowUpdateFilters: {
914
+ /**
915
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
916
+ * successful delivery. Applies to any webhook event.
917
+ */
918
+ one_shot?: boolean | null;
849
919
  /** @description Restrict to these crypto assets. Empty = all assets. */
850
920
  asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
851
921
  /** @description Restrict to these candle sizes. Empty = all sizes. */
@@ -971,6 +1041,15 @@ export interface components {
971
1041
  * `min_probability` or `max_probability` is required (enforced at runtime).
972
1042
  */
973
1043
  CloseToBondFilters: {
1044
+ /**
1045
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1046
+ * successful delivery. Applies to any webhook event.
1047
+ */
1048
+ one_shot?: boolean | null;
1049
+ /** @description Restrict to markets carrying any of these tags or category names (case-insensitive). Empty = all. */
1050
+ tags?: string[] | null;
1051
+ /** @description Restrict to markets in any of these series (by slug, case-insensitive). Empty = all. */
1052
+ series_slugs?: string[] | null;
974
1053
  /**
975
1054
  * Format: double
976
1055
  * @description Trigger when the YES outcome price is ≥ this value (e.g. 0.95 for 95% certainty). At least one of `min_probability` or `max_probability` must be set.
@@ -1068,6 +1147,11 @@ export interface components {
1068
1147
  };
1069
1148
  ConditionHolderMetricsFilters: {
1070
1149
  condition_ids?: string[];
1150
+ /**
1151
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1152
+ * successful delivery. Applies to any webhook event.
1153
+ */
1154
+ one_shot?: boolean | null;
1071
1155
  };
1072
1156
  ConditionHolderMetricsPayload: {
1073
1157
  /** Format: int32 */
@@ -1235,6 +1319,11 @@ export interface components {
1235
1319
  };
1236
1320
  EventHolderMetricsFilters: {
1237
1321
  event_slugs?: string[];
1322
+ /**
1323
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1324
+ * successful delivery. Applies to any webhook event.
1325
+ */
1326
+ one_shot?: boolean | null;
1238
1327
  };
1239
1328
  EventHolderMetricsPayload: {
1240
1329
  /** Format: int32 */
@@ -1247,6 +1336,11 @@ export interface components {
1247
1336
  };
1248
1337
  /** @description Subscription filters for the `event_metrics` event. All fields are optional. */
1249
1338
  EventMetricsFilters: {
1339
+ /**
1340
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1341
+ * successful delivery. Applies to any webhook event.
1342
+ */
1343
+ one_shot?: boolean | null;
1250
1344
  /** @description Restrict to these events. Empty = all events. */
1251
1345
  event_slugs?: string[] | null;
1252
1346
  /** @description Restrict to these aggregation windows. */
@@ -1336,6 +1430,11 @@ export interface components {
1336
1430
  };
1337
1431
  /** @description Subscription filters for the `event_volume_milestone` event. */
1338
1432
  EventVolumeMilestoneFilters: {
1433
+ /**
1434
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1435
+ * successful delivery. Applies to any webhook event.
1436
+ */
1437
+ one_shot?: boolean | null;
1339
1438
  /** @description **Required.** Aggregation windows to monitor. */
1340
1439
  timeframes: components["schemas"]["MetricFilterTimeframe"][];
1341
1440
  /** @description Restrict to these events. */
@@ -1372,6 +1471,11 @@ export interface components {
1372
1471
  };
1373
1472
  /** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
1374
1473
  EventVolumeSpikeFilters: {
1474
+ /**
1475
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1476
+ * successful delivery. Applies to any webhook event.
1477
+ */
1478
+ one_shot?: boolean | null;
1375
1479
  /**
1376
1480
  * Format: double
1377
1481
  * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
@@ -1612,6 +1716,11 @@ export interface components {
1612
1716
  };
1613
1717
  /** @description Subscription filters for the `market_created` event. All fields are optional. */
1614
1718
  MarketCreatedFilters: {
1719
+ /**
1720
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1721
+ * successful delivery. Applies to any webhook event.
1722
+ */
1723
+ one_shot?: boolean | null;
1615
1724
  /** @description Restrict to markets with these tags or category names (case-insensitive match). */
1616
1725
  tags?: string[] | null;
1617
1726
  /** @description Restrict to markets belonging to these events. */
@@ -1662,8 +1771,65 @@ export interface components {
1662
1771
  /** @description Whether this is a neg-risk market */
1663
1772
  neg_risk: boolean;
1664
1773
  };
1774
+ /** @description Subscription filters for the `market_disputed` event. All fields are optional. */
1775
+ MarketDisputedFilters: {
1776
+ /**
1777
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1778
+ * successful delivery. Applies to any webhook event.
1779
+ */
1780
+ one_shot?: boolean | null;
1781
+ /** @description Restrict to these markets. */
1782
+ condition_ids?: string[] | null;
1783
+ /** @description Restrict to markets in these events. */
1784
+ event_slugs?: string[] | null;
1785
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1786
+ exclude_shortterm_markets?: boolean | null;
1787
+ };
1788
+ /** @description Market-disputed webhook payload */
1789
+ MarketDisputedPayload: {
1790
+ /** @description Condition ID (the contested market), when resolvable */
1791
+ condition_id?: string | null;
1792
+ /** @description Which oracle event produced this dispute: `"dispute_price"` or `"assertion_disputed"`. */
1793
+ dispute_kind: string;
1794
+ /** @description Address that filed the dispute */
1795
+ disputer: string;
1796
+ /** @description Address that made the disputed proposal/assertion, when known */
1797
+ proposer?: string | null;
1798
+ /** @description The proposed outcome that was disputed, when known (e.g. "Yes", "No") */
1799
+ proposed_outcome?: string | null;
1800
+ /**
1801
+ * Format: double
1802
+ * @description The proposed price (0.0–1.0) that was disputed (`DisputePrice` only)
1803
+ */
1804
+ proposed_price?: number | null;
1805
+ /** @description Market question */
1806
+ question?: string | null;
1807
+ /** @description Market slug */
1808
+ market_slug?: string | null;
1809
+ /** @description Event slug */
1810
+ event_slug?: string | null;
1811
+ /** @description Market image URL */
1812
+ image_url?: string | null;
1813
+ /** @description Transaction hash of the dispute event */
1814
+ hash: string;
1815
+ /**
1816
+ * Format: int64
1817
+ * @description Block number
1818
+ */
1819
+ block?: number | null;
1820
+ /**
1821
+ * Format: int64
1822
+ * @description Confirmed timestamp (Unix seconds)
1823
+ */
1824
+ confirmed_at?: number | null;
1825
+ };
1665
1826
  /** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
1666
1827
  MarketMetricsFilters: {
1828
+ /**
1829
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1830
+ * successful delivery. Applies to any webhook event.
1831
+ */
1832
+ one_shot?: boolean | null;
1667
1833
  /** @description Restrict to these markets. Empty = all markets. */
1668
1834
  condition_ids?: string[] | null;
1669
1835
  /** @description Restrict to these aggregation windows. Empty = all windows. */
@@ -1739,8 +1905,67 @@ export interface components {
1739
1905
  /** Format: int64 */
1740
1906
  last_trade_at?: number | null;
1741
1907
  };
1908
+ /** @description Subscription filters for the `market_resolved` event. All fields are optional. */
1909
+ MarketResolvedFilters: {
1910
+ /**
1911
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1912
+ * successful delivery. Applies to any webhook event.
1913
+ */
1914
+ one_shot?: boolean | null;
1915
+ /** @description Restrict to these markets. */
1916
+ condition_ids?: string[] | null;
1917
+ /** @description Restrict to markets in these events. */
1918
+ event_slugs?: string[] | null;
1919
+ /** @description Only fire when the winning outcome matches one of these (e.g. \["Yes"\]). */
1920
+ outcomes?: string[] | null;
1921
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1922
+ exclude_shortterm_markets?: boolean | null;
1923
+ };
1924
+ /** @description Market-resolved webhook payload */
1925
+ MarketResolvedPayload: {
1926
+ /** @description Condition ID (the resolved market) */
1927
+ condition_id: string;
1928
+ /** @description Winning outcome name when known (e.g. "Yes", "No") */
1929
+ winning_outcome?: string | null;
1930
+ /**
1931
+ * Format: double
1932
+ * @description Settled price (0.0–1.0) when the resolution event carries one
1933
+ * (`QuestionResolved` only). 1.0 = full YES, 0.0 = full NO, 0.5 = split.
1934
+ */
1935
+ settled_price?: number | null;
1936
+ /**
1937
+ * @description Which oracle event produced this resolution: `"question_resolved"`,
1938
+ * `"question_emergency_resolved"`, `"condition_resolution"`, or `"neg_risk_outcome_reported"`.
1939
+ */
1940
+ resolution_kind: string;
1941
+ /** @description Market question */
1942
+ question?: string | null;
1943
+ /** @description Market slug */
1944
+ market_slug?: string | null;
1945
+ /** @description Event slug */
1946
+ event_slug?: string | null;
1947
+ /** @description Market image URL */
1948
+ image_url?: string | null;
1949
+ /** @description Transaction hash of the resolution event */
1950
+ hash: string;
1951
+ /**
1952
+ * Format: int64
1953
+ * @description Block number
1954
+ */
1955
+ block?: number | null;
1956
+ /**
1957
+ * Format: int64
1958
+ * @description Confirmed timestamp (Unix seconds)
1959
+ */
1960
+ confirmed_at?: number | null;
1961
+ };
1742
1962
  /** @description Subscription filters for the `market_volume_milestone` event. */
1743
1963
  MarketVolumeMilestoneFilters: {
1964
+ /**
1965
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1966
+ * successful delivery. Applies to any webhook event.
1967
+ */
1968
+ one_shot?: boolean | null;
1744
1969
  /** @description **Required.** Aggregation windows to monitor (e.g. \["1h", "24h"\]). */
1745
1970
  timeframes: components["schemas"]["MetricFilterTimeframe"][];
1746
1971
  /** @description Restrict to these markets. Empty = all markets. */
@@ -1750,6 +1975,11 @@ export interface components {
1750
1975
  };
1751
1976
  /** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
1752
1977
  MarketVolumeSpikeFilters: {
1978
+ /**
1979
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1980
+ * successful delivery. Applies to any webhook event.
1981
+ */
1982
+ one_shot?: boolean | null;
1753
1983
  /**
1754
1984
  * Format: double
1755
1985
  * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. The snapshot is set automatically on first data and resets after each fire.
@@ -2052,6 +2282,11 @@ export interface components {
2052
2282
  });
2053
2283
  /** @description Subscription filters for the `oracle_events` event. All fields are optional. */
2054
2284
  OracleEventsFilters: {
2285
+ /**
2286
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2287
+ * successful delivery. Applies to any webhook event.
2288
+ */
2289
+ one_shot?: boolean | null;
2055
2290
  /** @description Restrict to these event types (case-insensitive). Empty = all. */
2056
2291
  oracle_event_types?: components["schemas"]["OracleEventFilterType"][] | null;
2057
2292
  /** @description Restrict to events for these condition IDs. */
@@ -2078,11 +2313,15 @@ export interface components {
2078
2313
  * @description Polymarket webhook event types
2079
2314
  * @enum {string}
2080
2315
  */
2081
- PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_category_pnl" | "trader_position_resolved" | "trader_exit_markers" | "position_holder_metrics" | "condition_holder_metrics" | "event_holder_metrics" | "condition_metrics" | "event_metrics" | "tag_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update" | "price_spike" | "oracle_events";
2316
+ PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_category_pnl" | "trader_position_resolved" | "trader_exit_markers" | "position_holder_metrics" | "condition_holder_metrics" | "event_holder_metrics" | "condition_metrics" | "event_metrics" | "tag_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update" | "price_spike" | "oracle_events" | "price_threshold" | "market_resolved" | "market_disputed";
2082
2317
  /**
2083
2318
  * @description Polymarket-specific webhook filters
2084
2319
  *
2085
- * Different webhook handlers use different subsets of these fields:
2320
+ * Different webhook handlers use different subsets of these fields.
2321
+ * The trade-driven events `price_spike`, `probability_spike`, and
2322
+ * `close_to_bond` additionally accept `tags` (matches a market's tags OR its
2323
+ * category) and `series_slugs` (matches the market's parent series); these are
2324
+ * resolved from the tags/series the crawler enriches onto each trade.
2086
2325
  * - first_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, tags
2087
2326
  * - new_market: wallet_addresses, condition_ids, event_slugs, min_usd_value, min_probability, max_probability
2088
2327
  * - whale_trade: min_usd_value (required), min_probability, max_probability, condition_ids, event_slugs
@@ -2094,10 +2333,10 @@ export interface components {
2094
2333
  * - tag_metrics: tags, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
2095
2334
  * - position_metrics: position_ids, condition_ids, outcomes, min_volume_usd, max_volume_usd, min_buy_usd, min_sell_volume_usd, min_fees, min_txns, min_price_change_pct, min_probability_change_pct, timeframes
2096
2335
  * - volume_milestone: condition_ids, timeframes, milestone_amounts
2097
- * - close_to_bond: min_probability (high zone threshold), max_probability (low zone threshold), condition_ids, position_ids, outcomes, position_outcome_indices, event_slugs, exclude_shortterm_markets
2336
+ * - close_to_bond: min_probability (high zone threshold), max_probability (low zone threshold), condition_ids, tags, series_slugs, position_ids, outcomes, position_outcome_indices, event_slugs, exclude_shortterm_markets
2098
2337
  * - market_created: event_slugs, tags, exclude_shortterm_markets
2099
- * - probability_spike: condition_ids, event_slugs, outcomes, min_probability, max_probability, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
2100
- * - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
2338
+ * - probability_spike: condition_ids, event_slugs, tags, series_slugs, outcomes, min_probability, max_probability, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
2339
+ * - price_spike: condition_ids, event_slugs, tags, series_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
2101
2340
  * - trader_new_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
2102
2341
  * - trader_trade_event: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
2103
2342
  * - trader_first_trade: wallet_addresses, min_usd_value, min_probability, max_probability, exclude_shortterm_markets
@@ -2122,8 +2361,16 @@ export interface components {
2122
2361
  min_usd_value?: number | null;
2123
2362
  /** @description Filter by event slugs. Max 500 entries. */
2124
2363
  event_slugs?: string[];
2125
- /** @description Filter by tags. Max 500 entries. */
2364
+ /**
2365
+ * @description Filter by tags or category names (case-insensitive). Matches a market's
2366
+ * tags or its category label. Max 500 entries.
2367
+ */
2126
2368
  tags?: string[];
2369
+ /**
2370
+ * @description Filter by series slugs (case-insensitive). Matches a market's parent
2371
+ * series. Max 500 entries.
2372
+ */
2373
+ series_slugs?: string[];
2127
2374
  /**
2128
2375
  * Format: double
2129
2376
  * @description Minimum probability threshold (0.0 - 1.0)
@@ -2266,9 +2513,25 @@ export interface components {
2266
2513
  * `NegRiskOutcomeReported`. Empty = all types.
2267
2514
  */
2268
2515
  oracle_event_types?: string[];
2516
+ /**
2517
+ * @description Fire-and-delete: when `true`, the subscription is deleted after its first
2518
+ * successful delivery. Works on any webhook event. (`price_threshold`
2519
+ * additionally requires `position_ids` or `condition_ids`.)
2520
+ */
2521
+ one_shot?: boolean;
2522
+ /**
2523
+ * @description For `price_threshold` — when `true`, fire immediately if the first observed
2524
+ * price is already past the target (no prior baseline). Default `false`.
2525
+ */
2526
+ fire_if_already_past?: boolean;
2269
2527
  };
2270
2528
  PositionHolderMetricsFilters: {
2271
2529
  position_ids?: string[];
2530
+ /**
2531
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2532
+ * successful delivery. Applies to any webhook event.
2533
+ */
2534
+ one_shot?: boolean | null;
2272
2535
  };
2273
2536
  PositionHolderMetricsPayload: {
2274
2537
  /** Format: int32 */
@@ -2289,6 +2552,11 @@ export interface components {
2289
2552
  };
2290
2553
  /** @description Subscription filters for the `position_metrics` event. All fields are optional. */
2291
2554
  PositionMetricsFilters: {
2555
+ /**
2556
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2557
+ * successful delivery. Applies to any webhook event.
2558
+ */
2559
+ one_shot?: boolean | null;
2292
2560
  /** @description Restrict to these outcome token IDs. */
2293
2561
  position_ids?: string[] | null;
2294
2562
  /** @description Restrict to positions within these markets. */
@@ -2494,6 +2762,8 @@ export interface components {
2494
2762
  /** Format: double */
2495
2763
  total_pnl_usd?: number;
2496
2764
  /** Format: double */
2765
+ unrealized_pnl_usd?: number;
2766
+ /** Format: double */
2497
2767
  redemption_usd?: number;
2498
2768
  open?: boolean;
2499
2769
  won?: boolean | null;
@@ -2514,6 +2784,8 @@ export interface components {
2514
2784
  * window. `0.0` when the trader has no cost basis on this row yet.
2515
2785
  */
2516
2786
  realized_pnl_pct?: number;
2787
+ /** Format: double */
2788
+ total_pnl_pct?: number;
2517
2789
  /** @description Market slug for the parent market of this outcome. */
2518
2790
  market_slug?: string | null;
2519
2791
  /** @description Market title. */
@@ -2588,6 +2860,11 @@ export interface components {
2588
2860
  };
2589
2861
  /** @description Subscription filters for the `position_volume_milestone` event. */
2590
2862
  PositionVolumeMilestoneFilters: {
2863
+ /**
2864
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2865
+ * successful delivery. Applies to any webhook event.
2866
+ */
2867
+ one_shot?: boolean | null;
2591
2868
  /** @description **Required.** Aggregation windows to monitor. */
2592
2869
  timeframes: components["schemas"]["MetricFilterTimeframe"][];
2593
2870
  /** @description Restrict to these outcome token IDs. */
@@ -2650,6 +2927,11 @@ export interface components {
2650
2927
  };
2651
2928
  /** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
2652
2929
  PositionVolumeSpikeFilters: {
2930
+ /**
2931
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2932
+ * successful delivery. Applies to any webhook event.
2933
+ */
2934
+ one_shot?: boolean | null;
2653
2935
  /**
2654
2936
  * Format: double
2655
2937
  * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
@@ -2714,6 +2996,11 @@ export interface components {
2714
2996
  };
2715
2997
  /** @description Subscription filters for the `price_spike` event. */
2716
2998
  PriceSpikeFilters: {
2999
+ /**
3000
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3001
+ * successful delivery. Applies to any webhook event.
3002
+ */
3003
+ one_shot?: boolean | null;
2717
3004
  /** @description Restrict to specific outcome token IDs. Empty = all positions. */
2718
3005
  position_ids?: string[] | null;
2719
3006
  /** @description Restrict to specific market condition IDs. Empty = all markets. */
@@ -2722,6 +3009,10 @@ export interface components {
2722
3009
  event_slugs?: string[] | null;
2723
3010
  /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
2724
3011
  outcomes?: string[] | null;
3012
+ /** @description Restrict to markets carrying any of these tags or category names (case-insensitive). Empty = all. */
3013
+ tags?: string[] | null;
3014
+ /** @description Restrict to markets in any of these series (by slug, case-insensitive). Empty = all. */
3015
+ series_slugs?: string[] | null;
2725
3016
  /**
2726
3017
  * Format: double
2727
3018
  * @description Minimum price percentage move to trigger (e.g. `10` for a 10% move).
@@ -2785,8 +3076,126 @@ export interface components {
2785
3076
  */
2786
3077
  spike_pct: number;
2787
3078
  };
3079
+ /** @description Subscription filters for the `price_threshold` event. */
3080
+ PriceThresholdFilters: {
3081
+ /** @description Restrict to markets carrying any of these tags or category names (case-insensitive). Empty = all. */
3082
+ tags?: string[] | null;
3083
+ /** @description Restrict to markets in any of these series (by slug, case-insensitive). Empty = all. */
3084
+ series_slugs?: string[] | null;
3085
+ /**
3086
+ * Format: double
3087
+ * @description Upward target — fire when the YES price crosses up to ≥ this value (e.g. 0.75 for 75%). At least one of `min_probability` or `max_probability` must be set.
3088
+ */
3089
+ min_probability?: number | null;
3090
+ /**
3091
+ * Format: double
3092
+ * @description Downward target — fire when the YES price crosses down to ≤ this value (e.g. 0.25).
3093
+ */
3094
+ max_probability?: number | null;
3095
+ /** @description When `true`, delete the subscription after its first delivery (fire-and-delete). Requires `position_ids` or `condition_ids`. Default: `false`. */
3096
+ one_shot?: boolean | null;
3097
+ /** @description When `true`, fire immediately if the first observed price is already past the target (no prior baseline). Default: `false` (wait for an actual crossing). */
3098
+ fire_if_already_past?: boolean | null;
3099
+ /** @description Restrict to these markets. */
3100
+ condition_ids?: string[] | null;
3101
+ /** @description Restrict to these outcome token IDs. */
3102
+ position_ids?: string[] | null;
3103
+ /** @description Restrict to markets in these events. */
3104
+ event_slugs?: string[] | null;
3105
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
3106
+ outcomes?: string[] | null;
3107
+ /** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
3108
+ position_outcome_indices?: number[] | null;
3109
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3110
+ exclude_shortterm_markets?: boolean | null;
3111
+ };
3112
+ /** @description Price-threshold crossing webhook payload */
3113
+ PriceThresholdPayload: {
3114
+ /** @description Trader address (the limit-order maker) */
3115
+ trader: string;
3116
+ /** @description Taker address (the order filler — often the exchange contract) */
3117
+ taker: string;
3118
+ /** @description Position ID (ERC1155 token ID) */
3119
+ position_id: string;
3120
+ /** @description Condition ID (parent market) */
3121
+ condition_id?: string | null;
3122
+ /** @description Outcome name (e.g. "Yes", "No") */
3123
+ outcome?: string | null;
3124
+ /**
3125
+ * Format: int32
3126
+ * @description Outcome index (0 = Yes/Up, 1 = No). Position 0 usually represents Yes/Up.
3127
+ */
3128
+ outcome_index?: number | null;
3129
+ /** @description Market question */
3130
+ question?: string | null;
3131
+ /** @description Market slug */
3132
+ market_slug?: string | null;
3133
+ /** @description Event slug */
3134
+ event_slug?: string | null;
3135
+ /** @description Trade ID */
3136
+ trade_id: string;
3137
+ /** @description Transaction hash */
3138
+ hash: string;
3139
+ /**
3140
+ * Format: int64
3141
+ * @description Block number
3142
+ */
3143
+ block: number;
3144
+ /**
3145
+ * Format: int64
3146
+ * @description Confirmed timestamp (Unix seconds)
3147
+ */
3148
+ confirmed_at: number;
3149
+ /**
3150
+ * Format: double
3151
+ * @description USD size of the trade
3152
+ */
3153
+ amount_usd: number;
3154
+ /**
3155
+ * Format: double
3156
+ * @description Outcome shares traded
3157
+ */
3158
+ shares_amount: number;
3159
+ /**
3160
+ * Format: double
3161
+ * @description Fee paid (USD)
3162
+ */
3163
+ fee: number;
3164
+ /** @description Trade side ("Buy" or "Sell") */
3165
+ side: string;
3166
+ /**
3167
+ * Format: double
3168
+ * @description Last observed price before this trade (the baseline the crossing is measured from)
3169
+ */
3170
+ previous_price: number;
3171
+ /**
3172
+ * Format: double
3173
+ * @description Price per share (0.0–1.0) that crossed the threshold
3174
+ */
3175
+ price: number;
3176
+ /**
3177
+ * Format: double
3178
+ * @description Implied probability of the outcome (0.0–1.0)
3179
+ */
3180
+ probability?: number | null;
3181
+ /**
3182
+ * @description Crossing direction: `"up"` (crossed up to the `min_probability` target) or
3183
+ * `"down"` (crossed down to the `max_probability` target)
3184
+ */
3185
+ direction: string;
3186
+ /**
3187
+ * Format: double
3188
+ * @description The target threshold from the subscriber's filter that was crossed
3189
+ */
3190
+ threshold: number;
3191
+ };
2788
3192
  /** @description Subscription filters for the `probability_spike` event. */
2789
3193
  ProbabilitySpikeFilters: {
3194
+ /**
3195
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3196
+ * successful delivery. Applies to any webhook event.
3197
+ */
3198
+ one_shot?: boolean | null;
2790
3199
  /** @description Restrict to specific outcome token IDs. Empty = all positions. */
2791
3200
  position_ids?: string[] | null;
2792
3201
  /** @description Restrict to specific market condition IDs. Empty = all markets. */
@@ -2805,6 +3214,10 @@ export interface components {
2805
3214
  * @description Maximum YES probability (0-1).
2806
3215
  */
2807
3216
  max_probability?: number | null;
3217
+ /** @description Restrict to markets carrying any of these tags or category names (case-insensitive). Empty = all. */
3218
+ tags?: string[] | null;
3219
+ /** @description Restrict to markets in any of these series (by slug, case-insensitive). Empty = all. */
3220
+ series_slugs?: string[] | null;
2808
3221
  /**
2809
3222
  * Format: double
2810
3223
  * @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move).
@@ -3149,6 +3562,11 @@ export interface components {
3149
3562
  SpikeDirection: "up" | "down" | "both";
3150
3563
  /** @description Subscription filters for the `tag_metrics` event. All fields are optional. */
3151
3564
  TagMetricsFilters: {
3565
+ /**
3566
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3567
+ * successful delivery. Applies to any webhook event.
3568
+ */
3569
+ one_shot?: boolean | null;
3152
3570
  /** @description Restrict to these tags. Empty = all tags. */
3153
3571
  tags?: string[] | null;
3154
3572
  /** @description Restrict to these aggregation windows. */
@@ -3242,6 +3660,11 @@ export interface components {
3242
3660
  TradeEventFilterType: "OrderFilled" | "OrdersMatched" | "MakerRebate" | "Reward" | "Yield" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken";
3243
3661
  /** @description Subscription filters for the `trader_category_pnl` event. All fields are optional. */
3244
3662
  TraderCategoryPnlFilters: {
3663
+ /**
3664
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3665
+ * successful delivery. Applies to any webhook event.
3666
+ */
3667
+ one_shot?: boolean | null;
3245
3668
  /** @description Track only these trader wallet addresses. Empty = all traders. */
3246
3669
  traders?: string[] | null;
3247
3670
  /** @description Restrict to these market categories (e.g. `politics`, `sports`). */
@@ -3291,6 +3714,11 @@ export interface components {
3291
3714
  };
3292
3715
  /** @description Subscription filters for the `trader_pnl_exits` event. All fields are optional. */
3293
3716
  TraderExitMarkersFilters: {
3717
+ /**
3718
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3719
+ * successful delivery. Applies to any webhook event.
3720
+ */
3721
+ one_shot?: boolean | null;
3294
3722
  /** @description Track only these trader wallet addresses. Empty = all traders. */
3295
3723
  traders?: string[] | null;
3296
3724
  /** @description Restrict to these markets. */
@@ -3300,6 +3728,11 @@ export interface components {
3300
3728
  };
3301
3729
  /** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
3302
3730
  TraderFirstTradeFilters: {
3731
+ /**
3732
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3733
+ * successful delivery. Applies to any webhook event.
3734
+ */
3735
+ one_shot?: boolean | null;
3303
3736
  /** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
3304
3737
  wallet_addresses?: string[] | null;
3305
3738
  /** @description Restrict to trades in these markets. Empty = all markets. */
@@ -3326,6 +3759,11 @@ export interface components {
3326
3759
  };
3327
3760
  /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
3328
3761
  TraderGlobalPnlFilters: {
3762
+ /**
3763
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3764
+ * successful delivery. Applies to any webhook event.
3765
+ */
3766
+ one_shot?: boolean | null;
3329
3767
  /** @description Track only these trader wallet addresses. Empty = all traders. */
3330
3768
  traders?: string[] | null;
3331
3769
  /**
@@ -3373,6 +3811,11 @@ export interface components {
3373
3811
  };
3374
3812
  /** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
3375
3813
  TraderMarketPnlFilters: {
3814
+ /**
3815
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3816
+ * successful delivery. Applies to any webhook event.
3817
+ */
3818
+ one_shot?: boolean | null;
3376
3819
  /** @description Track only these trader wallet addresses. */
3377
3820
  traders?: string[] | null;
3378
3821
  /** @description Restrict to these markets. */
@@ -3416,6 +3859,11 @@ export interface components {
3416
3859
  };
3417
3860
  /** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
3418
3861
  TraderNewMarketFilters: {
3862
+ /**
3863
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3864
+ * successful delivery. Applies to any webhook event.
3865
+ */
3866
+ one_shot?: boolean | null;
3419
3867
  /** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
3420
3868
  wallet_addresses?: string[] | null;
3421
3869
  /** @description Restrict to these markets. */
@@ -3442,6 +3890,11 @@ export interface components {
3442
3890
  };
3443
3891
  /** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
3444
3892
  TraderNewTradeFilters: {
3893
+ /**
3894
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3895
+ * successful delivery. Applies to any webhook event.
3896
+ */
3897
+ one_shot?: boolean | null;
3445
3898
  /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
3446
3899
  wallet_addresses?: string[] | null;
3447
3900
  /** @description Restrict to these markets. */
@@ -3471,6 +3924,11 @@ export interface components {
3471
3924
  };
3472
3925
  /** @description Subscription filters for the `trader_position_resolved` event. All fields are optional. */
3473
3926
  TraderPositionResolvedFilters: {
3927
+ /**
3928
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3929
+ * successful delivery. Applies to any webhook event.
3930
+ */
3931
+ one_shot?: boolean | null;
3474
3932
  /** @description Track only these trader wallet addresses. Empty = all traders. */
3475
3933
  traders?: string[] | null;
3476
3934
  /** @description Restrict to these markets. */
@@ -3489,6 +3947,11 @@ export interface components {
3489
3947
  * `event_slug` in the typed webhook payload.
3490
3948
  */
3491
3949
  TraderTradeEventFilters: {
3950
+ /**
3951
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3952
+ * successful delivery. Applies to any webhook event.
3953
+ */
3954
+ one_shot?: boolean | null;
3492
3955
  /** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
3493
3956
  wallet_addresses?: string[] | null;
3494
3957
  /** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
@@ -3518,6 +3981,11 @@ export interface components {
3518
3981
  };
3519
3982
  /** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
3520
3983
  TraderWhaleTradeFilters: {
3984
+ /**
3985
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3986
+ * successful delivery. Applies to any webhook event.
3987
+ */
3988
+ one_shot?: boolean | null;
3521
3989
  /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
3522
3990
  wallet_addresses?: string[] | null;
3523
3991
  /** @description Restrict to these markets. */
@@ -3622,8 +4090,16 @@ export interface components {
3622
4090
  position_ids?: string[];
3623
4091
  /** @description Filter by event slugs. Max 500 entries. */
3624
4092
  event_slugs?: string[];
3625
- /** @description Filter by tags or category names (case-insensitive) — for market_created. Max 500 entries. */
4093
+ /**
4094
+ * @description Filter by tags or category names (case-insensitive). Matches a market's tags or its
4095
+ * category label — for market_created and all market-keyed events. Max 500 entries.
4096
+ */
3626
4097
  tags?: string[];
4098
+ /**
4099
+ * @description Filter by series slugs (case-insensitive). Matches a market's parent series — for all
4100
+ * market-keyed events. Max 500 entries.
4101
+ */
4102
+ series_slugs?: string[];
3627
4103
  /** @description Filter by outcomes (e.g. "Yes", "No") — for position metrics / close_to_bond. Max 500 entries. */
3628
4104
  outcomes?: string[];
3629
4105
  /** @description Filter by position outcome index — for close_to_bond. Position 0 = Yes/Up, 1 = No. Max 500 entries. */
@@ -3746,6 +4222,17 @@ export interface components {
3746
4222
  * Valid values: "BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", "HYPE". Empty = all assets (send everything).
3747
4223
  */
3748
4224
  asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
4225
+ /**
4226
+ * @description Fire-and-delete: delete the subscription after its first successful
4227
+ * delivery. Works on any webhook event. (`price_threshold` additionally
4228
+ * requires `position_ids` or `condition_ids`.)
4229
+ */
4230
+ one_shot?: boolean;
4231
+ /**
4232
+ * @description For `price_threshold` — fire immediately if the first observed price is
4233
+ * already past the target. Default `false` (wait for an actual crossing).
4234
+ */
4235
+ fire_if_already_past?: boolean;
3749
4236
  };
3750
4237
  /** @description List webhooks response */
3751
4238
  WebhookListResponseBody: {
@@ -5954,6 +6441,135 @@ export interface operations {
5954
6441
  };
5955
6442
  };
5956
6443
  };
6444
+ "price-threshold": {
6445
+ parameters: {
6446
+ query?: never;
6447
+ header: {
6448
+ /** @description UUID of the webhook subscription that fired */
6449
+ "X-Webhook-ID": string;
6450
+ /** @description UUID of this specific delivery attempt (matches envelope `id` field) */
6451
+ "X-Delivery-ID": string;
6452
+ /** @description Event name string (e.g. `trader_first_trade`) */
6453
+ "X-Event-Type": string;
6454
+ /** @description Delivery attempt number (1 = first attempt) */
6455
+ "X-Attempt": number;
6456
+ /** @description HMAC-SHA256 of the raw request body: `sha256=<hex>`. Present only when the webhook has a secret configured. Verify with: HMAC-SHA256(secret, raw_body_bytes) == hex_part. */
6457
+ "X-Webhook-Signature"?: string;
6458
+ };
6459
+ path?: never;
6460
+ cookie?: never;
6461
+ };
6462
+ /** @description Webhook delivery envelope. The `data` field contains the event-specific payload. */
6463
+ requestBody: {
6464
+ content: {
6465
+ "application/json": components["schemas"]["WebhookDeliveryEnvelope"] & {
6466
+ data?: components["schemas"]["PriceThresholdPayload"];
6467
+ };
6468
+ };
6469
+ };
6470
+ responses: {
6471
+ /** @description Webhook delivery acknowledged */
6472
+ 200: {
6473
+ headers: {
6474
+ [name: string]: unknown;
6475
+ };
6476
+ content?: never;
6477
+ };
6478
+ /** @description Server error (will retry) */
6479
+ 500: {
6480
+ headers: {
6481
+ [name: string]: unknown;
6482
+ };
6483
+ content?: never;
6484
+ };
6485
+ };
6486
+ };
6487
+ "market-resolved": {
6488
+ parameters: {
6489
+ query?: never;
6490
+ header: {
6491
+ /** @description UUID of the webhook subscription that fired */
6492
+ "X-Webhook-ID": string;
6493
+ /** @description UUID of this specific delivery attempt (matches envelope `id` field) */
6494
+ "X-Delivery-ID": string;
6495
+ /** @description Event name string (e.g. `trader_first_trade`) */
6496
+ "X-Event-Type": string;
6497
+ /** @description Delivery attempt number (1 = first attempt) */
6498
+ "X-Attempt": number;
6499
+ /** @description HMAC-SHA256 of the raw request body: `sha256=<hex>`. Present only when the webhook has a secret configured. Verify with: HMAC-SHA256(secret, raw_body_bytes) == hex_part. */
6500
+ "X-Webhook-Signature"?: string;
6501
+ };
6502
+ path?: never;
6503
+ cookie?: never;
6504
+ };
6505
+ /** @description Webhook delivery envelope. The `data` field contains the event-specific payload. */
6506
+ requestBody: {
6507
+ content: {
6508
+ "application/json": components["schemas"]["WebhookDeliveryEnvelope"] & {
6509
+ data?: components["schemas"]["MarketResolvedPayload"];
6510
+ };
6511
+ };
6512
+ };
6513
+ responses: {
6514
+ /** @description Webhook delivery acknowledged */
6515
+ 200: {
6516
+ headers: {
6517
+ [name: string]: unknown;
6518
+ };
6519
+ content?: never;
6520
+ };
6521
+ /** @description Server error (will retry) */
6522
+ 500: {
6523
+ headers: {
6524
+ [name: string]: unknown;
6525
+ };
6526
+ content?: never;
6527
+ };
6528
+ };
6529
+ };
6530
+ "market-disputed": {
6531
+ parameters: {
6532
+ query?: never;
6533
+ header: {
6534
+ /** @description UUID of the webhook subscription that fired */
6535
+ "X-Webhook-ID": string;
6536
+ /** @description UUID of this specific delivery attempt (matches envelope `id` field) */
6537
+ "X-Delivery-ID": string;
6538
+ /** @description Event name string (e.g. `trader_first_trade`) */
6539
+ "X-Event-Type": string;
6540
+ /** @description Delivery attempt number (1 = first attempt) */
6541
+ "X-Attempt": number;
6542
+ /** @description HMAC-SHA256 of the raw request body: `sha256=<hex>`. Present only when the webhook has a secret configured. Verify with: HMAC-SHA256(secret, raw_body_bytes) == hex_part. */
6543
+ "X-Webhook-Signature"?: string;
6544
+ };
6545
+ path?: never;
6546
+ cookie?: never;
6547
+ };
6548
+ /** @description Webhook delivery envelope. The `data` field contains the event-specific payload. */
6549
+ requestBody: {
6550
+ content: {
6551
+ "application/json": components["schemas"]["WebhookDeliveryEnvelope"] & {
6552
+ data?: components["schemas"]["MarketDisputedPayload"];
6553
+ };
6554
+ };
6555
+ };
6556
+ responses: {
6557
+ /** @description Webhook delivery acknowledged */
6558
+ 200: {
6559
+ headers: {
6560
+ [name: string]: unknown;
6561
+ };
6562
+ content?: never;
6563
+ };
6564
+ /** @description Server error (will retry) */
6565
+ 500: {
6566
+ headers: {
6567
+ [name: string]: unknown;
6568
+ };
6569
+ content?: never;
6570
+ };
6571
+ };
6572
+ };
5957
6573
  "market-created": {
5958
6574
  parameters: {
5959
6575
  query?: never;