@structbuild/sdk 0.1.21 → 0.1.23

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.
@@ -248,7 +248,7 @@ export interface webhooks {
248
248
  put?: never;
249
249
  /**
250
250
  * Market metrics callback
251
- * @description Fired when a market's volume or transaction metrics cross a configured threshold
251
+ * @description Fired when a market's volume or transaction metrics cross a configured threshold. Use `timeframes` to restrict to specific windows (valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`).
252
252
  */
253
253
  post: operations["market-metrics"];
254
254
  delete?: never;
@@ -268,7 +268,7 @@ export interface webhooks {
268
268
  put?: never;
269
269
  /**
270
270
  * Event metrics callback
271
- * @description Fired when an event's volume or transaction metrics cross a configured threshold
271
+ * @description Fired when an event's volume or transaction metrics cross a configured threshold. Use `timeframes` to restrict to specific windows (valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`).
272
272
  */
273
273
  post: operations["event-metrics"];
274
274
  delete?: never;
@@ -288,7 +288,7 @@ export interface webhooks {
288
288
  put?: never;
289
289
  /**
290
290
  * Position metrics callback
291
- * @description Fired when a position's volume or transaction metrics cross a configured threshold
291
+ * @description Fired when a position's volume or transaction metrics cross a configured threshold. Use `timeframes` to restrict to specific windows (valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`).
292
292
  */
293
293
  post: operations["position-metrics"];
294
294
  delete?: never;
@@ -308,7 +308,7 @@ export interface webhooks {
308
308
  put?: never;
309
309
  /**
310
310
  * Market volume milestone callback
311
- * @description Fired once per org when a market's trading volume crosses a milestone in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds (e.g. `[10000, 100000]`). Optional `condition_ids` restricts to specific markets. Each milestone fires at most once per minute per org.
311
+ * @description Fired when a market's trading volume crosses a milestone threshold in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds (e.g. `[10000, 100000]`). Optional `condition_ids` restricts to specific markets.
312
312
  */
313
313
  post: operations["market-volume-milestone"];
314
314
  delete?: never;
@@ -328,7 +328,7 @@ export interface webhooks {
328
328
  put?: never;
329
329
  /**
330
330
  * Event volume milestone callback
331
- * @description Fired once per org when an event's trading volume crosses a milestone in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds. Optional `event_slugs` restricts to specific events. Each milestone fires at most once per minute per org.
331
+ * @description Fired when an event's trading volume crosses a milestone threshold in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds. Optional `event_slugs` restricts to specific events.
332
332
  */
333
333
  post: operations["event-volume-milestone"];
334
334
  delete?: never;
@@ -348,7 +348,7 @@ export interface webhooks {
348
348
  put?: never;
349
349
  /**
350
350
  * Position volume milestone callback
351
- * @description Fired once per org when a position's trading volume crosses a milestone in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds. Optional `position_ids` or `condition_ids` restrict to specific positions/markets. Each milestone fires at most once per minute per org.
351
+ * @description Fired when a position's trading volume crosses a milestone threshold in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds. Optional `position_ids` or `condition_ids` restrict to specific positions/markets.
352
352
  */
353
353
  post: operations["position-volume-milestone"];
354
354
  delete?: never;
@@ -368,7 +368,7 @@ export interface webhooks {
368
368
  put?: never;
369
369
  /**
370
370
  * Probability spike callback
371
- * @description Fired when a position's probability changes by at least `min_probability_change_pct` percent (relative to open) within the specified timeframe. Valid timeframes: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional filters: `position_ids`, `outcomes`, `timeframes`. `probability_change_pct` in the payload is relative (e.g. `83.3` for a move from 30%→55%) and can be negative for downward moves. A hard minimum of 5% relative change is applied before any subscription filter.
371
+ * @description Fired when a position's probability moves significantly. Use `min_probability_change_pct` to set the minimum move (e.g. `10` for 10%). Use `window_secs` to observe moves within a specific time window (e.g. `60` for 60 seconds). Use `spike_direction` (`"up"` | `"down"` | `"both"`) defaults to `"up"` when not provided. Filter by `position_ids` or `outcomes` to narrow scope.
372
372
  */
373
373
  post: operations["probability-spike"];
374
374
  delete?: never;
@@ -377,6 +377,26 @@ export interface webhooks {
377
377
  patch?: never;
378
378
  trace?: never;
379
379
  };
380
+ "price-spike": {
381
+ parameters: {
382
+ query?: never;
383
+ header?: never;
384
+ path?: never;
385
+ cookie?: never;
386
+ };
387
+ get?: never;
388
+ put?: never;
389
+ /**
390
+ * Price spike callback
391
+ * @description Fired when a position's price moves significantly. Use `min_price_change_pct` to set the minimum move (e.g. `10` for 10%). Use `window_secs` to observe moves within a specific time window. Use `spike_direction` (`"up"` | `"down"` | `"both"`) — defaults to `"up"` when not provided. Filter by `position_ids` or `outcomes` to narrow scope.
392
+ */
393
+ post: operations["price-spike"];
394
+ delete?: never;
395
+ options?: never;
396
+ head?: never;
397
+ patch?: never;
398
+ trace?: never;
399
+ };
380
400
  "market-volume-spike": {
381
401
  parameters: {
382
402
  query?: never;
@@ -388,7 +408,7 @@ export interface webhooks {
388
408
  put?: never;
389
409
  /**
390
410
  * Market volume spike callback
391
- * @description Fired when a market's volume in a timeframe exceeds the user-defined baseline by the configured ratio (e.g. 2x baseline). Requires `baseline_volume_usd` and `spike_ratio` in the subscription filter. Optional `timeframes` restricts to specific windows — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `condition_ids` restricts to specific markets.
411
+ * @description Fired when a market's trading volume grows by a multiple of `spike_ratio` within a timeframe. Requires `spike_ratio` (> 1.0, e.g. `2.0` fires when volume doubles). Optional `window_secs` sets the observation window in seconds (max 600). Optional `timeframes` — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `1d`, `24h`, `7d`, `30d`. Optional `condition_ids` restricts to specific markets.
392
412
  */
393
413
  post: operations["market-volume-spike"];
394
414
  delete?: never;
@@ -408,7 +428,7 @@ export interface webhooks {
408
428
  put?: never;
409
429
  /**
410
430
  * Event volume spike callback
411
- * @description Fired when an event's aggregated volume in a timeframe exceeds the user-defined baseline by the configured ratio. Requires `baseline_volume_usd` and `spike_ratio` in the subscription filter. Optional `timeframes` and `event_slugs` filter by timeframe and event. 1-minute cooldown per org prevents repeated firing.
431
+ * @description Fired when an event's aggregated trading volume grows by a multiple of `spike_ratio` within a timeframe. Requires `spike_ratio` (> 1.0, e.g. `2.0` fires when volume doubles). Optional `window_secs` sets the observation window in seconds (max 600). Optional `timeframes` and `event_slugs` to narrow scope.
412
432
  */
413
433
  post: operations["event-volume-spike"];
414
434
  delete?: never;
@@ -428,7 +448,7 @@ export interface webhooks {
428
448
  put?: never;
429
449
  /**
430
450
  * Position volume spike callback
431
- * @description Fired when a position's volume in a timeframe exceeds the user-defined baseline by the configured ratio. Requires `baseline_volume_usd` and `spike_ratio` in the subscription filter. Optional `position_ids`, `condition_ids`, `outcomes`, and `timeframes` for narrowing scope. 1-minute cooldown per org prevents repeated firing.
451
+ * @description Fired when a position's trading volume grows by a multiple of `spike_ratio` within a timeframe. Requires `spike_ratio` (> 1.0, e.g. `2.0` fires when volume doubles). Optional `window_secs` sets the observation window in seconds (max 600). Optional `position_ids`, `condition_ids`, `outcomes`, and `timeframes` to narrow scope.
432
452
  */
433
453
  post: operations["position-volume-spike"];
434
454
  delete?: never;
@@ -448,7 +468,7 @@ export interface webhooks {
448
468
  put?: never;
449
469
  /**
450
470
  * Close to bond callback
451
- * @description Fired when a trade occurs at a near-certain-outcome price. **At least one of `min_probability` or `max_probability` is required.** Use `min_probability` (e.g. `0.95`) to trigger when YES is near-certain; use `max_probability` (e.g. `0.05`) for NO near-certain. Optional filters: `position_outcome_indices` — restrict by outcome index (`0` = Yes/Up, `1` = No; position 0 usually represents Yes/Up in binary markets); `condition_ids` — restrict to specific markets; `position_ids` — restrict to specific outcome tokens; `outcomes` — restrict by outcome name (e.g. `"Yes"`, `"No"`); `event_slugs` — restrict to specific events. Deduplication: each org is notified at most once per 6 hours while a position remains in the bond zone.
471
+ * @description Fired when a trade occurs at a near-certain-outcome price. **At least one of `min_probability` or `max_probability` is required.** Use `min_probability` (e.g. `0.95`) to trigger when YES is near-certain; use `max_probability` (e.g. `0.05`) for NO near-certain. Optional filters: `position_outcome_indices` — restrict by outcome index (`0` = Yes/Up, `1` = No); `condition_ids` — restrict to specific markets; `position_ids` — restrict to specific outcome tokens; `outcomes` — restrict by outcome name (e.g. `"Yes"`, `"No"`); `event_slugs` — restrict to specific events.
452
472
  */
453
473
  post: operations["close-to-bond"];
454
474
  delete?: never;
@@ -468,7 +488,7 @@ export interface webhooks {
468
488
  put?: never;
469
489
  /**
470
490
  * Market created callback
471
- * @description Fired when a new prediction market is detected on-chain (ConditionPreparation event), enriched with Gamma API metadata. Filterable by `tags`, `condition_ids`, `event_slugs`, and `exclude_shorterm_market_timeframes`. By default (`filter_no_metadata: true`) markets without Gamma metadata (no title, category, or tags) are suppressed — set `filter_no_metadata: false` to receive bare on-chain markets as well.
491
+ * @description Fired when a new prediction market is created on Polymarket. Filterable by `tags` and `event_slugs`.
472
492
  */
473
493
  post: operations["market-created"];
474
494
  delete?: never;
@@ -488,7 +508,7 @@ export interface webhooks {
488
508
  put?: never;
489
509
  /**
490
510
  * Asset price tick callback
491
- * @description Fired on every raw Chainlink price tick received from the WebSocket feed for crypto assets (BTC, ETH, SOL, XRP). Use `asset_symbols` to restrict to specific assets (empty = all). Use `min_usd_value` as a minimum price filter.
511
+ * @description Fired when the price of a tracked crypto asset updates (BTC, ETH, SOL, XRP). Use `asset_symbols` to restrict to specific assets (empty = all).
492
512
  */
493
513
  post: operations["asset-price-tick"];
494
514
  delete?: never;
@@ -508,7 +528,7 @@ export interface webhooks {
508
528
  put?: never;
509
529
  /**
510
530
  * Asset price window update callback
511
- * @description Fired twice per candle: once when the window opens (`update_type: "open"`) and once when it closes with a confirmed close price (`update_type: "close"`). Use `asset_symbols` to restrict to specific assets (BTC, ETH, SOL, XRP). Use `timeframes` to restrict to specific candle sizes — valid values: `"5m"`, `"15m"`, `"1h"`, `"24h"`.
531
+ * @description Fired at the start and end of each price candle for tracked crypto assets (BTC, ETH, SOL, XRP). Payload includes `update_type` (`"open"` or `"close"`) indicating whether the candle is opening or closing. Use `asset_symbols` to restrict to specific assets. Use `timeframes` to restrict to specific candle sizes — valid values: `"5m"`, `"15m"`, `"1h"`, `"1d"`, `"24h"`.
512
532
  */
513
533
  post: operations["asset-price-window-update"];
514
534
  delete?: never;
@@ -520,133 +540,118 @@ export interface webhooks {
520
540
  }
521
541
  export interface components {
522
542
  schemas: {
523
- /** @description Webhook payload for an asset price tick. */
543
+ /** @description Payload delivered on every raw Chainlink price tick for a tracked crypto asset */
524
544
  AssetPriceTickPayload: {
525
- /** @description Asset symbol: "BTC", "ETH", "SOL", or "XRP" */
526
- symbol: string;
527
545
  /**
528
- * Format: double
529
- * @description Current price from the Chainlink feed
546
+ * @description Asset symbol
547
+ * @enum {string}
530
548
  */
549
+ symbol: "BTC" | "ETH" | "SOL" | "XRP";
550
+ /** @description Current asset price in USD from the Chainlink feed */
531
551
  price: number;
532
552
  /**
533
553
  * Format: int64
534
- * @description Tick timestamp as reported by the WebSocket feed (milliseconds since epoch)
554
+ * @description Tick timestamp (milliseconds since Unix epoch)
535
555
  */
536
556
  timestamp_ms: number;
537
557
  };
538
- /** @description Webhook payload for an asset price window open or close. */
558
+ /** @description Payload delivered twice per candle once on open and once on close. `close_price` is 0.0 on the "open" update. */
539
559
  AssetPriceWindowUpdatePayload: {
540
- /** @description Asset symbol: "BTC", "ETH", "SOL", or "XRP" */
541
- symbol: string;
542
- /** @description Time-window variant: "5m", "15m", "1h", or "24h" */
543
- variant: string;
560
+ /**
561
+ * @description Asset symbol
562
+ * @enum {string}
563
+ */
564
+ symbol: "BTC" | "ETH" | "SOL" | "XRP";
565
+ /**
566
+ * @description Candle / window size
567
+ * @enum {string}
568
+ */
569
+ variant: "5m" | "15m" | "1h" | "1d" | "24h";
544
570
  /**
545
571
  * Format: int64
546
- * @description Window start timestamp (milliseconds since epoch)
572
+ * @description Window start timestamp (milliseconds since Unix epoch)
547
573
  */
548
574
  start_time: number;
549
575
  /**
550
576
  * Format: int64
551
- * @description Window end timestamp (milliseconds since epoch)
577
+ * @description Window end timestamp (milliseconds since Unix epoch)
552
578
  */
553
579
  end_time: number;
554
- /**
555
- * Format: double
556
- * @description Opening price at start_time
557
- */
580
+ /** @description Opening price at start_time (USD) */
558
581
  open_price: number;
582
+ /** @description Closing price at end_time (USD). 0.0 when update_type is "open" (not yet available). */
583
+ close_price: number;
559
584
  /**
560
- * Format: double
561
- * @description Closing price at end_time (0.0 on an "open" update — not yet available)
585
+ * @description "open" when the candle opens, "close" when it closes with a confirmed price
586
+ * @enum {string}
562
587
  */
563
- close_price: number;
564
- /** @description "open" when the window starts, "close" when the window is complete */
565
- update_type: string;
588
+ update_type: "open" | "close";
566
589
  };
567
- /** @description Close-to-bond webhook payload */
590
+ /** @description Payload delivered when a trade occurs at a near-certain-outcome price */
568
591
  CloseToBondPayload: {
569
- /** @description Trader address (the limit-order maker) */
592
+ /** @description Limit-order maker wallet address (lowercase) */
570
593
  trader: string;
571
- /** @description Taker address (the order filler often the exchange contract) */
594
+ /** @description Order filler wallet address (lowercase) */
572
595
  taker: string;
573
- /** @description Position ID (ERC1155 token ID) */
596
+ /** @description ERC-1155 outcome token ID */
574
597
  position_id: string;
575
- /** @description Condition ID (parent market) */
598
+ /** @description Parent market condition ID */
576
599
  condition_id?: string | null;
577
600
  /** @description Outcome name (e.g. "Yes", "No") */
578
601
  outcome?: string | null;
579
- /**
580
- * Format: int32
581
- * @description Outcome index (0 = Yes/Up, 1 = No). Position 0 usually represents Yes/Up.
582
- */
602
+ /** @description 0 = Yes/Up, 1 = No */
583
603
  outcome_index?: number | null;
584
- /** @description Market question */
585
604
  question?: string | null;
586
- /** @description Market slug */
587
605
  market_slug?: string | null;
588
- /** @description Event slug */
589
606
  event_slug?: string | null;
590
- /** @description Trade ID */
591
607
  trade_id: string;
592
608
  /** @description Transaction hash */
593
609
  hash: string;
594
- /**
595
- * Format: int64
596
- * @description Block number
597
- */
610
+ /** Format: int64 */
598
611
  block: number;
599
612
  /**
600
613
  * Format: int64
601
- * @description Confirmed timestamp (Unix seconds)
614
+ * @description Unix seconds
602
615
  */
603
616
  confirmed_at: number;
604
- /**
605
- * Format: double
606
- * @description USD size of the trade
607
- */
617
+ /** @description USD size of the trade */
608
618
  amount_usd: number;
609
- /**
610
- * Format: double
611
- * @description Outcome shares traded
612
- */
613
619
  shares_amount: number;
614
- /**
615
- * Format: double
616
- * @description Fee paid (USD)
617
- */
620
+ /** @description Fee paid in USD */
618
621
  fee: number;
619
- /** @description Trade side ("Buy" or "Sell") */
620
- side: string;
621
- /**
622
- * Format: double
623
- * @description Price per share (0.0–1.0) — the value that triggered the notification
624
- */
622
+ /** @enum {string} */
623
+ side: "Buy" | "Sell";
624
+ /** @description Price that triggered the notification (0.0–1.0) */
625
625
  price: number;
626
- /**
627
- * Format: double
628
- * @description Implied probability of the outcome (0.0–1.0)
629
- */
626
+ /** @description Implied probability (0.0–1.0) */
630
627
  probability?: number | null;
631
- /** @description Which bond zone was entered: `"high"` (YES near-certain) or `"low"` (NO near-certain) */
632
- bond_side: string;
633
628
  /**
634
- * Format: double
635
- * @description The probability threshold from the subscriber's filter that was breached
629
+ * @description "high" when near YES (price ≥ threshold), "low" when near NO (price ≤ threshold)
630
+ * @enum {string}
636
631
  */
632
+ bond_side: "high" | "low";
633
+ /** @description The probability threshold from the subscription filter that was breached */
637
634
  threshold: number;
638
635
  };
639
- /** @description Condition metrics webhook payload (Arc-optimized, no internal metadata) */
636
+ /** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
640
637
  ConditionMetricsPayload: {
638
+ /** @description Market condition ID */
641
639
  condition_id?: string | null;
640
+ /** @description Aggregation window (e.g. "1h", "24h") */
642
641
  timeframe?: string | null;
643
- /** Format: double */
642
+ /** @description Total trading volume in USD for this timeframe */
644
643
  volume_usd?: number | null;
645
- /** Format: double */
644
+ /** @description Total fees collected in USD */
646
645
  fees?: number | null;
647
- /** Format: int64 */
646
+ /**
647
+ * Format: int64
648
+ * @description Total number of transactions
649
+ */
648
650
  txns?: number | null;
649
- /** Format: int64 */
651
+ /**
652
+ * Format: int64
653
+ * @description Number of unique traders
654
+ */
650
655
  unique_traders?: number | null;
651
656
  };
652
657
  /** @description Request body for creating a webhook */
@@ -665,26 +670,42 @@ export interface components {
665
670
  DeleteWebhookResponse: {
666
671
  deleted: boolean;
667
672
  };
668
- /** @description Event metrics webhook payload (Arc-optimized, no internal metadata) */
673
+ /** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
669
674
  EventMetricsPayload: {
675
+ /** @description Event slug */
670
676
  event_slug?: string | null;
677
+ /** @description Aggregation window (e.g. "1h", "24h") */
671
678
  timeframe?: string | null;
672
- /** Format: double */
679
+ /** @description Total aggregated volume across all markets in the event (USD) */
673
680
  volume_usd?: number | null;
674
- /** Format: double */
681
+ /** @description Total fees collected in USD */
675
682
  fees?: number | null;
676
- /** Format: int64 */
683
+ /**
684
+ * Format: int64
685
+ * @description Total number of transactions
686
+ */
677
687
  txns?: number | null;
678
- /** Format: int64 */
688
+ /**
689
+ * Format: int64
690
+ * @description Number of unique traders
691
+ */
679
692
  unique_traders?: number | null;
680
693
  };
681
- /** @description Event PnL webhook payload (Arc-optimized) */
694
+ /** @description Payload delivered when a trader's per-event PnL crosses a configured threshold */
682
695
  EventPnlPayload: {
696
+ /** @description Trader wallet address (lowercase) */
683
697
  trader?: string | null;
698
+ /** @description Event slug */
684
699
  event_slug?: string | null;
685
- /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
686
- timeframe: string;
687
- /** Format: int64 */
700
+ /**
701
+ * @description PnL aggregation window
702
+ * @enum {string}
703
+ */
704
+ timeframe: "1d" | "7d" | "30d" | "lifetime";
705
+ /**
706
+ * Format: int64
707
+ * @description Number of distinct markets traded in this event
708
+ */
688
709
  markets_traded?: number | null;
689
710
  /** Format: int64 */
690
711
  outcomes_traded?: number | null;
@@ -696,47 +717,41 @@ export interface components {
696
717
  total_redemptions?: number | null;
697
718
  /** Format: int64 */
698
719
  total_merges?: number | null;
699
- /** Format: double */
720
+ /** @description Total volume in USD */
700
721
  total_volume_usd?: number | null;
701
- /** Format: double */
702
722
  buy_usd?: number | null;
703
- /** Format: double */
704
723
  sell_usd?: number | null;
705
- /** Format: double */
706
724
  redemption_usd?: number | null;
707
- /** Format: double */
708
725
  merge_usd?: number | null;
709
- /** Format: double */
726
+ /** @description Realized PnL in USD for this event */
710
727
  realized_pnl_usd?: number | null;
711
728
  /** Format: int64 */
712
729
  winning_markets?: number | null;
713
730
  /** Format: int64 */
714
731
  losing_markets?: number | null;
715
- /** Format: double */
716
732
  total_fees?: number | null;
717
- /** Format: int64 */
733
+ /**
734
+ * Format: int64
735
+ * @description Unix seconds
736
+ */
718
737
  first_trade_at?: number | null;
719
- /** Format: int64 */
738
+ /**
739
+ * Format: int64
740
+ * @description Unix seconds
741
+ */
720
742
  last_trade_at?: number | null;
721
743
  };
722
- /** @description Event volume milestone webhook payload */
744
+ /** @description Payload delivered when an event's aggregated trading volume crosses a USD milestone */
723
745
  EventVolumeMilestonePayload: {
746
+ /** @description Event slug */
724
747
  event_slug: string;
748
+ /** @description Aggregation window (e.g. "1h", "24h") */
725
749
  timeframe: string;
726
- /**
727
- * Format: double
728
- * @description Milestone amount reached (USD)
729
- */
750
+ /** @description The USD milestone amount that was crossed */
730
751
  milestone_usd: number;
731
- /**
732
- * Format: double
733
- * @description Current volume (USD) that triggered the milestone
734
- */
752
+ /** @description Current aggregated event volume at time of trigger (USD) */
735
753
  current_volume_usd: number;
736
- /**
737
- * Format: double
738
- * @description Total fees collected in this timeframe
739
- */
754
+ /** @description Total fees in USD for this timeframe */
740
755
  fees: number;
741
756
  /**
742
757
  * Format: int64
@@ -744,67 +759,47 @@ export interface components {
744
759
  */
745
760
  txns: number;
746
761
  };
747
- /** @description Event volume spike webhook payload */
762
+ /** @description Payload delivered when an event's aggregated volume has spiked since the last snapshot */
748
763
  EventVolumeSpikePayload: {
764
+ /** @description Event slug */
749
765
  event_slug: string;
766
+ /** @description Aggregation window (e.g. "1h", "24h") */
750
767
  timeframe: string;
751
- /**
752
- * Format: double
753
- * @description Current aggregated event volume that triggered the spike (USD)
754
- */
768
+ /** @description Current aggregated event volume at time of the spike (USD) */
755
769
  current_volume_usd: number;
756
- /**
757
- * Format: double
758
- * @description User's baseline volume for comparison (USD)
759
- */
760
- baseline_volume_usd: number;
761
- /**
762
- * Format: double
763
- * @description Spike ratio threshold that was triggered
764
- */
765
- spike_ratio: number;
766
- /**
767
- * Format: double
768
- * @description Calculated threshold that was crossed (baseline * ratio)
769
- */
770
- threshold_usd: number;
771
- /**
772
- * Format: int64
773
- * @description Total transactions in this timeframe
774
- */
770
+ /** @description Volume at the snapshot baseline (USD) */
771
+ snapshot_volume_usd: number;
772
+ /** @description New volume since the snapshot that triggered this notification (USD) */
773
+ delta_volume_usd: number;
774
+ /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
775
+ spike_pct: number;
776
+ /** Format: int64 */
775
777
  txns: number;
776
- /**
777
- * Format: double
778
- * @description Total fees in this timeframe
779
- */
780
778
  fees: number;
781
779
  };
782
- /** @description First trade webhook payload with zero-copy Arc<str> for string sharing */
780
+ /** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
783
781
  FirstTradePayload: {
784
- /** @description Trader/taker address (zero-copy Arc) */
782
+ /** @description Limit-order maker wallet address (lowercase) */
785
783
  trader: string;
786
- /** @description Taker address (same as trader, zero-copy Arc) */
784
+ /** @description Order filler wallet address (lowercase) */
787
785
  taker: string;
788
- /** @description Position ID (ERC1155 token ID, zero-copy Arc) */
786
+ /** @description ERC-1155 outcome token ID */
789
787
  position_id: string;
790
- /** @description Condition ID (market condition, zero-copy Arc) */
788
+ /** @description Parent market condition ID (0x-prefixed hex) */
791
789
  condition_id?: string | null;
792
- /** @description Market outcome (e.g., "Yes", "No", zero-copy Arc) */
790
+ /** @description Outcome name (e.g. "Yes", "No") */
793
791
  outcome?: string | null;
794
- /**
795
- * Format: int32
796
- * @description Outcome index (0 = Yes, 1 = No)
797
- */
792
+ /** @description Outcome index: 0 = Yes/Up, 1 = No */
798
793
  outcome_index?: number | null;
799
- /** @description Market question (zero-copy Arc) */
794
+ /** @description Market question text */
800
795
  question?: string | null;
801
- /** @description Market slug (zero-copy Arc) */
796
+ /** @description Market slug */
802
797
  market_slug?: string | null;
803
- /** @description Event slug (parent event, zero-copy Arc) */
798
+ /** @description Parent event slug */
804
799
  event_slug?: string | null;
805
- /** @description Trade ID (zero-copy Arc) */
800
+ /** @description Unique trade identifier */
806
801
  trade_id: string;
807
- /** @description Transaction hash (zero-copy Arc) */
802
+ /** @description Transaction hash */
808
803
  hash: string;
809
804
  /**
810
805
  * Format: int64
@@ -813,114 +808,149 @@ export interface components {
813
808
  block: number;
814
809
  /**
815
810
  * Format: int64
816
- * @description Confirmed timestamp (Unix seconds)
811
+ * @description Block confirmation timestamp (Unix seconds)
817
812
  */
818
813
  confirmed_at: number;
819
- /** Format: double */
814
+ /** @description USD size of the trade (6 decimal places) */
820
815
  amount_usd: number;
821
- /** Format: double */
816
+ /** @description Outcome shares traded (6 decimal places) */
822
817
  shares_amount: number;
823
- /** Format: double */
818
+ /** @description Fee paid in USD (6 decimal places) */
824
819
  fee: number;
825
- /** @description Trade side (Buy/Sell, zero-copy Arc) */
826
- side: string;
827
820
  /**
828
- * Format: double
829
- * @description Price per share (0.0 - 1.0)
821
+ * @description Trade direction
822
+ * @enum {string}
830
823
  */
824
+ side: "Buy" | "Sell";
825
+ /** @description Outcome token price (0.0–1.0) */
831
826
  price: number;
827
+ /** @description Exchange identifier */
832
828
  exchange: string;
829
+ /** @description Trade type identifier */
833
830
  trade_type: string;
834
831
  };
835
- /** @description Global PnL webhook payload (Arc-optimized) */
832
+ /** @description Payload delivered when a trader's global PnL (across all markets) crosses a configured threshold */
836
833
  GlobalPnlPayload: {
834
+ /** @description Trader wallet address (lowercase) */
837
835
  trader?: string | null;
838
- /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
839
- timeframe: string;
840
- /** Format: double */
836
+ /**
837
+ * @description PnL aggregation window
838
+ * @enum {string}
839
+ */
840
+ timeframe: "1d" | "7d" | "30d" | "lifetime";
841
+ /** @description Realized PnL in USD (positive = profit, negative = loss) */
841
842
  realized_pnl_usd?: number | null;
842
- /** Format: int64 */
843
+ /**
844
+ * Format: int64
845
+ * @description Number of distinct events traded
846
+ */
843
847
  events_traded?: number | null;
844
- /** Format: int64 */
848
+ /**
849
+ * Format: int64
850
+ * @description Number of distinct markets traded
851
+ */
845
852
  markets_traded?: number | null;
846
- /** Format: int64 */
853
+ /**
854
+ * Format: int64
855
+ * @description Total buy transactions
856
+ */
847
857
  total_buys?: number | null;
848
- /** Format: int64 */
858
+ /**
859
+ * Format: int64
860
+ * @description Total sell transactions
861
+ */
849
862
  total_sells?: number | null;
850
- /** Format: int64 */
863
+ /**
864
+ * Format: int64
865
+ * @description Total redemption transactions
866
+ */
851
867
  total_redemptions?: number | null;
852
- /** Format: int64 */
868
+ /**
869
+ * Format: int64
870
+ * @description Total merge transactions
871
+ */
853
872
  total_merges?: number | null;
854
- /** Format: double */
873
+ /** @description Total USD volume (buys + sells + redemptions + merges) */
855
874
  total_volume_usd?: number | null;
856
- /** Format: double */
875
+ /** @description Total buy volume in USD */
857
876
  buy_volume_usd?: number | null;
858
- /** Format: double */
877
+ /** @description Total sell volume in USD */
859
878
  sell_volume_usd?: number | null;
860
- /** Format: double */
879
+ /** @description Total redemption volume in USD */
861
880
  redemption_volume_usd?: number | null;
862
- /** Format: double */
881
+ /** @description Total merge volume in USD */
863
882
  merge_volume_usd?: number | null;
864
- /** Format: int64 */
883
+ /**
884
+ * Format: int64
885
+ * @description Number of markets where trader realised a profit
886
+ */
865
887
  markets_won?: number | null;
866
- /** Format: int64 */
888
+ /**
889
+ * Format: int64
890
+ * @description Number of markets where trader realised a loss
891
+ */
867
892
  markets_lost?: number | null;
868
- /** Format: double */
893
+ /** @description Market win rate as a percentage (0.0–100.0) */
869
894
  market_win_rate_pct?: number | null;
870
- /** Format: double */
895
+ /** @description Average PnL per market in USD */
871
896
  avg_pnl_per_market?: number | null;
872
- /** Format: double */
897
+ /** @description Average PnL per trade in USD */
873
898
  avg_pnl_per_trade?: number | null;
874
- /** Format: double */
899
+ /** @description Average hold time across all positions (seconds) */
875
900
  avg_hold_time_seconds?: number | null;
876
- /** Format: double */
901
+ /** @description Total fees paid in USD */
877
902
  total_fees?: number | null;
878
- /** Format: double */
903
+ /** @description Best single-trade PnL in USD */
879
904
  best_trade_pnl_usd?: number | null;
905
+ /** @description Condition ID of the best trade */
880
906
  best_trade_condition_id?: string | null;
881
- /** Format: double */
907
+ /** @description Worst single-trade PnL in USD */
882
908
  worst_trade_pnl_usd?: number | null;
909
+ /** @description Condition ID of the worst trade */
883
910
  worst_trade_condition_id?: string | null;
884
- /** Format: int64 */
911
+ /**
912
+ * Format: int64
913
+ * @description Timestamp of the first trade (Unix seconds)
914
+ */
885
915
  first_trade_at?: number | null;
886
- /** Format: int64 */
916
+ /**
917
+ * Format: int64
918
+ * @description Timestamp of the most recent trade (Unix seconds)
919
+ */
887
920
  last_trade_at?: number | null;
888
921
  };
889
922
  /** @description Response for GET /v1/webhook/events */
890
923
  ListEventsResponse: {
891
924
  events: components["schemas"]["WebhookEventInfo"][];
892
925
  };
893
- /** @description Outcome entry in the market created payload — mirrors `NewMarketOutcome` */
926
+ /** @description An outcome entry within a newly created market */
894
927
  MarketCreatedOutcome: {
895
- /**
896
- * Format: int32
897
- * @description Outcome index (0 = Yes, 1 = No)
898
- */
928
+ /** @description Outcome index (0 = Yes, 1 = No) */
899
929
  index: number;
900
930
  /** @description Outcome name (e.g. "Yes", "No") */
901
931
  name: string;
902
- /** @description ERC1155 position token ID */
932
+ /** @description ERC-1155 position token ID for this outcome */
903
933
  position_id: string;
904
934
  };
905
- /** @description Market created webhook payload mirrors `NewMarketPayload` field-for-field */
935
+ /** @description Payload delivered when a new prediction market is detected on-chain and enriched with Gamma API metadata */
906
936
  MarketCreatedPayload: {
907
937
  /** @description Condition ID (0x-prefixed hex, lowercase) */
908
938
  condition_id: string;
909
939
  /** @description Market slug */
910
940
  market_slug: string;
911
- /** @description Event slug (parent event) */
941
+ /** @description Parent event slug */
912
942
  event_slug?: string | null;
913
- /** @description Event ID */
943
+ /** @description Parent event ID */
914
944
  event_id?: string | null;
915
- /** @description Event title */
945
+ /** @description Parent event title */
916
946
  event_title?: string | null;
917
- /** @description Series slug */
947
+ /** @description Series slug (for recurring markets) */
918
948
  series_slug?: string | null;
919
- /** @description Outcomes with their position IDs, index, and name */
949
+ /** @description List of market outcomes with their position IDs */
920
950
  outcomes: components["schemas"]["MarketCreatedOutcome"][];
921
- /** @description Market question */
951
+ /** @description Full market question text */
922
952
  question: string;
923
- /** @description Market title (short display name) */
953
+ /** @description Short display title */
924
954
  title?: string | null;
925
955
  /** @description Market description */
926
956
  description: string;
@@ -932,25 +962,24 @@ export interface components {
932
962
  image_url?: string | null;
933
963
  /** @description Whether this is a neg-risk market */
934
964
  neg_risk: boolean;
935
- /**
936
- * Format: int64
937
- * @description Block number where ConditionPreparation was emitted
938
- */
939
- block: number;
940
- /**
941
- * Format: int64
942
- * @description Block timestamp (Unix seconds)
943
- */
944
- block_timestamp: number;
945
965
  };
946
- /** @description Market PnL webhook payload (Arc-optimized) */
966
+ /** @description Payload delivered when a trader's per-market PnL crosses a configured threshold */
947
967
  MarketPnlPayload: {
968
+ /** @description Trader wallet address (lowercase) */
948
969
  trader?: string | null;
970
+ /** @description Market condition ID */
949
971
  condition_id?: string | null;
972
+ /** @description Parent event slug */
950
973
  event_slug?: string | null;
951
- /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
952
- timeframe: string;
953
- /** Format: int64 */
974
+ /**
975
+ * @description PnL aggregation window
976
+ * @enum {string}
977
+ */
978
+ timeframe: "1d" | "7d" | "30d" | "lifetime";
979
+ /**
980
+ * Format: int64
981
+ * @description Number of distinct outcomes traded in this market
982
+ */
954
983
  outcomes_traded?: number | null;
955
984
  /** Format: int64 */
956
985
  total_buys?: number | null;
@@ -960,89 +989,77 @@ export interface components {
960
989
  total_redemptions?: number | null;
961
990
  /** Format: int64 */
962
991
  total_merges?: number | null;
963
- /** Format: double */
992
+ /** @description Total buy volume in USD */
964
993
  buy_usd?: number | null;
965
- /** Format: double */
994
+ /** @description Total sell volume in USD */
966
995
  sell_usd?: number | null;
967
- /** Format: double */
996
+ /** @description Total redemption volume in USD */
968
997
  redemption_usd?: number | null;
969
- /** Format: double */
998
+ /** @description Total merge volume in USD */
970
999
  merge_usd?: number | null;
971
- /** Format: double */
1000
+ /** @description Realized PnL in USD for this market */
972
1001
  realized_pnl_usd?: number | null;
973
- /** Format: int64 */
1002
+ /**
1003
+ * Format: int64
1004
+ * @description Number of outcomes with positive PnL
1005
+ */
974
1006
  winning_outcomes?: number | null;
975
- /** Format: double */
1007
+ /** @description Total fees paid in USD for this market */
976
1008
  total_fees?: number | null;
977
- /** Format: int64 */
1009
+ /**
1010
+ * Format: int64
1011
+ * @description Timestamp of first trade in market (Unix seconds)
1012
+ */
978
1013
  first_trade_at?: number | null;
979
- /** Format: int64 */
1014
+ /**
1015
+ * Format: int64
1016
+ * @description Timestamp of most recent trade in market (Unix seconds)
1017
+ */
980
1018
  last_trade_at?: number | null;
981
1019
  };
982
- /** @description Volume spike webhook payload */
1020
+ /** @description Payload delivered when a market's volume has spiked since the last snapshot */
983
1021
  MarketVolumeSpikePayload: {
1022
+ /** @description Market condition ID */
984
1023
  condition_id: string;
1024
+ /** @description Aggregation window (e.g. "1h", "24h") */
985
1025
  timeframe: string;
986
- /**
987
- * Format: double
988
- * @description Current volume that triggered the spike (USD)
989
- */
1026
+ /** @description Current volume at the time of the spike (USD) */
990
1027
  current_volume_usd: number;
991
- /**
992
- * Format: double
993
- * @description User's baseline volume for comparison (USD)
994
- */
995
- baseline_volume_usd: number;
996
- /**
997
- * Format: double
998
- * @description Spike ratio threshold that was triggered
999
- */
1000
- spike_ratio: number;
1001
- /**
1002
- * Format: double
1003
- * @description Calculated threshold that was crossed (baseline * ratio)
1004
- */
1005
- threshold_usd: number;
1028
+ /** @description Volume at the snapshot baseline (USD) */
1029
+ snapshot_volume_usd: number;
1030
+ /** @description New volume since the snapshot that triggered this notification (USD) */
1031
+ delta_volume_usd: number;
1032
+ /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
1033
+ spike_pct: number;
1006
1034
  /**
1007
1035
  * Format: int64
1008
1036
  * @description Total transactions in this timeframe
1009
1037
  */
1010
1038
  txns: number;
1011
- /**
1012
- * Format: double
1013
- * @description Total fees in this timeframe
1014
- */
1039
+ /** @description Total fees in USD for this timeframe */
1015
1040
  fees: number;
1016
1041
  };
1017
- /**
1018
- * @description New market entry webhook payload
1019
- *
1020
- * Fired when a trader places their first trade in a specific condition/market.
1021
- * The payload contains the full details of the triggering trade.
1022
- */
1042
+ /** @description Payload delivered when a trader places their first trade in a specific market (fires once per trader+market pair) */
1023
1043
  NewMarketPayload: {
1024
- /** @description Trader address (placed the limit order) */
1044
+ /** @description Limit-order maker wallet address (lowercase) */
1025
1045
  trader: string;
1026
- /** @description Taker address (filled the order — often the exchange contract) */
1046
+ /** @description Order filler wallet address (lowercase) */
1027
1047
  taker: string;
1028
- /** @description Position ID (ERC1155 token ID) */
1048
+ /** @description ERC-1155 outcome token ID */
1029
1049
  position_id: string;
1030
- /** @description Condition ID (market condition) */
1050
+ /** @description Parent market condition ID */
1031
1051
  condition_id?: string | null;
1032
1052
  /** @description Outcome name (e.g. "Yes", "No") */
1033
1053
  outcome?: string | null;
1034
- /**
1035
- * Format: int32
1036
- * @description Outcome index (0 = Yes, 1 = No)
1037
- */
1054
+ /** @description Outcome index: 0 = Yes/Up, 1 = No */
1038
1055
  outcome_index?: number | null;
1039
- /** @description Market question */
1056
+ /** @description Market question text */
1040
1057
  question?: string | null;
1041
1058
  /** @description Market slug */
1042
1059
  market_slug?: string | null;
1043
- /** @description Event slug (parent event) */
1060
+ /** @description Parent event slug */
1044
1061
  event_slug?: string | null;
1045
- /** @description Trade ID */
1062
+ /** @description Unique trade identifier */
1046
1063
  trade_id: string;
1047
1064
  /** @description Transaction hash */
1048
1065
  hash: string;
@@ -1053,37 +1070,27 @@ export interface components {
1053
1070
  block: number;
1054
1071
  /**
1055
1072
  * Format: int64
1056
- * @description Confirmed timestamp (Unix seconds)
1073
+ * @description Block confirmation timestamp (Unix seconds)
1057
1074
  */
1058
1075
  confirmed_at: number;
1059
- /**
1060
- * Format: double
1061
- * @description USD size of the trade
1062
- */
1076
+ /** @description USD size of the trade (6 decimal places) */
1063
1077
  amount_usd: number;
1064
- /**
1065
- * Format: double
1066
- * @description Outcome shares traded
1067
- */
1078
+ /** @description Outcome shares traded (6 decimal places) */
1068
1079
  shares_amount: number;
1069
- /**
1070
- * Format: double
1071
- * @description Fee paid (USD)
1072
- */
1080
+ /** @description Fee paid in USD (6 decimal places) */
1073
1081
  fee: number;
1074
- /** @description Trade side ("Buy" or "Sell") */
1075
- side: string;
1076
1082
  /**
1077
- * Format: double
1078
- * @description Price per share (0.0–1.0)
1083
+ * @description Trade direction
1084
+ * @enum {string}
1079
1085
  */
1086
+ side: "Buy" | "Sell";
1087
+ /** @description Outcome token price (0.0–1.0) */
1080
1088
  price: number;
1081
- /**
1082
- * Format: double
1083
- * @description Implied probability (0.0–1.0); None when outcome is unknown
1084
- */
1089
+ /** @description Implied probability (0.0–1.0); null when outcome is unknown */
1085
1090
  probability?: number | null;
1091
+ /** @description Exchange identifier */
1086
1092
  exchange: string;
1093
+ /** @description Trade type identifier */
1087
1094
  trade_type: string;
1088
1095
  };
1089
1096
  /**
@@ -1095,7 +1102,7 @@ export interface components {
1095
1102
  * @description Polymarket webhook event types
1096
1103
  * @enum {string}
1097
1104
  */
1098
- PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "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";
1105
+ PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "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";
1099
1106
  /**
1100
1107
  * @description Polymarket-specific webhook filters
1101
1108
  *
@@ -1110,25 +1117,33 @@ export interface components {
1110
1117
  * - event_metrics: event_slugs, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
1111
1118
  * - 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
1112
1119
  * - volume_milestone: condition_ids, timeframes, milestone_amounts
1113
- * - close_to_bond: min_probability (high zone threshold), max_probability (low zone threshold), condition_ids, position_ids, outcomes, position_outcome_indices, event_slugs
1120
+ * - 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
1121
+ * - market_created: event_slugs, tags, exclude_shortterm_markets
1122
+ * - probability_spike: condition_ids, event_slugs, outcomes, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
1123
+ * - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
1124
+ * - trader_first_trade: wallet_addresses, min_usd_value, min_probability, max_probability, exclude_shortterm_markets
1125
+ * - trader_new_market: wallet_addresses, condition_ids, event_slugs, min_usd_value, min_probability, max_probability, exclude_shortterm_markets
1126
+ * - trader_whale_trade: min_usd_value (required), min_probability, max_probability, condition_ids, event_slugs, exclude_shortterm_markets
1127
+ * - trader_event_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, event_slugs, min_markets_traded, exclude_shortterm_markets
1128
+ * - trader_market_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_buy_usd, condition_ids, event_slugs, exclude_shortterm_markets
1114
1129
  *
1115
1130
  * Implements Hash + Eq manually (f64 fields use bit representation)
1116
1131
  */
1117
1132
  PolymarketWebhookFilter: {
1118
- /** @description Filter by wallet addresses (for first_trade, normalized to lowercase) */
1133
+ /** @description Filter by wallet addresses (for first_trade, normalized to lowercase). Max 500 entries. */
1119
1134
  wallet_addresses?: string[];
1120
- /** @description Filter by trader addresses (for PnL webhooks, normalized to lowercase) */
1135
+ /** @description Filter by trader addresses (for PnL webhooks, normalized to lowercase). Max 500 entries. */
1121
1136
  traders?: string[];
1122
- /** @description Filter by market/condition IDs */
1137
+ /** @description Filter by market/condition IDs. Max 500 entries. */
1123
1138
  condition_ids?: string[];
1124
1139
  /**
1125
1140
  * Format: double
1126
1141
  * @description Filter by minimum USD value (for trades)
1127
1142
  */
1128
1143
  min_usd_value?: number | null;
1129
- /** @description Filter by event slugs */
1144
+ /** @description Filter by event slugs. Max 500 entries. */
1130
1145
  event_slugs?: string[];
1131
- /** @description Filter by tags */
1146
+ /** @description Filter by tags. Max 500 entries. */
1132
1147
  tags?: string[];
1133
1148
  /**
1134
1149
  * Format: double
@@ -1185,13 +1200,13 @@ export interface components {
1185
1200
  * @description Maximum net shares - for position PnL webhooks
1186
1201
  */
1187
1202
  max_net_shares?: number | null;
1188
- /** @description Filter by position IDs - for position PnL webhooks */
1203
+ /** @description Filter by position IDs - for position PnL webhooks. Max 500 entries. */
1189
1204
  position_ids?: string[];
1190
- /** @description Filter by outcomes (e.g., "Yes", "No") - for position PnL webhooks */
1205
+ /** @description Filter by outcomes (e.g., "Yes", "No") - for position PnL webhooks. Max 500 entries. */
1191
1206
  outcomes?: string[];
1192
1207
  /**
1193
1208
  * @description Filter by position outcome index — for close_to_bond. Position 0 usually represents Yes/Up, 1 = No.
1194
- * When non-empty, only trades whose outcome_index is in this list will match.
1209
+ * When non-empty, only trades whose outcome_index is in this list will match. Max 500 entries.
1195
1210
  */
1196
1211
  position_outcome_indices?: number[];
1197
1212
  /**
@@ -1224,16 +1239,10 @@ export interface components {
1224
1239
  * @description Minimum probability change percentage - for position metrics webhooks
1225
1240
  */
1226
1241
  min_probability_change_pct?: number | null;
1227
- /** @description Timeframes to track - for metrics webhooks (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d) */
1228
- timeframes?: string[];
1229
- /** @description Milestone amounts to track - for volume milestone webhooks (e.g., 10000, 100000, 1000000) */
1242
+ /** @description Timeframes to track - for metrics webhooks (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d). */
1243
+ timeframes?: components["schemas"]["WebhookTimeframe"][];
1244
+ /** @description Milestone amounts to track - for volume milestone webhooks (e.g., 10000, 100000, 1000000). Max 500 entries. */
1230
1245
  milestone_amounts?: number[];
1231
- /**
1232
- * Format: double
1233
- * @description User's baseline volume for spike detection (USD) - for volume spike webhooks
1234
- * Example: 50000.0 for $50k baseline
1235
- */
1236
- baseline_volume_usd?: number | null;
1237
1246
  /**
1238
1247
  * Format: double
1239
1248
  * @description Spike ratio multiplier (must be > 1.0) - for volume spike webhooks
@@ -1241,37 +1250,52 @@ export interface components {
1241
1250
  */
1242
1251
  spike_ratio?: number | null;
1243
1252
  /**
1244
- * @description Exclude short-term trading markets by timeframe (e.g., ["5m", "15m", "30m", "1h"])
1245
- * Filters out event slugs containing these timeframe patterns (auto-wrapped: "5m" "-5m-")
1246
- * Example: Excludes "btc-updown-5m-1771678800" when "5m" is in the list
1253
+ * @description When `true`, exclude all short-term "updown" markets (event slugs containing "updown").
1254
+ * These are short-duration crypto price markets (e.g., "btc-updown-5m-…", "eth-updown-1h-…").
1255
+ * Supported by: close_to_bond, market_created, price_spike, probability_spike,
1256
+ * trader_first_trade, trader_new_market, trader_whale_trade, trader_event_pnl, trader_market_pnl,
1257
+ * event_metrics, event_volume_milestone, event_volume_spike.
1247
1258
  */
1248
- exclude_shorterm_market_timeframes?: string[];
1259
+ exclude_shortterm_markets?: boolean;
1249
1260
  /**
1250
1261
  * @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update` webhooks.
1251
1262
  * Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets.
1252
1263
  */
1253
- asset_symbols?: string[];
1264
+ asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
1265
+ spike_direction?: null | components["schemas"]["SpikeDirection"];
1254
1266
  /**
1255
- * @description When `true` (default), skip markets that have no Gamma metadata (title, category, tags).
1256
- * Bare on-chain markets detected before Gamma enrichment arrives will be suppressed.
1257
- * Set to `false` to receive all `market_created` events regardless of metadata availability.
1258
- */
1259
- filter_no_metadata?: boolean;
1260
- };
1261
- /** @description Position metrics webhook payload (Arc-optimized, no internal metadata) */
1267
+ * Format: int64
1268
+ * @description Observation window in seconds for `probability_spike` and `price_spike`.
1269
+ *
1270
+ * When set, the first trade seen for a position opens a window of this duration.
1271
+ * The opening price becomes the baseline, and every subsequent trade within the
1272
+ * window is compared to it. When the window expires the next trade starts a new
1273
+ * window. If omitted, the baseline accumulates indefinitely until a spike fires.
1274
+ *
1275
+ * Example: `60` to detect spikes that happen within 60 seconds.
1276
+ */
1277
+ window_secs?: number | null;
1278
+ };
1279
+ /** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
1262
1280
  PositionMetricsPayload: {
1281
+ /** @description ERC-1155 outcome token ID */
1263
1282
  position_id?: string | null;
1283
+ /** @description Outcome name (e.g. "Yes", "No") */
1264
1284
  outcome?: string | null;
1265
- /** Format: int32 */
1285
+ /**
1286
+ * Format: int16
1287
+ * @description Outcome index
1288
+ */
1266
1289
  outcome_index?: number | null;
1290
+ /** @description Aggregation window (e.g. "1h", "24h") */
1267
1291
  timeframe?: string | null;
1268
- /** Format: double */
1292
+ /** @description Total trading volume in USD */
1269
1293
  volume_usd?: number | null;
1270
- /** Format: double */
1294
+ /** @description Buy volume in USD */
1271
1295
  buy_volume_usd?: number | null;
1272
- /** Format: double */
1296
+ /** @description Sell volume in USD */
1273
1297
  sell_volume_usd?: number | null;
1274
- /** Format: double */
1298
+ /** @description Total fees in USD */
1275
1299
  fees?: number | null;
1276
1300
  /** Format: int64 */
1277
1301
  txns?: number | null;
@@ -1281,158 +1305,92 @@ export interface components {
1281
1305
  sells?: number | null;
1282
1306
  /** Format: int64 */
1283
1307
  unique_traders?: number | null;
1284
- /** Format: double */
1285
1308
  price_open?: number | null;
1286
- /** Format: double */
1287
1309
  price_close?: number | null;
1288
- /** Format: double */
1289
1310
  price_high?: number | null;
1290
- /** Format: double */
1291
1311
  price_low?: number | null;
1292
- /** Format: double */
1293
1312
  probability_open?: number | null;
1294
- /** Format: double */
1295
1313
  probability_close?: number | null;
1296
- /** Format: double */
1297
1314
  probability_high?: number | null;
1298
- /** Format: double */
1299
1315
  probability_low?: number | null;
1300
1316
  };
1301
- /** @description Position volume milestone webhook payload */
1317
+ /** @description Payload delivered when a position's trading volume crosses a USD milestone */
1302
1318
  PositionVolumeMilestonePayload: {
1319
+ /** @description Parent market condition ID */
1303
1320
  condition_id?: string | null;
1321
+ /** @description ERC-1155 outcome token ID */
1304
1322
  position_id: string;
1323
+ /** @description Outcome name (e.g. "Yes", "No") */
1305
1324
  outcome?: string | null;
1306
- /** Format: int32 */
1307
- outcome_index?: number | null;
1308
- timeframe: string;
1309
1325
  /**
1310
- * Format: double
1311
- * @description Milestone amount reached (USD)
1326
+ * Format: int16
1327
+ * @description Outcome index
1312
1328
  */
1329
+ outcome_index?: number | null;
1330
+ /** @description Aggregation window (e.g. "1h", "24h") */
1331
+ timeframe: string;
1332
+ /** @description The USD milestone amount that was crossed */
1313
1333
  milestone_usd: number;
1314
- /**
1315
- * Format: double
1316
- * @description Current volume (USD) that triggered the milestone
1317
- */
1334
+ /** @description Current position volume at time of trigger (USD) */
1318
1335
  current_volume_usd: number;
1319
- /**
1320
- * Format: double
1321
- * @description Buy volume (USD)
1322
- */
1336
+ /** @description Buy volume in USD for this timeframe */
1323
1337
  buy_volume_usd: number;
1324
- /**
1325
- * Format: double
1326
- * @description Sell volume (USD)
1327
- */
1338
+ /** @description Sell volume in USD for this timeframe */
1328
1339
  sell_volume_usd: number;
1329
- /**
1330
- * Format: double
1331
- * @description Total fees collected in this timeframe
1332
- */
1340
+ /** @description Total fees in USD */
1333
1341
  fees: number;
1334
- /**
1335
- * Format: int64
1336
- * @description Total transactions in this timeframe
1337
- */
1342
+ /** Format: int64 */
1338
1343
  txns: number;
1339
- /**
1340
- * Format: int64
1341
- * @description Buy transactions
1342
- */
1344
+ /** Format: int64 */
1343
1345
  buys: number;
1344
- /**
1345
- * Format: int64
1346
- * @description Sell transactions
1347
- */
1346
+ /** Format: int64 */
1348
1347
  sells: number;
1349
1348
  };
1350
- /** @description Position volume spike webhook payload */
1349
+ /** @description Payload delivered when a position's volume has spiked since the last snapshot */
1351
1350
  PositionVolumeSpikePayload: {
1351
+ /** @description ERC-1155 outcome token ID */
1352
1352
  position_id: string;
1353
+ /** @description Parent market condition ID */
1353
1354
  condition_id: string;
1355
+ /** @description Outcome name (e.g. "Yes", "No") */
1354
1356
  outcome?: string | null;
1355
- /** Format: int32 */
1357
+ /** Format: int16 */
1356
1358
  outcome_index?: number | null;
1359
+ /** @description Aggregation window (e.g. "1h", "24h") */
1357
1360
  timeframe: string;
1358
- /**
1359
- * Format: double
1360
- * @description Current position volume that triggered the spike (USD)
1361
- */
1361
+ /** @description Current position volume at the time of the spike (USD) */
1362
1362
  current_volume_usd: number;
1363
- /**
1364
- * Format: double
1365
- * @description User's baseline volume for comparison (USD)
1366
- */
1367
- baseline_volume_usd: number;
1368
- /**
1369
- * Format: double
1370
- * @description Spike ratio threshold that was triggered
1371
- */
1372
- spike_ratio: number;
1373
- /**
1374
- * Format: double
1375
- * @description Calculated threshold that was crossed (baseline * ratio)
1376
- */
1377
- threshold_usd: number;
1378
- /**
1379
- * Format: int64
1380
- * @description Total transactions in this timeframe
1381
- */
1363
+ /** @description Volume at the snapshot baseline (USD) */
1364
+ snapshot_volume_usd: number;
1365
+ /** @description New volume since the snapshot that triggered this notification (USD) */
1366
+ delta_volume_usd: number;
1367
+ /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
1368
+ spike_pct: number;
1369
+ /** Format: int64 */
1382
1370
  txns: number;
1383
- /**
1384
- * Format: double
1385
- * @description Total fees in this timeframe
1386
- */
1387
1371
  fees: number;
1388
1372
  };
1389
- /** @description Position probability spike webhook payload */
1390
1373
  ProbabilitySpikePayload: {
1374
+ /** @description Outcome token ID */
1391
1375
  position_id: string;
1376
+ /** @description Market condition ID */
1377
+ condition_id?: string | null;
1378
+ /** @description Event slug */
1379
+ event_slug?: string | null;
1380
+ /** @description Outcome name (e.g. "Yes", "No") */
1392
1381
  outcome?: string | null;
1393
- /** Format: int32 */
1394
- outcome_index?: number | null;
1395
- timeframe: string;
1396
1382
  /**
1397
- * Format: double
1398
- * @description Probability at the start of the timeframe (0.0 - 1.0)
1399
- */
1400
- probability_open: number;
1401
- /**
1402
- * Format: double
1403
- * @description Probability at the end of the timeframe (0.0 - 1.0)
1383
+ * Format: int16
1384
+ * @description Outcome index
1404
1385
  */
1405
- probability_close: number;
1406
- /**
1407
- * Format: double
1408
- * @description Absolute probability change (e.g., 0.25 for 25 percentage points)
1409
- */
1410
- probability_change: number;
1411
- /**
1412
- * Format: double
1413
- * @description Percentage change relative to open (e.g., 83.33 for 30% -> 55%)
1414
- */
1415
- probability_change_pct: number;
1416
- /**
1417
- * Format: double
1418
- * @description Price at open (0.0 - 1.0)
1419
- */
1420
- price_open: number;
1421
- /**
1422
- * Format: double
1423
- * @description Price at close (0.0 - 1.0)
1424
- */
1425
- price_close: number;
1426
- /**
1427
- * Format: double
1428
- * @description Volume during the timeframe (USD)
1429
- */
1430
- volume_usd: number;
1386
+ outcome_index?: number | null;
1431
1387
  /**
1432
- * Format: int64
1433
- * @description Number of transactions
1388
+ * @description `"up"` = probability rising, `"down"` = probability falling
1389
+ * @enum {string}
1434
1390
  */
1435
- txns: number;
1391
+ spike_direction: "up" | "down";
1392
+ /** @description Percentage move that triggered this notification. Positive = up, negative = down. */
1393
+ spike_pct: number;
1436
1394
  };
1437
1395
  /** @description Response for POST /v1/webhook/{id}/rotate-secret */
1438
1396
  RotateSecretResponse: {
@@ -1444,6 +1402,11 @@ export interface components {
1444
1402
  */
1445
1403
  rotated_at: number;
1446
1404
  };
1405
+ /**
1406
+ * @description Direction filter for spike webhooks.
1407
+ * @enum {string}
1408
+ */
1409
+ SpikeDirection: "up" | "down" | "both";
1447
1410
  /** @description Request body for updating a webhook */
1448
1411
  UpdateWebhookRequestBody: {
1449
1412
  /** @description Destination URL for webhook deliveries (must be HTTPS) */
@@ -1456,24 +1419,17 @@ export interface components {
1456
1419
  /** @description Description/name */
1457
1420
  description?: string | null;
1458
1421
  };
1459
- /** @description Volume milestone webhook payload */
1422
+ /** @description Payload delivered when a market's trading volume crosses a USD milestone in the specified timeframe */
1460
1423
  VolumeMilestonePayload: {
1424
+ /** @description Market condition ID */
1461
1425
  condition_id: string;
1426
+ /** @description Aggregation window that crossed the milestone (e.g. "1h", "24h") */
1462
1427
  timeframe: string;
1463
- /**
1464
- * Format: double
1465
- * @description Milestone amount reached (USD)
1466
- */
1428
+ /** @description The USD milestone amount that was crossed */
1467
1429
  milestone_usd: number;
1468
- /**
1469
- * Format: double
1470
- * @description Current volume (USD) that triggered the milestone
1471
- */
1430
+ /** @description Current volume at time of trigger (USD) */
1472
1431
  current_volume_usd: number;
1473
- /**
1474
- * Format: double
1475
- * @description Total fees collected in this timeframe
1476
- */
1432
+ /** @description Total fees in USD for this timeframe */
1477
1433
  fees: number;
1478
1434
  /**
1479
1435
  * Format: int64
@@ -1481,6 +1437,11 @@ export interface components {
1481
1437
  */
1482
1438
  txns: number;
1483
1439
  };
1440
+ /**
1441
+ * @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
1442
+ * @enum {string}
1443
+ */
1444
+ WebhookAssetSymbol: "BTC" | "ETH" | "SOL" | "XRP";
1484
1445
  /** @description Single event type entry for the events list */
1485
1446
  WebhookEventInfo: {
1486
1447
  /** @description Event type identifier (e.g. "first_trade") */
@@ -1499,19 +1460,19 @@ export interface components {
1499
1460
  };
1500
1461
  /** @description Webhook filters request body */
1501
1462
  WebhookFiltersBody: {
1502
- /** @description Filter by wallet addresses (for first_trade / new_market / whale_trade) */
1463
+ /** @description Filter by wallet addresses (for first_trade / new_market / whale_trade). Max 500 entries. */
1503
1464
  wallet_addresses?: string[];
1504
- /** @description Filter by trader addresses (for PnL webhooks) */
1465
+ /** @description Filter by trader addresses (for PnL webhooks). Max 500 entries. */
1505
1466
  traders?: string[];
1506
- /** @description Filter by market/condition IDs */
1467
+ /** @description Filter by market/condition IDs. Max 500 entries. */
1507
1468
  condition_ids?: string[];
1508
- /** @description Filter by position IDs (for position metrics / close_to_bond) */
1469
+ /** @description Filter by position IDs (for position metrics / close_to_bond). Max 500 entries. */
1509
1470
  position_ids?: string[];
1510
- /** @description Filter by event slugs */
1471
+ /** @description Filter by event slugs. Max 500 entries. */
1511
1472
  event_slugs?: string[];
1512
- /** @description Filter by outcomes (e.g. "Yes", "No") — for position metrics / close_to_bond */
1473
+ /** @description Filter by outcomes (e.g. "Yes", "No") — for position metrics / close_to_bond. Max 500 entries. */
1513
1474
  outcomes?: string[];
1514
- /** @description Filter by position outcome index — for close_to_bond. Position 0 = Yes/Up, 1 = No. */
1475
+ /** @description Filter by position outcome index — for close_to_bond. Position 0 = Yes/Up, 1 = No. Max 500 entries. */
1515
1476
  position_outcome_indices?: number[];
1516
1477
  /**
1517
1478
  * Format: double
@@ -1598,26 +1559,19 @@ export interface components {
1598
1559
  * webhooks (market/event/position), optional for metrics webhooks.
1599
1560
  * Valid values: "1m", "5m", "30m", "1h", "6h", "24h", "7d", "30d".
1600
1561
  */
1601
- timeframes?: string[];
1602
- /** @description Milestone amounts to trigger on (USD) — for volume_milestone webhooks */
1562
+ timeframes?: components["schemas"]["WebhookTimeframe"][];
1563
+ /** @description Milestone amounts to trigger on (USD) — for volume_milestone webhooks. Max 500 entries. */
1603
1564
  milestone_amounts?: number[];
1604
- /**
1605
- * Format: double
1606
- * @description User-defined baseline volume for spike detection (USD) — for volume_spike
1607
- */
1608
- baseline_volume_usd?: number | null;
1609
1565
  /**
1610
1566
  * Format: double
1611
1567
  * @description Spike ratio multiplier (must be > 1.0) — for volume_spike. E.g. 2.0 for 2x baseline
1612
1568
  */
1613
1569
  spike_ratio?: number | null;
1614
- /** @description Exclude short-term trading markets by timeframe pattern (e.g. ["5m", "15m"]) */
1615
- exclude_shorterm_market_timeframes?: string[];
1616
1570
  /**
1617
1571
  * @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update`.
1618
1572
  * Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets (send everything).
1619
1573
  */
1620
- asset_symbols?: string[];
1574
+ asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
1621
1575
  };
1622
1576
  /** @description List webhooks response */
1623
1577
  WebhookListResponseBody: {
@@ -1680,30 +1634,32 @@ export interface components {
1680
1634
  */
1681
1635
  duration_ms: number;
1682
1636
  };
1683
- /** @description Whale trade webhook payload */
1637
+ /**
1638
+ * @description Timeframe values accepted by webhook metric, milestone, spike, and asset-price filters.
1639
+ * @enum {string}
1640
+ */
1641
+ WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
1642
+ /** @description Payload delivered when a trade exceeds the configured size and probability thresholds */
1684
1643
  WhaleTradePayload: {
1685
- /** @description Trader address (the limit-order maker) */
1644
+ /** @description Limit-order maker wallet address (lowercase) */
1686
1645
  trader: string;
1687
- /** @description Taker address (the order filler often the exchange contract) */
1646
+ /** @description Order filler wallet address (lowercase) */
1688
1647
  taker: string;
1689
- /** @description Position ID (ERC1155 token ID) */
1648
+ /** @description ERC-1155 outcome token ID */
1690
1649
  position_id: string;
1691
- /** @description Condition ID */
1650
+ /** @description Parent market condition ID */
1692
1651
  condition_id?: string | null;
1693
1652
  /** @description Outcome name (e.g. "Yes", "No") */
1694
1653
  outcome?: string | null;
1695
- /**
1696
- * Format: int32
1697
- * @description Outcome index (0 = Yes, 1 = No)
1698
- */
1654
+ /** @description Outcome index: 0 = Yes/Up, 1 = No */
1699
1655
  outcome_index?: number | null;
1700
- /** @description Market question */
1656
+ /** @description Market question text */
1701
1657
  question?: string | null;
1702
1658
  /** @description Market slug */
1703
1659
  market_slug?: string | null;
1704
- /** @description Event slug */
1660
+ /** @description Parent event slug */
1705
1661
  event_slug?: string | null;
1706
- /** @description Trade ID */
1662
+ /** @description Unique trade identifier */
1707
1663
  trade_id: string;
1708
1664
  /** @description Transaction hash */
1709
1665
  hash: string;
@@ -1714,38 +1670,400 @@ export interface components {
1714
1670
  block: number;
1715
1671
  /**
1716
1672
  * Format: int64
1717
- * @description Confirmed timestamp (Unix seconds)
1673
+ * @description Block confirmation timestamp (Unix seconds)
1718
1674
  */
1719
1675
  confirmed_at: number;
1676
+ /** @description USD size of the trade (6 decimal places) */
1677
+ amount_usd: number;
1678
+ /** @description Outcome shares traded (6 decimal places) */
1679
+ shares_amount: number;
1680
+ /** @description Fee paid in USD (6 decimal places) */
1681
+ fee: number;
1720
1682
  /**
1721
- * Format: double
1722
- * @description USD size of the trade
1683
+ * @description Trade direction
1684
+ * @enum {string}
1723
1685
  */
1724
- amount_usd: number;
1686
+ side: "Buy" | "Sell";
1687
+ /** @description Outcome token price (0.0–1.0) */
1688
+ price: number;
1689
+ /** @description Implied probability (0.0–1.0); null when outcome is unknown */
1690
+ probability?: number | null;
1691
+ /** @description Exchange identifier */
1692
+ exchange: string;
1693
+ /** @description Trade type identifier */
1694
+ trade_type: string;
1695
+ };
1696
+ PriceSpikePayload: {
1697
+ /** @description Outcome token ID */
1698
+ position_id: string;
1699
+ /** @description Market condition ID */
1700
+ condition_id?: string | null;
1701
+ /** @description Event slug */
1702
+ event_slug?: string | null;
1703
+ /** @description Outcome name (e.g. "Yes", "No") */
1704
+ outcome?: string | null;
1725
1705
  /**
1726
- * Format: double
1727
- * @description Outcome shares traded
1706
+ * Format: int16
1707
+ * @description Outcome index
1728
1708
  */
1729
- shares_amount: number;
1709
+ outcome_index?: number | null;
1730
1710
  /**
1731
- * Format: double
1732
- * @description Fee paid (USD)
1711
+ * @description `"up"` = price rising, `"down"` = price falling
1712
+ * @enum {string}
1733
1713
  */
1734
- fee: number;
1735
- /** @description Trade side ("Buy" or "Sell") */
1736
- side: string;
1714
+ spike_direction: "up" | "down";
1715
+ /** @description Percentage move that triggered this notification. Positive = up, negative = down. */
1716
+ spike_pct: number;
1717
+ };
1718
+ /** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
1719
+ TraderFirstTradeFilters: {
1720
+ /** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
1721
+ wallet_addresses?: string[];
1722
+ /** @description Restrict to trades in these markets. Empty = all markets. */
1723
+ condition_ids?: string[];
1724
+ /** @description Restrict to trades in markets belonging to these events. */
1725
+ event_slugs?: string[];
1726
+ /** @description Minimum trade size in USD. Omit to match all sizes. */
1727
+ min_usd_value?: number;
1728
+ /** @description Only fire when the outcome probability is ≥ this value. */
1729
+ min_probability?: number;
1730
+ /** @description Only fire when the outcome probability is ≤ this value. */
1731
+ max_probability?: number;
1732
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
1733
+ exclude_shortterm_markets?: boolean;
1734
+ };
1735
+ /** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
1736
+ TraderNewMarketFilters: {
1737
+ /** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
1738
+ wallet_addresses?: string[];
1739
+ /** @description Restrict to these markets. */
1740
+ condition_ids?: string[];
1741
+ /** @description Restrict to markets belonging to these events. */
1742
+ event_slugs?: string[];
1743
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1744
+ exclude_shortterm_markets?: boolean;
1745
+ };
1746
+ /** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
1747
+ TraderWhaleTradeFilters: {
1748
+ /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
1749
+ wallet_addresses?: string[];
1750
+ /** @description Restrict to these markets. */
1751
+ condition_ids?: string[];
1752
+ /** @description Restrict to markets belonging to these events. */
1753
+ event_slugs?: string[];
1737
1754
  /**
1738
- * Format: double
1739
- * @description Price per share (0.0–1.0)
1755
+ * @description Minimum trade size in USD. Defaults to 0 (matches all trades).
1756
+ * @default 0
1740
1757
  */
1741
- price: number;
1758
+ min_usd_value: number;
1759
+ /** @description Only fire when outcome probability is ≥ this value. */
1760
+ min_probability?: number;
1761
+ /** @description Only fire when outcome probability is ≤ this value. */
1762
+ max_probability?: number;
1763
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1764
+ exclude_shortterm_markets?: boolean;
1765
+ };
1766
+ /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
1767
+ TraderGlobalPnlFilters: {
1768
+ /** @description Track only these trader wallet addresses. Empty = all traders. */
1769
+ traders?: string[];
1770
+ /** @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds. */
1771
+ min_realized_pnl_usd?: number;
1772
+ /** @description Only fire when realized PnL ≤ this value (USD). */
1773
+ max_realized_pnl_usd?: number;
1774
+ /** @description Only fire when total trading volume ≥ this value (USD). */
1775
+ min_volume_usd?: number;
1776
+ /** @description Only fire when total trading volume ≤ this value (USD). */
1777
+ max_volume_usd?: number;
1778
+ /** @description Only fire when buy volume ≥ this value (USD). */
1779
+ min_buy_usd?: number;
1780
+ /** @description Only fire when sell volume ≥ this value (USD). */
1781
+ min_sell_volume_usd?: number;
1782
+ /** @description Only fire when market win rate ≥ this percentage (0.0–100.0). */
1783
+ min_win_rate?: number;
1742
1784
  /**
1743
- * Format: double
1744
- * @description Implied probability of the event (0.0–1.0); None when outcome is unknown
1785
+ * Format: int64
1786
+ * @description Only fire when the trader has traded in this many markets.
1745
1787
  */
1746
- probability?: number | null;
1747
- exchange: string;
1748
- trade_type: string;
1788
+ min_markets_traded?: number;
1789
+ /** @description Restrict to these PnL windows. Empty = all windows. */
1790
+ timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
1791
+ };
1792
+ /** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
1793
+ TraderMarketPnlFilters: {
1794
+ /** @description Track only these trader wallet addresses. */
1795
+ traders?: string[];
1796
+ /** @description Restrict to these markets. */
1797
+ condition_ids?: string[];
1798
+ /** @description Restrict to markets in these events. */
1799
+ event_slugs?: string[];
1800
+ /** @description Only fire when per-market realized PnL ≥ this value (USD). */
1801
+ min_realized_pnl_usd?: number;
1802
+ /** @description Only fire when per-market realized PnL ≤ this value (USD). */
1803
+ max_realized_pnl_usd?: number;
1804
+ /** @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD). */
1805
+ min_volume_usd?: number;
1806
+ /** @description Only fire when total volume ≤ this value (USD). */
1807
+ max_volume_usd?: number;
1808
+ /** @description Only fire when buy volume in the market ≥ this value (USD). */
1809
+ min_buy_usd?: number;
1810
+ /** @description Only fire when sell volume in the market ≥ this value (USD). */
1811
+ min_sell_volume_usd?: number;
1812
+ /** @description Restrict to these PnL windows. */
1813
+ timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
1814
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1815
+ exclude_shortterm_markets?: boolean;
1816
+ };
1817
+ /** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
1818
+ TraderEventPnlFilters: {
1819
+ /** @description Track only these trader wallet addresses. */
1820
+ traders?: string[];
1821
+ /** @description Restrict to these events. */
1822
+ event_slugs?: string[];
1823
+ /** @description Only fire when per-event realized PnL ≥ this value (USD). */
1824
+ min_realized_pnl_usd?: number;
1825
+ /** @description Only fire when per-event realized PnL ≤ this value (USD). */
1826
+ max_realized_pnl_usd?: number;
1827
+ /** @description Only fire when total event volume ≥ this value (USD). */
1828
+ min_volume_usd?: number;
1829
+ /** @description Only fire when total event volume ≤ this value (USD). */
1830
+ max_volume_usd?: number;
1831
+ /** @description Only fire when buy volume within the event ≥ this value (USD). */
1832
+ min_buy_usd?: number;
1833
+ /** @description Only fire when sell volume within the event ≥ this value (USD). */
1834
+ min_sell_volume_usd?: number;
1835
+ /**
1836
+ * Format: int64
1837
+ * @description Only fire when the trader has traded in ≥ this many markets within the event.
1838
+ */
1839
+ min_markets_traded?: number;
1840
+ /** @description Restrict to these PnL windows. */
1841
+ timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
1842
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1843
+ exclude_shortterm_markets?: boolean;
1844
+ };
1845
+ /** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
1846
+ MarketMetricsFilters: {
1847
+ /** @description Restrict to these markets. Empty = all markets. */
1848
+ condition_ids?: string[];
1849
+ /** @description Restrict to markets in these events. */
1850
+ event_slugs?: string[];
1851
+ /** @description Restrict to these aggregation windows. Empty = all windows. */
1852
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1853
+ /** @description Only fire when volume ≥ this value (USD). */
1854
+ min_volume_usd?: number;
1855
+ /** @description Only fire when volume ≤ this value (USD). */
1856
+ max_volume_usd?: number;
1857
+ /**
1858
+ * Format: int64
1859
+ * @description Only fire when transaction count ≥ this value.
1860
+ */
1861
+ min_txns?: number;
1862
+ /**
1863
+ * Format: int64
1864
+ * @description Only fire when unique trader count ≥ this value.
1865
+ */
1866
+ min_unique_traders?: number;
1867
+ /** @description Only fire when total fees ≥ this value (USD). */
1868
+ min_fees?: number;
1869
+ };
1870
+ /** @description Subscription filters for the `event_metrics` event. All fields are optional. */
1871
+ EventMetricsFilters: {
1872
+ /** @description Restrict to these events. Empty = all events. */
1873
+ event_slugs?: string[];
1874
+ /** @description Restrict to these aggregation windows. */
1875
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1876
+ /** @description Only fire when aggregated event volume ≥ this value (USD). */
1877
+ min_volume_usd?: number;
1878
+ max_volume_usd?: number;
1879
+ /** Format: int64 */
1880
+ min_txns?: number;
1881
+ /** Format: int64 */
1882
+ min_unique_traders?: number;
1883
+ min_fees?: number;
1884
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1885
+ exclude_shortterm_markets?: boolean;
1886
+ };
1887
+ /** @description Subscription filters for the `position_metrics` event. All fields are optional. */
1888
+ PositionMetricsFilters: {
1889
+ /** @description Restrict to these outcome token IDs. */
1890
+ position_ids?: string[];
1891
+ /** @description Restrict to positions within these markets. */
1892
+ condition_ids?: string[];
1893
+ /** @description Restrict to positions with these outcome names (e.g. ["Yes", "No"]). */
1894
+ outcomes?: string[];
1895
+ /** @description Restrict to these aggregation windows. */
1896
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1897
+ /** @description Only fire when position volume ≥ this value (USD). */
1898
+ min_volume_usd?: number;
1899
+ max_volume_usd?: number;
1900
+ min_buy_usd?: number;
1901
+ min_sell_volume_usd?: number;
1902
+ /** Format: int64 */
1903
+ min_txns?: number;
1904
+ /** Format: int64 */
1905
+ min_unique_traders?: number;
1906
+ /** @description Only fire when price change % ≥ this value. */
1907
+ min_price_change_pct?: number;
1908
+ /** @description Only fire when probability change % ≥ this value. */
1909
+ min_probability_change_pct?: number;
1910
+ min_fees?: number;
1911
+ };
1912
+ /** @description Subscription filters for the `market_volume_milestone` event. */
1913
+ MarketVolumeMilestoneFilters: {
1914
+ /** @description **Required.** Aggregation windows to monitor (e.g. ["1h", "24h"]). */
1915
+ timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1916
+ /** @description Restrict to these markets. Empty = all markets. */
1917
+ condition_ids?: string[];
1918
+ /** @description Specific USD milestones to trigger on (e.g. [10000, 100000, 1000000]). Empty = all milestones. */
1919
+ milestone_amounts?: number[];
1920
+ };
1921
+ /** @description Subscription filters for the `event_volume_milestone` event. */
1922
+ EventVolumeMilestoneFilters: {
1923
+ /** @description **Required.** Aggregation windows to monitor. */
1924
+ timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1925
+ /** @description Restrict to these events. */
1926
+ event_slugs?: string[];
1927
+ /** @description Specific USD milestones to trigger on. */
1928
+ milestone_amounts?: number[];
1929
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1930
+ exclude_shortterm_markets?: boolean;
1931
+ };
1932
+ /** @description Subscription filters for the `position_volume_milestone` event. */
1933
+ PositionVolumeMilestoneFilters: {
1934
+ /** @description **Required.** Aggregation windows to monitor. */
1935
+ timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1936
+ /** @description Restrict to these outcome token IDs. */
1937
+ position_ids?: string[];
1938
+ /** @description Restrict to positions within these markets. */
1939
+ condition_ids?: string[];
1940
+ /** @description Specific USD milestones to trigger on. */
1941
+ milestone_amounts?: number[];
1942
+ };
1943
+ /** @description Subscription filters for the `probability_spike` event. */
1944
+ ProbabilitySpikeFilters: {
1945
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1946
+ position_ids?: string[];
1947
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
1948
+ condition_ids?: string[];
1949
+ /** @description Restrict to specific events. Empty = all events. */
1950
+ event_slugs?: string[];
1951
+ /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
1952
+ outcomes?: string[];
1953
+ /** @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move). */
1954
+ min_probability_change_pct?: number;
1955
+ /**
1956
+ * @description `"up"` = probability rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
1957
+ * @enum {string}
1958
+ */
1959
+ spike_direction?: "up" | "down" | "both";
1960
+ /** @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. */
1961
+ window_secs?: number;
1962
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1963
+ exclude_shortterm_markets?: boolean;
1964
+ };
1965
+ /** @description Subscription filters for the `price_spike` event. */
1966
+ PriceSpikeFilters: {
1967
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1968
+ position_ids?: string[];
1969
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
1970
+ condition_ids?: string[];
1971
+ /** @description Restrict to specific events. Empty = all events. */
1972
+ event_slugs?: string[];
1973
+ /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
1974
+ outcomes?: string[];
1975
+ /** @description Minimum price percentage move to trigger (e.g. `10` for a 10% move). */
1976
+ min_price_change_pct?: number;
1977
+ /**
1978
+ * @description `"up"` = price rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
1979
+ * @enum {string}
1980
+ */
1981
+ spike_direction?: "up" | "down" | "both";
1982
+ /** @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. */
1983
+ window_secs?: number;
1984
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1985
+ exclude_shortterm_markets?: boolean;
1986
+ };
1987
+ /** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
1988
+ MarketVolumeSpikeFilters: {
1989
+ /** @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. */
1990
+ spike_ratio: number;
1991
+ /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
1992
+ window_secs?: number;
1993
+ /** @description Restrict to these markets. Empty = all markets. */
1994
+ condition_ids?: string[];
1995
+ /** @description Restrict to these aggregation windows. Empty = all windows. */
1996
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
1997
+ };
1998
+ /** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
1999
+ EventVolumeSpikeFilters: {
2000
+ /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
2001
+ spike_ratio: number;
2002
+ /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
2003
+ window_secs?: number;
2004
+ /** @description Restrict to these events. */
2005
+ event_slugs?: string[];
2006
+ /** @description Restrict to these aggregation windows. */
2007
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
2008
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2009
+ exclude_shortterm_markets?: boolean;
2010
+ };
2011
+ /** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
2012
+ PositionVolumeSpikeFilters: {
2013
+ /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
2014
+ spike_ratio: number;
2015
+ /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
2016
+ window_secs?: number;
2017
+ /** @description Restrict to these outcome token IDs. */
2018
+ position_ids?: string[];
2019
+ /** @description Restrict to positions within these markets. */
2020
+ condition_ids?: string[];
2021
+ /** @description Restrict to these outcome names. */
2022
+ outcomes?: string[];
2023
+ /** @description Restrict to these aggregation windows. */
2024
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
2025
+ };
2026
+ /** @description Subscription filters for the `close_to_bond` event. At least one of `min_probability` or `max_probability` is required. */
2027
+ CloseToBondFilters: {
2028
+ /** @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. */
2029
+ min_probability?: number;
2030
+ /** @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO). */
2031
+ max_probability?: number;
2032
+ /** @description Restrict to these markets. */
2033
+ condition_ids?: string[];
2034
+ /** @description Restrict to these outcome token IDs. */
2035
+ position_ids?: string[];
2036
+ /** @description Restrict to markets in these events. */
2037
+ event_slugs?: string[];
2038
+ /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
2039
+ outcomes?: string[];
2040
+ /** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
2041
+ position_outcome_indices?: number[];
2042
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2043
+ exclude_shortterm_markets?: boolean;
2044
+ };
2045
+ /** @description Subscription filters for the `market_created` event. All fields are optional. */
2046
+ MarketCreatedFilters: {
2047
+ /** @description Restrict to markets with these tags or category names (case-insensitive match). */
2048
+ tags?: string[];
2049
+ /** @description Restrict to these specific markets. */
2050
+ condition_ids?: string[];
2051
+ /** @description Restrict to markets belonging to these events. */
2052
+ event_slugs?: string[];
2053
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
2054
+ exclude_shortterm_markets?: boolean;
2055
+ };
2056
+ /** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
2057
+ AssetPriceTickFilters: {
2058
+ /** @description Restrict to these crypto assets. Empty = all assets. */
2059
+ asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP")[];
2060
+ };
2061
+ /** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
2062
+ AssetPriceWindowUpdateFilters: {
2063
+ /** @description Restrict to these crypto assets. Empty = all assets. */
2064
+ asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP")[];
2065
+ /** @description Restrict to these candle sizes. Empty = all sizes. */
2066
+ timeframes?: ("5m" | "15m" | "1h" | "1d" | "24h")[];
1749
2067
  };
1750
2068
  };
1751
2069
  responses: never;
@@ -2444,6 +2762,35 @@ export interface operations {
2444
2762
  };
2445
2763
  };
2446
2764
  };
2765
+ "price-spike": {
2766
+ parameters: {
2767
+ query?: never;
2768
+ header?: never;
2769
+ path?: never;
2770
+ cookie?: never;
2771
+ };
2772
+ requestBody: {
2773
+ content: {
2774
+ "application/json": components["schemas"]["PriceSpikePayload"];
2775
+ };
2776
+ };
2777
+ responses: {
2778
+ /** @description Webhook delivery acknowledged */
2779
+ 200: {
2780
+ headers: {
2781
+ [name: string]: unknown;
2782
+ };
2783
+ content?: never;
2784
+ };
2785
+ /** @description Server error (will retry) */
2786
+ 500: {
2787
+ headers: {
2788
+ [name: string]: unknown;
2789
+ };
2790
+ content?: never;
2791
+ };
2792
+ };
2793
+ };
2447
2794
  "market-volume-spike": {
2448
2795
  parameters: {
2449
2796
  query?: never;