@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.
@@ -88,6 +88,11 @@ export interface components {
88
88
  };
89
89
  /** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
90
90
  AssetPriceTickFilters: {
91
+ /**
92
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
93
+ * successful delivery. Applies to any webhook event.
94
+ */
95
+ one_shot?: boolean | null;
91
96
  /** @description Restrict to these crypto assets. Empty = all assets. */
92
97
  asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
93
98
  };
@@ -108,6 +113,11 @@ export interface components {
108
113
  };
109
114
  /** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
110
115
  AssetPriceWindowUpdateFilters: {
116
+ /**
117
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
118
+ * successful delivery. Applies to any webhook event.
119
+ */
120
+ one_shot?: boolean | null;
111
121
  /** @description Restrict to these crypto assets. Empty = all assets. */
112
122
  asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
113
123
  /** @description Restrict to these candle sizes. Empty = all sizes. */
@@ -233,6 +243,15 @@ export interface components {
233
243
  * `min_probability` or `max_probability` is required (enforced at runtime).
234
244
  */
235
245
  CloseToBondFilters: {
246
+ /**
247
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
248
+ * successful delivery. Applies to any webhook event.
249
+ */
250
+ one_shot?: boolean | null;
251
+ /** @description Restrict to markets carrying any of these tags or category names (case-insensitive). Empty = all. */
252
+ tags?: string[] | null;
253
+ /** @description Restrict to markets in any of these series (by slug, case-insensitive). Empty = all. */
254
+ series_slugs?: string[] | null;
236
255
  /**
237
256
  * Format: double
238
257
  * @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.
@@ -330,6 +349,11 @@ export interface components {
330
349
  };
331
350
  ConditionHolderMetricsFilters: {
332
351
  condition_ids?: string[];
352
+ /**
353
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
354
+ * successful delivery. Applies to any webhook event.
355
+ */
356
+ one_shot?: boolean | null;
333
357
  };
334
358
  ConditionHolderMetricsPayload: {
335
359
  /** Format: int32 */
@@ -497,6 +521,11 @@ export interface components {
497
521
  };
498
522
  EventHolderMetricsFilters: {
499
523
  event_slugs?: string[];
524
+ /**
525
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
526
+ * successful delivery. Applies to any webhook event.
527
+ */
528
+ one_shot?: boolean | null;
500
529
  };
501
530
  EventHolderMetricsPayload: {
502
531
  /** Format: int32 */
@@ -509,6 +538,11 @@ export interface components {
509
538
  };
510
539
  /** @description Subscription filters for the `event_metrics` event. All fields are optional. */
511
540
  EventMetricsFilters: {
541
+ /**
542
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
543
+ * successful delivery. Applies to any webhook event.
544
+ */
545
+ one_shot?: boolean | null;
512
546
  /** @description Restrict to these events. Empty = all events. */
513
547
  event_slugs?: string[] | null;
514
548
  /** @description Restrict to these aggregation windows. */
@@ -598,6 +632,11 @@ export interface components {
598
632
  };
599
633
  /** @description Subscription filters for the `event_volume_milestone` event. */
600
634
  EventVolumeMilestoneFilters: {
635
+ /**
636
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
637
+ * successful delivery. Applies to any webhook event.
638
+ */
639
+ one_shot?: boolean | null;
601
640
  /** @description **Required.** Aggregation windows to monitor. */
602
641
  timeframes: components["schemas"]["MetricFilterTimeframe"][];
603
642
  /** @description Restrict to these events. */
@@ -634,6 +673,11 @@ export interface components {
634
673
  };
635
674
  /** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
636
675
  EventVolumeSpikeFilters: {
676
+ /**
677
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
678
+ * successful delivery. Applies to any webhook event.
679
+ */
680
+ one_shot?: boolean | null;
637
681
  /**
638
682
  * Format: double
639
683
  * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
@@ -874,6 +918,11 @@ export interface components {
874
918
  };
875
919
  /** @description Subscription filters for the `market_created` event. All fields are optional. */
876
920
  MarketCreatedFilters: {
921
+ /**
922
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
923
+ * successful delivery. Applies to any webhook event.
924
+ */
925
+ one_shot?: boolean | null;
877
926
  /** @description Restrict to markets with these tags or category names (case-insensitive match). */
878
927
  tags?: string[] | null;
879
928
  /** @description Restrict to markets belonging to these events. */
@@ -924,8 +973,65 @@ export interface components {
924
973
  /** @description Whether this is a neg-risk market */
925
974
  neg_risk: boolean;
926
975
  };
976
+ /** @description Subscription filters for the `market_disputed` event. All fields are optional. */
977
+ MarketDisputedFilters: {
978
+ /**
979
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
980
+ * successful delivery. Applies to any webhook event.
981
+ */
982
+ one_shot?: boolean | null;
983
+ /** @description Restrict to these markets. */
984
+ condition_ids?: string[] | null;
985
+ /** @description Restrict to markets in these events. */
986
+ event_slugs?: string[] | null;
987
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
988
+ exclude_shortterm_markets?: boolean | null;
989
+ };
990
+ /** @description Market-disputed webhook payload */
991
+ MarketDisputedPayload: {
992
+ /** @description Condition ID (the contested market), when resolvable */
993
+ condition_id?: string | null;
994
+ /** @description Which oracle event produced this dispute: `"dispute_price"` or `"assertion_disputed"`. */
995
+ dispute_kind: string;
996
+ /** @description Address that filed the dispute */
997
+ disputer: string;
998
+ /** @description Address that made the disputed proposal/assertion, when known */
999
+ proposer?: string | null;
1000
+ /** @description The proposed outcome that was disputed, when known (e.g. "Yes", "No") */
1001
+ proposed_outcome?: string | null;
1002
+ /**
1003
+ * Format: double
1004
+ * @description The proposed price (0.0–1.0) that was disputed (`DisputePrice` only)
1005
+ */
1006
+ proposed_price?: number | null;
1007
+ /** @description Market question */
1008
+ question?: string | null;
1009
+ /** @description Market slug */
1010
+ market_slug?: string | null;
1011
+ /** @description Event slug */
1012
+ event_slug?: string | null;
1013
+ /** @description Market image URL */
1014
+ image_url?: string | null;
1015
+ /** @description Transaction hash of the dispute event */
1016
+ hash: string;
1017
+ /**
1018
+ * Format: int64
1019
+ * @description Block number
1020
+ */
1021
+ block?: number | null;
1022
+ /**
1023
+ * Format: int64
1024
+ * @description Confirmed timestamp (Unix seconds)
1025
+ */
1026
+ confirmed_at?: number | null;
1027
+ };
927
1028
  /** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
928
1029
  MarketMetricsFilters: {
1030
+ /**
1031
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1032
+ * successful delivery. Applies to any webhook event.
1033
+ */
1034
+ one_shot?: boolean | null;
929
1035
  /** @description Restrict to these markets. Empty = all markets. */
930
1036
  condition_ids?: string[] | null;
931
1037
  /** @description Restrict to these aggregation windows. Empty = all windows. */
@@ -1001,8 +1107,67 @@ export interface components {
1001
1107
  /** Format: int64 */
1002
1108
  last_trade_at?: number | null;
1003
1109
  };
1110
+ /** @description Subscription filters for the `market_resolved` event. All fields are optional. */
1111
+ MarketResolvedFilters: {
1112
+ /**
1113
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1114
+ * successful delivery. Applies to any webhook event.
1115
+ */
1116
+ one_shot?: boolean | null;
1117
+ /** @description Restrict to these markets. */
1118
+ condition_ids?: string[] | null;
1119
+ /** @description Restrict to markets in these events. */
1120
+ event_slugs?: string[] | null;
1121
+ /** @description Only fire when the winning outcome matches one of these (e.g. \["Yes"\]). */
1122
+ outcomes?: string[] | null;
1123
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1124
+ exclude_shortterm_markets?: boolean | null;
1125
+ };
1126
+ /** @description Market-resolved webhook payload */
1127
+ MarketResolvedPayload: {
1128
+ /** @description Condition ID (the resolved market) */
1129
+ condition_id: string;
1130
+ /** @description Winning outcome name when known (e.g. "Yes", "No") */
1131
+ winning_outcome?: string | null;
1132
+ /**
1133
+ * Format: double
1134
+ * @description Settled price (0.0–1.0) when the resolution event carries one
1135
+ * (`QuestionResolved` only). 1.0 = full YES, 0.0 = full NO, 0.5 = split.
1136
+ */
1137
+ settled_price?: number | null;
1138
+ /**
1139
+ * @description Which oracle event produced this resolution: `"question_resolved"`,
1140
+ * `"question_emergency_resolved"`, `"condition_resolution"`, or `"neg_risk_outcome_reported"`.
1141
+ */
1142
+ resolution_kind: string;
1143
+ /** @description Market question */
1144
+ question?: string | null;
1145
+ /** @description Market slug */
1146
+ market_slug?: string | null;
1147
+ /** @description Event slug */
1148
+ event_slug?: string | null;
1149
+ /** @description Market image URL */
1150
+ image_url?: string | null;
1151
+ /** @description Transaction hash of the resolution event */
1152
+ hash: string;
1153
+ /**
1154
+ * Format: int64
1155
+ * @description Block number
1156
+ */
1157
+ block?: number | null;
1158
+ /**
1159
+ * Format: int64
1160
+ * @description Confirmed timestamp (Unix seconds)
1161
+ */
1162
+ confirmed_at?: number | null;
1163
+ };
1004
1164
  /** @description Subscription filters for the `market_volume_milestone` event. */
1005
1165
  MarketVolumeMilestoneFilters: {
1166
+ /**
1167
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1168
+ * successful delivery. Applies to any webhook event.
1169
+ */
1170
+ one_shot?: boolean | null;
1006
1171
  /** @description **Required.** Aggregation windows to monitor (e.g. \["1h", "24h"\]). */
1007
1172
  timeframes: components["schemas"]["MetricFilterTimeframe"][];
1008
1173
  /** @description Restrict to these markets. Empty = all markets. */
@@ -1012,6 +1177,11 @@ export interface components {
1012
1177
  };
1013
1178
  /** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
1014
1179
  MarketVolumeSpikeFilters: {
1180
+ /**
1181
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1182
+ * successful delivery. Applies to any webhook event.
1183
+ */
1184
+ one_shot?: boolean | null;
1015
1185
  /**
1016
1186
  * Format: double
1017
1187
  * @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.
@@ -1314,6 +1484,11 @@ export interface components {
1314
1484
  });
1315
1485
  /** @description Subscription filters for the `oracle_events` event. All fields are optional. */
1316
1486
  OracleEventsFilters: {
1487
+ /**
1488
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1489
+ * successful delivery. Applies to any webhook event.
1490
+ */
1491
+ one_shot?: boolean | null;
1317
1492
  /** @description Restrict to these event types (case-insensitive). Empty = all. */
1318
1493
  oracle_event_types?: components["schemas"]["OracleEventFilterType"][] | null;
1319
1494
  /** @description Restrict to events for these condition IDs. */
@@ -1340,11 +1515,15 @@ export interface components {
1340
1515
  * @description Polymarket webhook event types
1341
1516
  * @enum {string}
1342
1517
  */
1343
- 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";
1518
+ 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";
1344
1519
  /**
1345
1520
  * @description Polymarket-specific webhook filters
1346
1521
  *
1347
- * Different webhook handlers use different subsets of these fields:
1522
+ * Different webhook handlers use different subsets of these fields.
1523
+ * The trade-driven events `price_spike`, `probability_spike`, and
1524
+ * `close_to_bond` additionally accept `tags` (matches a market's tags OR its
1525
+ * category) and `series_slugs` (matches the market's parent series); these are
1526
+ * resolved from the tags/series the crawler enriches onto each trade.
1348
1527
  * - first_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, tags
1349
1528
  * - new_market: wallet_addresses, condition_ids, event_slugs, min_usd_value, min_probability, max_probability
1350
1529
  * - whale_trade: min_usd_value (required), min_probability, max_probability, condition_ids, event_slugs
@@ -1356,10 +1535,10 @@ export interface components {
1356
1535
  * - tag_metrics: tags, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
1357
1536
  * - 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
1358
1537
  * - volume_milestone: condition_ids, timeframes, milestone_amounts
1359
- * - 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
1538
+ * - 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
1360
1539
  * - market_created: event_slugs, tags, exclude_shortterm_markets
1361
- * - probability_spike: condition_ids, event_slugs, outcomes, min_probability, max_probability, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
1362
- * - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
1540
+ * - 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
1541
+ * - price_spike: condition_ids, event_slugs, tags, series_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
1363
1542
  * - trader_new_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
1364
1543
  * - trader_trade_event: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
1365
1544
  * - trader_first_trade: wallet_addresses, min_usd_value, min_probability, max_probability, exclude_shortterm_markets
@@ -1384,8 +1563,16 @@ export interface components {
1384
1563
  min_usd_value?: number | null;
1385
1564
  /** @description Filter by event slugs. Max 500 entries. */
1386
1565
  event_slugs?: string[];
1387
- /** @description Filter by tags. Max 500 entries. */
1566
+ /**
1567
+ * @description Filter by tags or category names (case-insensitive). Matches a market's
1568
+ * tags or its category label. Max 500 entries.
1569
+ */
1388
1570
  tags?: string[];
1571
+ /**
1572
+ * @description Filter by series slugs (case-insensitive). Matches a market's parent
1573
+ * series. Max 500 entries.
1574
+ */
1575
+ series_slugs?: string[];
1389
1576
  /**
1390
1577
  * Format: double
1391
1578
  * @description Minimum probability threshold (0.0 - 1.0)
@@ -1528,9 +1715,25 @@ export interface components {
1528
1715
  * `NegRiskOutcomeReported`. Empty = all types.
1529
1716
  */
1530
1717
  oracle_event_types?: string[];
1718
+ /**
1719
+ * @description Fire-and-delete: when `true`, the subscription is deleted after its first
1720
+ * successful delivery. Works on any webhook event. (`price_threshold`
1721
+ * additionally requires `position_ids` or `condition_ids`.)
1722
+ */
1723
+ one_shot?: boolean;
1724
+ /**
1725
+ * @description For `price_threshold` — when `true`, fire immediately if the first observed
1726
+ * price is already past the target (no prior baseline). Default `false`.
1727
+ */
1728
+ fire_if_already_past?: boolean;
1531
1729
  };
1532
1730
  PositionHolderMetricsFilters: {
1533
1731
  position_ids?: string[];
1732
+ /**
1733
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1734
+ * successful delivery. Applies to any webhook event.
1735
+ */
1736
+ one_shot?: boolean | null;
1534
1737
  };
1535
1738
  PositionHolderMetricsPayload: {
1536
1739
  /** Format: int32 */
@@ -1551,6 +1754,11 @@ export interface components {
1551
1754
  };
1552
1755
  /** @description Subscription filters for the `position_metrics` event. All fields are optional. */
1553
1756
  PositionMetricsFilters: {
1757
+ /**
1758
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
1759
+ * successful delivery. Applies to any webhook event.
1760
+ */
1761
+ one_shot?: boolean | null;
1554
1762
  /** @description Restrict to these outcome token IDs. */
1555
1763
  position_ids?: string[] | null;
1556
1764
  /** @description Restrict to positions within these markets. */
@@ -1756,6 +1964,8 @@ export interface components {
1756
1964
  /** Format: double */
1757
1965
  total_pnl_usd?: number;
1758
1966
  /** Format: double */
1967
+ unrealized_pnl_usd?: number;
1968
+ /** Format: double */
1759
1969
  redemption_usd?: number;
1760
1970
  open?: boolean;
1761
1971
  won?: boolean | null;
@@ -1776,6 +1986,8 @@ export interface components {
1776
1986
  * window. `0.0` when the trader has no cost basis on this row yet.
1777
1987
  */
1778
1988
  realized_pnl_pct?: number;
1989
+ /** Format: double */
1990
+ total_pnl_pct?: number;
1779
1991
  /** @description Market slug for the parent market of this outcome. */
1780
1992
  market_slug?: string | null;
1781
1993
  /** @description Market title. */
@@ -1850,6 +2062,11 @@ export interface components {
1850
2062
  };
1851
2063
  /** @description Subscription filters for the `position_volume_milestone` event. */
1852
2064
  PositionVolumeMilestoneFilters: {
2065
+ /**
2066
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2067
+ * successful delivery. Applies to any webhook event.
2068
+ */
2069
+ one_shot?: boolean | null;
1853
2070
  /** @description **Required.** Aggregation windows to monitor. */
1854
2071
  timeframes: components["schemas"]["MetricFilterTimeframe"][];
1855
2072
  /** @description Restrict to these outcome token IDs. */
@@ -1912,6 +2129,11 @@ export interface components {
1912
2129
  };
1913
2130
  /** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
1914
2131
  PositionVolumeSpikeFilters: {
2132
+ /**
2133
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2134
+ * successful delivery. Applies to any webhook event.
2135
+ */
2136
+ one_shot?: boolean | null;
1915
2137
  /**
1916
2138
  * Format: double
1917
2139
  * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
@@ -1976,6 +2198,11 @@ export interface components {
1976
2198
  };
1977
2199
  /** @description Subscription filters for the `price_spike` event. */
1978
2200
  PriceSpikeFilters: {
2201
+ /**
2202
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2203
+ * successful delivery. Applies to any webhook event.
2204
+ */
2205
+ one_shot?: boolean | null;
1979
2206
  /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1980
2207
  position_ids?: string[] | null;
1981
2208
  /** @description Restrict to specific market condition IDs. Empty = all markets. */
@@ -1984,6 +2211,10 @@ export interface components {
1984
2211
  event_slugs?: string[] | null;
1985
2212
  /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
1986
2213
  outcomes?: string[] | null;
2214
+ /** @description Restrict to markets carrying any of these tags or category names (case-insensitive). Empty = all. */
2215
+ tags?: string[] | null;
2216
+ /** @description Restrict to markets in any of these series (by slug, case-insensitive). Empty = all. */
2217
+ series_slugs?: string[] | null;
1987
2218
  /**
1988
2219
  * Format: double
1989
2220
  * @description Minimum price percentage move to trigger (e.g. `10` for a 10% move).
@@ -2047,8 +2278,126 @@ export interface components {
2047
2278
  */
2048
2279
  spike_pct: number;
2049
2280
  };
2281
+ /** @description Subscription filters for the `price_threshold` event. */
2282
+ PriceThresholdFilters: {
2283
+ /** @description Restrict to markets carrying any of these tags or category names (case-insensitive). Empty = all. */
2284
+ tags?: string[] | null;
2285
+ /** @description Restrict to markets in any of these series (by slug, case-insensitive). Empty = all. */
2286
+ series_slugs?: string[] | null;
2287
+ /**
2288
+ * Format: double
2289
+ * @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.
2290
+ */
2291
+ min_probability?: number | null;
2292
+ /**
2293
+ * Format: double
2294
+ * @description Downward target — fire when the YES price crosses down to ≤ this value (e.g. 0.25).
2295
+ */
2296
+ max_probability?: number | null;
2297
+ /** @description When `true`, delete the subscription after its first delivery (fire-and-delete). Requires `position_ids` or `condition_ids`. Default: `false`. */
2298
+ one_shot?: boolean | null;
2299
+ /** @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). */
2300
+ fire_if_already_past?: boolean | null;
2301
+ /** @description Restrict to these markets. */
2302
+ condition_ids?: string[] | null;
2303
+ /** @description Restrict to these outcome token IDs. */
2304
+ position_ids?: string[] | null;
2305
+ /** @description Restrict to markets in these events. */
2306
+ event_slugs?: string[] | null;
2307
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
2308
+ outcomes?: string[] | null;
2309
+ /** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
2310
+ position_outcome_indices?: number[] | null;
2311
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2312
+ exclude_shortterm_markets?: boolean | null;
2313
+ };
2314
+ /** @description Price-threshold crossing webhook payload */
2315
+ PriceThresholdPayload: {
2316
+ /** @description Trader address (the limit-order maker) */
2317
+ trader: string;
2318
+ /** @description Taker address (the order filler — often the exchange contract) */
2319
+ taker: string;
2320
+ /** @description Position ID (ERC1155 token ID) */
2321
+ position_id: string;
2322
+ /** @description Condition ID (parent market) */
2323
+ condition_id?: string | null;
2324
+ /** @description Outcome name (e.g. "Yes", "No") */
2325
+ outcome?: string | null;
2326
+ /**
2327
+ * Format: int32
2328
+ * @description Outcome index (0 = Yes/Up, 1 = No). Position 0 usually represents Yes/Up.
2329
+ */
2330
+ outcome_index?: number | null;
2331
+ /** @description Market question */
2332
+ question?: string | null;
2333
+ /** @description Market slug */
2334
+ market_slug?: string | null;
2335
+ /** @description Event slug */
2336
+ event_slug?: string | null;
2337
+ /** @description Trade ID */
2338
+ trade_id: string;
2339
+ /** @description Transaction hash */
2340
+ hash: string;
2341
+ /**
2342
+ * Format: int64
2343
+ * @description Block number
2344
+ */
2345
+ block: number;
2346
+ /**
2347
+ * Format: int64
2348
+ * @description Confirmed timestamp (Unix seconds)
2349
+ */
2350
+ confirmed_at: number;
2351
+ /**
2352
+ * Format: double
2353
+ * @description USD size of the trade
2354
+ */
2355
+ amount_usd: number;
2356
+ /**
2357
+ * Format: double
2358
+ * @description Outcome shares traded
2359
+ */
2360
+ shares_amount: number;
2361
+ /**
2362
+ * Format: double
2363
+ * @description Fee paid (USD)
2364
+ */
2365
+ fee: number;
2366
+ /** @description Trade side ("Buy" or "Sell") */
2367
+ side: string;
2368
+ /**
2369
+ * Format: double
2370
+ * @description Last observed price before this trade (the baseline the crossing is measured from)
2371
+ */
2372
+ previous_price: number;
2373
+ /**
2374
+ * Format: double
2375
+ * @description Price per share (0.0–1.0) that crossed the threshold
2376
+ */
2377
+ price: number;
2378
+ /**
2379
+ * Format: double
2380
+ * @description Implied probability of the outcome (0.0–1.0)
2381
+ */
2382
+ probability?: number | null;
2383
+ /**
2384
+ * @description Crossing direction: `"up"` (crossed up to the `min_probability` target) or
2385
+ * `"down"` (crossed down to the `max_probability` target)
2386
+ */
2387
+ direction: string;
2388
+ /**
2389
+ * Format: double
2390
+ * @description The target threshold from the subscriber's filter that was crossed
2391
+ */
2392
+ threshold: number;
2393
+ };
2050
2394
  /** @description Subscription filters for the `probability_spike` event. */
2051
2395
  ProbabilitySpikeFilters: {
2396
+ /**
2397
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2398
+ * successful delivery. Applies to any webhook event.
2399
+ */
2400
+ one_shot?: boolean | null;
2052
2401
  /** @description Restrict to specific outcome token IDs. Empty = all positions. */
2053
2402
  position_ids?: string[] | null;
2054
2403
  /** @description Restrict to specific market condition IDs. Empty = all markets. */
@@ -2067,6 +2416,10 @@ export interface components {
2067
2416
  * @description Maximum YES probability (0-1).
2068
2417
  */
2069
2418
  max_probability?: number | null;
2419
+ /** @description Restrict to markets carrying any of these tags or category names (case-insensitive). Empty = all. */
2420
+ tags?: string[] | null;
2421
+ /** @description Restrict to markets in any of these series (by slug, case-insensitive). Empty = all. */
2422
+ series_slugs?: string[] | null;
2070
2423
  /**
2071
2424
  * Format: double
2072
2425
  * @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move).
@@ -2411,6 +2764,11 @@ export interface components {
2411
2764
  SpikeDirection: "up" | "down" | "both";
2412
2765
  /** @description Subscription filters for the `tag_metrics` event. All fields are optional. */
2413
2766
  TagMetricsFilters: {
2767
+ /**
2768
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2769
+ * successful delivery. Applies to any webhook event.
2770
+ */
2771
+ one_shot?: boolean | null;
2414
2772
  /** @description Restrict to these tags. Empty = all tags. */
2415
2773
  tags?: string[] | null;
2416
2774
  /** @description Restrict to these aggregation windows. */
@@ -2504,6 +2862,11 @@ export interface components {
2504
2862
  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";
2505
2863
  /** @description Subscription filters for the `trader_category_pnl` event. All fields are optional. */
2506
2864
  TraderCategoryPnlFilters: {
2865
+ /**
2866
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2867
+ * successful delivery. Applies to any webhook event.
2868
+ */
2869
+ one_shot?: boolean | null;
2507
2870
  /** @description Track only these trader wallet addresses. Empty = all traders. */
2508
2871
  traders?: string[] | null;
2509
2872
  /** @description Restrict to these market categories (e.g. `politics`, `sports`). */
@@ -2553,6 +2916,11 @@ export interface components {
2553
2916
  };
2554
2917
  /** @description Subscription filters for the `trader_pnl_exits` event. All fields are optional. */
2555
2918
  TraderExitMarkersFilters: {
2919
+ /**
2920
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2921
+ * successful delivery. Applies to any webhook event.
2922
+ */
2923
+ one_shot?: boolean | null;
2556
2924
  /** @description Track only these trader wallet addresses. Empty = all traders. */
2557
2925
  traders?: string[] | null;
2558
2926
  /** @description Restrict to these markets. */
@@ -2562,6 +2930,11 @@ export interface components {
2562
2930
  };
2563
2931
  /** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
2564
2932
  TraderFirstTradeFilters: {
2933
+ /**
2934
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2935
+ * successful delivery. Applies to any webhook event.
2936
+ */
2937
+ one_shot?: boolean | null;
2565
2938
  /** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
2566
2939
  wallet_addresses?: string[] | null;
2567
2940
  /** @description Restrict to trades in these markets. Empty = all markets. */
@@ -2588,6 +2961,11 @@ export interface components {
2588
2961
  };
2589
2962
  /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
2590
2963
  TraderGlobalPnlFilters: {
2964
+ /**
2965
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
2966
+ * successful delivery. Applies to any webhook event.
2967
+ */
2968
+ one_shot?: boolean | null;
2591
2969
  /** @description Track only these trader wallet addresses. Empty = all traders. */
2592
2970
  traders?: string[] | null;
2593
2971
  /**
@@ -2635,6 +3013,11 @@ export interface components {
2635
3013
  };
2636
3014
  /** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
2637
3015
  TraderMarketPnlFilters: {
3016
+ /**
3017
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3018
+ * successful delivery. Applies to any webhook event.
3019
+ */
3020
+ one_shot?: boolean | null;
2638
3021
  /** @description Track only these trader wallet addresses. */
2639
3022
  traders?: string[] | null;
2640
3023
  /** @description Restrict to these markets. */
@@ -2678,6 +3061,11 @@ export interface components {
2678
3061
  };
2679
3062
  /** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
2680
3063
  TraderNewMarketFilters: {
3064
+ /**
3065
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3066
+ * successful delivery. Applies to any webhook event.
3067
+ */
3068
+ one_shot?: boolean | null;
2681
3069
  /** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
2682
3070
  wallet_addresses?: string[] | null;
2683
3071
  /** @description Restrict to these markets. */
@@ -2704,6 +3092,11 @@ export interface components {
2704
3092
  };
2705
3093
  /** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
2706
3094
  TraderNewTradeFilters: {
3095
+ /**
3096
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3097
+ * successful delivery. Applies to any webhook event.
3098
+ */
3099
+ one_shot?: boolean | null;
2707
3100
  /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2708
3101
  wallet_addresses?: string[] | null;
2709
3102
  /** @description Restrict to these markets. */
@@ -2732,6 +3125,11 @@ export interface components {
2732
3125
  };
2733
3126
  /** @description Subscription filters for the `trader_position_resolved` event. All fields are optional. */
2734
3127
  TraderPositionResolvedFilters: {
3128
+ /**
3129
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3130
+ * successful delivery. Applies to any webhook event.
3131
+ */
3132
+ one_shot?: boolean | null;
2735
3133
  /** @description Track only these trader wallet addresses. Empty = all traders. */
2736
3134
  traders?: string[] | null;
2737
3135
  /** @description Restrict to these markets. */
@@ -2750,6 +3148,11 @@ export interface components {
2750
3148
  * `event_slug` in the typed webhook payload.
2751
3149
  */
2752
3150
  TraderTradeEventFilters: {
3151
+ /**
3152
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3153
+ * successful delivery. Applies to any webhook event.
3154
+ */
3155
+ one_shot?: boolean | null;
2753
3156
  /** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
2754
3157
  wallet_addresses?: string[] | null;
2755
3158
  /** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
@@ -2778,6 +3181,11 @@ export interface components {
2778
3181
  };
2779
3182
  /** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
2780
3183
  TraderWhaleTradeFilters: {
3184
+ /**
3185
+ * @description Fire-and-delete: when `true`, delete the subscription after its first
3186
+ * successful delivery. Applies to any webhook event.
3187
+ */
3188
+ one_shot?: boolean | null;
2781
3189
  /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2782
3190
  wallet_addresses?: string[] | null;
2783
3191
  /** @description Restrict to these markets. */
@@ -2881,8 +3289,16 @@ export interface components {
2881
3289
  position_ids?: string[];
2882
3290
  /** @description Filter by event slugs. Max 500 entries. */
2883
3291
  event_slugs?: string[];
2884
- /** @description Filter by tags or category names (case-insensitive) — for market_created. Max 500 entries. */
3292
+ /**
3293
+ * @description Filter by tags or category names (case-insensitive). Matches a market's tags or its
3294
+ * category label — for market_created and all market-keyed events. Max 500 entries.
3295
+ */
2885
3296
  tags?: string[];
3297
+ /**
3298
+ * @description Filter by series slugs (case-insensitive). Matches a market's parent series — for all
3299
+ * market-keyed events. Max 500 entries.
3300
+ */
3301
+ series_slugs?: string[];
2886
3302
  /** @description Filter by outcomes (e.g. "Yes", "No") — for position metrics / close_to_bond. Max 500 entries. */
2887
3303
  outcomes?: string[];
2888
3304
  /** @description Filter by position outcome index — for close_to_bond. Position 0 = Yes/Up, 1 = No. Max 500 entries. */
@@ -3005,6 +3421,17 @@ export interface components {
3005
3421
  * Valid values: "BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", "HYPE". Empty = all assets (send everything).
3006
3422
  */
3007
3423
  asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
3424
+ /**
3425
+ * @description Fire-and-delete: delete the subscription after its first successful
3426
+ * delivery. Works on any webhook event. (`price_threshold` additionally
3427
+ * requires `position_ids` or `condition_ids`.)
3428
+ */
3429
+ one_shot?: boolean;
3430
+ /**
3431
+ * @description For `price_threshold` — fire immediately if the first observed price is
3432
+ * already past the target. Default `false` (wait for an actual crossing).
3433
+ */
3434
+ fire_if_already_past?: boolean;
3008
3435
  };
3009
3436
  /** @description List webhooks response */
3010
3437
  WebhookListResponseBody: {
@@ -3733,7 +4160,7 @@ export interface components {
3733
4160
  * @description All alert event types supported by both HTTP webhooks and the alerts WebSocket.
3734
4161
  * @enum {string}
3735
4162
  */
3736
- WsAlertEventType: "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_pnl_exits" | "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" | "price_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "oracle_events" | "asset_price_tick" | "asset_price_window_update";
4163
+ WsAlertEventType: "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_pnl_exits" | "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" | "price_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "price_threshold" | "market_resolved" | "market_disputed" | "market_created" | "oracle_events" | "asset_price_tick" | "asset_price_window_update";
3737
4164
  /** @description Server acknowledgement for a successful alert subscription. */
3738
4165
  WsAlertSubscribedResponse: {
3739
4166
  /** @enum {string} */
@@ -4389,6 +4816,7 @@ export interface components {
4389
4816
  * "total_fees": 2.5,
4390
4817
  * "realized_pnl_usd": 100,
4391
4818
  * "total_pnl_usd": 100,
4819
+ * "unrealized_pnl_usd": 0,
4392
4820
  * "redemption_usd": 50,
4393
4821
  * "open": false,
4394
4822
  * "won": true,
@@ -4398,6 +4826,7 @@ export interface components {
4398
4826
  * "position_resolved"
4399
4827
  * ],
4400
4828
  * "realized_pnl_pct": 0,
4829
+ * "total_pnl_pct": 0,
4401
4830
  * "converted_count": 0,
4402
4831
  * "converted_shares_gained": 0,
4403
4832
  * "converted_shares_lost": 0,
@@ -5422,6 +5851,190 @@ export interface components {
5422
5851
  timestamp: number;
5423
5852
  data: components["schemas"]["CloseToBondPayload"];
5424
5853
  };
5854
+ WsAlertPriceThresholdSubscribeMessage: ({
5855
+ /** @enum {string} */
5856
+ op: "subscribe";
5857
+ /** @enum {string} */
5858
+ event: "price_threshold";
5859
+ } & components["schemas"]["PriceThresholdFilters"] & {
5860
+ /**
5861
+ * @description discriminator enum property added by openapi-typescript
5862
+ * @enum {string}
5863
+ */
5864
+ event: "price_threshold";
5865
+ }) | unknown | unknown;
5866
+ WsAlertPriceThresholdUnsubscribeMessage: ({
5867
+ /** @enum {string} */
5868
+ op: "unsubscribe";
5869
+ /** @enum {string} */
5870
+ event: "price_threshold";
5871
+ } & components["schemas"]["PriceThresholdFilters"] & {
5872
+ /**
5873
+ * @description discriminator enum property added by openapi-typescript
5874
+ * @enum {string}
5875
+ */
5876
+ event: "price_threshold";
5877
+ }) | unknown | unknown;
5878
+ /**
5879
+ * @description Pushed `price_threshold` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
5880
+ * @example {
5881
+ * "event": "price_threshold",
5882
+ * "timestamp": 1743500000000,
5883
+ * "data": {
5884
+ * "trader": "0x0000000000000000000000000000000000000000",
5885
+ * "taker": "0x0000000000000000000000000000000000000000",
5886
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656",
5887
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
5888
+ * "outcome": "Yes",
5889
+ * "outcome_index": 0,
5890
+ * "question": "Will this test webhook fire correctly?",
5891
+ * "market_slug": "test-market-0000000000",
5892
+ * "event_slug": "test-event-0000000000",
5893
+ * "trade_id": "00000000-0000-0000-0000-000000000000",
5894
+ * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
5895
+ * "block": 0,
5896
+ * "confirmed_at": 1700000000,
5897
+ * "amount_usd": 500,
5898
+ * "shares_amount": 666.67,
5899
+ * "fee": 2.5,
5900
+ * "side": "Buy",
5901
+ * "previous_price": 0.72,
5902
+ * "price": 0.75,
5903
+ * "probability": 0.75,
5904
+ * "direction": "up",
5905
+ * "threshold": 0.75
5906
+ * }
5907
+ * }
5908
+ */
5909
+ WsAlertPriceThresholdEvent: {
5910
+ /**
5911
+ * @description discriminator enum property added by openapi-typescript
5912
+ * @enum {string}
5913
+ */
5914
+ event: "price_threshold";
5915
+ /**
5916
+ * Format: int64
5917
+ * @description Unix timestamp in milliseconds
5918
+ */
5919
+ timestamp: number;
5920
+ data: components["schemas"]["PriceThresholdPayload"];
5921
+ };
5922
+ WsAlertMarketResolvedSubscribeMessage: {
5923
+ /** @enum {string} */
5924
+ op: "subscribe";
5925
+ /** @enum {string} */
5926
+ event: "market_resolved";
5927
+ } & components["schemas"]["MarketResolvedFilters"] & {
5928
+ /**
5929
+ * @description discriminator enum property added by openapi-typescript
5930
+ * @enum {string}
5931
+ */
5932
+ event: "market_resolved";
5933
+ };
5934
+ WsAlertMarketResolvedUnsubscribeMessage: {
5935
+ /** @enum {string} */
5936
+ op: "unsubscribe";
5937
+ /** @enum {string} */
5938
+ event: "market_resolved";
5939
+ } & components["schemas"]["MarketResolvedFilters"] & {
5940
+ /**
5941
+ * @description discriminator enum property added by openapi-typescript
5942
+ * @enum {string}
5943
+ */
5944
+ event: "market_resolved";
5945
+ };
5946
+ /**
5947
+ * @description Pushed `market_resolved` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
5948
+ * @example {
5949
+ * "event": "market_resolved",
5950
+ * "timestamp": 1743500000000,
5951
+ * "data": {
5952
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
5953
+ * "winning_outcome": "Yes",
5954
+ * "settled_price": 1,
5955
+ * "resolution_kind": "question_resolved",
5956
+ * "question": "Will this test webhook fire correctly?",
5957
+ * "market_slug": "test-market-0000000000",
5958
+ * "event_slug": "test-event-0000000000",
5959
+ * "image_url": "https://polymarket-upload.s3.us-east-2.amazonaws.com/test.png",
5960
+ * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
5961
+ * "block": 0,
5962
+ * "confirmed_at": 1700000000
5963
+ * }
5964
+ * }
5965
+ */
5966
+ WsAlertMarketResolvedEvent: {
5967
+ /**
5968
+ * @description discriminator enum property added by openapi-typescript
5969
+ * @enum {string}
5970
+ */
5971
+ event: "market_resolved";
5972
+ /**
5973
+ * Format: int64
5974
+ * @description Unix timestamp in milliseconds
5975
+ */
5976
+ timestamp: number;
5977
+ data: components["schemas"]["MarketResolvedPayload"];
5978
+ };
5979
+ WsAlertMarketDisputedSubscribeMessage: {
5980
+ /** @enum {string} */
5981
+ op: "subscribe";
5982
+ /** @enum {string} */
5983
+ event: "market_disputed";
5984
+ } & components["schemas"]["MarketDisputedFilters"] & {
5985
+ /**
5986
+ * @description discriminator enum property added by openapi-typescript
5987
+ * @enum {string}
5988
+ */
5989
+ event: "market_disputed";
5990
+ };
5991
+ WsAlertMarketDisputedUnsubscribeMessage: {
5992
+ /** @enum {string} */
5993
+ op: "unsubscribe";
5994
+ /** @enum {string} */
5995
+ event: "market_disputed";
5996
+ } & components["schemas"]["MarketDisputedFilters"] & {
5997
+ /**
5998
+ * @description discriminator enum property added by openapi-typescript
5999
+ * @enum {string}
6000
+ */
6001
+ event: "market_disputed";
6002
+ };
6003
+ /**
6004
+ * @description Pushed `market_disputed` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
6005
+ * @example {
6006
+ * "event": "market_disputed",
6007
+ * "timestamp": 1743500000000,
6008
+ * "data": {
6009
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
6010
+ * "dispute_kind": "dispute_price",
6011
+ * "disputer": "0x0000000000000000000000000000000000000000",
6012
+ * "proposer": "0x0000000000000000000000000000000000000001",
6013
+ * "proposed_outcome": "Yes",
6014
+ * "proposed_price": 1,
6015
+ * "question": "Will this test webhook fire correctly?",
6016
+ * "market_slug": "test-market-0000000000",
6017
+ * "event_slug": "test-event-0000000000",
6018
+ * "image_url": "https://polymarket-upload.s3.us-east-2.amazonaws.com/test.png",
6019
+ * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
6020
+ * "block": 0,
6021
+ * "confirmed_at": 1700000000
6022
+ * }
6023
+ * }
6024
+ */
6025
+ WsAlertMarketDisputedEvent: {
6026
+ /**
6027
+ * @description discriminator enum property added by openapi-typescript
6028
+ * @enum {string}
6029
+ */
6030
+ event: "market_disputed";
6031
+ /**
6032
+ * Format: int64
6033
+ * @description Unix timestamp in milliseconds
6034
+ */
6035
+ timestamp: number;
6036
+ data: components["schemas"]["MarketDisputedPayload"];
6037
+ };
5425
6038
  WsAlertMarketCreatedSubscribeMessage: {
5426
6039
  /** @enum {string} */
5427
6040
  op: "subscribe";
@@ -5656,11 +6269,11 @@ export interface components {
5656
6269
  data: components["schemas"]["AssetPriceWindowUpdatePayload"];
5657
6270
  };
5658
6271
  /** @description Typed subscribe request for the alerts WebSocket. The request shape depends on `event`; filters follow the schema associated with that event type. */
5659
- WsAlertSubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketSubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderTradeEventSubscribeMessage"] | components["schemas"]["WsAlertTraderGlobalPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderMarketPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderCategoryPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderPositionResolvedSubscribeMessage"] | components["schemas"]["WsAlertTraderPnlExitsSubscribeMessage"] | components["schemas"]["WsAlertPositionHolderMetricsSubscribeMessage"] | components["schemas"]["WsAlertConditionHolderMetricsSubscribeMessage"] | components["schemas"]["WsAlertEventHolderMetricsSubscribeMessage"] | components["schemas"]["WsAlertConditionMetricsSubscribeMessage"] | components["schemas"]["WsAlertEventMetricsSubscribeMessage"] | components["schemas"]["WsAlertTagMetricsSubscribeMessage"] | components["schemas"]["WsAlertPositionMetricsSubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertEventVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertProbabilitySpikeSubscribeMessage"] | components["schemas"]["WsAlertPriceSpikeSubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertEventVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertCloseToBondSubscribeMessage"] | components["schemas"]["WsAlertMarketCreatedSubscribeMessage"] | components["schemas"]["WsAlertOracleEventsSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateSubscribeMessage"];
6272
+ WsAlertSubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketSubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderTradeEventSubscribeMessage"] | components["schemas"]["WsAlertTraderGlobalPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderMarketPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderCategoryPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderPositionResolvedSubscribeMessage"] | components["schemas"]["WsAlertTraderPnlExitsSubscribeMessage"] | components["schemas"]["WsAlertPositionHolderMetricsSubscribeMessage"] | components["schemas"]["WsAlertConditionHolderMetricsSubscribeMessage"] | components["schemas"]["WsAlertEventHolderMetricsSubscribeMessage"] | components["schemas"]["WsAlertConditionMetricsSubscribeMessage"] | components["schemas"]["WsAlertEventMetricsSubscribeMessage"] | components["schemas"]["WsAlertTagMetricsSubscribeMessage"] | components["schemas"]["WsAlertPositionMetricsSubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertEventVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertProbabilitySpikeSubscribeMessage"] | components["schemas"]["WsAlertPriceSpikeSubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertEventVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertCloseToBondSubscribeMessage"] | components["schemas"]["WsAlertPriceThresholdSubscribeMessage"] | components["schemas"]["WsAlertMarketResolvedSubscribeMessage"] | components["schemas"]["WsAlertMarketDisputedSubscribeMessage"] | components["schemas"]["WsAlertMarketCreatedSubscribeMessage"] | components["schemas"]["WsAlertOracleEventsSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateSubscribeMessage"];
5660
6273
  /** @description Typed unsubscribe request for the alerts WebSocket. The request shape depends on `event` and must match the original subscription filters. */
5661
- WsAlertUnsubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketUnsubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderTradeEventUnsubscribeMessage"] | components["schemas"]["WsAlertTraderGlobalPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderMarketPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderCategoryPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderPositionResolvedUnsubscribeMessage"] | components["schemas"]["WsAlertTraderPnlExitsUnsubscribeMessage"] | components["schemas"]["WsAlertPositionHolderMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertConditionHolderMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertEventHolderMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertConditionMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertEventMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertTagMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertPositionMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertEventVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertProbabilitySpikeUnsubscribeMessage"] | components["schemas"]["WsAlertPriceSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertEventVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertCloseToBondUnsubscribeMessage"] | components["schemas"]["WsAlertMarketCreatedUnsubscribeMessage"] | components["schemas"]["WsAlertOracleEventsUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateUnsubscribeMessage"];
6274
+ WsAlertUnsubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketUnsubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderTradeEventUnsubscribeMessage"] | components["schemas"]["WsAlertTraderGlobalPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderMarketPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderCategoryPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderPositionResolvedUnsubscribeMessage"] | components["schemas"]["WsAlertTraderPnlExitsUnsubscribeMessage"] | components["schemas"]["WsAlertPositionHolderMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertConditionHolderMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertEventHolderMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertConditionMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertEventMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertTagMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertPositionMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertEventVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertProbabilitySpikeUnsubscribeMessage"] | components["schemas"]["WsAlertPriceSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertEventVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertCloseToBondUnsubscribeMessage"] | components["schemas"]["WsAlertPriceThresholdUnsubscribeMessage"] | components["schemas"]["WsAlertMarketResolvedUnsubscribeMessage"] | components["schemas"]["WsAlertMarketDisputedUnsubscribeMessage"] | components["schemas"]["WsAlertMarketCreatedUnsubscribeMessage"] | components["schemas"]["WsAlertOracleEventsUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateUnsubscribeMessage"];
5662
6275
  /** @description Typed pushed-event envelope for the alerts WebSocket. The `data` payload depends on `event` and matches the corresponding HTTP webhook payload schema. */
5663
- WsAlertEventPayload: components["schemas"]["WsAlertTraderFirstTradeEvent"] | components["schemas"]["WsAlertTraderNewMarketEvent"] | components["schemas"]["WsAlertTraderWhaleTradeEvent"] | components["schemas"]["WsAlertTraderNewTradeEvent"] | components["schemas"]["WsAlertTraderTradeEventEvent"] | components["schemas"]["WsAlertTraderGlobalPnlEvent"] | components["schemas"]["WsAlertTraderMarketPnlEvent"] | components["schemas"]["WsAlertTraderCategoryPnlEvent"] | components["schemas"]["WsAlertTraderPositionResolvedEvent"] | components["schemas"]["WsAlertTraderPnlExitsEvent"] | components["schemas"]["WsAlertPositionHolderMetricsEvent"] | components["schemas"]["WsAlertConditionHolderMetricsEvent"] | components["schemas"]["WsAlertEventHolderMetricsEvent"] | components["schemas"]["WsAlertConditionMetricsEvent"] | components["schemas"]["WsAlertEventMetricsEvent"] | components["schemas"]["WsAlertTagMetricsEvent"] | components["schemas"]["WsAlertPositionMetricsEvent"] | components["schemas"]["WsAlertMarketVolumeMilestoneEvent"] | components["schemas"]["WsAlertEventVolumeMilestoneEvent"] | components["schemas"]["WsAlertPositionVolumeMilestoneEvent"] | components["schemas"]["WsAlertProbabilitySpikeEvent"] | components["schemas"]["WsAlertPriceSpikeEvent"] | components["schemas"]["WsAlertMarketVolumeSpikeEvent"] | components["schemas"]["WsAlertEventVolumeSpikeEvent"] | components["schemas"]["WsAlertPositionVolumeSpikeEvent"] | components["schemas"]["WsAlertCloseToBondEvent"] | components["schemas"]["WsAlertMarketCreatedEvent"] | components["schemas"]["WsAlertOracleEventsEvent"] | components["schemas"]["WsAlertAssetPriceTickEvent"] | components["schemas"]["WsAlertAssetPriceWindowUpdateEvent"];
6276
+ WsAlertEventPayload: components["schemas"]["WsAlertTraderFirstTradeEvent"] | components["schemas"]["WsAlertTraderNewMarketEvent"] | components["schemas"]["WsAlertTraderWhaleTradeEvent"] | components["schemas"]["WsAlertTraderNewTradeEvent"] | components["schemas"]["WsAlertTraderTradeEventEvent"] | components["schemas"]["WsAlertTraderGlobalPnlEvent"] | components["schemas"]["WsAlertTraderMarketPnlEvent"] | components["schemas"]["WsAlertTraderCategoryPnlEvent"] | components["schemas"]["WsAlertTraderPositionResolvedEvent"] | components["schemas"]["WsAlertTraderPnlExitsEvent"] | components["schemas"]["WsAlertPositionHolderMetricsEvent"] | components["schemas"]["WsAlertConditionHolderMetricsEvent"] | components["schemas"]["WsAlertEventHolderMetricsEvent"] | components["schemas"]["WsAlertConditionMetricsEvent"] | components["schemas"]["WsAlertEventMetricsEvent"] | components["schemas"]["WsAlertTagMetricsEvent"] | components["schemas"]["WsAlertPositionMetricsEvent"] | components["schemas"]["WsAlertMarketVolumeMilestoneEvent"] | components["schemas"]["WsAlertEventVolumeMilestoneEvent"] | components["schemas"]["WsAlertPositionVolumeMilestoneEvent"] | components["schemas"]["WsAlertProbabilitySpikeEvent"] | components["schemas"]["WsAlertPriceSpikeEvent"] | components["schemas"]["WsAlertMarketVolumeSpikeEvent"] | components["schemas"]["WsAlertEventVolumeSpikeEvent"] | components["schemas"]["WsAlertPositionVolumeSpikeEvent"] | components["schemas"]["WsAlertCloseToBondEvent"] | components["schemas"]["WsAlertPriceThresholdEvent"] | components["schemas"]["WsAlertMarketResolvedEvent"] | components["schemas"]["WsAlertMarketDisputedEvent"] | components["schemas"]["WsAlertMarketCreatedEvent"] | components["schemas"]["WsAlertOracleEventsEvent"] | components["schemas"]["WsAlertAssetPriceTickEvent"] | components["schemas"]["WsAlertAssetPriceWindowUpdateEvent"];
5664
6277
  };
5665
6278
  responses: never;
5666
6279
  parameters: never;
@@ -5697,6 +6310,9 @@ export interface WsAlertSubscribeMap {
5697
6310
  event_volume_spike: components["schemas"]["WsAlertEventVolumeSpikeSubscribeMessage"];
5698
6311
  position_volume_spike: components["schemas"]["WsAlertPositionVolumeSpikeSubscribeMessage"];
5699
6312
  close_to_bond: components["schemas"]["WsAlertCloseToBondSubscribeMessage"];
6313
+ price_threshold: components["schemas"]["WsAlertPriceThresholdSubscribeMessage"];
6314
+ market_resolved: components["schemas"]["WsAlertMarketResolvedSubscribeMessage"];
6315
+ market_disputed: components["schemas"]["WsAlertMarketDisputedSubscribeMessage"];
5700
6316
  market_created: components["schemas"]["WsAlertMarketCreatedSubscribeMessage"];
5701
6317
  oracle_events: components["schemas"]["WsAlertOracleEventsSubscribeMessage"];
5702
6318
  asset_price_tick: components["schemas"]["WsAlertAssetPriceTickSubscribeMessage"];
@@ -5729,6 +6345,9 @@ export interface WsAlertEventDataMap {
5729
6345
  event_volume_spike: components["schemas"]["EventVolumeSpikePayload"];
5730
6346
  position_volume_spike: components["schemas"]["PositionVolumeSpikePayload"];
5731
6347
  close_to_bond: components["schemas"]["CloseToBondPayload"];
6348
+ price_threshold: components["schemas"]["PriceThresholdPayload"];
6349
+ market_resolved: components["schemas"]["MarketResolvedPayload"];
6350
+ market_disputed: components["schemas"]["MarketDisputedPayload"];
5732
6351
  market_created: components["schemas"]["MarketCreatedPayload"];
5733
6352
  oracle_events: components["schemas"]["OracleEventTyped"];
5734
6353
  asset_price_tick: components["schemas"]["AssetPriceTickPayload"];