@structbuild/sdk 0.5.1 → 0.5.3

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.
@@ -86,111 +86,192 @@ export interface components {
86
86
  slug?: string | null;
87
87
  event_slug?: string | null;
88
88
  };
89
- /** @description Payload delivered on every raw Chainlink price tick for a tracked crypto asset */
89
+ /** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
90
+ AssetPriceTickFilters: {
91
+ /** @description Restrict to these crypto assets. Empty = all assets. */
92
+ asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
93
+ };
94
+ /** @description Webhook payload for an asset price tick. */
90
95
  AssetPriceTickPayload: {
96
+ /** @description Asset symbol */
97
+ symbol: components["schemas"]["WebhookAssetSymbol"];
91
98
  /**
92
- * @description Asset symbol
93
- * @enum {string}
99
+ * Format: double
100
+ * @description Current price from the Chainlink feed
94
101
  */
95
- symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
96
- /** @description Current asset price in USD from the Chainlink feed */
97
102
  price: number;
98
103
  /**
99
104
  * Format: int64
100
- * @description Tick timestamp (milliseconds since Unix epoch)
105
+ * @description Tick timestamp as reported by the WebSocket feed (milliseconds since epoch)
101
106
  */
102
107
  timestamp_ms: number;
103
108
  };
104
- /** @description Payload delivered twice per candle — once on open and once on close. `close_price` is 0.0 on the "open" update. */
109
+ /** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
110
+ AssetPriceWindowUpdateFilters: {
111
+ /** @description Restrict to these crypto assets. Empty = all assets. */
112
+ asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
113
+ /** @description Restrict to these candle sizes. Empty = all sizes. */
114
+ timeframes?: components["schemas"]["AssetWindowFilterTimeframe"][] | null;
115
+ };
116
+ /** @description Webhook payload for an asset price window open or close. */
105
117
  AssetPriceWindowUpdatePayload: {
106
- /**
107
- * @description Asset symbol
108
- * @enum {string}
109
- */
110
- symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
111
- /**
112
- * @description Candle / window size
113
- * @enum {string}
114
- */
115
- variant: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
118
+ /** @description Asset symbol */
119
+ symbol: components["schemas"]["WebhookAssetSymbol"];
120
+ /** @description Time-window variant */
121
+ variant: components["schemas"]["AssetPriceWindowVariant"];
116
122
  /**
117
123
  * Format: int64
118
- * @description Window start timestamp (milliseconds since Unix epoch)
124
+ * @description Window start timestamp (milliseconds since epoch)
119
125
  */
120
126
  start_time: number;
121
127
  /**
122
128
  * Format: int64
123
- * @description Window end timestamp (milliseconds since Unix epoch)
129
+ * @description Window end timestamp (milliseconds since epoch)
124
130
  */
125
131
  end_time: number;
126
- /** @description Opening price at start_time (USD) */
132
+ /**
133
+ * Format: double
134
+ * @description Opening price at start_time
135
+ */
127
136
  open_price: number;
128
- /** @description Closing price at end_time (USD). 0.0 when update_type is "open" (not yet available). */
137
+ /**
138
+ * Format: double
139
+ * @description Closing price at end_time (0.0 on an "open" update — not yet available)
140
+ */
129
141
  close_price: number;
142
+ /** @description "open" when the window starts, "close" when the window is complete */
143
+ update_type: components["schemas"]["AssetPriceWindowUpdateType"];
144
+ };
145
+ /**
146
+ * @description Whether this update is the open or the close of a candle.
147
+ * @enum {string}
148
+ */
149
+ AssetPriceWindowUpdateType: "open" | "close";
150
+ /**
151
+ * @description Time-window variant emitted by the asset price window stream.
152
+ * @enum {string}
153
+ */
154
+ AssetPriceWindowVariant: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
155
+ /**
156
+ * @description Candle sizes accepted by `asset_price_window_update.timeframes`.
157
+ * @enum {string}
158
+ */
159
+ AssetWindowFilterTimeframe: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
160
+ /**
161
+ * @description Subscription filters for the `close_to_bond` event. At least one of
162
+ * `min_probability` or `max_probability` is required (enforced at runtime).
163
+ */
164
+ CloseToBondFilters: {
130
165
  /**
131
- * @description "open" when the candle opens, "close" when it closes with a confirmed price
132
- * @enum {string}
166
+ * Format: double
167
+ * @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.
133
168
  */
134
- update_type: "open" | "close";
169
+ min_probability?: number | null;
170
+ /**
171
+ * Format: double
172
+ * @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO).
173
+ */
174
+ max_probability?: number | null;
175
+ /** @description Restrict to these markets. */
176
+ condition_ids?: string[] | null;
177
+ /** @description Restrict to these outcome token IDs. */
178
+ position_ids?: string[] | null;
179
+ /** @description Restrict to markets in these events. */
180
+ event_slugs?: string[] | null;
181
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
182
+ outcomes?: string[] | null;
183
+ /** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
184
+ position_outcome_indices?: number[] | null;
185
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
186
+ exclude_shortterm_markets?: boolean | null;
135
187
  };
136
- /** @description Payload delivered when a trade occurs at a near-certain-outcome price */
188
+ /** @description Close-to-bond webhook payload */
137
189
  CloseToBondPayload: {
138
- /** @description Limit-order maker wallet address (lowercase) */
190
+ /** @description Trader address (the limit-order maker) */
139
191
  trader: string;
140
- /** @description Order filler wallet address (lowercase) */
192
+ /** @description Taker address (the order filler often the exchange contract) */
141
193
  taker: string;
142
- /** @description ERC-1155 outcome token ID */
194
+ /** @description Position ID (ERC1155 token ID) */
143
195
  position_id: string;
144
- /** @description Parent market condition ID */
196
+ /** @description Condition ID (parent market) */
145
197
  condition_id?: string | null;
146
198
  /** @description Outcome name (e.g. "Yes", "No") */
147
199
  outcome?: string | null;
148
- /** @description 0 = Yes/Up, 1 = No */
200
+ /**
201
+ * Format: int32
202
+ * @description Outcome index (0 = Yes/Up, 1 = No). Position 0 usually represents Yes/Up.
203
+ */
149
204
  outcome_index?: number | null;
205
+ /** @description Market question */
150
206
  question?: string | null;
207
+ /** @description Market slug */
151
208
  market_slug?: string | null;
209
+ /** @description Event slug */
152
210
  event_slug?: string | null;
211
+ /** @description Trade ID */
153
212
  trade_id: string;
154
213
  /** @description Transaction hash */
155
214
  hash: string;
156
- /** Format: int64 */
215
+ /**
216
+ * Format: int64
217
+ * @description Block number
218
+ */
157
219
  block: number;
158
220
  /**
159
221
  * Format: int64
160
- * @description Unix seconds
222
+ * @description Confirmed timestamp (Unix seconds)
161
223
  */
162
224
  confirmed_at: number;
163
- /** @description USD size of the trade */
225
+ /**
226
+ * Format: double
227
+ * @description USD size of the trade
228
+ */
164
229
  amount_usd: number;
230
+ /**
231
+ * Format: double
232
+ * @description Outcome shares traded
233
+ */
165
234
  shares_amount: number;
166
- /** @description Fee paid in USD */
235
+ /**
236
+ * Format: double
237
+ * @description Fee paid (USD)
238
+ */
167
239
  fee: number;
168
- /** @enum {string} */
169
- side: "Buy" | "Sell";
170
- /** @description Price that triggered the notification (0.0–1.0) */
240
+ /** @description Trade side ("Buy" or "Sell") */
241
+ side: string;
242
+ /**
243
+ * Format: double
244
+ * @description Price per share (0.0–1.0) — the value that triggered the notification
245
+ */
171
246
  price: number;
172
- /** @description Implied probability (0.0–1.0) */
247
+ /**
248
+ * Format: double
249
+ * @description Implied probability of the outcome (0.0–1.0)
250
+ */
173
251
  probability?: number | null;
252
+ /** @description Which bond zone was entered: `"high"` (YES near-certain) or `"low"` (NO near-certain) */
253
+ bond_side: string;
174
254
  /**
175
- * @description "high" when near YES (price ≥ threshold), "low" when near NO (price ≤ threshold)
176
- * @enum {string}
255
+ * Format: double
256
+ * @description The probability threshold from the subscriber's filter that was breached
177
257
  */
178
- bond_side: "high" | "low";
179
- /** @description The probability threshold from the subscription filter that was breached */
180
258
  threshold: number;
181
259
  };
182
260
  /** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
183
261
  ConditionMetricsPayload: {
184
262
  /** @description Market condition ID */
185
263
  condition_id?: string | null;
264
+ /** @description Aggregation window */
265
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
186
266
  /**
187
- * @description Aggregation window
188
- * @enum {string|null}
267
+ * Format: double
268
+ * @description Total trading volume in USD for this timeframe
189
269
  */
190
- timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
191
- /** @description Total trading volume in USD for this timeframe */
192
270
  volume_usd?: number | null;
193
- /** @description Total fees collected in USD */
271
+ /**
272
+ * Format: double
273
+ * @description Total fees collected in USD
274
+ */
194
275
  fees?: number | null;
195
276
  /**
196
277
  * Format: int64
@@ -272,18 +353,43 @@ export interface components {
272
353
  slug?: string | null;
273
354
  event_slug?: string | null;
274
355
  };
356
+ /** @description Subscription filters for the `event_metrics` event. All fields are optional. */
357
+ EventMetricsFilters: {
358
+ /** @description Restrict to these events. Empty = all events. */
359
+ event_slugs?: string[] | null;
360
+ /** @description Restrict to these aggregation windows. */
361
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
362
+ /**
363
+ * Format: double
364
+ * @description Only fire when aggregated event volume ≥ this value (USD).
365
+ */
366
+ min_volume_usd?: number | null;
367
+ /** Format: double */
368
+ max_volume_usd?: number | null;
369
+ /** Format: int64 */
370
+ min_txns?: number | null;
371
+ /** Format: int64 */
372
+ min_unique_traders?: number | null;
373
+ /** Format: double */
374
+ min_fees?: number | null;
375
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
376
+ exclude_shortterm_markets?: boolean | null;
377
+ };
275
378
  /** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
276
379
  EventMetricsPayload: {
277
380
  /** @description Event slug */
278
381
  event_slug?: string | null;
382
+ /** @description Aggregation window */
383
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
279
384
  /**
280
- * @description Aggregation window
281
- * @enum {string|null}
385
+ * Format: double
386
+ * @description Total aggregated volume across all markets in the event (USD)
282
387
  */
283
- timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
284
- /** @description Total aggregated volume across all markets in the event (USD) */
285
388
  volume_usd?: number | null;
286
- /** @description Total fees collected in USD */
389
+ /**
390
+ * Format: double
391
+ * @description Total fees collected in USD
392
+ */
287
393
  fees?: number | null;
288
394
  /**
289
395
  * Format: int64
@@ -296,21 +402,13 @@ export interface components {
296
402
  */
297
403
  unique_traders?: number | null;
298
404
  };
299
- /** @description Payload delivered when a trader's per-event PnL crosses a configured threshold */
405
+ /** @description Event PnL webhook payload (Arc-optimized) */
300
406
  EventPnlPayload: {
301
- /** @description Trader wallet address (lowercase) */
302
407
  trader?: string | null;
303
- /** @description Event slug */
304
408
  event_slug?: string | null;
305
- /**
306
- * @description PnL aggregation window
307
- * @enum {string}
308
- */
309
- timeframe: "1d" | "7d" | "30d" | "lifetime";
310
- /**
311
- * Format: int64
312
- * @description Number of distinct markets traded in this event
313
- */
409
+ /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
410
+ timeframe: string;
411
+ /** Format: int64 */
314
412
  markets_traded?: number | null;
315
413
  /** Format: int64 */
316
414
  outcomes_traded?: number | null;
@@ -322,44 +420,58 @@ export interface components {
322
420
  total_redemptions?: number | null;
323
421
  /** Format: int64 */
324
422
  total_merges?: number | null;
325
- /** @description Total volume in USD */
423
+ /** Format: double */
326
424
  total_volume_usd?: number | null;
425
+ /** Format: double */
327
426
  buy_usd?: number | null;
427
+ /** Format: double */
328
428
  sell_usd?: number | null;
429
+ /** Format: double */
329
430
  redemption_usd?: number | null;
431
+ /** Format: double */
330
432
  merge_usd?: number | null;
331
- /** @description Realized PnL in USD for this event */
433
+ /** Format: double */
332
434
  realized_pnl_usd?: number | null;
333
435
  /** Format: int64 */
334
436
  winning_markets?: number | null;
335
437
  /** Format: int64 */
336
438
  losing_markets?: number | null;
439
+ /** Format: double */
337
440
  total_fees?: number | null;
338
- /**
339
- * Format: int64
340
- * @description Unix seconds
341
- */
441
+ /** Format: int64 */
342
442
  first_trade_at?: number | null;
343
- /**
344
- * Format: int64
345
- * @description Unix seconds
346
- */
443
+ /** Format: int64 */
347
444
  last_trade_at?: number | null;
348
445
  };
349
- /** @description Payload delivered when an event's aggregated trading volume crosses a USD milestone */
446
+ /** @description Subscription filters for the `event_volume_milestone` event. */
447
+ EventVolumeMilestoneFilters: {
448
+ /** @description **Required.** Aggregation windows to monitor. */
449
+ timeframes: components["schemas"]["MetricFilterTimeframe"][];
450
+ /** @description Restrict to these events. */
451
+ event_slugs?: string[] | null;
452
+ /** @description Specific USD milestones to trigger on. */
453
+ milestone_amounts?: number[] | null;
454
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
455
+ exclude_shortterm_markets?: boolean | null;
456
+ };
457
+ /** @description Event volume milestone webhook payload */
350
458
  EventVolumeMilestonePayload: {
351
- /** @description Event slug */
352
459
  event_slug: string;
460
+ timeframe: string;
353
461
  /**
354
- * @description Aggregation window
355
- * @enum {string}
462
+ * Format: double
463
+ * @description Milestone amount reached (USD)
356
464
  */
357
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
358
- /** @description The USD milestone amount that was crossed */
359
465
  milestone_usd: number;
360
- /** @description Current aggregated event volume at time of trigger (USD) */
466
+ /**
467
+ * Format: double
468
+ * @description Current volume (USD) that triggered the milestone
469
+ */
361
470
  current_volume_usd: number;
362
- /** @description Total fees in USD for this timeframe */
471
+ /**
472
+ * Format: double
473
+ * @description Total fees collected in this timeframe
474
+ */
363
475
  fees: number;
364
476
  /**
365
477
  * Format: int64
@@ -367,25 +479,60 @@ export interface components {
367
479
  */
368
480
  txns: number;
369
481
  };
370
- /** @description Payload delivered when an event's aggregated volume has spiked since the last snapshot */
482
+ /** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
483
+ EventVolumeSpikeFilters: {
484
+ /**
485
+ * Format: double
486
+ * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
487
+ */
488
+ spike_ratio: number;
489
+ /**
490
+ * Format: int64
491
+ * @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
492
+ */
493
+ window_secs?: number | null;
494
+ /** @description Restrict to these events. */
495
+ event_slugs?: string[] | null;
496
+ /** @description Restrict to these aggregation windows. */
497
+ timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
498
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
499
+ exclude_shortterm_markets?: boolean | null;
500
+ };
501
+ /** @description Event volume spike webhook payload */
371
502
  EventVolumeSpikePayload: {
372
- /** @description Event slug */
373
503
  event_slug: string;
504
+ event_title?: string | null;
505
+ image_url?: string | null;
506
+ timeframe: string;
374
507
  /**
375
- * @description Aggregation window
376
- * @enum {string}
508
+ * Format: double
509
+ * @description Current aggregated event volume at the time of the spike (USD)
377
510
  */
378
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
379
- /** @description Current aggregated event volume at time of the spike (USD) */
380
511
  current_volume_usd: number;
381
- /** @description Volume at the snapshot baseline (USD) */
512
+ /**
513
+ * Format: double
514
+ * @description Volume at the snapshot baseline (USD)
515
+ */
382
516
  snapshot_volume_usd: number;
383
- /** @description New volume since the snapshot that triggered this notification (USD) */
517
+ /**
518
+ * Format: double
519
+ * @description New volume since the snapshot that triggered this notification (USD)
520
+ */
384
521
  delta_volume_usd: number;
385
- /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
522
+ /**
523
+ * Format: double
524
+ * @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
525
+ */
386
526
  spike_pct: number;
387
- /** Format: int64 */
527
+ /**
528
+ * Format: int64
529
+ * @description Total transactions in this timeframe
530
+ */
388
531
  txns: number;
532
+ /**
533
+ * Format: double
534
+ * @description Total fees in this timeframe
535
+ */
389
536
  fees: number;
390
537
  };
391
538
  /** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
@@ -400,7 +547,10 @@ export interface components {
400
547
  condition_id?: string | null;
401
548
  /** @description Outcome name (e.g. "Yes", "No") */
402
549
  outcome?: string | null;
403
- /** @description Outcome index: 0 = Yes/Up, 1 = No */
550
+ /**
551
+ * Format: int32
552
+ * @description Outcome index: 0 = Yes/Up, 1 = No
553
+ */
404
554
  outcome_index?: number | null;
405
555
  /** @description Market question text */
406
556
  question?: string | null;
@@ -422,148 +572,128 @@ export interface components {
422
572
  * @description Block confirmation timestamp (Unix seconds)
423
573
  */
424
574
  confirmed_at: number;
425
- /** @description USD size of the trade (6 decimal places) */
575
+ /**
576
+ * Format: double
577
+ * @description USD size of the trade (6 decimal places)
578
+ */
426
579
  amount_usd: number;
427
- /** @description Outcome shares traded (6 decimal places) */
428
- shares_amount: number;
429
- /** @description Fee paid in USD (6 decimal places) */
430
- fee: number;
431
580
  /**
432
- * @description Trade direction
433
- * @enum {string}
581
+ * Format: double
582
+ * @description Outcome shares traded (6 decimal places)
434
583
  */
435
- side: "Buy" | "Sell";
436
- /** @description Outcome token price (0.0–1.0) */
437
- price: number;
584
+ shares_amount: number;
438
585
  /**
439
- * @description Exchange contract that processed the trade
440
- * @enum {string}
586
+ * Format: double
587
+ * @description Fee paid in USD (6 decimal places)
441
588
  */
442
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
589
+ fee: number;
590
+ /** @description Trade direction */
591
+ side: "Buy" | "Sell";
443
592
  /**
444
- * @description Trade type (webhook events only fire on order fills)
445
- * @enum {string}
593
+ * Format: double
594
+ * @description Outcome token price (0.0–1.0)
446
595
  */
596
+ price: number;
597
+ /** @description Exchange contract that processed the trade */
598
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
599
+ /** @description Trade type (webhook events only fire on order fills) */
447
600
  trade_type: "OrderFilled" | "OrdersMatched";
448
601
  };
449
- /** @description Payload delivered when a trader's global PnL (across all markets) crosses a configured threshold */
602
+ /** @description Global PnL webhook payload (Arc-optimized) */
450
603
  GlobalPnlPayload: {
451
- /** @description Trader wallet address (lowercase) */
452
604
  trader?: string | null;
453
- /**
454
- * @description PnL aggregation window
455
- * @enum {string}
456
- */
457
- timeframe: "1d" | "7d" | "30d" | "lifetime";
458
- /** @description Realized PnL in USD (positive = profit, negative = loss) */
605
+ /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
606
+ timeframe: string;
607
+ /** Format: double */
459
608
  realized_pnl_usd?: number | null;
460
- /**
461
- * Format: int64
462
- * @description Number of distinct events traded
463
- */
609
+ /** Format: int64 */
464
610
  events_traded?: number | null;
465
- /**
466
- * Format: int64
467
- * @description Number of distinct markets traded
468
- */
611
+ /** Format: int64 */
469
612
  markets_traded?: number | null;
470
- /**
471
- * Format: int64
472
- * @description Total buy transactions
473
- */
613
+ /** Format: int64 */
474
614
  total_buys?: number | null;
475
- /**
476
- * Format: int64
477
- * @description Total sell transactions
478
- */
615
+ /** Format: int64 */
479
616
  total_sells?: number | null;
480
- /**
481
- * Format: int64
482
- * @description Total redemption transactions
483
- */
617
+ /** Format: int64 */
484
618
  total_redemptions?: number | null;
485
- /**
486
- * Format: int64
487
- * @description Total merge transactions
488
- */
619
+ /** Format: int64 */
489
620
  total_merges?: number | null;
490
- /** @description Total USD volume (buys + sells + redemptions + merges) */
621
+ /** Format: double */
491
622
  total_volume_usd?: number | null;
492
- /** @description Total buy volume in USD */
623
+ /** Format: double */
493
624
  buy_volume_usd?: number | null;
494
- /** @description Total sell volume in USD */
625
+ /** Format: double */
495
626
  sell_volume_usd?: number | null;
496
- /** @description Total redemption volume in USD */
627
+ /** Format: double */
497
628
  redemption_volume_usd?: number | null;
498
- /** @description Total merge volume in USD */
629
+ /** Format: double */
499
630
  merge_volume_usd?: number | null;
500
- /**
501
- * Format: int64
502
- * @description Number of markets where trader realised a profit
503
- */
631
+ /** Format: int64 */
504
632
  markets_won?: number | null;
505
- /**
506
- * Format: int64
507
- * @description Number of markets where trader realised a loss
508
- */
633
+ /** Format: int64 */
509
634
  markets_lost?: number | null;
510
- /** @description Market win rate as a percentage (0.0–100.0) */
635
+ /** Format: double */
511
636
  market_win_rate_pct?: number | null;
512
- /** @description Average PnL per market in USD */
637
+ /** Format: double */
513
638
  avg_pnl_per_market?: number | null;
514
- /** @description Average PnL per trade in USD */
639
+ /** Format: double */
515
640
  avg_pnl_per_trade?: number | null;
516
- /** @description Average hold time across all positions (seconds) */
641
+ /** Format: double */
517
642
  avg_hold_time_seconds?: number | null;
518
- /** @description Total fees paid in USD */
643
+ /** Format: double */
519
644
  total_fees?: number | null;
520
- /** @description Best single-trade PnL in USD */
645
+ /** Format: double */
521
646
  best_trade_pnl_usd?: number | null;
522
- /** @description Condition ID of the best trade */
523
647
  best_trade_condition_id?: string | null;
524
- /**
525
- * Format: int64
526
- * @description Timestamp of the first trade (Unix seconds)
527
- */
648
+ /** Format: int64 */
528
649
  first_trade_at?: number | null;
529
- /**
530
- * Format: int64
531
- * @description Timestamp of the most recent trade (Unix seconds)
532
- */
650
+ /** Format: int64 */
533
651
  last_trade_at?: number | null;
534
652
  };
535
653
  /** @description Response for GET /v1/webhook/events */
536
654
  ListEventsResponse: {
537
655
  events: components["schemas"]["WebhookEventInfo"][];
538
656
  };
539
- /** @description An outcome entry within a newly created market */
657
+ /** @description Subscription filters for the `market_created` event. All fields are optional. */
658
+ MarketCreatedFilters: {
659
+ /** @description Restrict to markets with these tags or category names (case-insensitive match). */
660
+ tags?: string[] | null;
661
+ /** @description Restrict to markets belonging to these events. */
662
+ event_slugs?: string[] | null;
663
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
664
+ exclude_shortterm_markets?: boolean | null;
665
+ };
666
+ /** @description Outcome entry in the market created payload — mirrors `NewMarketOutcome` */
540
667
  MarketCreatedOutcome: {
541
- /** @description Outcome index (0 = Yes, 1 = No) */
668
+ /**
669
+ * Format: int32
670
+ * @description Outcome index (0 = Yes, 1 = No)
671
+ */
542
672
  index: number;
543
673
  /** @description Outcome name (e.g. "Yes", "No") */
544
674
  name: string;
545
- /** @description ERC-1155 position token ID for this outcome */
675
+ /** @description ERC1155 position token ID */
546
676
  position_id: string;
547
677
  };
548
- /** @description Payload delivered when a new prediction market is detected on-chain and enriched with Gamma API metadata */
678
+ /** @description Market created webhook payload mirrors `NewMarketPayload` field-for-field */
549
679
  MarketCreatedPayload: {
550
680
  /** @description Condition ID (0x-prefixed hex, lowercase) */
551
681
  condition_id: string;
552
682
  /** @description Market slug */
553
683
  market_slug: string;
554
- /** @description Parent event slug */
684
+ /** @description Event slug (parent event) */
555
685
  event_slug?: string | null;
556
- /** @description Parent event ID */
686
+ /** @description Event ID */
557
687
  event_id?: string | null;
558
- /** @description Parent event title */
688
+ /** @description Event title */
559
689
  event_title?: string | null;
560
- /** @description Series slug (for recurring markets) */
690
+ /** @description Series slug */
561
691
  series_slug?: string | null;
562
- /** @description List of market outcomes with their position IDs */
692
+ /** @description Outcomes with their position IDs, index, and name */
563
693
  outcomes: components["schemas"]["MarketCreatedOutcome"][];
564
- /** @description Full market question text */
694
+ /** @description Market question */
565
695
  question: string;
566
- /** @description Short display title */
696
+ /** @description Market title (short display name) */
567
697
  title?: string | null;
568
698
  /** @description Market description */
569
699
  description: string;
@@ -576,23 +706,46 @@ export interface components {
576
706
  /** @description Whether this is a neg-risk market */
577
707
  neg_risk: boolean;
578
708
  };
579
- /** @description Payload delivered when a trader's per-market PnL crosses a configured threshold */
580
- MarketPnlPayload: {
581
- /** @description Trader wallet address (lowercase) */
582
- trader?: string | null;
583
- /** @description Market condition ID */
584
- condition_id?: string | null;
585
- /** @description Parent event slug */
586
- event_slug?: string | null;
709
+ /** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
710
+ MarketMetricsFilters: {
711
+ /** @description Restrict to these markets. Empty = all markets. */
712
+ condition_ids?: string[] | null;
713
+ /** @description Restrict to these aggregation windows. Empty = all windows. */
714
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
587
715
  /**
588
- * @description PnL aggregation window
589
- * @enum {string}
716
+ * Format: double
717
+ * @description Only fire when volume ≥ this value (USD).
718
+ */
719
+ min_volume_usd?: number | null;
720
+ /**
721
+ * Format: double
722
+ * @description Only fire when volume ≤ this value (USD).
590
723
  */
591
- timeframe: "1d" | "7d" | "30d" | "lifetime";
724
+ max_volume_usd?: number | null;
592
725
  /**
593
726
  * Format: int64
594
- * @description Number of distinct outcomes traded in this market
727
+ * @description Only fire when transaction count this value.
728
+ */
729
+ min_txns?: number | null;
730
+ /**
731
+ * Format: int64
732
+ * @description Only fire when unique trader count ≥ this value.
595
733
  */
734
+ min_unique_traders?: number | null;
735
+ /**
736
+ * Format: double
737
+ * @description Only fire when total fees ≥ this value (USD).
738
+ */
739
+ min_fees?: number | null;
740
+ };
741
+ /** @description Market PnL webhook payload (Arc-optimized) */
742
+ MarketPnlPayload: {
743
+ trader?: string | null;
744
+ condition_id?: string | null;
745
+ event_slug?: string | null;
746
+ /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
747
+ timeframe: string;
748
+ /** Format: int64 */
596
749
  outcomes_traded?: number | null;
597
750
  /** Format: int64 */
598
751
  total_buys?: number | null;
@@ -602,59 +755,95 @@ export interface components {
602
755
  total_redemptions?: number | null;
603
756
  /** Format: int64 */
604
757
  total_merges?: number | null;
605
- /** @description Total buy volume in USD */
758
+ /** Format: double */
606
759
  buy_usd?: number | null;
607
- /** @description Total sell volume in USD */
760
+ /** Format: double */
608
761
  sell_usd?: number | null;
609
- /** @description Total redemption volume in USD */
762
+ /** Format: double */
610
763
  redemption_usd?: number | null;
611
- /** @description Total merge volume in USD */
764
+ /** Format: double */
612
765
  merge_usd?: number | null;
613
- /** @description Realized PnL in USD for this market */
766
+ /** Format: double */
614
767
  realized_pnl_usd?: number | null;
615
- /**
616
- * Format: int64
617
- * @description Number of outcomes with positive PnL
618
- */
768
+ /** Format: int64 */
619
769
  winning_outcomes?: number | null;
620
- /** @description Total fees paid in USD for this market */
770
+ /** Format: double */
621
771
  total_fees?: number | null;
772
+ /** Format: int64 */
773
+ first_trade_at?: number | null;
774
+ /** Format: int64 */
775
+ last_trade_at?: number | null;
776
+ };
777
+ /** @description Subscription filters for the `market_volume_milestone` event. */
778
+ MarketVolumeMilestoneFilters: {
779
+ /** @description **Required.** Aggregation windows to monitor (e.g. \["1h", "24h"\]). */
780
+ timeframes: components["schemas"]["MetricFilterTimeframe"][];
781
+ /** @description Restrict to these markets. Empty = all markets. */
782
+ condition_ids?: string[] | null;
783
+ /** @description Specific USD milestones to trigger on (e.g. \[10000, 100000, 1000000\]). Empty = all milestones. */
784
+ milestone_amounts?: number[] | null;
785
+ };
786
+ /** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
787
+ MarketVolumeSpikeFilters: {
622
788
  /**
623
- * Format: int64
624
- * @description Timestamp of first trade in market (Unix seconds)
789
+ * Format: double
790
+ * @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.
625
791
  */
626
- first_trade_at?: number | null;
792
+ spike_ratio: number;
627
793
  /**
628
794
  * Format: int64
629
- * @description Timestamp of most recent trade in market (Unix seconds)
795
+ * @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
630
796
  */
631
- last_trade_at?: number | null;
797
+ window_secs?: number | null;
798
+ /** @description Restrict to these markets. Empty = all markets. */
799
+ condition_ids?: string[] | null;
800
+ /** @description Restrict to these aggregation windows. Empty = all windows. */
801
+ timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
632
802
  };
633
- /** @description Payload delivered when a market's volume has spiked since the last snapshot */
803
+ /** @description Market volume spike webhook payload */
634
804
  MarketVolumeSpikePayload: {
635
- /** @description Market condition ID */
636
805
  condition_id: string;
806
+ question?: string | null;
807
+ market_slug?: string | null;
808
+ event_slug?: string | null;
809
+ image_url?: string | null;
810
+ timeframe: string;
637
811
  /**
638
- * @description Aggregation window
639
- * @enum {string}
812
+ * Format: double
813
+ * @description Current window volume at the time of the spike (USD)
640
814
  */
641
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
642
- /** @description Current volume at the time of the spike (USD) */
643
815
  current_volume_usd: number;
644
- /** @description Volume at the snapshot baseline (USD) */
816
+ /**
817
+ * Format: double
818
+ * @description Volume at the snapshot baseline (USD)
819
+ */
645
820
  snapshot_volume_usd: number;
646
- /** @description New volume since the snapshot that triggered this notification (USD) */
821
+ /**
822
+ * Format: double
823
+ * @description New volume since the snapshot that triggered this notification (USD)
824
+ */
647
825
  delta_volume_usd: number;
648
- /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
826
+ /**
827
+ * Format: double
828
+ * @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
829
+ */
649
830
  spike_pct: number;
650
831
  /**
651
832
  * Format: int64
652
833
  * @description Total transactions in this timeframe
653
834
  */
654
835
  txns: number;
655
- /** @description Total fees in USD for this timeframe */
836
+ /**
837
+ * Format: double
838
+ * @description Total fees in this timeframe
839
+ */
656
840
  fees: number;
657
841
  };
842
+ /**
843
+ * @description Aggregation windows emitted by the metrics / milestone streams.
844
+ * @enum {string}
845
+ */
846
+ MetricFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
658
847
  /** @description NegRisk Adapter: outcome reported for a neg-risk market question. */
659
848
  NegRiskOutcomeReportedEvent: {
660
849
  id: string;
@@ -689,7 +878,10 @@ export interface components {
689
878
  condition_id?: string | null;
690
879
  /** @description Outcome name (e.g. "Yes", "No") */
691
880
  outcome?: string | null;
692
- /** @description Outcome index: 0 = Yes/Up, 1 = No */
881
+ /**
882
+ * Format: int32
883
+ * @description Outcome index: 0 = Yes/Up, 1 = No
884
+ */
693
885
  outcome_index?: number | null;
694
886
  /** @description Market question text */
695
887
  question?: string | null;
@@ -711,32 +903,44 @@ export interface components {
711
903
  * @description Block confirmation timestamp (Unix seconds)
712
904
  */
713
905
  confirmed_at: number;
714
- /** @description USD size of the trade (6 decimal places) */
906
+ /**
907
+ * Format: double
908
+ * @description USD size of the trade (6 decimal places)
909
+ */
715
910
  amount_usd: number;
716
- /** @description Outcome shares traded (6 decimal places) */
911
+ /**
912
+ * Format: double
913
+ * @description Outcome shares traded (6 decimal places)
914
+ */
717
915
  shares_amount: number;
718
- /** @description Fee paid in USD (6 decimal places) */
719
- fee: number;
720
916
  /**
721
- * @description Trade direction
722
- * @enum {string}
917
+ * Format: double
918
+ * @description Fee paid in USD (6 decimal places)
723
919
  */
920
+ fee: number;
921
+ /** @description Trade direction */
724
922
  side: "Buy" | "Sell";
725
- /** @description Outcome token price (0.0–1.0) */
726
- price: number;
727
- /** @description Implied probability (0.0–1.0); null when outcome is unknown */
728
- probability?: number | null;
729
923
  /**
730
- * @description Exchange contract that processed the trade
731
- * @enum {string}
924
+ * Format: double
925
+ * @description Outcome token price (0.0–1.0)
732
926
  */
733
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
927
+ price: number;
734
928
  /**
735
- * @description Trade type (webhook events only fire on order fills)
736
- * @enum {string}
929
+ * Format: double
930
+ * @description Implied probability (0.0–1.0); null when outcome is unknown
737
931
  */
932
+ probability?: number | null;
933
+ /** @description Exchange contract that processed the trade */
934
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
935
+ /** @description Trade type (webhook events only fire on order fills) */
738
936
  trade_type: "OrderFilled" | "OrdersMatched";
739
937
  };
938
+ /**
939
+ * @description Trade types accepted by `trader_new_trade.trade_types`. Webhook fires on
940
+ * fill-style trades only.
941
+ * @enum {string}
942
+ */
943
+ NewTradeFilterType: "OrderFilled" | "OrdersMatched";
740
944
  /** @description Payload delivered on every order-filled trade */
741
945
  NewTradePayload: {
742
946
  /** @description Limit-order maker wallet address (lowercase) */
@@ -749,7 +953,10 @@ export interface components {
749
953
  condition_id?: string | null;
750
954
  /** @description Outcome name (e.g. "Yes", "No") */
751
955
  outcome?: string | null;
752
- /** @description Outcome index: 0 = Yes/Up, 1 = No */
956
+ /**
957
+ * Format: int32
958
+ * @description Outcome index: 0 = Yes/Up, 1 = No
959
+ */
753
960
  outcome_index?: number | null;
754
961
  /** @description Market question text */
755
962
  question?: string | null;
@@ -771,32 +978,43 @@ export interface components {
771
978
  * @description Block confirmation timestamp (Unix seconds)
772
979
  */
773
980
  confirmed_at: number;
774
- /** @description USD size of the trade (6 decimal places) */
981
+ /**
982
+ * Format: double
983
+ * @description USD size of the trade (6 decimal places)
984
+ */
775
985
  amount_usd: number;
776
- /** @description Outcome shares traded (6 decimal places) */
986
+ /**
987
+ * Format: double
988
+ * @description Outcome shares traded (6 decimal places)
989
+ */
777
990
  shares_amount: number;
778
- /** @description Fee paid in USD (6 decimal places) */
779
- fee: number;
780
991
  /**
781
- * @description Trade direction
782
- * @enum {string}
992
+ * Format: double
993
+ * @description Fee paid in USD (6 decimal places)
783
994
  */
995
+ fee: number;
996
+ /** @description Trade direction */
784
997
  side: "Buy" | "Sell";
785
- /** @description Outcome token price (0.0–1.0) */
786
- price: number;
787
- /** @description Implied probability (0.0–1.0); null when outcome is unknown */
788
- probability?: number | null;
789
998
  /**
790
- * @description Exchange contract that processed the trade
791
- * @enum {string}
999
+ * Format: double
1000
+ * @description Outcome token price (0.0–1.0)
792
1001
  */
793
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
1002
+ price: number;
794
1003
  /**
795
- * @description Trade type (webhook events only fire on order fills)
796
- * @enum {string}
1004
+ * Format: double
1005
+ * @description Implied probability (0.0–1.0); null when outcome is unknown
797
1006
  */
1007
+ probability?: number | null;
1008
+ /** @description Exchange contract that processed the trade */
1009
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
1010
+ /** @description Trade type (webhook events only fire on order fills) */
798
1011
  trade_type: "OrderFilled" | "OrdersMatched";
799
1012
  };
1013
+ /**
1014
+ * @description Oracle event variants accepted by `oracle_events.oracle_event_types`.
1015
+ * @enum {string}
1016
+ */
1017
+ OracleEventFilterType: "AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported";
800
1018
  /**
801
1019
  * @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
802
1020
  * and only includes fields relevant to each type.
@@ -853,6 +1071,18 @@ export interface components {
853
1071
  /** @enum {string} */
854
1072
  event_type: "NegRiskOutcomeReported";
855
1073
  });
1074
+ /** @description Subscription filters for the `oracle_events` event. All fields are optional. */
1075
+ OracleEventsFilters: {
1076
+ /** @description Restrict to these event types (case-insensitive). Empty = all. */
1077
+ oracle_event_types?: components["schemas"]["OracleEventFilterType"][] | null;
1078
+ /** @description Restrict to events for these condition IDs. */
1079
+ condition_ids?: string[] | null;
1080
+ };
1081
+ /**
1082
+ * @description PnL aggregation windows accepted by `*_pnl.timeframes`.
1083
+ * @enum {string}
1084
+ */
1085
+ PnlFilterTimeframe: "1d" | "7d" | "30d" | "lifetime";
856
1086
  /**
857
1087
  * @description PnL timeframe enum for webhook filtering
858
1088
  * @enum {string}
@@ -879,7 +1109,7 @@ export interface components {
879
1109
  * - volume_milestone: condition_ids, timeframes, milestone_amounts
880
1110
  * - 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
881
1111
  * - market_created: event_slugs, tags, exclude_shortterm_markets
882
- * - probability_spike: condition_ids, event_slugs, outcomes, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
1112
+ * - probability_spike: condition_ids, event_slugs, outcomes, min_probability, max_probability, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
883
1113
  * - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
884
1114
  * - trader_new_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
885
1115
  * - trader_trade_event: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
@@ -1050,6 +1280,44 @@ export interface components {
1050
1280
  */
1051
1281
  oracle_event_types?: string[];
1052
1282
  };
1283
+ /** @description Subscription filters for the `position_metrics` event. All fields are optional. */
1284
+ PositionMetricsFilters: {
1285
+ /** @description Restrict to these outcome token IDs. */
1286
+ position_ids?: string[] | null;
1287
+ /** @description Restrict to positions within these markets. */
1288
+ condition_ids?: string[] | null;
1289
+ /** @description Restrict to positions with these outcome names (e.g. \["Yes", "No"\]). */
1290
+ outcomes?: string[] | null;
1291
+ /** @description Restrict to these aggregation windows. */
1292
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
1293
+ /**
1294
+ * Format: double
1295
+ * @description Only fire when position volume ≥ this value (USD).
1296
+ */
1297
+ min_volume_usd?: number | null;
1298
+ /** Format: double */
1299
+ max_volume_usd?: number | null;
1300
+ /** Format: double */
1301
+ min_buy_usd?: number | null;
1302
+ /** Format: double */
1303
+ min_sell_volume_usd?: number | null;
1304
+ /** Format: int64 */
1305
+ min_txns?: number | null;
1306
+ /** Format: int64 */
1307
+ min_unique_traders?: number | null;
1308
+ /**
1309
+ * Format: double
1310
+ * @description Only fire when price change % ≥ this value.
1311
+ */
1312
+ min_price_change_pct?: number | null;
1313
+ /**
1314
+ * Format: double
1315
+ * @description Only fire when probability change % ≥ this value.
1316
+ */
1317
+ min_probability_change_pct?: number | null;
1318
+ /** Format: double */
1319
+ min_fees?: number | null;
1320
+ };
1053
1321
  /** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
1054
1322
  PositionMetricsPayload: {
1055
1323
  /** @description ERC-1155 outcome token ID */
@@ -1057,22 +1325,31 @@ export interface components {
1057
1325
  /** @description Outcome name (e.g. "Yes", "No") */
1058
1326
  outcome?: string | null;
1059
1327
  /**
1060
- * Format: int16
1328
+ * Format: int32
1061
1329
  * @description Outcome index
1062
1330
  */
1063
1331
  outcome_index?: number | null;
1332
+ /** @description Aggregation window */
1333
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
1064
1334
  /**
1065
- * @description Aggregation window
1066
- * @enum {string|null}
1335
+ * Format: double
1336
+ * @description Total trading volume in USD
1067
1337
  */
1068
- timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
1069
- /** @description Total trading volume in USD */
1070
1338
  volume_usd?: number | null;
1071
- /** @description Buy volume in USD */
1339
+ /**
1340
+ * Format: double
1341
+ * @description Buy volume in USD
1342
+ */
1072
1343
  buy_volume_usd?: number | null;
1073
- /** @description Sell volume in USD */
1344
+ /**
1345
+ * Format: double
1346
+ * @description Sell volume in USD
1347
+ */
1074
1348
  sell_volume_usd?: number | null;
1075
- /** @description Total fees in USD */
1349
+ /**
1350
+ * Format: double
1351
+ * @description Total fees in USD
1352
+ */
1076
1353
  fees?: number | null;
1077
1354
  /** Format: int64 */
1078
1355
  txns?: number | null;
@@ -1082,127 +1359,251 @@ export interface components {
1082
1359
  sells?: number | null;
1083
1360
  /** Format: int64 */
1084
1361
  unique_traders?: number | null;
1362
+ /** Format: double */
1085
1363
  price_open?: number | null;
1364
+ /** Format: double */
1086
1365
  price_close?: number | null;
1366
+ /** Format: double */
1087
1367
  price_high?: number | null;
1368
+ /** Format: double */
1088
1369
  price_low?: number | null;
1370
+ /** Format: double */
1089
1371
  probability_open?: number | null;
1372
+ /** Format: double */
1090
1373
  probability_close?: number | null;
1374
+ /** Format: double */
1091
1375
  probability_high?: number | null;
1376
+ /** Format: double */
1092
1377
  probability_low?: number | null;
1093
1378
  };
1094
- /** @description Payload delivered when a position's trading volume crosses a USD milestone */
1379
+ /** @description Subscription filters for the `position_volume_milestone` event. */
1380
+ PositionVolumeMilestoneFilters: {
1381
+ /** @description **Required.** Aggregation windows to monitor. */
1382
+ timeframes: components["schemas"]["MetricFilterTimeframe"][];
1383
+ /** @description Restrict to these outcome token IDs. */
1384
+ position_ids?: string[] | null;
1385
+ /** @description Restrict to positions within these markets. */
1386
+ condition_ids?: string[] | null;
1387
+ /** @description Specific USD milestones to trigger on. */
1388
+ milestone_amounts?: number[] | null;
1389
+ };
1390
+ /** @description Position volume milestone webhook payload */
1095
1391
  PositionVolumeMilestonePayload: {
1096
- /** @description Parent market condition ID */
1097
1392
  condition_id?: string | null;
1098
- /** @description ERC-1155 outcome token ID */
1099
1393
  position_id: string;
1100
- /** @description Outcome name (e.g. "Yes", "No") */
1101
1394
  outcome?: string | null;
1102
- /**
1103
- * Format: int16
1104
- * @description Outcome index
1105
- */
1395
+ /** Format: int32 */
1106
1396
  outcome_index?: number | null;
1397
+ timeframe: string;
1107
1398
  /**
1108
- * @description Aggregation window
1109
- * @enum {string}
1399
+ * Format: double
1400
+ * @description Milestone amount reached (USD)
1110
1401
  */
1111
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
1112
- /** @description The USD milestone amount that was crossed */
1113
1402
  milestone_usd: number;
1114
- /** @description Current position volume at time of trigger (USD) */
1403
+ /**
1404
+ * Format: double
1405
+ * @description Current volume (USD) that triggered the milestone
1406
+ */
1115
1407
  current_volume_usd: number;
1116
- /** @description Buy volume in USD for this timeframe */
1408
+ /**
1409
+ * Format: double
1410
+ * @description Buy volume (USD)
1411
+ */
1117
1412
  buy_volume_usd: number;
1118
- /** @description Sell volume in USD for this timeframe */
1413
+ /**
1414
+ * Format: double
1415
+ * @description Sell volume (USD)
1416
+ */
1119
1417
  sell_volume_usd: number;
1120
- /** @description Total fees in USD */
1418
+ /**
1419
+ * Format: double
1420
+ * @description Total fees collected in this timeframe
1421
+ */
1121
1422
  fees: number;
1122
- /** Format: int64 */
1423
+ /**
1424
+ * Format: int64
1425
+ * @description Total transactions in this timeframe
1426
+ */
1123
1427
  txns: number;
1124
- /** Format: int64 */
1428
+ /**
1429
+ * Format: int64
1430
+ * @description Buy transactions
1431
+ */
1125
1432
  buys: number;
1126
- /** Format: int64 */
1433
+ /**
1434
+ * Format: int64
1435
+ * @description Sell transactions
1436
+ */
1127
1437
  sells: number;
1128
1438
  };
1129
- /** @description Payload delivered when a position's volume has spiked since the last snapshot */
1439
+ /** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
1440
+ PositionVolumeSpikeFilters: {
1441
+ /**
1442
+ * Format: double
1443
+ * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
1444
+ */
1445
+ spike_ratio: number;
1446
+ /**
1447
+ * Format: int64
1448
+ * @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
1449
+ */
1450
+ window_secs?: number | null;
1451
+ /** @description Restrict to these outcome token IDs. */
1452
+ position_ids?: string[] | null;
1453
+ /** @description Restrict to positions within these markets. */
1454
+ condition_ids?: string[] | null;
1455
+ /** @description Restrict to these outcome names. */
1456
+ outcomes?: string[] | null;
1457
+ /** @description Restrict to these aggregation windows. */
1458
+ timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
1459
+ };
1460
+ /** @description Position volume spike webhook payload */
1130
1461
  PositionVolumeSpikePayload: {
1131
- /** @description ERC-1155 outcome token ID */
1132
1462
  position_id: string;
1133
- /** @description Parent market condition ID */
1134
1463
  condition_id: string;
1135
- /** @description Outcome name (e.g. "Yes", "No") */
1464
+ question?: string | null;
1465
+ market_slug?: string | null;
1466
+ event_slug?: string | null;
1467
+ image_url?: string | null;
1136
1468
  outcome?: string | null;
1137
- /** Format: int16 */
1469
+ /** Format: int32 */
1138
1470
  outcome_index?: number | null;
1471
+ timeframe: string;
1139
1472
  /**
1140
- * @description Aggregation window
1141
- * @enum {string}
1473
+ * Format: double
1474
+ * @description Current position volume at the time of the spike (USD)
1142
1475
  */
1143
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
1144
- /** @description Current position volume at the time of the spike (USD) */
1145
1476
  current_volume_usd: number;
1146
- /** @description Volume at the snapshot baseline (USD) */
1477
+ /**
1478
+ * Format: double
1479
+ * @description Volume at the snapshot baseline (USD)
1480
+ */
1147
1481
  snapshot_volume_usd: number;
1148
- /** @description New volume since the snapshot that triggered this notification (USD) */
1482
+ /**
1483
+ * Format: double
1484
+ * @description New volume since the snapshot that triggered this notification (USD)
1485
+ */
1149
1486
  delta_volume_usd: number;
1150
- /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
1487
+ /**
1488
+ * Format: double
1489
+ * @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
1490
+ */
1151
1491
  spike_pct: number;
1152
- /** Format: int64 */
1492
+ /**
1493
+ * Format: int64
1494
+ * @description Total transactions in this timeframe
1495
+ */
1153
1496
  txns: number;
1497
+ /**
1498
+ * Format: double
1499
+ * @description Total fees in this timeframe
1500
+ */
1154
1501
  fees: number;
1155
1502
  };
1503
+ /** @description Subscription filters for the `price_spike` event. */
1504
+ PriceSpikeFilters: {
1505
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1506
+ position_ids?: string[] | null;
1507
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
1508
+ condition_ids?: string[] | null;
1509
+ /** @description Restrict to specific events. Empty = all events. */
1510
+ event_slugs?: string[] | null;
1511
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
1512
+ outcomes?: string[] | null;
1513
+ /**
1514
+ * Format: double
1515
+ * @description Minimum price percentage move to trigger (e.g. `10` for a 10% move).
1516
+ */
1517
+ min_price_change_pct?: number | null;
1518
+ spike_direction?: null | components["schemas"]["SpikeDirection"];
1519
+ /**
1520
+ * Format: int64
1521
+ * @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds.
1522
+ */
1523
+ window_secs?: number | null;
1524
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1525
+ exclude_shortterm_markets?: boolean | null;
1526
+ };
1527
+ /** @description Position price spike webhook payload */
1156
1528
  PriceSpikePayload: {
1157
- /** @description Outcome token ID */
1158
1529
  position_id: string;
1159
- /** @description Market condition ID */
1160
1530
  condition_id?: string | null;
1161
- /** @description Event slug */
1531
+ question?: string | null;
1532
+ market_slug?: string | null;
1162
1533
  event_slug?: string | null;
1163
- /** @description Outcome name (e.g. "Yes", "No") */
1534
+ image_url?: string | null;
1164
1535
  outcome?: string | null;
1536
+ /** Format: int32 */
1537
+ outcome_index?: number | null;
1538
+ /**
1539
+ * Format: double
1540
+ * @description Price at the start of the observation window (the baseline snapshot)
1541
+ */
1542
+ previous_price: number;
1543
+ /**
1544
+ * Format: double
1545
+ * @description Current price that triggered the spike
1546
+ */
1547
+ current_price: number;
1548
+ /** @description Direction of the spike: `"up"` (price rising) or `"down"` (price falling) */
1549
+ spike_direction: string;
1550
+ /**
1551
+ * Format: double
1552
+ * @description Detected spike percentage from the snapshot baseline. Positive = rising, negative = falling.
1553
+ */
1554
+ spike_pct: number;
1555
+ };
1556
+ /** @description Subscription filters for the `probability_spike` event. */
1557
+ ProbabilitySpikeFilters: {
1558
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1559
+ position_ids?: string[] | null;
1560
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
1561
+ condition_ids?: string[] | null;
1562
+ /** @description Restrict to specific events. Empty = all events. */
1563
+ event_slugs?: string[] | null;
1564
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
1565
+ outcomes?: string[] | null;
1165
1566
  /**
1166
- * Format: int16
1167
- * @description Outcome index
1567
+ * Format: double
1568
+ * @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move).
1168
1569
  */
1169
- outcome_index?: number | null;
1170
- /** @description Price at the start of the observation window (baseline snapshot, 0.0–1.0) */
1171
- previous_price: number;
1172
- /** @description Current price that triggered the spike (0.0–1.0) */
1173
- current_price: number;
1570
+ min_probability_change_pct?: number | null;
1571
+ spike_direction?: null | components["schemas"]["SpikeDirection"];
1174
1572
  /**
1175
- * @description `"up"` = price rising, `"down"` = price falling
1176
- * @enum {string}
1573
+ * Format: int64
1574
+ * @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds.
1177
1575
  */
1178
- spike_direction: "up" | "down";
1179
- /** @description Percentage move that triggered this notification. Positive = up, negative = down. */
1180
- spike_pct: number;
1576
+ window_secs?: number | null;
1577
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1578
+ exclude_shortterm_markets?: boolean | null;
1181
1579
  };
1580
+ /** @description Position probability spike webhook payload */
1182
1581
  ProbabilitySpikePayload: {
1183
- /** @description Outcome token ID */
1184
1582
  position_id: string;
1185
- /** @description Market condition ID */
1186
1583
  condition_id?: string | null;
1187
- /** @description Event slug */
1584
+ question?: string | null;
1585
+ market_slug?: string | null;
1188
1586
  event_slug?: string | null;
1189
- /** @description Outcome name (e.g. "Yes", "No") */
1587
+ image_url?: string | null;
1190
1588
  outcome?: string | null;
1589
+ /** Format: int32 */
1590
+ outcome_index?: number | null;
1191
1591
  /**
1192
- * Format: int16
1193
- * @description Outcome index
1592
+ * Format: double
1593
+ * @description Probability at the start of the observation window (the baseline snapshot)
1194
1594
  */
1195
- outcome_index?: number | null;
1196
- /** @description Probability at the start of the observation window (baseline snapshot, 0.0–1.0) */
1197
1595
  previous_probability: number;
1198
- /** @description Current probability that triggered the spike (0.0–1.0) */
1596
+ /**
1597
+ * Format: double
1598
+ * @description Current probability that triggered the spike
1599
+ */
1199
1600
  current_probability: number;
1601
+ /** @description Direction of the spike: `"up"` (probability rising) or `"down"` (probability falling) */
1602
+ spike_direction: string;
1200
1603
  /**
1201
- * @description `"up"` = probability rising, `"down"` = probability falling
1202
- * @enum {string}
1604
+ * Format: double
1605
+ * @description Detected spike percentage from the snapshot baseline. Positive = rising, negative = falling.
1203
1606
  */
1204
- spike_direction: "up" | "down";
1205
- /** @description Percentage move that triggered this notification. Positive = up, negative = down. */
1206
1607
  spike_pct: number;
1207
1608
  };
1208
1609
  /** @description V2 UMA OOv2: a price was proposed (resolution proposal). */
@@ -1494,6 +1895,287 @@ export interface components {
1494
1895
  * @enum {string}
1495
1896
  */
1496
1897
  SpikeDirection: "up" | "down" | "both";
1898
+ /**
1899
+ * @description Trade-event types accepted by `trader_trade_event.trade_types`. Covers the
1900
+ * full set of typed prediction-trade variants.
1901
+ * @enum {string}
1902
+ */
1903
+ TradeEventFilterType: "OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval";
1904
+ /** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
1905
+ TraderEventPnlFilters: {
1906
+ /** @description Track only these trader wallet addresses. */
1907
+ traders?: string[] | null;
1908
+ /** @description Restrict to these events. */
1909
+ event_slugs?: string[] | null;
1910
+ /**
1911
+ * Format: double
1912
+ * @description Only fire when per-event realized PnL ≥ this value (USD).
1913
+ */
1914
+ min_realized_pnl_usd?: number | null;
1915
+ /**
1916
+ * Format: double
1917
+ * @description Only fire when per-event realized PnL ≤ this value (USD).
1918
+ */
1919
+ max_realized_pnl_usd?: number | null;
1920
+ /**
1921
+ * Format: double
1922
+ * @description Only fire when total event volume ≥ this value (USD).
1923
+ */
1924
+ min_volume_usd?: number | null;
1925
+ /**
1926
+ * Format: double
1927
+ * @description Only fire when total event volume ≤ this value (USD).
1928
+ */
1929
+ max_volume_usd?: number | null;
1930
+ /**
1931
+ * Format: double
1932
+ * @description Only fire when buy volume within the event ≥ this value (USD).
1933
+ */
1934
+ min_buy_usd?: number | null;
1935
+ /**
1936
+ * Format: double
1937
+ * @description Only fire when sell volume within the event ≥ this value (USD).
1938
+ */
1939
+ min_sell_volume_usd?: number | null;
1940
+ /**
1941
+ * Format: int64
1942
+ * @description Only fire when the trader has traded in ≥ this many markets within the event.
1943
+ */
1944
+ min_markets_traded?: number | null;
1945
+ /** @description Restrict to these PnL windows. */
1946
+ timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
1947
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1948
+ exclude_shortterm_markets?: boolean | null;
1949
+ };
1950
+ /** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
1951
+ TraderFirstTradeFilters: {
1952
+ /** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
1953
+ wallet_addresses?: string[] | null;
1954
+ /** @description Restrict to trades in these markets. Empty = all markets. */
1955
+ condition_ids?: string[] | null;
1956
+ /** @description Restrict to trades in markets belonging to these events. */
1957
+ event_slugs?: string[] | null;
1958
+ /**
1959
+ * Format: double
1960
+ * @description Minimum trade size in USD. Omit to match all sizes.
1961
+ */
1962
+ min_usd_value?: number | null;
1963
+ /**
1964
+ * Format: double
1965
+ * @description Only fire when the outcome probability is ≥ this value.
1966
+ */
1967
+ min_probability?: number | null;
1968
+ /**
1969
+ * Format: double
1970
+ * @description Only fire when the outcome probability is ≤ this value.
1971
+ */
1972
+ max_probability?: number | null;
1973
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
1974
+ exclude_shortterm_markets?: boolean | null;
1975
+ };
1976
+ /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
1977
+ TraderGlobalPnlFilters: {
1978
+ /** @description Track only these trader wallet addresses. Empty = all traders. */
1979
+ traders?: string[] | null;
1980
+ /**
1981
+ * Format: double
1982
+ * @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds.
1983
+ */
1984
+ min_realized_pnl_usd?: number | null;
1985
+ /**
1986
+ * Format: double
1987
+ * @description Only fire when realized PnL ≤ this value (USD).
1988
+ */
1989
+ max_realized_pnl_usd?: number | null;
1990
+ /**
1991
+ * Format: double
1992
+ * @description Only fire when total trading volume ≥ this value (USD).
1993
+ */
1994
+ min_volume_usd?: number | null;
1995
+ /**
1996
+ * Format: double
1997
+ * @description Only fire when total trading volume ≤ this value (USD).
1998
+ */
1999
+ max_volume_usd?: number | null;
2000
+ /**
2001
+ * Format: double
2002
+ * @description Only fire when buy volume ≥ this value (USD).
2003
+ */
2004
+ min_buy_usd?: number | null;
2005
+ /**
2006
+ * Format: double
2007
+ * @description Only fire when sell volume ≥ this value (USD).
2008
+ */
2009
+ min_sell_volume_usd?: number | null;
2010
+ /**
2011
+ * Format: double
2012
+ * @description Only fire when market win rate ≥ this percentage (0.0–100.0).
2013
+ */
2014
+ min_win_rate?: number | null;
2015
+ /**
2016
+ * Format: int64
2017
+ * @description Only fire when the trader has traded in ≥ this many markets.
2018
+ */
2019
+ min_markets_traded?: number | null;
2020
+ /** @description Restrict to these PnL windows. Empty = all windows. */
2021
+ timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
2022
+ };
2023
+ /** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
2024
+ TraderMarketPnlFilters: {
2025
+ /** @description Track only these trader wallet addresses. */
2026
+ traders?: string[] | null;
2027
+ /** @description Restrict to these markets. */
2028
+ condition_ids?: string[] | null;
2029
+ /** @description Restrict to markets in these events. */
2030
+ event_slugs?: string[] | null;
2031
+ /**
2032
+ * Format: double
2033
+ * @description Only fire when per-market realized PnL ≥ this value (USD).
2034
+ */
2035
+ min_realized_pnl_usd?: number | null;
2036
+ /**
2037
+ * Format: double
2038
+ * @description Only fire when per-market realized PnL ≤ this value (USD).
2039
+ */
2040
+ max_realized_pnl_usd?: number | null;
2041
+ /**
2042
+ * Format: double
2043
+ * @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD).
2044
+ */
2045
+ min_volume_usd?: number | null;
2046
+ /**
2047
+ * Format: double
2048
+ * @description Only fire when total volume ≤ this value (USD).
2049
+ */
2050
+ max_volume_usd?: number | null;
2051
+ /**
2052
+ * Format: double
2053
+ * @description Only fire when buy volume in the market ≥ this value (USD).
2054
+ */
2055
+ min_buy_usd?: number | null;
2056
+ /**
2057
+ * Format: double
2058
+ * @description Only fire when sell volume in the market ≥ this value (USD).
2059
+ */
2060
+ min_sell_volume_usd?: number | null;
2061
+ /** @description Restrict to these PnL windows. */
2062
+ timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
2063
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2064
+ exclude_shortterm_markets?: boolean | null;
2065
+ };
2066
+ /** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
2067
+ TraderNewMarketFilters: {
2068
+ /** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
2069
+ wallet_addresses?: string[] | null;
2070
+ /** @description Restrict to these markets. */
2071
+ condition_ids?: string[] | null;
2072
+ /** @description Restrict to markets belonging to these events. */
2073
+ event_slugs?: string[] | null;
2074
+ /**
2075
+ * Format: double
2076
+ * @description Minimum trade size in USD. Omit to match all sizes.
2077
+ */
2078
+ min_usd_value?: number | null;
2079
+ /**
2080
+ * Format: double
2081
+ * @description Only fire when the outcome probability is ≥ this value.
2082
+ */
2083
+ min_probability?: number | null;
2084
+ /**
2085
+ * Format: double
2086
+ * @description Only fire when the outcome probability is ≤ this value.
2087
+ */
2088
+ max_probability?: number | null;
2089
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2090
+ exclude_shortterm_markets?: boolean | null;
2091
+ };
2092
+ /** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
2093
+ TraderNewTradeFilters: {
2094
+ /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2095
+ wallet_addresses?: string[] | null;
2096
+ /** @description Restrict to these markets. */
2097
+ condition_ids?: string[] | null;
2098
+ /** @description Restrict to markets belonging to these events. */
2099
+ event_slugs?: string[] | null;
2100
+ /**
2101
+ * Format: double
2102
+ * @description Minimum trade size in USD. Defaults to 0 (matches all trades).
2103
+ */
2104
+ min_usd_value?: number | null;
2105
+ /**
2106
+ * Format: double
2107
+ * @description Only fire when outcome probability is ≥ this value.
2108
+ */
2109
+ min_probability?: number | null;
2110
+ /**
2111
+ * Format: double
2112
+ * @description Only fire when outcome probability is ≤ this value.
2113
+ */
2114
+ max_probability?: number | null;
2115
+ /** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
2116
+ trade_types?: ("OrderFilled" | "OrdersMatched")[] | null;
2117
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2118
+ exclude_shortterm_markets?: boolean | null;
2119
+ };
2120
+ /**
2121
+ * @description Subscription filters for the `trader_trade_event` event. All fields are optional.
2122
+ * `event_slugs` and `exclude_shortterm_markets` require explicit `trade_types` that
2123
+ * exclude `PositionsConverted`, because conversion events do not currently carry
2124
+ * `event_slug` in the typed webhook payload.
2125
+ */
2126
+ TraderTradeEventFilters: {
2127
+ /** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
2128
+ wallet_addresses?: string[] | null;
2129
+ /** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
2130
+ condition_ids?: string[] | null;
2131
+ /** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
2132
+ event_slugs?: string[] | null;
2133
+ /**
2134
+ * Format: double
2135
+ * @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events).
2136
+ */
2137
+ min_usd_value?: number | null;
2138
+ /**
2139
+ * Format: double
2140
+ * @description Only fire when event probability is ≥ this value. Events without probability data do not match.
2141
+ */
2142
+ min_probability?: number | null;
2143
+ /**
2144
+ * Format: double
2145
+ * @description Only fire when event probability is ≤ this value. Events without probability data do not match.
2146
+ */
2147
+ max_probability?: number | null;
2148
+ /** @description Only fire for these trade types. Empty = all supported trade-event variants. */
2149
+ trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[] | null;
2150
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
2151
+ exclude_shortterm_markets?: boolean | null;
2152
+ };
2153
+ /** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
2154
+ TraderWhaleTradeFilters: {
2155
+ /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2156
+ wallet_addresses?: string[] | null;
2157
+ /** @description Restrict to these markets. */
2158
+ condition_ids?: string[] | null;
2159
+ /** @description Restrict to markets belonging to these events. */
2160
+ event_slugs?: string[] | null;
2161
+ /**
2162
+ * Format: double
2163
+ * @description Minimum trade size in USD. Defaults to 0 (matches all trades).
2164
+ */
2165
+ min_usd_value?: number | null;
2166
+ /**
2167
+ * Format: double
2168
+ * @description Only fire when outcome probability is ≥ this value.
2169
+ */
2170
+ min_probability?: number | null;
2171
+ /**
2172
+ * Format: double
2173
+ * @description Only fire when outcome probability is ≤ this value.
2174
+ */
2175
+ max_probability?: number | null;
2176
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2177
+ exclude_shortterm_markets?: boolean | null;
2178
+ };
1497
2179
  /** @description Request body for updating a webhook */
1498
2180
  UpdateWebhookRequestBody: {
1499
2181
  /** @description Destination URL for webhook deliveries (must be HTTPS) */
@@ -1506,20 +2188,24 @@ export interface components {
1506
2188
  /** @description Description/name */
1507
2189
  description?: string | null;
1508
2190
  };
1509
- /** @description Payload delivered when a market's trading volume crosses a USD milestone in the specified timeframe */
2191
+ /** @description Volume milestone webhook payload */
1510
2192
  VolumeMilestonePayload: {
1511
- /** @description Market condition ID */
1512
2193
  condition_id: string;
2194
+ timeframe: string;
1513
2195
  /**
1514
- * @description Aggregation window that crossed the milestone
1515
- * @enum {string}
2196
+ * Format: double
2197
+ * @description Milestone amount reached (USD)
1516
2198
  */
1517
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
1518
- /** @description The USD milestone amount that was crossed */
1519
2199
  milestone_usd: number;
1520
- /** @description Current volume at time of trigger (USD) */
2200
+ /**
2201
+ * Format: double
2202
+ * @description Current volume (USD) that triggered the milestone
2203
+ */
1521
2204
  current_volume_usd: number;
1522
- /** @description Total fees in USD for this timeframe */
2205
+ /**
2206
+ * Format: double
2207
+ * @description Total fees collected in this timeframe
2208
+ */
1523
2209
  fees: number;
1524
2210
  /**
1525
2211
  * Format: int64
@@ -1527,6 +2213,12 @@ export interface components {
1527
2213
  */
1528
2214
  txns: number;
1529
2215
  };
2216
+ /**
2217
+ * @description Aggregation windows accepted by `*_volume_spike.timeframes`. Includes `1d`
2218
+ * in addition to the metric set.
2219
+ * @enum {string}
2220
+ */
2221
+ VolumeSpikeFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
1530
2222
  /**
1531
2223
  * @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
1532
2224
  * @enum {string}
@@ -1769,7 +2461,10 @@ export interface components {
1769
2461
  condition_id?: string | null;
1770
2462
  /** @description Outcome name (e.g. "Yes", "No") */
1771
2463
  outcome?: string | null;
1772
- /** @description Outcome index: 0 = Yes/Up, 1 = No */
2464
+ /**
2465
+ * Format: int32
2466
+ * @description Outcome index: 0 = Yes/Up, 1 = No
2467
+ */
1773
2468
  outcome_index?: number | null;
1774
2469
  /** @description Market question text */
1775
2470
  question?: string | null;
@@ -1791,30 +2486,36 @@ export interface components {
1791
2486
  * @description Block confirmation timestamp (Unix seconds)
1792
2487
  */
1793
2488
  confirmed_at: number;
1794
- /** @description USD size of the trade (6 decimal places) */
2489
+ /**
2490
+ * Format: double
2491
+ * @description USD size of the trade (6 decimal places)
2492
+ */
1795
2493
  amount_usd: number;
1796
- /** @description Outcome shares traded (6 decimal places) */
2494
+ /**
2495
+ * Format: double
2496
+ * @description Outcome shares traded (6 decimal places)
2497
+ */
1797
2498
  shares_amount: number;
1798
- /** @description Fee paid in USD (6 decimal places) */
1799
- fee: number;
1800
2499
  /**
1801
- * @description Trade direction
1802
- * @enum {string}
2500
+ * Format: double
2501
+ * @description Fee paid in USD (6 decimal places)
1803
2502
  */
2503
+ fee: number;
2504
+ /** @description Trade direction */
1804
2505
  side: "Buy" | "Sell";
1805
- /** @description Outcome token price (0.0–1.0) */
1806
- price: number;
1807
- /** @description Implied probability (0.0–1.0); null when outcome is unknown */
1808
- probability?: number | null;
1809
2506
  /**
1810
- * @description Exchange contract that processed the trade
1811
- * @enum {string}
2507
+ * Format: double
2508
+ * @description Outcome token price (0.0–1.0)
1812
2509
  */
1813
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
2510
+ price: number;
1814
2511
  /**
1815
- * @description Trade type (webhook events only fire on order fills)
1816
- * @enum {string}
2512
+ * Format: double
2513
+ * @description Implied probability (0.0–1.0); null when outcome is unknown
1817
2514
  */
2515
+ probability?: number | null;
2516
+ /** @description Exchange contract that processed the trade */
2517
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
2518
+ /** @description Trade type (webhook events only fire on order fills) */
1818
2519
  trade_type: "OrderFilled" | "OrdersMatched";
1819
2520
  };
1820
2521
  /** @description Outer envelope for every webhook HTTP POST delivery. The `data` field contains the event-specific payload. Delivery headers sent with every POST: `X-Webhook-ID` (subscription UUID), `X-Delivery-ID` (this attempt's UUID), `X-Event-Type` (event name string, e.g. `trader_first_trade`), `X-Attempt` (attempt number, 1-indexed). When the webhook has a secret configured, `X-Webhook-Signature: sha256=<hmac-hex>` is also included — compute HMAC-SHA256 over the raw request body using your secret to verify. */
@@ -2317,400 +3018,6 @@ export interface components {
2317
3018
  /** @enum {string} */
2318
3019
  trade_type: "Approval";
2319
3020
  };
2320
- /** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
2321
- TraderFirstTradeFilters: {
2322
- /** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
2323
- wallet_addresses?: string[];
2324
- /** @description Restrict to trades in these markets. Empty = all markets. */
2325
- condition_ids?: string[];
2326
- /** @description Restrict to trades in markets belonging to these events. */
2327
- event_slugs?: string[];
2328
- /** @description Minimum trade size in USD. Omit to match all sizes. */
2329
- min_usd_value?: number;
2330
- /** @description Only fire when the outcome probability is ≥ this value. */
2331
- min_probability?: number;
2332
- /** @description Only fire when the outcome probability is ≤ this value. */
2333
- max_probability?: number;
2334
- /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
2335
- exclude_shortterm_markets?: boolean;
2336
- };
2337
- /** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
2338
- TraderNewMarketFilters: {
2339
- /** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
2340
- wallet_addresses?: string[];
2341
- /** @description Restrict to these markets. */
2342
- condition_ids?: string[];
2343
- /** @description Restrict to markets belonging to these events. */
2344
- event_slugs?: string[];
2345
- /** @description Minimum trade size in USD. Omit to match all sizes. */
2346
- min_usd_value?: number;
2347
- /** @description Only fire when the outcome probability is ≥ this value. */
2348
- min_probability?: number;
2349
- /** @description Only fire when the outcome probability is ≤ this value. */
2350
- max_probability?: number;
2351
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2352
- exclude_shortterm_markets?: boolean;
2353
- };
2354
- /** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
2355
- TraderWhaleTradeFilters: {
2356
- /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2357
- wallet_addresses?: string[];
2358
- /** @description Restrict to these markets. */
2359
- condition_ids?: string[];
2360
- /** @description Restrict to markets belonging to these events. */
2361
- event_slugs?: string[];
2362
- /** @description Minimum trade size in USD. Defaults to 0 (matches all trades). */
2363
- min_usd_value?: number;
2364
- /** @description Only fire when outcome probability is ≥ this value. */
2365
- min_probability?: number;
2366
- /** @description Only fire when outcome probability is ≤ this value. */
2367
- max_probability?: number;
2368
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2369
- exclude_shortterm_markets?: boolean;
2370
- };
2371
- /** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
2372
- TraderNewTradeFilters: {
2373
- /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2374
- wallet_addresses?: string[];
2375
- /** @description Restrict to these markets. */
2376
- condition_ids?: string[];
2377
- /** @description Restrict to markets belonging to these events. */
2378
- event_slugs?: string[];
2379
- /** @description Minimum trade size in USD. Defaults to 0 (matches all trades). */
2380
- min_usd_value?: number;
2381
- /** @description Only fire when outcome probability is ≥ this value. */
2382
- min_probability?: number;
2383
- /** @description Only fire when outcome probability is ≤ this value. */
2384
- max_probability?: number;
2385
- /** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
2386
- trade_types?: ("OrderFilled" | "OrdersMatched")[];
2387
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2388
- exclude_shortterm_markets?: boolean;
2389
- };
2390
- /** @description Subscription filters for the `trader_trade_event` event. All fields are optional. `event_slugs` and `exclude_shortterm_markets` require explicit `trade_types` that exclude `PositionsConverted`, because conversion events do not currently carry `event_slug` in the typed webhook payload. */
2391
- TraderTradeEventFilters: {
2392
- /** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
2393
- wallet_addresses?: string[];
2394
- /** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
2395
- condition_ids?: string[];
2396
- /** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
2397
- event_slugs?: string[];
2398
- /** @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events). */
2399
- min_usd_value?: number;
2400
- /** @description Only fire when event probability is ≥ this value. Events without probability data do not match. */
2401
- min_probability?: number;
2402
- /** @description Only fire when event probability is ≤ this value. Events without probability data do not match. */
2403
- max_probability?: number;
2404
- /** @description Only fire for these trade types. Empty = all supported trade-event variants. */
2405
- trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[];
2406
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
2407
- exclude_shortterm_markets?: boolean;
2408
- };
2409
- /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
2410
- TraderGlobalPnlFilters: {
2411
- /** @description Track only these trader wallet addresses. Empty = all traders. */
2412
- traders?: string[];
2413
- /** @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds. */
2414
- min_realized_pnl_usd?: number;
2415
- /** @description Only fire when realized PnL ≤ this value (USD). */
2416
- max_realized_pnl_usd?: number;
2417
- /** @description Only fire when total trading volume ≥ this value (USD). */
2418
- min_volume_usd?: number;
2419
- /** @description Only fire when total trading volume ≤ this value (USD). */
2420
- max_volume_usd?: number;
2421
- /** @description Only fire when buy volume ≥ this value (USD). */
2422
- min_buy_usd?: number;
2423
- /** @description Only fire when sell volume ≥ this value (USD). */
2424
- min_sell_volume_usd?: number;
2425
- /** @description Only fire when market win rate ≥ this percentage (0.0–100.0). */
2426
- min_win_rate?: number;
2427
- /**
2428
- * Format: int64
2429
- * @description Only fire when the trader has traded in ≥ this many markets.
2430
- */
2431
- min_markets_traded?: number;
2432
- /** @description Restrict to these PnL windows. Empty = all windows. */
2433
- timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
2434
- };
2435
- /** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
2436
- TraderMarketPnlFilters: {
2437
- /** @description Track only these trader wallet addresses. */
2438
- traders?: string[];
2439
- /** @description Restrict to these markets. */
2440
- condition_ids?: string[];
2441
- /** @description Restrict to markets in these events. */
2442
- event_slugs?: string[];
2443
- /** @description Only fire when per-market realized PnL ≥ this value (USD). */
2444
- min_realized_pnl_usd?: number;
2445
- /** @description Only fire when per-market realized PnL ≤ this value (USD). */
2446
- max_realized_pnl_usd?: number;
2447
- /** @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD). */
2448
- min_volume_usd?: number;
2449
- /** @description Only fire when total volume ≤ this value (USD). */
2450
- max_volume_usd?: number;
2451
- /** @description Only fire when buy volume in the market ≥ this value (USD). */
2452
- min_buy_usd?: number;
2453
- /** @description Only fire when sell volume in the market ≥ this value (USD). */
2454
- min_sell_volume_usd?: number;
2455
- /** @description Restrict to these PnL windows. */
2456
- timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
2457
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2458
- exclude_shortterm_markets?: boolean;
2459
- };
2460
- /** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
2461
- TraderEventPnlFilters: {
2462
- /** @description Track only these trader wallet addresses. */
2463
- traders?: string[];
2464
- /** @description Restrict to these events. */
2465
- event_slugs?: string[];
2466
- /** @description Only fire when per-event realized PnL ≥ this value (USD). */
2467
- min_realized_pnl_usd?: number;
2468
- /** @description Only fire when per-event realized PnL ≤ this value (USD). */
2469
- max_realized_pnl_usd?: number;
2470
- /** @description Only fire when total event volume ≥ this value (USD). */
2471
- min_volume_usd?: number;
2472
- /** @description Only fire when total event volume ≤ this value (USD). */
2473
- max_volume_usd?: number;
2474
- /** @description Only fire when buy volume within the event ≥ this value (USD). */
2475
- min_buy_usd?: number;
2476
- /** @description Only fire when sell volume within the event ≥ this value (USD). */
2477
- min_sell_volume_usd?: number;
2478
- /**
2479
- * Format: int64
2480
- * @description Only fire when the trader has traded in ≥ this many markets within the event.
2481
- */
2482
- min_markets_traded?: number;
2483
- /** @description Restrict to these PnL windows. */
2484
- timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
2485
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2486
- exclude_shortterm_markets?: boolean;
2487
- };
2488
- /** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
2489
- MarketMetricsFilters: {
2490
- /** @description Restrict to these markets. Empty = all markets. */
2491
- condition_ids?: string[];
2492
- /** @description Restrict to these aggregation windows. Empty = all windows. */
2493
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2494
- /** @description Only fire when volume ≥ this value (USD). */
2495
- min_volume_usd?: number;
2496
- /** @description Only fire when volume ≤ this value (USD). */
2497
- max_volume_usd?: number;
2498
- /**
2499
- * Format: int64
2500
- * @description Only fire when transaction count ≥ this value.
2501
- */
2502
- min_txns?: number;
2503
- /**
2504
- * Format: int64
2505
- * @description Only fire when unique trader count ≥ this value.
2506
- */
2507
- min_unique_traders?: number;
2508
- /** @description Only fire when total fees ≥ this value (USD). */
2509
- min_fees?: number;
2510
- };
2511
- /** @description Subscription filters for the `event_metrics` event. All fields are optional. */
2512
- EventMetricsFilters: {
2513
- /** @description Restrict to these events. Empty = all events. */
2514
- event_slugs?: string[];
2515
- /** @description Restrict to these aggregation windows. */
2516
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2517
- /** @description Only fire when aggregated event volume ≥ this value (USD). */
2518
- min_volume_usd?: number;
2519
- max_volume_usd?: number;
2520
- /** Format: int64 */
2521
- min_txns?: number;
2522
- /** Format: int64 */
2523
- min_unique_traders?: number;
2524
- min_fees?: number;
2525
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2526
- exclude_shortterm_markets?: boolean;
2527
- };
2528
- /** @description Subscription filters for the `position_metrics` event. All fields are optional. */
2529
- PositionMetricsFilters: {
2530
- /** @description Restrict to these outcome token IDs. */
2531
- position_ids?: string[];
2532
- /** @description Restrict to positions within these markets. */
2533
- condition_ids?: string[];
2534
- /** @description Restrict to positions with these outcome names (e.g. ["Yes", "No"]). */
2535
- outcomes?: string[];
2536
- /** @description Restrict to these aggregation windows. */
2537
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2538
- /** @description Only fire when position volume ≥ this value (USD). */
2539
- min_volume_usd?: number;
2540
- max_volume_usd?: number;
2541
- min_buy_usd?: number;
2542
- min_sell_volume_usd?: number;
2543
- /** Format: int64 */
2544
- min_txns?: number;
2545
- /** Format: int64 */
2546
- min_unique_traders?: number;
2547
- /** @description Only fire when price change % ≥ this value. */
2548
- min_price_change_pct?: number;
2549
- /** @description Only fire when probability change % ≥ this value. */
2550
- min_probability_change_pct?: number;
2551
- min_fees?: number;
2552
- };
2553
- /** @description Subscription filters for the `market_volume_milestone` event. */
2554
- MarketVolumeMilestoneFilters: {
2555
- /** @description **Required.** Aggregation windows to monitor (e.g. ["1h", "24h"]). */
2556
- timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2557
- /** @description Restrict to these markets. Empty = all markets. */
2558
- condition_ids?: string[];
2559
- /** @description Specific USD milestones to trigger on (e.g. [10000, 100000, 1000000]). Empty = all milestones. */
2560
- milestone_amounts?: number[];
2561
- };
2562
- /** @description Subscription filters for the `event_volume_milestone` event. */
2563
- EventVolumeMilestoneFilters: {
2564
- /** @description **Required.** Aggregation windows to monitor. */
2565
- timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2566
- /** @description Restrict to these events. */
2567
- event_slugs?: string[];
2568
- /** @description Specific USD milestones to trigger on. */
2569
- milestone_amounts?: number[];
2570
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2571
- exclude_shortterm_markets?: boolean;
2572
- };
2573
- /** @description Subscription filters for the `position_volume_milestone` event. */
2574
- PositionVolumeMilestoneFilters: {
2575
- /** @description **Required.** Aggregation windows to monitor. */
2576
- timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2577
- /** @description Restrict to these outcome token IDs. */
2578
- position_ids?: string[];
2579
- /** @description Restrict to positions within these markets. */
2580
- condition_ids?: string[];
2581
- /** @description Specific USD milestones to trigger on. */
2582
- milestone_amounts?: number[];
2583
- };
2584
- /** @description Subscription filters for the `probability_spike` event. */
2585
- ProbabilitySpikeFilters: {
2586
- /** @description Restrict to specific outcome token IDs. Empty = all positions. */
2587
- position_ids?: string[];
2588
- /** @description Restrict to specific market condition IDs. Empty = all markets. */
2589
- condition_ids?: string[];
2590
- /** @description Restrict to specific events. Empty = all events. */
2591
- event_slugs?: string[];
2592
- /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
2593
- outcomes?: string[];
2594
- /** @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move). */
2595
- min_probability_change_pct?: number;
2596
- /**
2597
- * @description `"up"` = probability rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
2598
- * @enum {string}
2599
- */
2600
- spike_direction?: "up" | "down" | "both";
2601
- /** @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds. */
2602
- window_secs?: number;
2603
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2604
- exclude_shortterm_markets?: boolean;
2605
- };
2606
- /** @description Subscription filters for the `price_spike` event. */
2607
- PriceSpikeFilters: {
2608
- /** @description Restrict to specific outcome token IDs. Empty = all positions. */
2609
- position_ids?: string[];
2610
- /** @description Restrict to specific market condition IDs. Empty = all markets. */
2611
- condition_ids?: string[];
2612
- /** @description Restrict to specific events. Empty = all events. */
2613
- event_slugs?: string[];
2614
- /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
2615
- outcomes?: string[];
2616
- /** @description Minimum price percentage move to trigger (e.g. `10` for a 10% move). */
2617
- min_price_change_pct?: number;
2618
- /**
2619
- * @description `"up"` = price rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
2620
- * @enum {string}
2621
- */
2622
- spike_direction?: "up" | "down" | "both";
2623
- /** @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds. */
2624
- window_secs?: number;
2625
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2626
- exclude_shortterm_markets?: boolean;
2627
- };
2628
- /** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
2629
- MarketVolumeSpikeFilters: {
2630
- /** @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. */
2631
- spike_ratio: number;
2632
- /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
2633
- window_secs?: number;
2634
- /** @description Restrict to these markets. Empty = all markets. */
2635
- condition_ids?: string[];
2636
- /** @description Restrict to these aggregation windows. Empty = all windows. */
2637
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
2638
- };
2639
- /** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
2640
- EventVolumeSpikeFilters: {
2641
- /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
2642
- spike_ratio: number;
2643
- /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
2644
- window_secs?: number;
2645
- /** @description Restrict to these events. */
2646
- event_slugs?: string[];
2647
- /** @description Restrict to these aggregation windows. */
2648
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
2649
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2650
- exclude_shortterm_markets?: boolean;
2651
- };
2652
- /** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
2653
- PositionVolumeSpikeFilters: {
2654
- /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
2655
- spike_ratio: number;
2656
- /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
2657
- window_secs?: number;
2658
- /** @description Restrict to these outcome token IDs. */
2659
- position_ids?: string[];
2660
- /** @description Restrict to positions within these markets. */
2661
- condition_ids?: string[];
2662
- /** @description Restrict to these outcome names. */
2663
- outcomes?: string[];
2664
- /** @description Restrict to these aggregation windows. */
2665
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
2666
- };
2667
- /** @description Subscription filters for the `close_to_bond` event. At least one of `min_probability` or `max_probability` is required. */
2668
- CloseToBondFilters: {
2669
- /** @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. */
2670
- min_probability?: number;
2671
- /** @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO). */
2672
- max_probability?: number;
2673
- /** @description Restrict to these markets. */
2674
- condition_ids?: string[];
2675
- /** @description Restrict to these outcome token IDs. */
2676
- position_ids?: string[];
2677
- /** @description Restrict to markets in these events. */
2678
- event_slugs?: string[];
2679
- /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
2680
- outcomes?: string[];
2681
- /** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
2682
- position_outcome_indices?: number[];
2683
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2684
- exclude_shortterm_markets?: boolean;
2685
- } | unknown | unknown;
2686
- /** @description Subscription filters for the `market_created` event. All fields are optional. */
2687
- MarketCreatedFilters: {
2688
- /** @description Restrict to markets with these tags or category names (case-insensitive match). */
2689
- tags?: string[];
2690
- /** @description Restrict to markets belonging to these events. */
2691
- event_slugs?: string[];
2692
- /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
2693
- exclude_shortterm_markets?: boolean;
2694
- };
2695
- /** @description Subscription filters for the `oracle_events` event. All fields are optional. */
2696
- OracleEventsFilters: {
2697
- /** @description Restrict to these event types (case-insensitive). Empty = all. */
2698
- oracle_event_types?: ("AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported")[];
2699
- /** @description Restrict to events for these condition IDs. */
2700
- condition_ids?: string[];
2701
- };
2702
- /** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
2703
- AssetPriceTickFilters: {
2704
- /** @description Restrict to these crypto assets. Empty = all assets. */
2705
- asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
2706
- };
2707
- /** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
2708
- AssetPriceWindowUpdateFilters: {
2709
- /** @description Restrict to these crypto assets. Empty = all assets. */
2710
- asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
2711
- /** @description Restrict to these candle sizes. Empty = all sizes. */
2712
- timeframes?: ("5m" | "15m" | "1h" | "4h" | "1d" | "24h")[];
2713
- };
2714
3021
  /**
2715
3022
  * @description All alert event types supported by both HTTP webhooks and the alerts WebSocket.
2716
3023
  * @enum {string}
@@ -2782,7 +3089,7 @@ export interface components {
2782
3089
  * "fee": 0.125,
2783
3090
  * "side": "Buy",
2784
3091
  * "price": 0.5,
2785
- * "exchange": "polymarket",
3092
+ * "exchange": "CTFExchange",
2786
3093
  * "trade_type": "OrderFilled"
2787
3094
  * }
2788
3095
  * }
@@ -2849,7 +3156,7 @@ export interface components {
2849
3156
  * "side": "Buy",
2850
3157
  * "price": 0.5,
2851
3158
  * "probability": 0.5,
2852
- * "exchange": "polymarket",
3159
+ * "exchange": "CTFExchange",
2853
3160
  * "trade_type": "OrderFilled"
2854
3161
  * }
2855
3162
  * }
@@ -2916,7 +3223,7 @@ export interface components {
2916
3223
  * "side": "Buy",
2917
3224
  * "price": 0.5,
2918
3225
  * "probability": 0.5,
2919
- * "exchange": "polymarket",
3226
+ * "exchange": "CTFExchange",
2920
3227
  * "trade_type": "OrderFilled"
2921
3228
  * }
2922
3229
  * }
@@ -2983,7 +3290,7 @@ export interface components {
2983
3290
  * "side": "Buy",
2984
3291
  * "price": 0.5,
2985
3292
  * "probability": 0.5,
2986
- * "exchange": "polymarket",
3293
+ * "exchange": "CTFExchange",
2987
3294
  * "trade_type": "OrderFilled"
2988
3295
  * }
2989
3296
  * }