@structbuild/sdk 0.5.6-staging.4 → 0.5.6

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,122 +86,233 @@ 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.
168
+ */
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).
133
173
  */
134
- update_type: "open" | "close";
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 shares/contracts volume for this timeframe
274
+ */
275
+ shares_volume?: number | null;
276
+ /**
277
+ * Format: double
278
+ * @description Builder-attributed trading volume in USD
279
+ */
280
+ builder_usd_volume?: number | null;
281
+ /**
282
+ * Format: double
283
+ * @description Builder-attributed shares/contracts volume
284
+ */
285
+ builder_shares_volume?: number | null;
286
+ /**
287
+ * Format: double
288
+ * @description Total fees collected in USD
289
+ */
194
290
  fees?: number | null;
291
+ /**
292
+ * Format: double
293
+ * @description Builder-attributed fees in USD
294
+ */
295
+ builder_fees?: number | null;
195
296
  /**
196
297
  * Format: int64
197
298
  * @description Total number of transactions
198
299
  */
199
300
  txns?: number | null;
301
+ /**
302
+ * Format: int64
303
+ * @description Builder-attributed transaction count
304
+ */
305
+ builder_txns?: number | null;
200
306
  /**
201
307
  * Format: int64
202
308
  * @description Number of unique traders
203
309
  */
204
310
  unique_traders?: number | null;
311
+ /**
312
+ * Format: int64
313
+ * @description Number of unique builder-attributed traders
314
+ */
315
+ unique_builder_traders?: number | null;
205
316
  };
206
317
  /** @description CTF ConditionResolution: positions become redeemable on the Conditional Tokens contract. */
207
318
  ConditionResolutionEvent: {
@@ -272,45 +383,92 @@ export interface components {
272
383
  slug?: string | null;
273
384
  event_slug?: string | null;
274
385
  };
386
+ /** @description Subscription filters for the `event_metrics` event. All fields are optional. */
387
+ EventMetricsFilters: {
388
+ /** @description Restrict to these events. Empty = all events. */
389
+ event_slugs?: string[] | null;
390
+ /** @description Restrict to these aggregation windows. */
391
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
392
+ /**
393
+ * Format: double
394
+ * @description Only fire when aggregated event volume ≥ this value (USD).
395
+ */
396
+ min_volume_usd?: number | null;
397
+ /** Format: double */
398
+ max_volume_usd?: number | null;
399
+ /** Format: int64 */
400
+ min_txns?: number | null;
401
+ /** Format: int64 */
402
+ min_unique_traders?: number | null;
403
+ /** Format: double */
404
+ min_fees?: number | null;
405
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
406
+ exclude_shortterm_markets?: boolean | null;
407
+ };
275
408
  /** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
276
409
  EventMetricsPayload: {
277
410
  /** @description Event slug */
278
411
  event_slug?: string | null;
412
+ /** @description Aggregation window */
413
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
279
414
  /**
280
- * @description Aggregation window
281
- * @enum {string|null}
415
+ * Format: double
416
+ * @description Total aggregated volume across all markets in the event (USD)
282
417
  */
283
- timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
284
- /** @description Total aggregated volume across all markets in the event (USD) */
285
418
  volume_usd?: number | null;
286
- /** @description Total fees collected in USD */
419
+ /**
420
+ * Format: double
421
+ * @description Total aggregated shares/contracts volume across all markets in the event
422
+ */
423
+ shares_volume?: number | null;
424
+ /**
425
+ * Format: double
426
+ * @description Builder-attributed aggregated volume in USD
427
+ */
428
+ builder_usd_volume?: number | null;
429
+ /**
430
+ * Format: double
431
+ * @description Builder-attributed aggregated shares/contracts volume
432
+ */
433
+ builder_shares_volume?: number | null;
434
+ /**
435
+ * Format: double
436
+ * @description Total fees collected in USD
437
+ */
287
438
  fees?: number | null;
439
+ /**
440
+ * Format: double
441
+ * @description Builder-attributed fees in USD
442
+ */
443
+ builder_fees?: number | null;
288
444
  /**
289
445
  * Format: int64
290
446
  * @description Total number of transactions
291
447
  */
292
448
  txns?: number | null;
449
+ /**
450
+ * Format: int64
451
+ * @description Builder-attributed transaction count
452
+ */
453
+ builder_txns?: number | null;
293
454
  /**
294
455
  * Format: int64
295
456
  * @description Number of unique traders
296
457
  */
297
458
  unique_traders?: number | null;
459
+ /**
460
+ * Format: int64
461
+ * @description Number of unique builder-attributed traders
462
+ */
463
+ unique_builder_traders?: number | null;
298
464
  };
299
- /** @description Payload delivered when a trader's per-event PnL crosses a configured threshold */
465
+ /** @description Event PnL webhook payload. */
300
466
  EventPnlPayload: {
301
- /** @description Trader wallet address (lowercase) */
302
467
  trader?: string | null;
303
- /** @description Event slug */
304
468
  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
- */
469
+ /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
470
+ timeframe: string;
471
+ /** Format: int64 */
314
472
  markets_traded?: number | null;
315
473
  /** Format: int64 */
316
474
  outcomes_traded?: number | null;
@@ -322,44 +480,58 @@ export interface components {
322
480
  total_redemptions?: number | null;
323
481
  /** Format: int64 */
324
482
  total_merges?: number | null;
325
- /** @description Total volume in USD */
483
+ /** Format: double */
326
484
  total_volume_usd?: number | null;
485
+ /** Format: double */
327
486
  buy_usd?: number | null;
487
+ /** Format: double */
328
488
  sell_usd?: number | null;
489
+ /** Format: double */
329
490
  redemption_usd?: number | null;
491
+ /** Format: double */
330
492
  merge_usd?: number | null;
331
- /** @description Realized PnL in USD for this event */
493
+ /** Format: double */
332
494
  realized_pnl_usd?: number | null;
333
495
  /** Format: int64 */
334
496
  winning_markets?: number | null;
335
497
  /** Format: int64 */
336
498
  losing_markets?: number | null;
499
+ /** Format: double */
337
500
  total_fees?: number | null;
338
- /**
339
- * Format: int64
340
- * @description Unix seconds
341
- */
501
+ /** Format: int64 */
342
502
  first_trade_at?: number | null;
343
- /**
344
- * Format: int64
345
- * @description Unix seconds
346
- */
503
+ /** Format: int64 */
347
504
  last_trade_at?: number | null;
348
505
  };
349
- /** @description Payload delivered when an event's aggregated trading volume crosses a USD milestone */
506
+ /** @description Subscription filters for the `event_volume_milestone` event. */
507
+ EventVolumeMilestoneFilters: {
508
+ /** @description **Required.** Aggregation windows to monitor. */
509
+ timeframes: components["schemas"]["MetricFilterTimeframe"][];
510
+ /** @description Restrict to these events. */
511
+ event_slugs?: string[] | null;
512
+ /** @description Specific USD milestones to trigger on. */
513
+ milestone_amounts?: number[] | null;
514
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
515
+ exclude_shortterm_markets?: boolean | null;
516
+ };
517
+ /** @description Event volume milestone webhook payload */
350
518
  EventVolumeMilestonePayload: {
351
- /** @description Event slug */
352
519
  event_slug: string;
520
+ timeframe: string;
353
521
  /**
354
- * @description Aggregation window
355
- * @enum {string}
522
+ * Format: double
523
+ * @description Milestone amount reached (USD)
356
524
  */
357
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
358
- /** @description The USD milestone amount that was crossed */
359
525
  milestone_usd: number;
360
- /** @description Current aggregated event volume at time of trigger (USD) */
526
+ /**
527
+ * Format: double
528
+ * @description Current volume (USD) that triggered the milestone
529
+ */
361
530
  current_volume_usd: number;
362
- /** @description Total fees in USD for this timeframe */
531
+ /**
532
+ * Format: double
533
+ * @description Total fees collected in this timeframe
534
+ */
363
535
  fees: number;
364
536
  /**
365
537
  * Format: int64
@@ -367,25 +539,60 @@ export interface components {
367
539
  */
368
540
  txns: number;
369
541
  };
370
- /** @description Payload delivered when an event's aggregated volume has spiked since the last snapshot */
542
+ /** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
543
+ EventVolumeSpikeFilters: {
544
+ /**
545
+ * Format: double
546
+ * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
547
+ */
548
+ spike_ratio: number;
549
+ /**
550
+ * Format: int64
551
+ * @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
552
+ */
553
+ window_secs?: number | null;
554
+ /** @description Restrict to these events. */
555
+ event_slugs?: string[] | null;
556
+ /** @description Restrict to these aggregation windows. */
557
+ timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
558
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
559
+ exclude_shortterm_markets?: boolean | null;
560
+ };
561
+ /** @description Event volume spike webhook payload */
371
562
  EventVolumeSpikePayload: {
372
- /** @description Event slug */
373
563
  event_slug: string;
564
+ event_title?: string | null;
565
+ image_url?: string | null;
566
+ timeframe: string;
374
567
  /**
375
- * @description Aggregation window
376
- * @enum {string}
568
+ * Format: double
569
+ * @description Current aggregated event volume at the time of the spike (USD)
377
570
  */
378
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
379
- /** @description Current aggregated event volume at time of the spike (USD) */
380
571
  current_volume_usd: number;
381
- /** @description Volume at the snapshot baseline (USD) */
572
+ /**
573
+ * Format: double
574
+ * @description Volume at the snapshot baseline (USD)
575
+ */
382
576
  snapshot_volume_usd: number;
383
- /** @description New volume since the snapshot that triggered this notification (USD) */
577
+ /**
578
+ * Format: double
579
+ * @description New volume since the snapshot that triggered this notification (USD)
580
+ */
384
581
  delta_volume_usd: number;
385
- /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
582
+ /**
583
+ * Format: double
584
+ * @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
585
+ */
386
586
  spike_pct: number;
387
- /** Format: int64 */
587
+ /**
588
+ * Format: int64
589
+ * @description Total transactions in this timeframe
590
+ */
388
591
  txns: number;
592
+ /**
593
+ * Format: double
594
+ * @description Total fees in this timeframe
595
+ */
389
596
  fees: number;
390
597
  };
391
598
  /** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
@@ -400,7 +607,10 @@ export interface components {
400
607
  condition_id?: string | null;
401
608
  /** @description Outcome name (e.g. "Yes", "No") */
402
609
  outcome?: string | null;
403
- /** @description Outcome index: 0 = Yes/Up, 1 = No */
610
+ /**
611
+ * Format: int32
612
+ * @description Outcome index: 0 = Yes/Up, 1 = No
613
+ */
404
614
  outcome_index?: number | null;
405
615
  /** @description Market question text */
406
616
  question?: string | null;
@@ -408,6 +618,8 @@ export interface components {
408
618
  market_slug?: string | null;
409
619
  /** @description Parent event slug */
410
620
  event_slug?: string | null;
621
+ /** @description Market image URL */
622
+ image_url?: string | null;
411
623
  /** @description Unique trade identifier */
412
624
  trade_id: string;
413
625
  /** @description Transaction hash */
@@ -422,148 +634,128 @@ export interface components {
422
634
  * @description Block confirmation timestamp (Unix seconds)
423
635
  */
424
636
  confirmed_at: number;
425
- /** @description USD size of the trade (6 decimal places) */
637
+ /**
638
+ * Format: double
639
+ * @description USD size of the trade (6 decimal places)
640
+ */
426
641
  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
642
  /**
432
- * @description Trade direction
433
- * @enum {string}
643
+ * Format: double
644
+ * @description Outcome shares traded (6 decimal places)
434
645
  */
435
- side: "Buy" | "Sell";
436
- /** @description Outcome token price (0.0–1.0) */
437
- price: number;
646
+ shares_amount: number;
438
647
  /**
439
- * @description Exchange contract that processed the trade
440
- * @enum {string}
648
+ * Format: double
649
+ * @description Fee paid in USD (6 decimal places)
441
650
  */
442
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
651
+ fee: number;
652
+ /** @description Trade direction */
653
+ side: "Buy" | "Sell";
443
654
  /**
444
- * @description Trade type (webhook events only fire on order fills)
445
- * @enum {string}
655
+ * Format: double
656
+ * @description Outcome token price (0.0–1.0)
446
657
  */
658
+ price: number;
659
+ /** @description Exchange contract that processed the trade */
660
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
661
+ /** @description Trade type (webhook events only fire on order fills) */
447
662
  trade_type: "OrderFilled" | "OrdersMatched";
448
663
  };
449
- /** @description Payload delivered when a trader's global PnL (across all markets) crosses a configured threshold */
664
+ /** @description Global PnL webhook payload. */
450
665
  GlobalPnlPayload: {
451
- /** @description Trader wallet address (lowercase) */
452
666
  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) */
667
+ /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
668
+ timeframe: string;
669
+ /** Format: double */
459
670
  realized_pnl_usd?: number | null;
460
- /**
461
- * Format: int64
462
- * @description Number of distinct events traded
463
- */
671
+ /** Format: int64 */
464
672
  events_traded?: number | null;
465
- /**
466
- * Format: int64
467
- * @description Number of distinct markets traded
468
- */
673
+ /** Format: int64 */
469
674
  markets_traded?: number | null;
470
- /**
471
- * Format: int64
472
- * @description Total buy transactions
473
- */
675
+ /** Format: int64 */
474
676
  total_buys?: number | null;
475
- /**
476
- * Format: int64
477
- * @description Total sell transactions
478
- */
677
+ /** Format: int64 */
479
678
  total_sells?: number | null;
480
- /**
481
- * Format: int64
482
- * @description Total redemption transactions
483
- */
679
+ /** Format: int64 */
484
680
  total_redemptions?: number | null;
485
- /**
486
- * Format: int64
487
- * @description Total merge transactions
488
- */
681
+ /** Format: int64 */
489
682
  total_merges?: number | null;
490
- /** @description Total USD volume (buys + sells + redemptions + merges) */
683
+ /** Format: double */
491
684
  total_volume_usd?: number | null;
492
- /** @description Total buy volume in USD */
685
+ /** Format: double */
493
686
  buy_volume_usd?: number | null;
494
- /** @description Total sell volume in USD */
687
+ /** Format: double */
495
688
  sell_volume_usd?: number | null;
496
- /** @description Total redemption volume in USD */
689
+ /** Format: double */
497
690
  redemption_volume_usd?: number | null;
498
- /** @description Total merge volume in USD */
691
+ /** Format: double */
499
692
  merge_volume_usd?: number | null;
500
- /**
501
- * Format: int64
502
- * @description Number of markets where trader realised a profit
503
- */
693
+ /** Format: int64 */
504
694
  markets_won?: number | null;
505
- /**
506
- * Format: int64
507
- * @description Number of markets where trader realised a loss
508
- */
695
+ /** Format: int64 */
509
696
  markets_lost?: number | null;
510
- /** @description Market win rate as a percentage (0.0–100.0) */
697
+ /** Format: double */
511
698
  market_win_rate_pct?: number | null;
512
- /** @description Average PnL per market in USD */
699
+ /** Format: double */
513
700
  avg_pnl_per_market?: number | null;
514
- /** @description Average PnL per trade in USD */
701
+ /** Format: double */
515
702
  avg_pnl_per_trade?: number | null;
516
- /** @description Average hold time across all positions (seconds) */
703
+ /** Format: double */
517
704
  avg_hold_time_seconds?: number | null;
518
- /** @description Total fees paid in USD */
705
+ /** Format: double */
519
706
  total_fees?: number | null;
520
- /** @description Best single-trade PnL in USD */
707
+ /** Format: double */
521
708
  best_trade_pnl_usd?: number | null;
522
- /** @description Condition ID of the best trade */
523
709
  best_trade_condition_id?: string | null;
524
- /**
525
- * Format: int64
526
- * @description Timestamp of the first trade (Unix seconds)
527
- */
710
+ /** Format: int64 */
528
711
  first_trade_at?: number | null;
529
- /**
530
- * Format: int64
531
- * @description Timestamp of the most recent trade (Unix seconds)
532
- */
712
+ /** Format: int64 */
533
713
  last_trade_at?: number | null;
534
714
  };
535
715
  /** @description Response for GET /v1/webhook/events */
536
716
  ListEventsResponse: {
537
717
  events: components["schemas"]["WebhookEventInfo"][];
538
718
  };
539
- /** @description An outcome entry within a newly created market */
719
+ /** @description Subscription filters for the `market_created` event. All fields are optional. */
720
+ MarketCreatedFilters: {
721
+ /** @description Restrict to markets with these tags or category names (case-insensitive match). */
722
+ tags?: string[] | null;
723
+ /** @description Restrict to markets belonging to these events. */
724
+ event_slugs?: string[] | null;
725
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
726
+ exclude_shortterm_markets?: boolean | null;
727
+ };
728
+ /** @description Outcome entry in the market created payload — mirrors `NewMarketOutcome` */
540
729
  MarketCreatedOutcome: {
541
- /** @description Outcome index (0 = Yes, 1 = No) */
730
+ /**
731
+ * Format: int32
732
+ * @description Outcome index (0 = Yes, 1 = No)
733
+ */
542
734
  index: number;
543
735
  /** @description Outcome name (e.g. "Yes", "No") */
544
736
  name: string;
545
- /** @description ERC-1155 position token ID for this outcome */
737
+ /** @description ERC1155 position token ID */
546
738
  position_id: string;
547
739
  };
548
- /** @description Payload delivered when a new prediction market is detected on-chain and enriched with Gamma API metadata */
740
+ /** @description Market created webhook payload mirrors `NewMarketPayload` field-for-field */
549
741
  MarketCreatedPayload: {
550
742
  /** @description Condition ID (0x-prefixed hex, lowercase) */
551
743
  condition_id: string;
552
744
  /** @description Market slug */
553
745
  market_slug: string;
554
- /** @description Parent event slug */
746
+ /** @description Event slug (parent event) */
555
747
  event_slug?: string | null;
556
- /** @description Parent event ID */
748
+ /** @description Event ID */
557
749
  event_id?: string | null;
558
- /** @description Parent event title */
750
+ /** @description Event title */
559
751
  event_title?: string | null;
560
- /** @description Series slug (for recurring markets) */
752
+ /** @description Series slug */
561
753
  series_slug?: string | null;
562
- /** @description List of market outcomes with their position IDs */
754
+ /** @description Outcomes with their position IDs, index, and name */
563
755
  outcomes: components["schemas"]["MarketCreatedOutcome"][];
564
- /** @description Full market question text */
756
+ /** @description Market question */
565
757
  question: string;
566
- /** @description Short display title */
758
+ /** @description Market title (short display name) */
567
759
  title?: string | null;
568
760
  /** @description Market description */
569
761
  description: string;
@@ -576,23 +768,46 @@ export interface components {
576
768
  /** @description Whether this is a neg-risk market */
577
769
  neg_risk: boolean;
578
770
  };
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;
771
+ /** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
772
+ MarketMetricsFilters: {
773
+ /** @description Restrict to these markets. Empty = all markets. */
774
+ condition_ids?: string[] | null;
775
+ /** @description Restrict to these aggregation windows. Empty = all windows. */
776
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
587
777
  /**
588
- * @description PnL aggregation window
589
- * @enum {string}
778
+ * Format: double
779
+ * @description Only fire when volume ≥ this value (USD).
780
+ */
781
+ min_volume_usd?: number | null;
782
+ /**
783
+ * Format: double
784
+ * @description Only fire when volume ≤ this value (USD).
785
+ */
786
+ max_volume_usd?: number | null;
787
+ /**
788
+ * Format: int64
789
+ * @description Only fire when transaction count ≥ this value.
590
790
  */
591
- timeframe: "1d" | "7d" | "30d" | "lifetime";
791
+ min_txns?: number | null;
592
792
  /**
593
793
  * Format: int64
594
- * @description Number of distinct outcomes traded in this market
794
+ * @description Only fire when unique trader count this value.
795
+ */
796
+ min_unique_traders?: number | null;
797
+ /**
798
+ * Format: double
799
+ * @description Only fire when total fees ≥ this value (USD).
595
800
  */
801
+ min_fees?: number | null;
802
+ };
803
+ /** @description Market PnL webhook payload. */
804
+ MarketPnlPayload: {
805
+ trader?: string | null;
806
+ condition_id?: string | null;
807
+ event_slug?: string | null;
808
+ /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
809
+ timeframe: string;
810
+ /** Format: int64 */
596
811
  outcomes_traded?: number | null;
597
812
  /** Format: int64 */
598
813
  total_buys?: number | null;
@@ -602,59 +817,95 @@ export interface components {
602
817
  total_redemptions?: number | null;
603
818
  /** Format: int64 */
604
819
  total_merges?: number | null;
605
- /** @description Total buy volume in USD */
820
+ /** Format: double */
606
821
  buy_usd?: number | null;
607
- /** @description Total sell volume in USD */
822
+ /** Format: double */
608
823
  sell_usd?: number | null;
609
- /** @description Total redemption volume in USD */
824
+ /** Format: double */
610
825
  redemption_usd?: number | null;
611
- /** @description Total merge volume in USD */
826
+ /** Format: double */
612
827
  merge_usd?: number | null;
613
- /** @description Realized PnL in USD for this market */
828
+ /** Format: double */
614
829
  realized_pnl_usd?: number | null;
615
- /**
616
- * Format: int64
617
- * @description Number of outcomes with positive PnL
618
- */
830
+ /** Format: int64 */
619
831
  winning_outcomes?: number | null;
620
- /** @description Total fees paid in USD for this market */
832
+ /** Format: double */
621
833
  total_fees?: number | null;
834
+ /** Format: int64 */
835
+ first_trade_at?: number | null;
836
+ /** Format: int64 */
837
+ last_trade_at?: number | null;
838
+ };
839
+ /** @description Subscription filters for the `market_volume_milestone` event. */
840
+ MarketVolumeMilestoneFilters: {
841
+ /** @description **Required.** Aggregation windows to monitor (e.g. \["1h", "24h"\]). */
842
+ timeframes: components["schemas"]["MetricFilterTimeframe"][];
843
+ /** @description Restrict to these markets. Empty = all markets. */
844
+ condition_ids?: string[] | null;
845
+ /** @description Specific USD milestones to trigger on (e.g. \[10000, 100000, 1000000\]). Empty = all milestones. */
846
+ milestone_amounts?: number[] | null;
847
+ };
848
+ /** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
849
+ MarketVolumeSpikeFilters: {
622
850
  /**
623
- * Format: int64
624
- * @description Timestamp of first trade in market (Unix seconds)
851
+ * Format: double
852
+ * @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
853
  */
626
- first_trade_at?: number | null;
854
+ spike_ratio: number;
627
855
  /**
628
856
  * Format: int64
629
- * @description Timestamp of most recent trade in market (Unix seconds)
857
+ * @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
630
858
  */
631
- last_trade_at?: number | null;
859
+ window_secs?: number | null;
860
+ /** @description Restrict to these markets. Empty = all markets. */
861
+ condition_ids?: string[] | null;
862
+ /** @description Restrict to these aggregation windows. Empty = all windows. */
863
+ timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
632
864
  };
633
- /** @description Payload delivered when a market's volume has spiked since the last snapshot */
865
+ /** @description Market volume spike webhook payload */
634
866
  MarketVolumeSpikePayload: {
635
- /** @description Market condition ID */
636
867
  condition_id: string;
868
+ question?: string | null;
869
+ market_slug?: string | null;
870
+ event_slug?: string | null;
871
+ image_url?: string | null;
872
+ timeframe: string;
637
873
  /**
638
- * @description Aggregation window
639
- * @enum {string}
874
+ * Format: double
875
+ * @description Current window volume at the time of the spike (USD)
640
876
  */
641
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
642
- /** @description Current volume at the time of the spike (USD) */
643
877
  current_volume_usd: number;
644
- /** @description Volume at the snapshot baseline (USD) */
878
+ /**
879
+ * Format: double
880
+ * @description Volume at the snapshot baseline (USD)
881
+ */
645
882
  snapshot_volume_usd: number;
646
- /** @description New volume since the snapshot that triggered this notification (USD) */
883
+ /**
884
+ * Format: double
885
+ * @description New volume since the snapshot that triggered this notification (USD)
886
+ */
647
887
  delta_volume_usd: number;
648
- /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
888
+ /**
889
+ * Format: double
890
+ * @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
891
+ */
649
892
  spike_pct: number;
650
893
  /**
651
894
  * Format: int64
652
895
  * @description Total transactions in this timeframe
653
896
  */
654
897
  txns: number;
655
- /** @description Total fees in USD for this timeframe */
898
+ /**
899
+ * Format: double
900
+ * @description Total fees in this timeframe
901
+ */
656
902
  fees: number;
657
903
  };
904
+ /**
905
+ * @description Aggregation windows emitted by the metrics / milestone streams.
906
+ * @enum {string}
907
+ */
908
+ MetricFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
658
909
  /** @description NegRisk Adapter: outcome reported for a neg-risk market question. */
659
910
  NegRiskOutcomeReportedEvent: {
660
911
  id: string;
@@ -689,7 +940,10 @@ export interface components {
689
940
  condition_id?: string | null;
690
941
  /** @description Outcome name (e.g. "Yes", "No") */
691
942
  outcome?: string | null;
692
- /** @description Outcome index: 0 = Yes/Up, 1 = No */
943
+ /**
944
+ * Format: int32
945
+ * @description Outcome index: 0 = Yes/Up, 1 = No
946
+ */
693
947
  outcome_index?: number | null;
694
948
  /** @description Market question text */
695
949
  question?: string | null;
@@ -697,6 +951,8 @@ export interface components {
697
951
  market_slug?: string | null;
698
952
  /** @description Parent event slug */
699
953
  event_slug?: string | null;
954
+ /** @description Market image URL */
955
+ image_url?: string | null;
700
956
  /** @description Unique trade identifier */
701
957
  trade_id: string;
702
958
  /** @description Transaction hash */
@@ -711,32 +967,44 @@ export interface components {
711
967
  * @description Block confirmation timestamp (Unix seconds)
712
968
  */
713
969
  confirmed_at: number;
714
- /** @description USD size of the trade (6 decimal places) */
970
+ /**
971
+ * Format: double
972
+ * @description USD size of the trade (6 decimal places)
973
+ */
715
974
  amount_usd: number;
716
- /** @description Outcome shares traded (6 decimal places) */
975
+ /**
976
+ * Format: double
977
+ * @description Outcome shares traded (6 decimal places)
978
+ */
717
979
  shares_amount: number;
718
- /** @description Fee paid in USD (6 decimal places) */
719
- fee: number;
720
980
  /**
721
- * @description Trade direction
722
- * @enum {string}
981
+ * Format: double
982
+ * @description Fee paid in USD (6 decimal places)
723
983
  */
984
+ fee: number;
985
+ /** @description Trade direction */
724
986
  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
987
  /**
730
- * @description Exchange contract that processed the trade
731
- * @enum {string}
988
+ * Format: double
989
+ * @description Outcome token price (0.0–1.0)
732
990
  */
733
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
991
+ price: number;
734
992
  /**
735
- * @description Trade type (webhook events only fire on order fills)
736
- * @enum {string}
993
+ * Format: double
994
+ * @description Implied probability (0.0–1.0); null when outcome is unknown
737
995
  */
996
+ probability?: number | null;
997
+ /** @description Exchange contract that processed the trade */
998
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
999
+ /** @description Trade type (webhook events only fire on order fills) */
738
1000
  trade_type: "OrderFilled" | "OrdersMatched";
739
1001
  };
1002
+ /**
1003
+ * @description Trade types accepted by `trader_new_trade.trade_types`. Webhook fires on
1004
+ * fill-style trades only.
1005
+ * @enum {string}
1006
+ */
1007
+ NewTradeFilterType: "OrderFilled" | "OrdersMatched";
740
1008
  /** @description Payload delivered on every order-filled trade */
741
1009
  NewTradePayload: {
742
1010
  /** @description Limit-order maker wallet address (lowercase) */
@@ -749,7 +1017,10 @@ export interface components {
749
1017
  condition_id?: string | null;
750
1018
  /** @description Outcome name (e.g. "Yes", "No") */
751
1019
  outcome?: string | null;
752
- /** @description Outcome index: 0 = Yes/Up, 1 = No */
1020
+ /**
1021
+ * Format: int32
1022
+ * @description Outcome index: 0 = Yes/Up, 1 = No
1023
+ */
753
1024
  outcome_index?: number | null;
754
1025
  /** @description Market question text */
755
1026
  question?: string | null;
@@ -757,6 +1028,8 @@ export interface components {
757
1028
  market_slug?: string | null;
758
1029
  /** @description Parent event slug */
759
1030
  event_slug?: string | null;
1031
+ /** @description Market image URL */
1032
+ image_url?: string | null;
760
1033
  /** @description Unique trade identifier */
761
1034
  trade_id: string;
762
1035
  /** @description Transaction hash */
@@ -771,32 +1044,43 @@ export interface components {
771
1044
  * @description Block confirmation timestamp (Unix seconds)
772
1045
  */
773
1046
  confirmed_at: number;
774
- /** @description USD size of the trade (6 decimal places) */
1047
+ /**
1048
+ * Format: double
1049
+ * @description USD size of the trade (6 decimal places)
1050
+ */
775
1051
  amount_usd: number;
776
- /** @description Outcome shares traded (6 decimal places) */
1052
+ /**
1053
+ * Format: double
1054
+ * @description Outcome shares traded (6 decimal places)
1055
+ */
777
1056
  shares_amount: number;
778
- /** @description Fee paid in USD (6 decimal places) */
779
- fee: number;
780
1057
  /**
781
- * @description Trade direction
782
- * @enum {string}
1058
+ * Format: double
1059
+ * @description Fee paid in USD (6 decimal places)
783
1060
  */
1061
+ fee: number;
1062
+ /** @description Trade direction */
784
1063
  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
1064
  /**
790
- * @description Exchange contract that processed the trade
791
- * @enum {string}
1065
+ * Format: double
1066
+ * @description Outcome token price (0.0–1.0)
792
1067
  */
793
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
1068
+ price: number;
794
1069
  /**
795
- * @description Trade type (webhook events only fire on order fills)
796
- * @enum {string}
1070
+ * Format: double
1071
+ * @description Implied probability (0.0–1.0); null when outcome is unknown
797
1072
  */
1073
+ probability?: number | null;
1074
+ /** @description Exchange contract that processed the trade */
1075
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
1076
+ /** @description Trade type (webhook events only fire on order fills) */
798
1077
  trade_type: "OrderFilled" | "OrdersMatched";
799
1078
  };
1079
+ /**
1080
+ * @description Oracle event variants accepted by `oracle_events.oracle_event_types`.
1081
+ * @enum {string}
1082
+ */
1083
+ OracleEventFilterType: "AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported";
800
1084
  /**
801
1085
  * @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
802
1086
  * and only includes fields relevant to each type.
@@ -853,6 +1137,18 @@ export interface components {
853
1137
  /** @enum {string} */
854
1138
  event_type: "NegRiskOutcomeReported";
855
1139
  });
1140
+ /** @description Subscription filters for the `oracle_events` event. All fields are optional. */
1141
+ OracleEventsFilters: {
1142
+ /** @description Restrict to these event types (case-insensitive). Empty = all. */
1143
+ oracle_event_types?: components["schemas"]["OracleEventFilterType"][] | null;
1144
+ /** @description Restrict to events for these condition IDs. */
1145
+ condition_ids?: string[] | null;
1146
+ };
1147
+ /**
1148
+ * @description PnL aggregation windows accepted by `*_pnl.timeframes`.
1149
+ * @enum {string}
1150
+ */
1151
+ PnlFilterTimeframe: "1d" | "7d" | "30d" | "lifetime";
856
1152
  /**
857
1153
  * @description PnL timeframe enum for webhook filtering
858
1154
  * @enum {string}
@@ -862,7 +1158,7 @@ export interface components {
862
1158
  * @description Polymarket webhook event types
863
1159
  * @enum {string}
864
1160
  */
865
- PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update" | "price_spike" | "oracle_events";
1161
+ PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "tag_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update" | "price_spike" | "oracle_events";
866
1162
  /**
867
1163
  * @description Polymarket-specific webhook filters
868
1164
  *
@@ -875,11 +1171,12 @@ export interface components {
875
1171
  * - event_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, event_slugs, min_markets_traded
876
1172
  * - condition_metrics: condition_ids, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
877
1173
  * - event_metrics: event_slugs, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
1174
+ * - tag_metrics: tags, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
878
1175
  * - position_metrics: position_ids, condition_ids, outcomes, min_volume_usd, max_volume_usd, min_buy_usd, min_sell_volume_usd, min_fees, min_txns, min_price_change_pct, min_probability_change_pct, timeframes
879
1176
  * - volume_milestone: condition_ids, timeframes, milestone_amounts
880
1177
  * - 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
1178
  * - 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
1179
+ * - probability_spike: condition_ids, event_slugs, outcomes, min_probability, max_probability, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
883
1180
  * - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
884
1181
  * - trader_new_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
885
1182
  * - trader_trade_event: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
@@ -1050,6 +1347,44 @@ export interface components {
1050
1347
  */
1051
1348
  oracle_event_types?: string[];
1052
1349
  };
1350
+ /** @description Subscription filters for the `position_metrics` event. All fields are optional. */
1351
+ PositionMetricsFilters: {
1352
+ /** @description Restrict to these outcome token IDs. */
1353
+ position_ids?: string[] | null;
1354
+ /** @description Restrict to positions within these markets. */
1355
+ condition_ids?: string[] | null;
1356
+ /** @description Restrict to positions with these outcome names (e.g. \["Yes", "No"\]). */
1357
+ outcomes?: string[] | null;
1358
+ /** @description Restrict to these aggregation windows. */
1359
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
1360
+ /**
1361
+ * Format: double
1362
+ * @description Only fire when position volume ≥ this value (USD).
1363
+ */
1364
+ min_volume_usd?: number | null;
1365
+ /** Format: double */
1366
+ max_volume_usd?: number | null;
1367
+ /** Format: double */
1368
+ min_buy_usd?: number | null;
1369
+ /** Format: double */
1370
+ min_sell_volume_usd?: number | null;
1371
+ /** Format: int64 */
1372
+ min_txns?: number | null;
1373
+ /** Format: int64 */
1374
+ min_unique_traders?: number | null;
1375
+ /**
1376
+ * Format: double
1377
+ * @description Only fire when price change % ≥ this value.
1378
+ */
1379
+ min_price_change_pct?: number | null;
1380
+ /**
1381
+ * Format: double
1382
+ * @description Only fire when probability change % ≥ this value.
1383
+ */
1384
+ min_probability_change_pct?: number | null;
1385
+ /** Format: double */
1386
+ min_fees?: number | null;
1387
+ };
1053
1388
  /** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
1054
1389
  PositionMetricsPayload: {
1055
1390
  /** @description ERC-1155 outcome token ID */
@@ -1057,23 +1392,82 @@ export interface components {
1057
1392
  /** @description Outcome name (e.g. "Yes", "No") */
1058
1393
  outcome?: string | null;
1059
1394
  /**
1060
- * Format: int16
1395
+ * Format: int32
1061
1396
  * @description Outcome index
1062
1397
  */
1063
1398
  outcome_index?: number | null;
1399
+ /** @description Aggregation window */
1400
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
1064
1401
  /**
1065
- * @description Aggregation window
1066
- * @enum {string|null}
1402
+ * Format: double
1403
+ * @description Total trading volume in USD
1067
1404
  */
1068
- timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
1069
- /** @description Total trading volume in USD */
1070
1405
  volume_usd?: number | null;
1071
- /** @description Buy volume in USD */
1406
+ /**
1407
+ * Format: double
1408
+ * @description Buy volume in USD
1409
+ */
1072
1410
  buy_volume_usd?: number | null;
1073
- /** @description Sell volume in USD */
1411
+ /**
1412
+ * Format: double
1413
+ * @description Sell volume in USD
1414
+ */
1074
1415
  sell_volume_usd?: number | null;
1075
- /** @description Total fees in USD */
1416
+ /**
1417
+ * Format: double
1418
+ * @description Total shares/contracts volume
1419
+ */
1420
+ shares_volume?: number | null;
1421
+ /**
1422
+ * Format: double
1423
+ * @description Buy shares/contracts volume
1424
+ */
1425
+ shares_buy_volume?: number | null;
1426
+ /**
1427
+ * Format: double
1428
+ * @description Sell shares/contracts volume
1429
+ */
1430
+ shares_sell_volume?: number | null;
1431
+ /**
1432
+ * Format: double
1433
+ * @description Builder-attributed volume in USD
1434
+ */
1435
+ builder_usd_volume?: number | null;
1436
+ /**
1437
+ * Format: double
1438
+ * @description Builder-attributed buy volume in USD
1439
+ */
1440
+ builder_usd_buy_volume?: number | null;
1441
+ /**
1442
+ * Format: double
1443
+ * @description Builder-attributed sell volume in USD
1444
+ */
1445
+ builder_usd_sell_volume?: number | null;
1446
+ /**
1447
+ * Format: double
1448
+ * @description Builder-attributed shares/contracts volume
1449
+ */
1450
+ builder_shares_volume?: number | null;
1451
+ /**
1452
+ * Format: double
1453
+ * @description Builder-attributed buy shares/contracts volume
1454
+ */
1455
+ builder_shares_buy_volume?: number | null;
1456
+ /**
1457
+ * Format: double
1458
+ * @description Builder-attributed sell shares/contracts volume
1459
+ */
1460
+ builder_shares_sell_volume?: number | null;
1461
+ /**
1462
+ * Format: double
1463
+ * @description Total fees in USD
1464
+ */
1076
1465
  fees?: number | null;
1466
+ /**
1467
+ * Format: double
1468
+ * @description Builder-attributed fees in USD
1469
+ */
1470
+ builder_fees?: number | null;
1077
1471
  /** Format: int64 */
1078
1472
  txns?: number | null;
1079
1473
  /** Format: int64 */
@@ -1081,128 +1475,308 @@ export interface components {
1081
1475
  /** Format: int64 */
1082
1476
  sells?: number | null;
1083
1477
  /** Format: int64 */
1478
+ builder_txns?: number | null;
1479
+ /** Format: int64 */
1480
+ builder_buys?: number | null;
1481
+ /** Format: int64 */
1482
+ builder_sells?: number | null;
1483
+ /** Format: int64 */
1084
1484
  unique_traders?: number | null;
1485
+ /** Format: int64 */
1486
+ unique_builder_traders?: number | null;
1487
+ /** Format: double */
1085
1488
  price_open?: number | null;
1489
+ /** Format: double */
1086
1490
  price_close?: number | null;
1491
+ /** Format: double */
1087
1492
  price_high?: number | null;
1493
+ /** Format: double */
1088
1494
  price_low?: number | null;
1495
+ /** Format: double */
1089
1496
  probability_open?: number | null;
1497
+ /** Format: double */
1090
1498
  probability_close?: number | null;
1499
+ /** Format: double */
1091
1500
  probability_high?: number | null;
1501
+ /** Format: double */
1092
1502
  probability_low?: number | null;
1503
+ /** Format: double */
1504
+ avg_trade_shares?: number | null;
1505
+ /** Format: double */
1506
+ avg_buy_shares?: number | null;
1507
+ /** Format: double */
1508
+ avg_sell_shares?: number | null;
1509
+ };
1510
+ /** @description Subscription filters for the `position_volume_milestone` event. */
1511
+ PositionVolumeMilestoneFilters: {
1512
+ /** @description **Required.** Aggregation windows to monitor. */
1513
+ timeframes: components["schemas"]["MetricFilterTimeframe"][];
1514
+ /** @description Restrict to these outcome token IDs. */
1515
+ position_ids?: string[] | null;
1516
+ /** @description Restrict to positions within these markets. */
1517
+ condition_ids?: string[] | null;
1518
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
1519
+ outcomes?: string[] | null;
1520
+ /** @description Specific USD milestones to trigger on. */
1521
+ milestone_amounts?: number[] | null;
1093
1522
  };
1094
- /** @description Payload delivered when a position's trading volume crosses a USD milestone */
1523
+ /** @description Position volume milestone webhook payload */
1095
1524
  PositionVolumeMilestonePayload: {
1096
- /** @description Parent market condition ID */
1097
1525
  condition_id?: string | null;
1098
- /** @description ERC-1155 outcome token ID */
1099
1526
  position_id: string;
1100
- /** @description Outcome name (e.g. "Yes", "No") */
1101
1527
  outcome?: string | null;
1102
- /**
1103
- * Format: int16
1104
- * @description Outcome index
1105
- */
1528
+ /** Format: int32 */
1106
1529
  outcome_index?: number | null;
1530
+ timeframe: string;
1107
1531
  /**
1108
- * @description Aggregation window
1109
- * @enum {string}
1532
+ * Format: double
1533
+ * @description Milestone amount reached (USD)
1110
1534
  */
1111
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
1112
- /** @description The USD milestone amount that was crossed */
1113
1535
  milestone_usd: number;
1114
- /** @description Current position volume at time of trigger (USD) */
1536
+ /**
1537
+ * Format: double
1538
+ * @description Current volume (USD) that triggered the milestone
1539
+ */
1115
1540
  current_volume_usd: number;
1116
- /** @description Buy volume in USD for this timeframe */
1541
+ /**
1542
+ * Format: double
1543
+ * @description Buy volume (USD)
1544
+ */
1117
1545
  buy_volume_usd: number;
1118
- /** @description Sell volume in USD for this timeframe */
1546
+ /**
1547
+ * Format: double
1548
+ * @description Sell volume (USD)
1549
+ */
1119
1550
  sell_volume_usd: number;
1120
- /** @description Total fees in USD */
1551
+ /**
1552
+ * Format: double
1553
+ * @description Total fees collected in this timeframe
1554
+ */
1121
1555
  fees: number;
1122
- /** Format: int64 */
1556
+ /**
1557
+ * Format: int64
1558
+ * @description Total transactions in this timeframe
1559
+ */
1123
1560
  txns: number;
1124
- /** Format: int64 */
1561
+ /**
1562
+ * Format: int64
1563
+ * @description Buy transactions
1564
+ */
1125
1565
  buys: number;
1126
- /** Format: int64 */
1566
+ /**
1567
+ * Format: int64
1568
+ * @description Sell transactions
1569
+ */
1127
1570
  sells: number;
1128
1571
  };
1129
- /** @description Payload delivered when a position's volume has spiked since the last snapshot */
1572
+ /** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
1573
+ PositionVolumeSpikeFilters: {
1574
+ /**
1575
+ * Format: double
1576
+ * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
1577
+ */
1578
+ spike_ratio: number;
1579
+ /**
1580
+ * Format: int64
1581
+ * @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
1582
+ */
1583
+ window_secs?: number | null;
1584
+ /** @description Restrict to these outcome token IDs. */
1585
+ position_ids?: string[] | null;
1586
+ /** @description Restrict to positions within these markets. */
1587
+ condition_ids?: string[] | null;
1588
+ /** @description Restrict to these outcome names. */
1589
+ outcomes?: string[] | null;
1590
+ /** @description Restrict to these aggregation windows. */
1591
+ timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
1592
+ };
1593
+ /** @description Position volume spike webhook payload */
1130
1594
  PositionVolumeSpikePayload: {
1131
- /** @description ERC-1155 outcome token ID */
1132
1595
  position_id: string;
1133
- /** @description Parent market condition ID */
1134
1596
  condition_id: string;
1135
- /** @description Outcome name (e.g. "Yes", "No") */
1597
+ question?: string | null;
1598
+ market_slug?: string | null;
1599
+ event_slug?: string | null;
1600
+ image_url?: string | null;
1136
1601
  outcome?: string | null;
1137
- /** Format: int16 */
1602
+ /** Format: int32 */
1138
1603
  outcome_index?: number | null;
1604
+ timeframe: string;
1139
1605
  /**
1140
- * @description Aggregation window
1141
- * @enum {string}
1606
+ * Format: double
1607
+ * @description Current position volume at the time of the spike (USD)
1142
1608
  */
1143
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
1144
- /** @description Current position volume at the time of the spike (USD) */
1145
1609
  current_volume_usd: number;
1146
- /** @description Volume at the snapshot baseline (USD) */
1610
+ /**
1611
+ * Format: double
1612
+ * @description Volume at the snapshot baseline (USD)
1613
+ */
1147
1614
  snapshot_volume_usd: number;
1148
- /** @description New volume since the snapshot that triggered this notification (USD) */
1615
+ /**
1616
+ * Format: double
1617
+ * @description New volume since the snapshot that triggered this notification (USD)
1618
+ */
1149
1619
  delta_volume_usd: number;
1150
- /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
1620
+ /**
1621
+ * Format: double
1622
+ * @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
1623
+ */
1151
1624
  spike_pct: number;
1152
- /** Format: int64 */
1625
+ /**
1626
+ * Format: int64
1627
+ * @description Total transactions in this timeframe
1628
+ */
1153
1629
  txns: number;
1630
+ /**
1631
+ * Format: double
1632
+ * @description Total fees in this timeframe
1633
+ */
1154
1634
  fees: number;
1155
1635
  };
1636
+ /** @description Subscription filters for the `price_spike` event. */
1637
+ PriceSpikeFilters: {
1638
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1639
+ position_ids?: string[] | null;
1640
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
1641
+ condition_ids?: string[] | null;
1642
+ /** @description Restrict to specific events. Empty = all events. */
1643
+ event_slugs?: string[] | null;
1644
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
1645
+ outcomes?: string[] | null;
1646
+ /**
1647
+ * Format: double
1648
+ * @description Minimum price percentage move to trigger (e.g. `10` for a 10% move).
1649
+ */
1650
+ min_price_change_pct?: number | null;
1651
+ /**
1652
+ * Format: double
1653
+ * @description Minimum YES probability (0-1).
1654
+ */
1655
+ min_probability?: number | null;
1656
+ /**
1657
+ * Format: double
1658
+ * @description Maximum YES probability (0-1).
1659
+ */
1660
+ max_probability?: number | null;
1661
+ /**
1662
+ * Format: int64
1663
+ * @description Minimum trades accumulated in the observation window before firing.
1664
+ */
1665
+ min_txns?: number | null;
1666
+ /**
1667
+ * Format: double
1668
+ * @description Minimum USD volume accumulated in the observation window before firing.
1669
+ */
1670
+ min_volume_usd?: number | null;
1671
+ spike_direction?: null | components["schemas"]["SpikeDirection"];
1672
+ /**
1673
+ * Format: int64
1674
+ * @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.
1675
+ */
1676
+ window_secs?: number | null;
1677
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1678
+ exclude_shortterm_markets?: boolean | null;
1679
+ };
1680
+ /** @description Position price spike webhook payload */
1156
1681
  PriceSpikePayload: {
1157
- /** @description Outcome token ID */
1158
1682
  position_id: string;
1159
- /** @description Market condition ID */
1160
1683
  condition_id?: string | null;
1161
- /** @description Event slug */
1684
+ question?: string | null;
1685
+ market_slug?: string | null;
1162
1686
  event_slug?: string | null;
1163
- /** @description Outcome name (e.g. "Yes", "No") */
1687
+ image_url?: string | null;
1164
1688
  outcome?: string | null;
1689
+ /** Format: int32 */
1690
+ outcome_index?: number | null;
1165
1691
  /**
1166
- * Format: int16
1167
- * @description Outcome index
1692
+ * Format: double
1693
+ * @description Price at the start of the observation window (the baseline snapshot)
1168
1694
  */
1169
- outcome_index?: number | null;
1170
- /** @description Price at the start of the observation window (baseline snapshot, 0.0–1.0) */
1171
1695
  previous_price: number;
1172
- /** @description Current price that triggered the spike (0.0–1.0) */
1696
+ /**
1697
+ * Format: double
1698
+ * @description Current price that triggered the spike
1699
+ */
1173
1700
  current_price: number;
1701
+ /** @description Direction of the spike: `"up"` (price rising) or `"down"` (price falling) */
1702
+ spike_direction: string;
1174
1703
  /**
1175
- * @description `"up"` = price rising, `"down"` = price falling
1176
- * @enum {string}
1704
+ * Format: double
1705
+ * @description Detected spike percentage from the snapshot baseline. Positive = rising, negative = falling.
1177
1706
  */
1178
- spike_direction: "up" | "down";
1179
- /** @description Percentage move that triggered this notification. Positive = up, negative = down. */
1180
1707
  spike_pct: number;
1181
1708
  };
1709
+ /** @description Subscription filters for the `probability_spike` event. */
1710
+ ProbabilitySpikeFilters: {
1711
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1712
+ position_ids?: string[] | null;
1713
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
1714
+ condition_ids?: string[] | null;
1715
+ /** @description Restrict to specific events. Empty = all events. */
1716
+ event_slugs?: string[] | null;
1717
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
1718
+ outcomes?: string[] | null;
1719
+ /**
1720
+ * Format: double
1721
+ * @description Minimum YES probability (0-1). At least one of `min_probability`/`max_probability` is enforced at runtime if you want a probability gate.
1722
+ */
1723
+ min_probability?: number | null;
1724
+ /**
1725
+ * Format: double
1726
+ * @description Maximum YES probability (0-1).
1727
+ */
1728
+ max_probability?: number | null;
1729
+ /**
1730
+ * Format: double
1731
+ * @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move).
1732
+ */
1733
+ min_probability_change_pct?: number | null;
1734
+ /**
1735
+ * Format: int64
1736
+ * @description Minimum trades accumulated in the observation window before firing.
1737
+ */
1738
+ min_txns?: number | null;
1739
+ /**
1740
+ * Format: double
1741
+ * @description Minimum USD volume accumulated in the observation window before firing.
1742
+ */
1743
+ min_volume_usd?: number | null;
1744
+ spike_direction?: null | components["schemas"]["SpikeDirection"];
1745
+ /**
1746
+ * Format: int64
1747
+ * @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.
1748
+ */
1749
+ window_secs?: number | null;
1750
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1751
+ exclude_shortterm_markets?: boolean | null;
1752
+ };
1753
+ /** @description Position probability spike webhook payload */
1182
1754
  ProbabilitySpikePayload: {
1183
- /** @description Outcome token ID */
1184
1755
  position_id: string;
1185
- /** @description Market condition ID */
1186
1756
  condition_id?: string | null;
1187
- /** @description Event slug */
1757
+ question?: string | null;
1758
+ market_slug?: string | null;
1188
1759
  event_slug?: string | null;
1189
- /** @description Outcome name (e.g. "Yes", "No") */
1760
+ image_url?: string | null;
1190
1761
  outcome?: string | null;
1762
+ /** Format: int32 */
1763
+ outcome_index?: number | null;
1191
1764
  /**
1192
- * Format: int16
1193
- * @description Outcome index
1765
+ * Format: double
1766
+ * @description Probability at the start of the observation window (the baseline snapshot)
1194
1767
  */
1195
- outcome_index?: number | null;
1196
- /** @description Probability at the start of the observation window (baseline snapshot, 0.0–1.0) */
1197
1768
  previous_probability: number;
1198
- /** @description Current probability that triggered the spike (0.0–1.0) */
1769
+ /**
1770
+ * Format: double
1771
+ * @description Current probability that triggered the spike
1772
+ */
1199
1773
  current_probability: number;
1774
+ /** @description Direction of the spike: `"up"` (probability rising) or `"down"` (probability falling) */
1775
+ spike_direction: string;
1200
1776
  /**
1201
- * @description `"up"` = probability rising, `"down"` = probability falling
1202
- * @enum {string}
1777
+ * Format: double
1778
+ * @description Detected spike percentage from the snapshot baseline. Positive = rising, negative = falling.
1203
1779
  */
1204
- spike_direction: "up" | "down";
1205
- /** @description Percentage move that triggered this notification. Positive = up, negative = down. */
1206
1780
  spike_pct: number;
1207
1781
  };
1208
1782
  /** @description V2 UMA OOv2: a price was proposed (resolution proposal). */
@@ -1412,88 +1986,446 @@ export interface components {
1412
1986
  slug?: string | null;
1413
1987
  event_slug?: string | null;
1414
1988
  };
1415
- /** @description V2 UMA OOv2: a price request was made (market initialization). */
1416
- RequestPriceEvent: {
1417
- id: string;
1418
- hash: string;
1419
- /** Format: int64 */
1420
- block?: number | null;
1421
- /** Format: int64 */
1422
- confirmed_at?: number | null;
1423
- /** Format: int64 */
1424
- received_at?: number | null;
1425
- /** Format: int64 */
1426
- log_index?: number | null;
1427
- /** Format: int64 */
1428
- block_index?: number | null;
1429
- oracle_contract: string;
1430
- requester: string;
1431
- identifier: string;
1989
+ /** @description V2 UMA OOv2: a price request was made (market initialization). */
1990
+ RequestPriceEvent: {
1991
+ id: string;
1992
+ hash: string;
1993
+ /** Format: int64 */
1994
+ block?: number | null;
1995
+ /** Format: int64 */
1996
+ confirmed_at?: number | null;
1997
+ /** Format: int64 */
1998
+ received_at?: number | null;
1999
+ /** Format: int64 */
2000
+ log_index?: number | null;
2001
+ /** Format: int64 */
2002
+ block_index?: number | null;
2003
+ oracle_contract: string;
2004
+ requester: string;
2005
+ identifier: string;
2006
+ /**
2007
+ * @description UMA request timestamp (seconds, decimal string).
2008
+ * The point in time the requester is asking the oracle to resolve the
2009
+ * price for — part of the request identity tuple
2010
+ * `(requester, identifier, timestamp, ancillaryData)`. Not the block
2011
+ * timestamp of this event; see `confirmed_at` for that.
2012
+ */
2013
+ timestamp: string;
2014
+ ancillary_data: string;
2015
+ currency: string;
2016
+ reward: string;
2017
+ final_fee: string;
2018
+ condition_id?: string | null;
2019
+ question?: string | null;
2020
+ image_url?: string | null;
2021
+ slug?: string | null;
2022
+ event_slug?: string | null;
2023
+ };
2024
+ /** @description Response for POST /v1/webhook/{id}/rotate-secret */
2025
+ RotateSecretResponse: {
2026
+ /** @description The new HMAC secret (only returned once — store it securely) */
2027
+ secret: string;
2028
+ /**
2029
+ * Format: int64
2030
+ * @description Timestamp of rotation (ms since epoch)
2031
+ */
2032
+ rotated_at: number;
2033
+ };
2034
+ /** @description V2 UMA OOv2: a price request was settled (final resolution). */
2035
+ SettleEvent: {
2036
+ id: string;
2037
+ hash: string;
2038
+ /** Format: int64 */
2039
+ block?: number | null;
2040
+ /** Format: int64 */
2041
+ confirmed_at?: number | null;
2042
+ /** Format: int64 */
2043
+ received_at?: number | null;
2044
+ /** Format: int64 */
2045
+ log_index?: number | null;
2046
+ /** Format: int64 */
2047
+ block_index?: number | null;
2048
+ oracle_contract: string;
2049
+ requester: string;
2050
+ proposer: string;
2051
+ disputer: string;
2052
+ identifier: string;
2053
+ timestamp: string;
2054
+ ancillary_data: string;
2055
+ /** Format: int64 */
2056
+ proposed_price: number;
2057
+ payout: string;
2058
+ disputed: boolean;
2059
+ condition_id?: string | null;
2060
+ proposed_outcome?: string | null;
2061
+ question?: string | null;
2062
+ image_url?: string | null;
2063
+ slug?: string | null;
2064
+ event_slug?: string | null;
2065
+ };
2066
+ /**
2067
+ * @description Direction filter for spike webhooks.
2068
+ * @enum {string}
2069
+ */
2070
+ SpikeDirection: "up" | "down" | "both";
2071
+ /** @description Subscription filters for the `tag_metrics` event. All fields are optional. */
2072
+ TagMetricsFilters: {
2073
+ /** @description Restrict to these tags. Empty = all tags. */
2074
+ tags?: string[] | null;
2075
+ /** @description Restrict to these aggregation windows. */
2076
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
2077
+ /**
2078
+ * Format: double
2079
+ * @description Only fire when aggregated tag volume >= this value (USD).
2080
+ */
2081
+ min_volume_usd?: number | null;
2082
+ /** Format: double */
2083
+ max_volume_usd?: number | null;
2084
+ /** Format: int64 */
2085
+ min_txns?: number | null;
2086
+ /** Format: int64 */
2087
+ min_unique_traders?: number | null;
2088
+ /** Format: double */
2089
+ min_fees?: number | null;
2090
+ };
2091
+ /** @description Payload delivered when a tag's aggregated volume or transaction metrics cross a configured threshold */
2092
+ TagMetricsPayload: {
2093
+ /** @description Tag label or slug */
2094
+ tag?: string | null;
2095
+ /** @description Aggregation window */
2096
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
2097
+ /**
2098
+ * Format: double
2099
+ * @description Total aggregated volume for the tag (USD)
2100
+ */
2101
+ volume_usd?: number | null;
2102
+ /**
2103
+ * Format: double
2104
+ * @description Total aggregated shares/contracts volume for the tag
2105
+ */
2106
+ shares_volume?: number | null;
2107
+ /**
2108
+ * Format: double
2109
+ * @description Builder-attributed aggregated volume in USD
2110
+ */
2111
+ builder_usd_volume?: number | null;
2112
+ /**
2113
+ * Format: double
2114
+ * @description Builder-attributed aggregated shares/contracts volume
2115
+ */
2116
+ builder_shares_volume?: number | null;
2117
+ /**
2118
+ * Format: double
2119
+ * @description Total fees collected in USD
2120
+ */
2121
+ fees?: number | null;
2122
+ /**
2123
+ * Format: double
2124
+ * @description Builder-attributed fees in USD
2125
+ */
2126
+ builder_fees?: number | null;
2127
+ /**
2128
+ * Format: int64
2129
+ * @description Total number of transactions
2130
+ */
2131
+ txns?: number | null;
2132
+ /**
2133
+ * Format: int64
2134
+ * @description Builder-attributed transaction count
2135
+ */
2136
+ builder_txns?: number | null;
2137
+ /**
2138
+ * Format: int64
2139
+ * @description Number of unique traders
2140
+ */
2141
+ unique_traders?: number | null;
2142
+ /**
2143
+ * Format: int64
2144
+ * @description Number of unique builder-attributed traders
2145
+ */
2146
+ unique_builder_traders?: number | null;
2147
+ };
2148
+ /**
2149
+ * @description Trade-event types accepted by `trader_trade_event.trade_types`. Covers the
2150
+ * full set of typed prediction-trade variants.
2151
+ * @enum {string}
2152
+ */
2153
+ TradeEventFilterType: "OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval";
2154
+ /** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
2155
+ TraderEventPnlFilters: {
2156
+ /** @description Track only these trader wallet addresses. */
2157
+ traders?: string[] | null;
2158
+ /** @description Restrict to these events. */
2159
+ event_slugs?: string[] | null;
2160
+ /**
2161
+ * Format: double
2162
+ * @description Only fire when per-event realized PnL ≥ this value (USD).
2163
+ */
2164
+ min_realized_pnl_usd?: number | null;
2165
+ /**
2166
+ * Format: double
2167
+ * @description Only fire when per-event realized PnL ≤ this value (USD).
2168
+ */
2169
+ max_realized_pnl_usd?: number | null;
2170
+ /**
2171
+ * Format: double
2172
+ * @description Only fire when total event volume ≥ this value (USD).
2173
+ */
2174
+ min_volume_usd?: number | null;
2175
+ /**
2176
+ * Format: double
2177
+ * @description Only fire when total event volume ≤ this value (USD).
2178
+ */
2179
+ max_volume_usd?: number | null;
2180
+ /**
2181
+ * Format: double
2182
+ * @description Only fire when buy volume within the event ≥ this value (USD).
2183
+ */
2184
+ min_buy_usd?: number | null;
2185
+ /**
2186
+ * Format: double
2187
+ * @description Only fire when sell volume within the event ≥ this value (USD).
2188
+ */
2189
+ min_sell_volume_usd?: number | null;
2190
+ /**
2191
+ * Format: int64
2192
+ * @description Only fire when the trader has traded in ≥ this many markets within the event.
2193
+ */
2194
+ min_markets_traded?: number | null;
2195
+ /** @description Restrict to these PnL windows. */
2196
+ timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
2197
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2198
+ exclude_shortterm_markets?: boolean | null;
2199
+ };
2200
+ /** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
2201
+ TraderFirstTradeFilters: {
2202
+ /** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
2203
+ wallet_addresses?: string[] | null;
2204
+ /** @description Restrict to trades in these markets. Empty = all markets. */
2205
+ condition_ids?: string[] | null;
2206
+ /** @description Restrict to trades in markets belonging to these events. */
2207
+ event_slugs?: string[] | null;
1432
2208
  /**
1433
- * @description UMA request timestamp (seconds, decimal string).
1434
- * The point in time the requester is asking the oracle to resolve the
1435
- * price for — part of the request identity tuple
1436
- * `(requester, identifier, timestamp, ancillaryData)`. Not the block
1437
- * timestamp of this event; see `confirmed_at` for that.
2209
+ * Format: double
2210
+ * @description Minimum trade size in USD. Omit to match all sizes.
1438
2211
  */
1439
- timestamp: string;
1440
- ancillary_data: string;
1441
- currency: string;
1442
- reward: string;
1443
- final_fee: string;
1444
- condition_id?: string | null;
1445
- question?: string | null;
1446
- image_url?: string | null;
1447
- slug?: string | null;
1448
- event_slug?: string | null;
2212
+ min_usd_value?: number | null;
2213
+ /**
2214
+ * Format: double
2215
+ * @description Only fire when the outcome probability is ≥ this value.
2216
+ */
2217
+ min_probability?: number | null;
2218
+ /**
2219
+ * Format: double
2220
+ * @description Only fire when the outcome probability is ≤ this value.
2221
+ */
2222
+ max_probability?: number | null;
2223
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
2224
+ exclude_shortterm_markets?: boolean | null;
1449
2225
  };
1450
- /** @description Response for POST /v1/webhook/{id}/rotate-secret */
1451
- RotateSecretResponse: {
1452
- /** @description The new HMAC secret (only returned once store it securely) */
1453
- secret: string;
2226
+ /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
2227
+ TraderGlobalPnlFilters: {
2228
+ /** @description Track only these trader wallet addresses. Empty = all traders. */
2229
+ traders?: string[] | null;
2230
+ /**
2231
+ * Format: double
2232
+ * @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds.
2233
+ */
2234
+ min_realized_pnl_usd?: number | null;
2235
+ /**
2236
+ * Format: double
2237
+ * @description Only fire when realized PnL ≤ this value (USD).
2238
+ */
2239
+ max_realized_pnl_usd?: number | null;
2240
+ /**
2241
+ * Format: double
2242
+ * @description Only fire when total trading volume ≥ this value (USD).
2243
+ */
2244
+ min_volume_usd?: number | null;
2245
+ /**
2246
+ * Format: double
2247
+ * @description Only fire when total trading volume ≤ this value (USD).
2248
+ */
2249
+ max_volume_usd?: number | null;
2250
+ /**
2251
+ * Format: double
2252
+ * @description Only fire when buy volume ≥ this value (USD).
2253
+ */
2254
+ min_buy_usd?: number | null;
2255
+ /**
2256
+ * Format: double
2257
+ * @description Only fire when sell volume ≥ this value (USD).
2258
+ */
2259
+ min_sell_volume_usd?: number | null;
2260
+ /**
2261
+ * Format: double
2262
+ * @description Only fire when market win rate ≥ this percentage (0.0–100.0).
2263
+ */
2264
+ min_win_rate?: number | null;
1454
2265
  /**
1455
2266
  * Format: int64
1456
- * @description Timestamp of rotation (ms since epoch)
2267
+ * @description Only fire when the trader has traded in ≥ this many markets.
1457
2268
  */
1458
- rotated_at: number;
2269
+ min_markets_traded?: number | null;
2270
+ /** @description Restrict to these PnL windows. Empty = all windows. */
2271
+ timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
1459
2272
  };
1460
- /** @description V2 UMA OOv2: a price request was settled (final resolution). */
1461
- SettleEvent: {
1462
- id: string;
1463
- hash: string;
1464
- /** Format: int64 */
1465
- block?: number | null;
1466
- /** Format: int64 */
1467
- confirmed_at?: number | null;
1468
- /** Format: int64 */
1469
- received_at?: number | null;
1470
- /** Format: int64 */
1471
- log_index?: number | null;
1472
- /** Format: int64 */
1473
- block_index?: number | null;
1474
- oracle_contract: string;
1475
- requester: string;
1476
- proposer: string;
1477
- disputer: string;
1478
- identifier: string;
1479
- timestamp: string;
1480
- ancillary_data: string;
1481
- /** Format: int64 */
1482
- proposed_price: number;
1483
- payout: string;
1484
- disputed: boolean;
1485
- condition_id?: string | null;
1486
- proposed_outcome?: string | null;
1487
- question?: string | null;
1488
- image_url?: string | null;
1489
- slug?: string | null;
1490
- event_slug?: string | null;
2273
+ /** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
2274
+ TraderMarketPnlFilters: {
2275
+ /** @description Track only these trader wallet addresses. */
2276
+ traders?: string[] | null;
2277
+ /** @description Restrict to these markets. */
2278
+ condition_ids?: string[] | null;
2279
+ /** @description Restrict to markets in these events. */
2280
+ event_slugs?: string[] | null;
2281
+ /**
2282
+ * Format: double
2283
+ * @description Only fire when per-market realized PnL ≥ this value (USD).
2284
+ */
2285
+ min_realized_pnl_usd?: number | null;
2286
+ /**
2287
+ * Format: double
2288
+ * @description Only fire when per-market realized PnL ≤ this value (USD).
2289
+ */
2290
+ max_realized_pnl_usd?: number | null;
2291
+ /**
2292
+ * Format: double
2293
+ * @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD).
2294
+ */
2295
+ min_volume_usd?: number | null;
2296
+ /**
2297
+ * Format: double
2298
+ * @description Only fire when total volume ≤ this value (USD).
2299
+ */
2300
+ max_volume_usd?: number | null;
2301
+ /**
2302
+ * Format: double
2303
+ * @description Only fire when buy volume in the market ≥ this value (USD).
2304
+ */
2305
+ min_buy_usd?: number | null;
2306
+ /**
2307
+ * Format: double
2308
+ * @description Only fire when sell volume in the market ≥ this value (USD).
2309
+ */
2310
+ min_sell_volume_usd?: number | null;
2311
+ /** @description Restrict to these PnL windows. */
2312
+ timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
2313
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2314
+ exclude_shortterm_markets?: boolean | null;
2315
+ };
2316
+ /** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
2317
+ TraderNewMarketFilters: {
2318
+ /** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
2319
+ wallet_addresses?: string[] | null;
2320
+ /** @description Restrict to these markets. */
2321
+ condition_ids?: string[] | null;
2322
+ /** @description Restrict to markets belonging to these events. */
2323
+ event_slugs?: string[] | null;
2324
+ /**
2325
+ * Format: double
2326
+ * @description Minimum trade size in USD. Omit to match all sizes.
2327
+ */
2328
+ min_usd_value?: number | null;
2329
+ /**
2330
+ * Format: double
2331
+ * @description Only fire when the outcome probability is ≥ this value.
2332
+ */
2333
+ min_probability?: number | null;
2334
+ /**
2335
+ * Format: double
2336
+ * @description Only fire when the outcome probability is ≤ this value.
2337
+ */
2338
+ max_probability?: number | null;
2339
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2340
+ exclude_shortterm_markets?: boolean | null;
2341
+ };
2342
+ /** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
2343
+ TraderNewTradeFilters: {
2344
+ /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2345
+ wallet_addresses?: string[] | null;
2346
+ /** @description Restrict to these markets. */
2347
+ condition_ids?: string[] | null;
2348
+ /** @description Restrict to markets belonging to these events. */
2349
+ event_slugs?: string[] | null;
2350
+ /**
2351
+ * Format: double
2352
+ * @description Minimum trade size in USD. Defaults to 0 (matches all trades).
2353
+ */
2354
+ min_usd_value?: number | null;
2355
+ /**
2356
+ * Format: double
2357
+ * @description Only fire when outcome probability is ≥ this value.
2358
+ */
2359
+ min_probability?: number | null;
2360
+ /**
2361
+ * Format: double
2362
+ * @description Only fire when outcome probability is ≤ this value.
2363
+ */
2364
+ max_probability?: number | null;
2365
+ /** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
2366
+ trade_types?: ("OrderFilled" | "OrdersMatched")[] | null;
2367
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2368
+ exclude_shortterm_markets?: boolean | null;
1491
2369
  };
1492
2370
  /**
1493
- * @description Direction filter for spike webhooks.
1494
- * @enum {string}
2371
+ * @description Subscription filters for the `trader_trade_event` event. All fields are optional.
2372
+ * `event_slugs` and `exclude_shortterm_markets` require explicit `trade_types` that
2373
+ * exclude `PositionsConverted`, because conversion events do not currently carry
2374
+ * `event_slug` in the typed webhook payload.
1495
2375
  */
1496
- SpikeDirection: "up" | "down" | "both";
2376
+ TraderTradeEventFilters: {
2377
+ /** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
2378
+ wallet_addresses?: string[] | null;
2379
+ /** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
2380
+ condition_ids?: string[] | null;
2381
+ /** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
2382
+ event_slugs?: string[] | null;
2383
+ /**
2384
+ * Format: double
2385
+ * @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events).
2386
+ */
2387
+ min_usd_value?: number | null;
2388
+ /**
2389
+ * Format: double
2390
+ * @description Only fire when event probability is ≥ this value. Events without probability data do not match.
2391
+ */
2392
+ min_probability?: number | null;
2393
+ /**
2394
+ * Format: double
2395
+ * @description Only fire when event probability is ≤ this value. Events without probability data do not match.
2396
+ */
2397
+ max_probability?: number | null;
2398
+ /** @description Only fire for these trade types. Empty = all supported trade-event variants. */
2399
+ 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;
2400
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
2401
+ exclude_shortterm_markets?: boolean | null;
2402
+ };
2403
+ /** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
2404
+ TraderWhaleTradeFilters: {
2405
+ /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2406
+ wallet_addresses?: string[] | null;
2407
+ /** @description Restrict to these markets. */
2408
+ condition_ids?: string[] | null;
2409
+ /** @description Restrict to markets belonging to these events. */
2410
+ event_slugs?: string[] | null;
2411
+ /**
2412
+ * Format: double
2413
+ * @description Minimum trade size in USD. Defaults to 0 (matches all trades).
2414
+ */
2415
+ min_usd_value?: number | null;
2416
+ /**
2417
+ * Format: double
2418
+ * @description Only fire when outcome probability is ≥ this value.
2419
+ */
2420
+ min_probability?: number | null;
2421
+ /**
2422
+ * Format: double
2423
+ * @description Only fire when outcome probability is ≤ this value.
2424
+ */
2425
+ max_probability?: number | null;
2426
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2427
+ exclude_shortterm_markets?: boolean | null;
2428
+ };
1497
2429
  /** @description Request body for updating a webhook */
1498
2430
  UpdateWebhookRequestBody: {
1499
2431
  /** @description Destination URL for webhook deliveries (must be HTTPS) */
@@ -1506,20 +2438,24 @@ export interface components {
1506
2438
  /** @description Description/name */
1507
2439
  description?: string | null;
1508
2440
  };
1509
- /** @description Payload delivered when a market's trading volume crosses a USD milestone in the specified timeframe */
2441
+ /** @description Volume milestone webhook payload */
1510
2442
  VolumeMilestonePayload: {
1511
- /** @description Market condition ID */
1512
2443
  condition_id: string;
2444
+ timeframe: string;
1513
2445
  /**
1514
- * @description Aggregation window that crossed the milestone
1515
- * @enum {string}
2446
+ * Format: double
2447
+ * @description Milestone amount reached (USD)
1516
2448
  */
1517
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
1518
- /** @description The USD milestone amount that was crossed */
1519
2449
  milestone_usd: number;
1520
- /** @description Current volume at time of trigger (USD) */
2450
+ /**
2451
+ * Format: double
2452
+ * @description Current volume (USD) that triggered the milestone
2453
+ */
1521
2454
  current_volume_usd: number;
1522
- /** @description Total fees in USD for this timeframe */
2455
+ /**
2456
+ * Format: double
2457
+ * @description Total fees collected in this timeframe
2458
+ */
1523
2459
  fees: number;
1524
2460
  /**
1525
2461
  * Format: int64
@@ -1527,6 +2463,12 @@ export interface components {
1527
2463
  */
1528
2464
  txns: number;
1529
2465
  };
2466
+ /**
2467
+ * @description Aggregation windows accepted by `*_volume_spike.timeframes`. Includes `1d`
2468
+ * in addition to the metric set.
2469
+ * @enum {string}
2470
+ */
2471
+ VolumeSpikeFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
1530
2472
  /**
1531
2473
  * @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
1532
2474
  * @enum {string}
@@ -1542,7 +2484,7 @@ export interface components {
1542
2484
  * @description Category grouping for the event type
1543
2485
  * @enum {string}
1544
2486
  */
1545
- category: "trader" | "trade" | "market" | "event" | "position" | "assets";
2487
+ category: "trader" | "trade" | "market" | "event" | "tag" | "position" | "assets";
1546
2488
  /**
1547
2489
  * Format: int64
1548
2490
  * @description Millicredits consumed per webhook delivery (1 credit = 1000 mc)
@@ -1769,7 +2711,10 @@ export interface components {
1769
2711
  condition_id?: string | null;
1770
2712
  /** @description Outcome name (e.g. "Yes", "No") */
1771
2713
  outcome?: string | null;
1772
- /** @description Outcome index: 0 = Yes/Up, 1 = No */
2714
+ /**
2715
+ * Format: int32
2716
+ * @description Outcome index: 0 = Yes/Up, 1 = No
2717
+ */
1773
2718
  outcome_index?: number | null;
1774
2719
  /** @description Market question text */
1775
2720
  question?: string | null;
@@ -1777,6 +2722,8 @@ export interface components {
1777
2722
  market_slug?: string | null;
1778
2723
  /** @description Parent event slug */
1779
2724
  event_slug?: string | null;
2725
+ /** @description Market image URL */
2726
+ image_url?: string | null;
1780
2727
  /** @description Unique trade identifier */
1781
2728
  trade_id: string;
1782
2729
  /** @description Transaction hash */
@@ -1790,31 +2737,37 @@ export interface components {
1790
2737
  * Format: int64
1791
2738
  * @description Block confirmation timestamp (Unix seconds)
1792
2739
  */
1793
- confirmed_at: number;
1794
- /** @description USD size of the trade (6 decimal places) */
2740
+ confirmed_at: number;
2741
+ /**
2742
+ * Format: double
2743
+ * @description USD size of the trade (6 decimal places)
2744
+ */
1795
2745
  amount_usd: number;
1796
- /** @description Outcome shares traded (6 decimal places) */
2746
+ /**
2747
+ * Format: double
2748
+ * @description Outcome shares traded (6 decimal places)
2749
+ */
1797
2750
  shares_amount: number;
1798
- /** @description Fee paid in USD (6 decimal places) */
1799
- fee: number;
1800
2751
  /**
1801
- * @description Trade direction
1802
- * @enum {string}
2752
+ * Format: double
2753
+ * @description Fee paid in USD (6 decimal places)
1803
2754
  */
2755
+ fee: number;
2756
+ /** @description Trade direction */
1804
2757
  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
2758
  /**
1810
- * @description Exchange contract that processed the trade
1811
- * @enum {string}
2759
+ * Format: double
2760
+ * @description Outcome token price (0.0–1.0)
1812
2761
  */
1813
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
2762
+ price: number;
1814
2763
  /**
1815
- * @description Trade type (webhook events only fire on order fills)
1816
- * @enum {string}
2764
+ * Format: double
2765
+ * @description Implied probability (0.0–1.0); null when outcome is unknown
1817
2766
  */
2767
+ probability?: number | null;
2768
+ /** @description Exchange contract that processed the trade */
2769
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
2770
+ /** @description Trade type (webhook events only fire on order fills) */
1818
2771
  trade_type: "OrderFilled" | "OrdersMatched";
1819
2772
  };
1820
2773
  /** @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. */
@@ -1931,7 +2884,7 @@ export interface components {
1931
2884
  */
1932
2885
  exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
1933
2886
  /** @enum {string} */
1934
- trade_type: "MakerRebate" | "Reward";
2887
+ trade_type: "MakerRebate" | "Reward" | "Yield";
1935
2888
  } | {
1936
2889
  id: string;
1937
2890
  hash: string;
@@ -2232,535 +3185,109 @@ export interface components {
2232
3185
  /** Format: int64 */
2233
3186
  confirmed_at: number;
2234
3187
  /** Format: int64 */
2235
- log_index: number;
2236
- /** Format: int64 */
2237
- block_index: number;
2238
- oracle_contract: string;
2239
- condition_id: string;
2240
- oracle: string;
2241
- proposed_outcome?: string;
2242
- question?: string;
2243
- image_url?: string;
2244
- slug?: string;
2245
- event_slug?: string;
2246
- /** @enum {string} */
2247
- trade_type: "ConditionResolution";
2248
- } | {
2249
- id: string;
2250
- hash: string;
2251
- /** Format: int64 */
2252
- block: number;
2253
- /** Format: int64 */
2254
- confirmed_at: number;
2255
- /** Format: int64 */
2256
- log_index: number;
2257
- /** Format: int64 */
2258
- block_index: number;
2259
- oracle_contract: string;
2260
- condition_id: string;
2261
- question?: string;
2262
- image_url?: string;
2263
- slug?: string;
2264
- event_slug?: string;
2265
- /** @enum {string} */
2266
- trade_type: "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause";
2267
- } | {
2268
- id: string;
2269
- hash: string;
2270
- /** Format: int64 */
2271
- block: number;
2272
- /** Format: int64 */
2273
- confirmed_at: number;
2274
- /** Format: int64 */
2275
- log_index: number;
2276
- /** Format: int64 */
2277
- block_index: number;
2278
- oracle_contract: string;
2279
- condition_id: string;
2280
- proposed_outcome?: string;
2281
- question?: string;
2282
- image_url?: string;
2283
- slug?: string;
2284
- event_slug?: string;
2285
- /** @enum {string} */
2286
- trade_type: "ManualResolution";
2287
- } | {
2288
- id: string;
2289
- hash: string;
2290
- /** Format: int64 */
2291
- block: number;
2292
- /** Format: int64 */
2293
- confirmed_at: number;
2294
- /** Format: int64 */
2295
- log_index: number;
2296
- /** Format: int64 */
2297
- block_index: number;
2298
- oracle_contract: string;
2299
- condition_id: string;
2300
- proposed_outcome?: string;
2301
- question?: string;
2302
- image_url?: string;
2303
- slug?: string;
2304
- event_slug?: string;
2305
- /** @enum {string} */
2306
- trade_type: "NegRiskOutcomeReported";
2307
- } | {
2308
- id: string;
2309
- hash: string;
2310
- /** Format: int64 */
2311
- block: number;
2312
- /** Format: int64 */
2313
- confirmed_at: number;
2314
- /** Format: int64 */
2315
- log_index: number;
2316
- /** Format: int64 */
2317
- block_index: number;
2318
- condition_id: string;
2319
- token0: string;
2320
- token1: string;
2321
- question?: string;
2322
- image_url?: string;
2323
- slug?: string;
2324
- event_slug?: string;
2325
- /**
2326
- * @description Exchange contract that processed the event
2327
- * @enum {string}
2328
- */
2329
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
2330
- /** @enum {string} */
2331
- trade_type: "RegisterToken";
2332
- } | {
2333
- id: string;
2334
- hash: string;
2335
- /** Format: int64 */
2336
- block: number;
2337
- /** Format: int64 */
2338
- confirmed_at: number;
2339
- /** Format: int64 */
2340
- log_index: number;
2341
- /** Format: int64 */
2342
- block_index: number;
2343
- trader: {
2344
- address: string;
2345
- name: string | null;
2346
- pseudonym: string | null;
2347
- profile_image: string | null;
2348
- x_username: string | null;
2349
- verified_badge: boolean;
2350
- };
2351
- operator: string;
2352
- approved: boolean;
2353
- question?: string;
2354
- image_url?: string;
2355
- slug?: string;
2356
- event_slug?: string;
2357
- /**
2358
- * @description Exchange contract that processed the event
2359
- * @enum {string}
2360
- */
2361
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
2362
- /** @enum {string} */
2363
- trade_type: "Approval";
2364
- };
2365
- /** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
2366
- TraderFirstTradeFilters: {
2367
- /** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
2368
- wallet_addresses?: string[];
2369
- /** @description Restrict to trades in these markets. Empty = all markets. */
2370
- condition_ids?: string[];
2371
- /** @description Restrict to trades in markets belonging to these events. */
2372
- event_slugs?: string[];
2373
- /** @description Minimum trade size in USD. Omit to match all sizes. */
2374
- min_usd_value?: number;
2375
- /** @description Only fire when the outcome probability is ≥ this value. */
2376
- min_probability?: number;
2377
- /** @description Only fire when the outcome probability is ≤ this value. */
2378
- max_probability?: number;
2379
- /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
2380
- exclude_shortterm_markets?: boolean;
2381
- };
2382
- /** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
2383
- TraderNewMarketFilters: {
2384
- /** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
2385
- wallet_addresses?: string[];
2386
- /** @description Restrict to these markets. */
2387
- condition_ids?: string[];
2388
- /** @description Restrict to markets belonging to these events. */
2389
- event_slugs?: string[];
2390
- /** @description Minimum trade size in USD. Omit to match all sizes. */
2391
- min_usd_value?: number;
2392
- /** @description Only fire when the outcome probability is ≥ this value. */
2393
- min_probability?: number;
2394
- /** @description Only fire when the outcome probability is ≤ this value. */
2395
- max_probability?: number;
2396
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2397
- exclude_shortterm_markets?: boolean;
2398
- };
2399
- /** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
2400
- TraderWhaleTradeFilters: {
2401
- /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2402
- wallet_addresses?: string[];
2403
- /** @description Restrict to these markets. */
2404
- condition_ids?: string[];
2405
- /** @description Restrict to markets belonging to these events. */
2406
- event_slugs?: string[];
2407
- /** @description Minimum trade size in USD. Defaults to 0 (matches all trades). */
2408
- min_usd_value?: number;
2409
- /** @description Only fire when outcome probability is ≥ this value. */
2410
- min_probability?: number;
2411
- /** @description Only fire when outcome probability is ≤ this value. */
2412
- max_probability?: number;
2413
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2414
- exclude_shortterm_markets?: boolean;
2415
- };
2416
- /** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
2417
- TraderNewTradeFilters: {
2418
- /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2419
- wallet_addresses?: string[];
2420
- /** @description Restrict to these markets. */
2421
- condition_ids?: string[];
2422
- /** @description Restrict to markets belonging to these events. */
2423
- event_slugs?: string[];
2424
- /** @description Minimum trade size in USD. Defaults to 0 (matches all trades). */
2425
- min_usd_value?: number;
2426
- /** @description Only fire when outcome probability is ≥ this value. */
2427
- min_probability?: number;
2428
- /** @description Only fire when outcome probability is ≤ this value. */
2429
- max_probability?: number;
2430
- /** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
2431
- trade_types?: ("OrderFilled" | "OrdersMatched")[];
2432
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2433
- exclude_shortterm_markets?: boolean;
2434
- };
2435
- /** @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. */
2436
- TraderTradeEventFilters: {
2437
- /** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
2438
- wallet_addresses?: string[];
2439
- /** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
2440
- condition_ids?: string[];
2441
- /** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
2442
- event_slugs?: string[];
2443
- /** @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events). */
2444
- min_usd_value?: number;
2445
- /** @description Only fire when event probability is ≥ this value. Events without probability data do not match. */
2446
- min_probability?: number;
2447
- /** @description Only fire when event probability is ≤ this value. Events without probability data do not match. */
2448
- max_probability?: number;
2449
- /** @description Only fire for these trade types. Empty = all supported trade-event variants. */
2450
- trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "MakerRebate" | "Reward" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[];
2451
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
2452
- exclude_shortterm_markets?: boolean;
2453
- };
2454
- /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
2455
- TraderGlobalPnlFilters: {
2456
- /** @description Track only these trader wallet addresses. Empty = all traders. */
2457
- traders?: string[];
2458
- /** @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds. */
2459
- min_realized_pnl_usd?: number;
2460
- /** @description Only fire when realized PnL ≤ this value (USD). */
2461
- max_realized_pnl_usd?: number;
2462
- /** @description Only fire when total trading volume ≥ this value (USD). */
2463
- min_volume_usd?: number;
2464
- /** @description Only fire when total trading volume ≤ this value (USD). */
2465
- max_volume_usd?: number;
2466
- /** @description Only fire when buy volume ≥ this value (USD). */
2467
- min_buy_usd?: number;
2468
- /** @description Only fire when sell volume ≥ this value (USD). */
2469
- min_sell_volume_usd?: number;
2470
- /** @description Only fire when market win rate ≥ this percentage (0.0–100.0). */
2471
- min_win_rate?: number;
2472
- /**
2473
- * Format: int64
2474
- * @description Only fire when the trader has traded in ≥ this many markets.
2475
- */
2476
- min_markets_traded?: number;
2477
- /** @description Restrict to these PnL windows. Empty = all windows. */
2478
- timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
2479
- };
2480
- /** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
2481
- TraderMarketPnlFilters: {
2482
- /** @description Track only these trader wallet addresses. */
2483
- traders?: string[];
2484
- /** @description Restrict to these markets. */
2485
- condition_ids?: string[];
2486
- /** @description Restrict to markets in these events. */
2487
- event_slugs?: string[];
2488
- /** @description Only fire when per-market realized PnL ≥ this value (USD). */
2489
- min_realized_pnl_usd?: number;
2490
- /** @description Only fire when per-market realized PnL ≤ this value (USD). */
2491
- max_realized_pnl_usd?: number;
2492
- /** @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD). */
2493
- min_volume_usd?: number;
2494
- /** @description Only fire when total volume ≤ this value (USD). */
2495
- max_volume_usd?: number;
2496
- /** @description Only fire when buy volume in the market ≥ this value (USD). */
2497
- min_buy_usd?: number;
2498
- /** @description Only fire when sell volume in the market ≥ this value (USD). */
2499
- min_sell_volume_usd?: number;
2500
- /** @description Restrict to these PnL windows. */
2501
- timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
2502
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2503
- exclude_shortterm_markets?: boolean;
2504
- };
2505
- /** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
2506
- TraderEventPnlFilters: {
2507
- /** @description Track only these trader wallet addresses. */
2508
- traders?: string[];
2509
- /** @description Restrict to these events. */
2510
- event_slugs?: string[];
2511
- /** @description Only fire when per-event realized PnL ≥ this value (USD). */
2512
- min_realized_pnl_usd?: number;
2513
- /** @description Only fire when per-event realized PnL ≤ this value (USD). */
2514
- max_realized_pnl_usd?: number;
2515
- /** @description Only fire when total event volume ≥ this value (USD). */
2516
- min_volume_usd?: number;
2517
- /** @description Only fire when total event volume ≤ this value (USD). */
2518
- max_volume_usd?: number;
2519
- /** @description Only fire when buy volume within the event ≥ this value (USD). */
2520
- min_buy_usd?: number;
2521
- /** @description Only fire when sell volume within the event ≥ this value (USD). */
2522
- min_sell_volume_usd?: number;
2523
- /**
2524
- * Format: int64
2525
- * @description Only fire when the trader has traded in ≥ this many markets within the event.
2526
- */
2527
- min_markets_traded?: number;
2528
- /** @description Restrict to these PnL windows. */
2529
- timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
2530
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2531
- exclude_shortterm_markets?: boolean;
2532
- };
2533
- /** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
2534
- MarketMetricsFilters: {
2535
- /** @description Restrict to these markets. Empty = all markets. */
2536
- condition_ids?: string[];
2537
- /** @description Restrict to these aggregation windows. Empty = all windows. */
2538
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2539
- /** @description Only fire when volume ≥ this value (USD). */
2540
- min_volume_usd?: number;
2541
- /** @description Only fire when volume ≤ this value (USD). */
2542
- max_volume_usd?: number;
2543
- /**
2544
- * Format: int64
2545
- * @description Only fire when transaction count ≥ this value.
2546
- */
2547
- min_txns?: number;
2548
- /**
2549
- * Format: int64
2550
- * @description Only fire when unique trader count ≥ this value.
2551
- */
2552
- min_unique_traders?: number;
2553
- /** @description Only fire when total fees ≥ this value (USD). */
2554
- min_fees?: number;
2555
- };
2556
- /** @description Subscription filters for the `event_metrics` event. All fields are optional. */
2557
- EventMetricsFilters: {
2558
- /** @description Restrict to these events. Empty = all events. */
2559
- event_slugs?: string[];
2560
- /** @description Restrict to these aggregation windows. */
2561
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2562
- /** @description Only fire when aggregated event volume ≥ this value (USD). */
2563
- min_volume_usd?: number;
2564
- max_volume_usd?: number;
3188
+ log_index: number;
2565
3189
  /** Format: int64 */
2566
- min_txns?: number;
3190
+ block_index: number;
3191
+ oracle_contract: string;
3192
+ condition_id: string;
3193
+ oracle: string;
3194
+ proposed_outcome?: string;
3195
+ question?: string;
3196
+ image_url?: string;
3197
+ slug?: string;
3198
+ event_slug?: string;
3199
+ /** @enum {string} */
3200
+ trade_type: "ConditionResolution";
3201
+ } | {
3202
+ id: string;
3203
+ hash: string;
2567
3204
  /** Format: int64 */
2568
- min_unique_traders?: number;
2569
- min_fees?: 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_metrics` event. All fields are optional. */
2574
- PositionMetricsFilters: {
2575
- /** @description Restrict to these outcome token IDs. */
2576
- position_ids?: string[];
2577
- /** @description Restrict to positions within these markets. */
2578
- condition_ids?: string[];
2579
- /** @description Restrict to positions with these outcome names (e.g. ["Yes", "No"]). */
2580
- outcomes?: string[];
2581
- /** @description Restrict to these aggregation windows. */
2582
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2583
- /** @description Only fire when position volume ≥ this value (USD). */
2584
- min_volume_usd?: number;
2585
- max_volume_usd?: number;
2586
- min_buy_usd?: number;
2587
- min_sell_volume_usd?: number;
2588
- /** Format: int64 */
2589
- min_txns?: number;
2590
- /** Format: int64 */
2591
- min_unique_traders?: number;
2592
- /** @description Only fire when price change % ≥ this value. */
2593
- min_price_change_pct?: number;
2594
- /** @description Only fire when probability change % ≥ this value. */
2595
- min_probability_change_pct?: number;
2596
- min_fees?: number;
2597
- };
2598
- /** @description Subscription filters for the `market_volume_milestone` event. */
2599
- MarketVolumeMilestoneFilters: {
2600
- /** @description **Required.** Aggregation windows to monitor (e.g. ["1h", "24h"]). */
2601
- timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2602
- /** @description Restrict to these markets. Empty = all markets. */
2603
- condition_ids?: string[];
2604
- /** @description Specific USD milestones to trigger on (e.g. [10000, 100000, 1000000]). Empty = all milestones. */
2605
- milestone_amounts?: number[];
2606
- };
2607
- /** @description Subscription filters for the `event_volume_milestone` event. */
2608
- EventVolumeMilestoneFilters: {
2609
- /** @description **Required.** Aggregation windows to monitor. */
2610
- timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2611
- /** @description Restrict to these events. */
2612
- event_slugs?: string[];
2613
- /** @description Specific USD milestones to trigger on. */
2614
- milestone_amounts?: number[];
2615
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2616
- exclude_shortterm_markets?: boolean;
2617
- };
2618
- /** @description Subscription filters for the `position_volume_milestone` event. */
2619
- PositionVolumeMilestoneFilters: {
2620
- /** @description **Required.** Aggregation windows to monitor. */
2621
- timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2622
- /** @description Restrict to these outcome token IDs. */
2623
- position_ids?: string[];
2624
- /** @description Restrict to positions within these markets. */
2625
- condition_ids?: string[];
2626
- /** @description Specific USD milestones to trigger on. */
2627
- milestone_amounts?: number[];
2628
- };
2629
- /** @description Subscription filters for the `probability_spike` event. */
2630
- ProbabilitySpikeFilters: {
2631
- /** @description Restrict to specific outcome token IDs. Empty = all positions. */
2632
- position_ids?: string[];
2633
- /** @description Restrict to specific market condition IDs. Empty = all markets. */
2634
- condition_ids?: string[];
2635
- /** @description Restrict to specific events. Empty = all events. */
2636
- event_slugs?: string[];
2637
- /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
2638
- outcomes?: string[];
2639
- /** @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move). */
2640
- min_probability_change_pct?: number;
2641
- /**
2642
- * @description `"up"` = probability rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
2643
- * @enum {string}
2644
- */
2645
- spike_direction?: "up" | "down" | "both";
2646
- /** @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. */
2647
- window_secs?: number;
2648
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2649
- exclude_shortterm_markets?: boolean;
2650
- };
2651
- /** @description Subscription filters for the `price_spike` event. */
2652
- PriceSpikeFilters: {
2653
- /** @description Restrict to specific outcome token IDs. Empty = all positions. */
2654
- position_ids?: string[];
2655
- /** @description Restrict to specific market condition IDs. Empty = all markets. */
2656
- condition_ids?: string[];
2657
- /** @description Restrict to specific events. Empty = all events. */
2658
- event_slugs?: string[];
2659
- /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
2660
- outcomes?: string[];
2661
- /** @description Minimum price percentage move to trigger (e.g. `10` for a 10% move). */
2662
- min_price_change_pct?: number;
3205
+ block: number;
3206
+ /** Format: int64 */
3207
+ confirmed_at: number;
3208
+ /** Format: int64 */
3209
+ log_index: number;
3210
+ /** Format: int64 */
3211
+ block_index: number;
3212
+ oracle_contract: string;
3213
+ condition_id: string;
3214
+ question?: string;
3215
+ image_url?: string;
3216
+ slug?: string;
3217
+ event_slug?: string;
3218
+ /** @enum {string} */
3219
+ trade_type: "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause";
3220
+ } | {
3221
+ id: string;
3222
+ hash: string;
3223
+ /** Format: int64 */
3224
+ block: number;
3225
+ /** Format: int64 */
3226
+ confirmed_at: number;
3227
+ /** Format: int64 */
3228
+ log_index: number;
3229
+ /** Format: int64 */
3230
+ block_index: number;
3231
+ oracle_contract: string;
3232
+ condition_id: string;
3233
+ proposed_outcome?: string;
3234
+ question?: string;
3235
+ image_url?: string;
3236
+ slug?: string;
3237
+ event_slug?: string;
3238
+ /** @enum {string} */
3239
+ trade_type: "ManualResolution";
3240
+ } | {
3241
+ id: string;
3242
+ hash: string;
3243
+ /** Format: int64 */
3244
+ block: number;
3245
+ /** Format: int64 */
3246
+ confirmed_at: number;
3247
+ /** Format: int64 */
3248
+ log_index: number;
3249
+ /** Format: int64 */
3250
+ block_index: number;
3251
+ oracle_contract: string;
3252
+ condition_id: string;
3253
+ proposed_outcome?: string;
3254
+ question?: string;
3255
+ image_url?: string;
3256
+ slug?: string;
3257
+ event_slug?: string;
3258
+ /** @enum {string} */
3259
+ trade_type: "NegRiskOutcomeReported";
3260
+ } | {
3261
+ id: string;
3262
+ hash: string;
3263
+ /** Format: int64 */
3264
+ block: number;
3265
+ /** Format: int64 */
3266
+ confirmed_at: number;
3267
+ /** Format: int64 */
3268
+ log_index: number;
3269
+ /** Format: int64 */
3270
+ block_index: number;
3271
+ condition_id: string;
3272
+ token0: string;
3273
+ token1: string;
3274
+ question?: string;
3275
+ image_url?: string;
3276
+ slug?: string;
3277
+ event_slug?: string;
2663
3278
  /**
2664
- * @description `"up"` = price rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
3279
+ * @description Exchange contract that processed the event
2665
3280
  * @enum {string}
2666
3281
  */
2667
- spike_direction?: "up" | "down" | "both";
2668
- /** @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. */
2669
- window_secs?: number;
2670
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2671
- exclude_shortterm_markets?: boolean;
2672
- };
2673
- /** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
2674
- MarketVolumeSpikeFilters: {
2675
- /** @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. */
2676
- spike_ratio: number;
2677
- /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
2678
- window_secs?: number;
2679
- /** @description Restrict to these markets. Empty = all markets. */
2680
- condition_ids?: string[];
2681
- /** @description Restrict to these aggregation windows. Empty = all windows. */
2682
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
2683
- };
2684
- /** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
2685
- EventVolumeSpikeFilters: {
2686
- /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
2687
- spike_ratio: number;
2688
- /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
2689
- window_secs?: number;
2690
- /** @description Restrict to these events. */
2691
- event_slugs?: string[];
2692
- /** @description Restrict to these aggregation windows. */
2693
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
2694
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2695
- exclude_shortterm_markets?: boolean;
2696
- };
2697
- /** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
2698
- PositionVolumeSpikeFilters: {
2699
- /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
2700
- spike_ratio: number;
2701
- /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
2702
- window_secs?: number;
2703
- /** @description Restrict to these outcome token IDs. */
2704
- position_ids?: string[];
2705
- /** @description Restrict to positions within these markets. */
2706
- condition_ids?: string[];
2707
- /** @description Restrict to these outcome names. */
2708
- outcomes?: string[];
2709
- /** @description Restrict to these aggregation windows. */
2710
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
2711
- };
2712
- /** @description Subscription filters for the `close_to_bond` event. At least one of `min_probability` or `max_probability` is required. */
2713
- CloseToBondFilters: {
2714
- /** @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. */
2715
- min_probability?: number;
2716
- /** @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO). */
2717
- max_probability?: number;
2718
- /** @description Restrict to these markets. */
2719
- condition_ids?: string[];
2720
- /** @description Restrict to these outcome token IDs. */
2721
- position_ids?: string[];
2722
- /** @description Restrict to markets in these events. */
2723
- event_slugs?: string[];
2724
- /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
2725
- outcomes?: string[];
2726
- /** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
2727
- position_outcome_indices?: number[];
2728
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2729
- exclude_shortterm_markets?: boolean;
2730
- } | unknown | unknown;
2731
- /** @description Subscription filters for the `market_created` event. All fields are optional. */
2732
- MarketCreatedFilters: {
2733
- /** @description Restrict to markets with these tags or category names (case-insensitive match). */
2734
- tags?: string[];
2735
- /** @description Restrict to markets belonging to these events. */
2736
- event_slugs?: string[];
2737
- /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
2738
- exclude_shortterm_markets?: boolean;
2739
- };
2740
- /** @description Subscription filters for the `oracle_events` event. All fields are optional. */
2741
- OracleEventsFilters: {
2742
- /** @description Restrict to these event types (case-insensitive). Empty = all. */
2743
- oracle_event_types?: ("AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported")[];
2744
- /** @description Restrict to events for these condition IDs. */
2745
- condition_ids?: string[];
2746
- };
2747
- /** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
2748
- AssetPriceTickFilters: {
2749
- /** @description Restrict to these crypto assets. Empty = all assets. */
2750
- asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
2751
- };
2752
- /** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
2753
- AssetPriceWindowUpdateFilters: {
2754
- /** @description Restrict to these crypto assets. Empty = all assets. */
2755
- asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
2756
- /** @description Restrict to these candle sizes. Empty = all sizes. */
2757
- timeframes?: ("5m" | "15m" | "1h" | "4h" | "1d" | "24h")[];
3282
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
3283
+ /** @enum {string} */
3284
+ trade_type: "RegisterToken";
2758
3285
  };
2759
3286
  /**
2760
3287
  * @description All alert event types supported by both HTTP webhooks and the alerts WebSocket.
2761
3288
  * @enum {string}
2762
3289
  */
2763
- WsAlertEventType: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "price_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "oracle_events" | "asset_price_tick" | "asset_price_window_update";
3290
+ WsAlertEventType: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "tag_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "price_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "oracle_events" | "asset_price_tick" | "asset_price_window_update";
2764
3291
  /** @description Server acknowledgement for a successful alert subscription. */
2765
3292
  WsAlertSubscribedResponse: {
2766
3293
  /** @enum {string} */
@@ -2818,6 +3345,7 @@ export interface components {
2818
3345
  * "question": "Will this test webhook fire correctly?",
2819
3346
  * "market_slug": "test-market-0000000000",
2820
3347
  * "event_slug": "test-event-0000000000",
3348
+ * "image_url": "https://example.com/market.png",
2821
3349
  * "trade_id": "00000000-0000-0000-0000-000000000000",
2822
3350
  * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
2823
3351
  * "block": 0,
@@ -2827,7 +3355,7 @@ export interface components {
2827
3355
  * "fee": 0.125,
2828
3356
  * "side": "Buy",
2829
3357
  * "price": 0.5,
2830
- * "exchange": "polymarket",
3358
+ * "exchange": "CTFExchange",
2831
3359
  * "trade_type": "OrderFilled"
2832
3360
  * }
2833
3361
  * }
@@ -2884,6 +3412,7 @@ export interface components {
2884
3412
  * "question": "Will this test webhook fire correctly?",
2885
3413
  * "market_slug": "test-market-0000000000",
2886
3414
  * "event_slug": "test-event-0000000000",
3415
+ * "image_url": "https://example.com/market.png",
2887
3416
  * "trade_id": "00000000-0000-0000-0000-000000000000",
2888
3417
  * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
2889
3418
  * "block": 0,
@@ -2894,7 +3423,7 @@ export interface components {
2894
3423
  * "side": "Buy",
2895
3424
  * "price": 0.5,
2896
3425
  * "probability": 0.5,
2897
- * "exchange": "polymarket",
3426
+ * "exchange": "CTFExchange",
2898
3427
  * "trade_type": "OrderFilled"
2899
3428
  * }
2900
3429
  * }
@@ -2951,6 +3480,7 @@ export interface components {
2951
3480
  * "question": "Will this test webhook fire correctly?",
2952
3481
  * "market_slug": "test-market-0000000000",
2953
3482
  * "event_slug": "test-event-0000000000",
3483
+ * "image_url": "https://example.com/market.png",
2954
3484
  * "trade_id": "00000000-0000-0000-0000-000000000000",
2955
3485
  * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
2956
3486
  * "block": 0,
@@ -2961,7 +3491,7 @@ export interface components {
2961
3491
  * "side": "Buy",
2962
3492
  * "price": 0.5,
2963
3493
  * "probability": 0.5,
2964
- * "exchange": "polymarket",
3494
+ * "exchange": "CTFExchange",
2965
3495
  * "trade_type": "OrderFilled"
2966
3496
  * }
2967
3497
  * }
@@ -3018,6 +3548,7 @@ export interface components {
3018
3548
  * "question": "Will this test webhook fire correctly?",
3019
3549
  * "market_slug": "test-market-0000000000",
3020
3550
  * "event_slug": "test-event-0000000000",
3551
+ * "image_url": "https://example.com/market.png",
3021
3552
  * "trade_id": "00000000-0000-0000-0000-000000000000",
3022
3553
  * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
3023
3554
  * "block": 0,
@@ -3028,7 +3559,7 @@ export interface components {
3028
3559
  * "side": "Buy",
3029
3560
  * "price": 0.5,
3030
3561
  * "probability": 0.5,
3031
- * "exchange": "polymarket",
3562
+ * "exchange": "CTFExchange",
3032
3563
  * "trade_type": "OrderFilled"
3033
3564
  * }
3034
3565
  * }
@@ -3354,9 +3885,15 @@ export interface components {
3354
3885
  * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
3355
3886
  * "timeframe": "1h",
3356
3887
  * "volume_usd": 50000,
3888
+ * "shares_volume": 62000,
3889
+ * "builder_usd_volume": 12500,
3890
+ * "builder_shares_volume": 15500,
3357
3891
  * "fees": 250,
3892
+ * "builder_fees": 62.5,
3358
3893
  * "txns": 320,
3359
- * "unique_traders": 85
3894
+ * "builder_txns": 80,
3895
+ * "unique_traders": 85,
3896
+ * "unique_builder_traders": 24
3360
3897
  * }
3361
3898
  * }
3362
3899
  */
@@ -3406,9 +3943,15 @@ export interface components {
3406
3943
  * "event_slug": "test-event-0000000000",
3407
3944
  * "timeframe": "1h",
3408
3945
  * "volume_usd": 120000,
3946
+ * "shares_volume": 148000,
3947
+ * "builder_usd_volume": 30000,
3948
+ * "builder_shares_volume": 37000,
3409
3949
  * "fees": 600,
3950
+ * "builder_fees": 150,
3410
3951
  * "txns": 740,
3411
- * "unique_traders": 210
3952
+ * "builder_txns": 185,
3953
+ * "unique_traders": 210,
3954
+ * "unique_builder_traders": 54
3412
3955
  * }
3413
3956
  * }
3414
3957
  */
@@ -3425,6 +3968,64 @@ export interface components {
3425
3968
  timestamp: number;
3426
3969
  data: components["schemas"]["EventMetricsPayload"];
3427
3970
  };
3971
+ WsAlertTagMetricsSubscribeMessage: {
3972
+ /** @enum {string} */
3973
+ op: "subscribe";
3974
+ /** @enum {string} */
3975
+ event: "tag_metrics";
3976
+ } & components["schemas"]["TagMetricsFilters"] & {
3977
+ /**
3978
+ * @description discriminator enum property added by openapi-typescript
3979
+ * @enum {string}
3980
+ */
3981
+ event: "tag_metrics";
3982
+ };
3983
+ WsAlertTagMetricsUnsubscribeMessage: {
3984
+ /** @enum {string} */
3985
+ op: "unsubscribe";
3986
+ /** @enum {string} */
3987
+ event: "tag_metrics";
3988
+ } & components["schemas"]["TagMetricsFilters"] & {
3989
+ /**
3990
+ * @description discriminator enum property added by openapi-typescript
3991
+ * @enum {string}
3992
+ */
3993
+ event: "tag_metrics";
3994
+ };
3995
+ /**
3996
+ * @description Pushed `tag_metrics` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
3997
+ * @example {
3998
+ * "event": "tag_metrics",
3999
+ * "timestamp": 1743500000000,
4000
+ * "data": {
4001
+ * "tag": "politics",
4002
+ * "timeframe": "1h",
4003
+ * "volume_usd": 120000,
4004
+ * "shares_volume": 148000,
4005
+ * "builder_usd_volume": 30000,
4006
+ * "builder_shares_volume": 37000,
4007
+ * "fees": 600,
4008
+ * "builder_fees": 150,
4009
+ * "txns": 740,
4010
+ * "builder_txns": 185,
4011
+ * "unique_traders": 210,
4012
+ * "unique_builder_traders": 54
4013
+ * }
4014
+ * }
4015
+ */
4016
+ WsAlertTagMetricsEvent: {
4017
+ /**
4018
+ * @description discriminator enum property added by openapi-typescript
4019
+ * @enum {string}
4020
+ */
4021
+ event: "tag_metrics";
4022
+ /**
4023
+ * Format: int64
4024
+ * @description Unix timestamp in milliseconds
4025
+ */
4026
+ timestamp: number;
4027
+ data: components["schemas"]["TagMetricsPayload"];
4028
+ };
3428
4029
  WsAlertPositionMetricsSubscribeMessage: {
3429
4030
  /** @enum {string} */
3430
4031
  op: "subscribe";
@@ -3462,11 +4063,25 @@ export interface components {
3462
4063
  * "volume_usd": 25000,
3463
4064
  * "buy_volume_usd": 15000,
3464
4065
  * "sell_volume_usd": 10000,
4066
+ * "shares_volume": 31000,
4067
+ * "shares_buy_volume": 18600,
4068
+ * "shares_sell_volume": 12400,
4069
+ * "builder_usd_volume": 6250,
4070
+ * "builder_usd_buy_volume": 3750,
4071
+ * "builder_usd_sell_volume": 2500,
4072
+ * "builder_shares_volume": 7750,
4073
+ * "builder_shares_buy_volume": 4650,
4074
+ * "builder_shares_sell_volume": 3100,
3465
4075
  * "fees": 125,
4076
+ * "builder_fees": 31.25,
3466
4077
  * "txns": 160,
3467
4078
  * "buys": 95,
3468
4079
  * "sells": 65,
4080
+ * "builder_txns": 40,
4081
+ * "builder_buys": 24,
4082
+ * "builder_sells": 16,
3469
4083
  * "unique_traders": 48,
4084
+ * "unique_builder_traders": 12,
3470
4085
  * "price_open": 0.48,
3471
4086
  * "price_close": 0.52,
3472
4087
  * "price_high": 0.55,
@@ -3474,7 +4089,10 @@ export interface components {
3474
4089
  * "probability_open": 0.48,
3475
4090
  * "probability_close": 0.52,
3476
4091
  * "probability_high": 0.55,
3477
- * "probability_low": 0.46
4092
+ * "probability_low": 0.46,
4093
+ * "avg_trade_shares": 193.75,
4094
+ * "avg_buy_shares": 195.78947368421052,
4095
+ * "avg_sell_shares": 190.76923076923077
3478
4096
  * }
3479
4097
  * }
3480
4098
  */
@@ -4246,11 +4864,11 @@ export interface components {
4246
4864
  data: components["schemas"]["AssetPriceWindowUpdatePayload"];
4247
4865
  };
4248
4866
  /** @description Typed subscribe request for the alerts WebSocket. The request shape depends on `event`; filters follow the schema associated with that event type. */
4249
- WsAlertSubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketSubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderTradeEventSubscribeMessage"] | components["schemas"]["WsAlertTraderGlobalPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderMarketPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderEventPnlSubscribeMessage"] | components["schemas"]["WsAlertConditionMetricsSubscribeMessage"] | components["schemas"]["WsAlertEventMetricsSubscribeMessage"] | components["schemas"]["WsAlertPositionMetricsSubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertEventVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertProbabilitySpikeSubscribeMessage"] | components["schemas"]["WsAlertPriceSpikeSubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertEventVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertCloseToBondSubscribeMessage"] | components["schemas"]["WsAlertMarketCreatedSubscribeMessage"] | components["schemas"]["WsAlertOracleEventsSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateSubscribeMessage"];
4867
+ WsAlertSubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketSubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderTradeEventSubscribeMessage"] | components["schemas"]["WsAlertTraderGlobalPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderMarketPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderEventPnlSubscribeMessage"] | components["schemas"]["WsAlertConditionMetricsSubscribeMessage"] | components["schemas"]["WsAlertEventMetricsSubscribeMessage"] | components["schemas"]["WsAlertTagMetricsSubscribeMessage"] | components["schemas"]["WsAlertPositionMetricsSubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertEventVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertProbabilitySpikeSubscribeMessage"] | components["schemas"]["WsAlertPriceSpikeSubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertEventVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertCloseToBondSubscribeMessage"] | components["schemas"]["WsAlertMarketCreatedSubscribeMessage"] | components["schemas"]["WsAlertOracleEventsSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateSubscribeMessage"];
4250
4868
  /** @description Typed unsubscribe request for the alerts WebSocket. The request shape depends on `event` and must match the original subscription filters. */
4251
- WsAlertUnsubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketUnsubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderTradeEventUnsubscribeMessage"] | components["schemas"]["WsAlertTraderGlobalPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderMarketPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderEventPnlUnsubscribeMessage"] | components["schemas"]["WsAlertConditionMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertEventMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertPositionMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertEventVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertProbabilitySpikeUnsubscribeMessage"] | components["schemas"]["WsAlertPriceSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertEventVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertCloseToBondUnsubscribeMessage"] | components["schemas"]["WsAlertMarketCreatedUnsubscribeMessage"] | components["schemas"]["WsAlertOracleEventsUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateUnsubscribeMessage"];
4869
+ WsAlertUnsubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketUnsubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderTradeEventUnsubscribeMessage"] | components["schemas"]["WsAlertTraderGlobalPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderMarketPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderEventPnlUnsubscribeMessage"] | components["schemas"]["WsAlertConditionMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertEventMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertTagMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertPositionMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertEventVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertProbabilitySpikeUnsubscribeMessage"] | components["schemas"]["WsAlertPriceSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertEventVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertCloseToBondUnsubscribeMessage"] | components["schemas"]["WsAlertMarketCreatedUnsubscribeMessage"] | components["schemas"]["WsAlertOracleEventsUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateUnsubscribeMessage"];
4252
4870
  /** @description Typed pushed-event envelope for the alerts WebSocket. The `data` payload depends on `event` and matches the corresponding HTTP webhook payload schema. */
4253
- WsAlertEventPayload: components["schemas"]["WsAlertTraderFirstTradeEvent"] | components["schemas"]["WsAlertTraderNewMarketEvent"] | components["schemas"]["WsAlertTraderWhaleTradeEvent"] | components["schemas"]["WsAlertTraderNewTradeEvent"] | components["schemas"]["WsAlertTraderTradeEventEvent"] | components["schemas"]["WsAlertTraderGlobalPnlEvent"] | components["schemas"]["WsAlertTraderMarketPnlEvent"] | components["schemas"]["WsAlertTraderEventPnlEvent"] | components["schemas"]["WsAlertConditionMetricsEvent"] | components["schemas"]["WsAlertEventMetricsEvent"] | components["schemas"]["WsAlertPositionMetricsEvent"] | components["schemas"]["WsAlertMarketVolumeMilestoneEvent"] | components["schemas"]["WsAlertEventVolumeMilestoneEvent"] | components["schemas"]["WsAlertPositionVolumeMilestoneEvent"] | components["schemas"]["WsAlertProbabilitySpikeEvent"] | components["schemas"]["WsAlertPriceSpikeEvent"] | components["schemas"]["WsAlertMarketVolumeSpikeEvent"] | components["schemas"]["WsAlertEventVolumeSpikeEvent"] | components["schemas"]["WsAlertPositionVolumeSpikeEvent"] | components["schemas"]["WsAlertCloseToBondEvent"] | components["schemas"]["WsAlertMarketCreatedEvent"] | components["schemas"]["WsAlertOracleEventsEvent"] | components["schemas"]["WsAlertAssetPriceTickEvent"] | components["schemas"]["WsAlertAssetPriceWindowUpdateEvent"];
4871
+ WsAlertEventPayload: components["schemas"]["WsAlertTraderFirstTradeEvent"] | components["schemas"]["WsAlertTraderNewMarketEvent"] | components["schemas"]["WsAlertTraderWhaleTradeEvent"] | components["schemas"]["WsAlertTraderNewTradeEvent"] | components["schemas"]["WsAlertTraderTradeEventEvent"] | components["schemas"]["WsAlertTraderGlobalPnlEvent"] | components["schemas"]["WsAlertTraderMarketPnlEvent"] | components["schemas"]["WsAlertTraderEventPnlEvent"] | components["schemas"]["WsAlertConditionMetricsEvent"] | components["schemas"]["WsAlertEventMetricsEvent"] | components["schemas"]["WsAlertTagMetricsEvent"] | components["schemas"]["WsAlertPositionMetricsEvent"] | components["schemas"]["WsAlertMarketVolumeMilestoneEvent"] | components["schemas"]["WsAlertEventVolumeMilestoneEvent"] | components["schemas"]["WsAlertPositionVolumeMilestoneEvent"] | components["schemas"]["WsAlertProbabilitySpikeEvent"] | components["schemas"]["WsAlertPriceSpikeEvent"] | components["schemas"]["WsAlertMarketVolumeSpikeEvent"] | components["schemas"]["WsAlertEventVolumeSpikeEvent"] | components["schemas"]["WsAlertPositionVolumeSpikeEvent"] | components["schemas"]["WsAlertCloseToBondEvent"] | components["schemas"]["WsAlertMarketCreatedEvent"] | components["schemas"]["WsAlertOracleEventsEvent"] | components["schemas"]["WsAlertAssetPriceTickEvent"] | components["schemas"]["WsAlertAssetPriceWindowUpdateEvent"];
4254
4872
  };
4255
4873
  responses: never;
4256
4874
  parameters: never;
@@ -4271,6 +4889,7 @@ export interface WsAlertSubscribeMap {
4271
4889
  trader_event_pnl: components["schemas"]["WsAlertTraderEventPnlSubscribeMessage"];
4272
4890
  condition_metrics: components["schemas"]["WsAlertConditionMetricsSubscribeMessage"];
4273
4891
  event_metrics: components["schemas"]["WsAlertEventMetricsSubscribeMessage"];
4892
+ tag_metrics: components["schemas"]["WsAlertTagMetricsSubscribeMessage"];
4274
4893
  position_metrics: components["schemas"]["WsAlertPositionMetricsSubscribeMessage"];
4275
4894
  market_volume_milestone: components["schemas"]["WsAlertMarketVolumeMilestoneSubscribeMessage"];
4276
4895
  event_volume_milestone: components["schemas"]["WsAlertEventVolumeMilestoneSubscribeMessage"];
@@ -4297,6 +4916,7 @@ export interface WsAlertEventDataMap {
4297
4916
  trader_event_pnl: components["schemas"]["EventPnlPayload"];
4298
4917
  condition_metrics: components["schemas"]["ConditionMetricsPayload"];
4299
4918
  event_metrics: components["schemas"]["EventMetricsPayload"];
4919
+ tag_metrics: components["schemas"]["TagMetricsPayload"];
4300
4920
  position_metrics: components["schemas"]["PositionMetricsPayload"];
4301
4921
  market_volume_milestone: components["schemas"]["VolumeMilestonePayload"];
4302
4922
  event_volume_milestone: components["schemas"]["EventVolumeMilestonePayload"];