@structbuild/sdk 0.5.6-staging.4 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,10 +86,15 @@ export interface components {
86
86
  slug?: string | null;
87
87
  event_slug?: string | null;
88
88
  };
89
+ /** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
90
+ AssetPriceTickFilters: {
91
+ /** @description Restrict to these crypto assets. Empty = all assets. */
92
+ asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
93
+ };
89
94
  /** @description Webhook payload for an asset price tick. */
90
95
  AssetPriceTickPayload: {
91
- /** @description Asset symbol: "BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", or "HYPE" */
92
- symbol: string;
96
+ /** @description Asset symbol */
97
+ symbol: components["schemas"]["WebhookAssetSymbol"];
93
98
  /**
94
99
  * Format: double
95
100
  * @description Current price from the Chainlink feed
@@ -101,12 +106,19 @@ export interface components {
101
106
  */
102
107
  timestamp_ms: number;
103
108
  };
109
+ /** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
110
+ AssetPriceWindowUpdateFilters: {
111
+ /** @description Restrict to these crypto assets. Empty = all assets. */
112
+ asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
113
+ /** @description Restrict to these candle sizes. Empty = all sizes. */
114
+ timeframes?: components["schemas"]["AssetWindowFilterTimeframe"][] | null;
115
+ };
104
116
  /** @description Webhook payload for an asset price window open or close. */
105
117
  AssetPriceWindowUpdatePayload: {
106
- /** @description Asset symbol: "BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", or "HYPE" */
107
- symbol: string;
108
- /** @description Time-window variant: "5m", "15m", "1h", "4h", "1d", or "24h" */
109
- variant: string;
118
+ /** @description Asset symbol */
119
+ symbol: components["schemas"]["WebhookAssetSymbol"];
120
+ /** @description Time-window variant */
121
+ variant: components["schemas"]["AssetPriceWindowVariant"];
110
122
  /**
111
123
  * Format: int64
112
124
  * @description Window start timestamp (milliseconds since epoch)
@@ -128,7 +140,50 @@ export interface components {
128
140
  */
129
141
  close_price: number;
130
142
  /** @description "open" when the window starts, "close" when the window is complete */
131
- update_type: string;
143
+ update_type: components["schemas"]["AssetPriceWindowUpdateType"];
144
+ };
145
+ /**
146
+ * @description Whether this update is the open or the close of a candle.
147
+ * @enum {string}
148
+ */
149
+ AssetPriceWindowUpdateType: "open" | "close";
150
+ /**
151
+ * @description Time-window variant emitted by the asset price window stream.
152
+ * @enum {string}
153
+ */
154
+ AssetPriceWindowVariant: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
155
+ /**
156
+ * @description Candle sizes accepted by `asset_price_window_update.timeframes`.
157
+ * @enum {string}
158
+ */
159
+ AssetWindowFilterTimeframe: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
160
+ /**
161
+ * @description Subscription filters for the `close_to_bond` event. At least one of
162
+ * `min_probability` or `max_probability` is required (enforced at runtime).
163
+ */
164
+ CloseToBondFilters: {
165
+ /**
166
+ * Format: double
167
+ * @description Trigger when the YES outcome price is ≥ this value (e.g. 0.95 for 95% certainty). At least one of `min_probability` or `max_probability` must be set.
168
+ */
169
+ min_probability?: number | null;
170
+ /**
171
+ * Format: double
172
+ * @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO).
173
+ */
174
+ max_probability?: number | null;
175
+ /** @description Restrict to these markets. */
176
+ condition_ids?: string[] | null;
177
+ /** @description Restrict to these outcome token IDs. */
178
+ position_ids?: string[] | null;
179
+ /** @description Restrict to markets in these events. */
180
+ event_slugs?: string[] | null;
181
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
182
+ outcomes?: string[] | null;
183
+ /** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
184
+ position_outcome_indices?: number[] | null;
185
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
186
+ exclude_shortterm_markets?: boolean | null;
132
187
  };
133
188
  /** @description Close-to-bond webhook payload */
134
189
  CloseToBondPayload: {
@@ -202,18 +257,62 @@ export interface components {
202
257
  */
203
258
  threshold: number;
204
259
  };
205
- /** @description Condition metrics webhook payload. */
260
+ /** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
206
261
  ConditionMetricsPayload: {
262
+ /** @description Market condition ID */
207
263
  condition_id?: string | null;
208
- timeframe?: string | null;
209
- /** Format: double */
264
+ /** @description Aggregation window */
265
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
266
+ /**
267
+ * Format: double
268
+ * @description Total trading volume in USD for this timeframe
269
+ */
210
270
  volume_usd?: number | null;
211
- /** Format: double */
271
+ /**
272
+ * Format: double
273
+ * @description Total shares/contracts volume for this timeframe
274
+ */
275
+ shares_volume?: number | null;
276
+ /**
277
+ * Format: double
278
+ * @description Builder-attributed trading volume in USD
279
+ */
280
+ builder_usd_volume?: number | null;
281
+ /**
282
+ * Format: double
283
+ * @description Builder-attributed shares/contracts volume
284
+ */
285
+ builder_shares_volume?: number | null;
286
+ /**
287
+ * Format: double
288
+ * @description Total fees collected in USD
289
+ */
212
290
  fees?: number | null;
213
- /** Format: int64 */
291
+ /**
292
+ * Format: double
293
+ * @description Builder-attributed fees in USD
294
+ */
295
+ builder_fees?: number | null;
296
+ /**
297
+ * Format: int64
298
+ * @description Total number of transactions
299
+ */
214
300
  txns?: number | null;
215
- /** Format: int64 */
301
+ /**
302
+ * Format: int64
303
+ * @description Builder-attributed transaction count
304
+ */
305
+ builder_txns?: number | null;
306
+ /**
307
+ * Format: int64
308
+ * @description Number of unique traders
309
+ */
216
310
  unique_traders?: number | null;
311
+ /**
312
+ * Format: int64
313
+ * @description Number of unique builder-attributed traders
314
+ */
315
+ unique_builder_traders?: number | null;
217
316
  };
218
317
  /** @description CTF ConditionResolution: positions become redeemable on the Conditional Tokens contract. */
219
318
  ConditionResolutionEvent: {
@@ -284,18 +383,84 @@ export interface components {
284
383
  slug?: string | null;
285
384
  event_slug?: string | null;
286
385
  };
287
- /** @description Event metrics webhook payload. */
386
+ /** @description Subscription filters for the `event_metrics` event. All fields are optional. */
387
+ EventMetricsFilters: {
388
+ /** @description Restrict to these events. Empty = all events. */
389
+ event_slugs?: string[] | null;
390
+ /** @description Restrict to these aggregation windows. */
391
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
392
+ /**
393
+ * Format: double
394
+ * @description Only fire when aggregated event volume ≥ this value (USD).
395
+ */
396
+ min_volume_usd?: number | null;
397
+ /** Format: double */
398
+ max_volume_usd?: number | null;
399
+ /** Format: int64 */
400
+ min_txns?: number | null;
401
+ /** Format: int64 */
402
+ min_unique_traders?: number | null;
403
+ /** Format: double */
404
+ min_fees?: number | null;
405
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
406
+ exclude_shortterm_markets?: boolean | null;
407
+ };
408
+ /** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
288
409
  EventMetricsPayload: {
410
+ /** @description Event slug */
289
411
  event_slug?: string | null;
290
- timeframe?: string | null;
291
- /** Format: double */
412
+ /** @description Aggregation window */
413
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
414
+ /**
415
+ * Format: double
416
+ * @description Total aggregated volume across all markets in the event (USD)
417
+ */
292
418
  volume_usd?: number | null;
293
- /** Format: double */
419
+ /**
420
+ * Format: double
421
+ * @description Total aggregated shares/contracts volume across all markets in the event
422
+ */
423
+ shares_volume?: number | null;
424
+ /**
425
+ * Format: double
426
+ * @description Builder-attributed aggregated volume in USD
427
+ */
428
+ builder_usd_volume?: number | null;
429
+ /**
430
+ * Format: double
431
+ * @description Builder-attributed aggregated shares/contracts volume
432
+ */
433
+ builder_shares_volume?: number | null;
434
+ /**
435
+ * Format: double
436
+ * @description Total fees collected in USD
437
+ */
294
438
  fees?: number | null;
295
- /** Format: int64 */
439
+ /**
440
+ * Format: double
441
+ * @description Builder-attributed fees in USD
442
+ */
443
+ builder_fees?: number | null;
444
+ /**
445
+ * Format: int64
446
+ * @description Total number of transactions
447
+ */
296
448
  txns?: number | null;
297
- /** Format: int64 */
449
+ /**
450
+ * Format: int64
451
+ * @description Builder-attributed transaction count
452
+ */
453
+ builder_txns?: number | null;
454
+ /**
455
+ * Format: int64
456
+ * @description Number of unique traders
457
+ */
298
458
  unique_traders?: number | null;
459
+ /**
460
+ * Format: int64
461
+ * @description Number of unique builder-attributed traders
462
+ */
463
+ unique_builder_traders?: number | null;
299
464
  };
300
465
  /** @description Event PnL webhook payload. */
301
466
  EventPnlPayload: {
@@ -338,6 +503,17 @@ export interface components {
338
503
  /** Format: int64 */
339
504
  last_trade_at?: number | null;
340
505
  };
506
+ /** @description Subscription filters for the `event_volume_milestone` event. */
507
+ EventVolumeMilestoneFilters: {
508
+ /** @description **Required.** Aggregation windows to monitor. */
509
+ timeframes: components["schemas"]["MetricFilterTimeframe"][];
510
+ /** @description Restrict to these events. */
511
+ event_slugs?: string[] | null;
512
+ /** @description Specific USD milestones to trigger on. */
513
+ milestone_amounts?: number[] | null;
514
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
515
+ exclude_shortterm_markets?: boolean | null;
516
+ };
341
517
  /** @description Event volume milestone webhook payload */
342
518
  EventVolumeMilestonePayload: {
343
519
  event_slug: string;
@@ -363,6 +539,25 @@ export interface components {
363
539
  */
364
540
  txns: number;
365
541
  };
542
+ /** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
543
+ EventVolumeSpikeFilters: {
544
+ /**
545
+ * Format: double
546
+ * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
547
+ */
548
+ spike_ratio: number;
549
+ /**
550
+ * Format: int64
551
+ * @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
552
+ */
553
+ window_secs?: number | null;
554
+ /** @description Restrict to these events. */
555
+ event_slugs?: string[] | null;
556
+ /** @description Restrict to these aggregation windows. */
557
+ timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
558
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
559
+ exclude_shortterm_markets?: boolean | null;
560
+ };
366
561
  /** @description Event volume spike webhook payload */
367
562
  EventVolumeSpikePayload: {
368
563
  event_slug: string;
@@ -400,32 +595,34 @@ export interface components {
400
595
  */
401
596
  fees: number;
402
597
  };
403
- /** @description First trade webhook payload with zero-copy Arc<str> for string sharing */
598
+ /** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
404
599
  FirstTradePayload: {
405
- /** @description Trader/taker address (zero-copy Arc) */
600
+ /** @description Limit-order maker wallet address (lowercase) */
406
601
  trader: string;
407
- /** @description Taker address (same as trader, zero-copy Arc) */
602
+ /** @description Order filler wallet address (lowercase) */
408
603
  taker: string;
409
- /** @description Position ID (ERC1155 token ID, zero-copy Arc) */
604
+ /** @description ERC-1155 outcome token ID */
410
605
  position_id: string;
411
- /** @description Condition ID (market condition, zero-copy Arc) */
606
+ /** @description Parent market condition ID (0x-prefixed hex) */
412
607
  condition_id?: string | null;
413
- /** @description Market outcome (e.g., "Yes", "No", zero-copy Arc) */
608
+ /** @description Outcome name (e.g. "Yes", "No") */
414
609
  outcome?: string | null;
415
610
  /**
416
611
  * Format: int32
417
- * @description Outcome index (0 = Yes, 1 = No)
612
+ * @description Outcome index: 0 = Yes/Up, 1 = No
418
613
  */
419
614
  outcome_index?: number | null;
420
- /** @description Market question (zero-copy Arc) */
615
+ /** @description Market question text */
421
616
  question?: string | null;
422
- /** @description Market slug (zero-copy Arc) */
617
+ /** @description Market slug */
423
618
  market_slug?: string | null;
424
- /** @description Event slug (parent event, zero-copy Arc) */
619
+ /** @description Parent event slug */
425
620
  event_slug?: string | null;
426
- /** @description Trade ID (zero-copy Arc) */
621
+ /** @description Market image URL */
622
+ image_url?: string | null;
623
+ /** @description Unique trade identifier */
427
624
  trade_id: string;
428
- /** @description Transaction hash (zero-copy Arc) */
625
+ /** @description Transaction hash */
429
626
  hash: string;
430
627
  /**
431
628
  * Format: int64
@@ -434,24 +631,35 @@ export interface components {
434
631
  block: number;
435
632
  /**
436
633
  * Format: int64
437
- * @description Confirmed timestamp (Unix seconds)
634
+ * @description Block confirmation timestamp (Unix seconds)
438
635
  */
439
636
  confirmed_at: number;
440
- /** Format: double */
637
+ /**
638
+ * Format: double
639
+ * @description USD size of the trade (6 decimal places)
640
+ */
441
641
  amount_usd: number;
442
- /** Format: double */
642
+ /**
643
+ * Format: double
644
+ * @description Outcome shares traded (6 decimal places)
645
+ */
443
646
  shares_amount: number;
444
- /** Format: double */
647
+ /**
648
+ * Format: double
649
+ * @description Fee paid in USD (6 decimal places)
650
+ */
445
651
  fee: number;
446
- /** @description Trade side (Buy/Sell, zero-copy Arc) */
447
- side: string;
652
+ /** @description Trade direction */
653
+ side: "Buy" | "Sell";
448
654
  /**
449
655
  * Format: double
450
- * @description Price per share (0.0 - 1.0)
656
+ * @description Outcome token price (0.01.0)
451
657
  */
452
658
  price: number;
453
- exchange: string;
454
- trade_type: string;
659
+ /** @description Exchange contract that processed the trade */
660
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
661
+ /** @description Trade type (webhook events only fire on order fills) */
662
+ trade_type: "OrderFilled" | "OrdersMatched";
455
663
  };
456
664
  /** @description Global PnL webhook payload. */
457
665
  GlobalPnlPayload: {
@@ -508,6 +716,15 @@ export interface components {
508
716
  ListEventsResponse: {
509
717
  events: components["schemas"]["WebhookEventInfo"][];
510
718
  };
719
+ /** @description Subscription filters for the `market_created` event. All fields are optional. */
720
+ MarketCreatedFilters: {
721
+ /** @description Restrict to markets with these tags or category names (case-insensitive match). */
722
+ tags?: string[] | null;
723
+ /** @description Restrict to markets belonging to these events. */
724
+ event_slugs?: string[] | null;
725
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
726
+ exclude_shortterm_markets?: boolean | null;
727
+ };
511
728
  /** @description Outcome entry in the market created payload — mirrors `NewMarketOutcome` */
512
729
  MarketCreatedOutcome: {
513
730
  /**
@@ -551,6 +768,38 @@ export interface components {
551
768
  /** @description Whether this is a neg-risk market */
552
769
  neg_risk: boolean;
553
770
  };
771
+ /** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
772
+ MarketMetricsFilters: {
773
+ /** @description Restrict to these markets. Empty = all markets. */
774
+ condition_ids?: string[] | null;
775
+ /** @description Restrict to these aggregation windows. Empty = all windows. */
776
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
777
+ /**
778
+ * Format: double
779
+ * @description Only fire when volume ≥ this value (USD).
780
+ */
781
+ min_volume_usd?: number | null;
782
+ /**
783
+ * Format: double
784
+ * @description Only fire when volume ≤ this value (USD).
785
+ */
786
+ max_volume_usd?: number | null;
787
+ /**
788
+ * Format: int64
789
+ * @description Only fire when transaction count ≥ this value.
790
+ */
791
+ min_txns?: number | null;
792
+ /**
793
+ * Format: int64
794
+ * @description Only fire when unique trader count ≥ this value.
795
+ */
796
+ min_unique_traders?: number | null;
797
+ /**
798
+ * Format: double
799
+ * @description Only fire when total fees ≥ this value (USD).
800
+ */
801
+ min_fees?: number | null;
802
+ };
554
803
  /** @description Market PnL webhook payload. */
555
804
  MarketPnlPayload: {
556
805
  trader?: string | null;
@@ -587,6 +836,32 @@ export interface components {
587
836
  /** Format: int64 */
588
837
  last_trade_at?: number | null;
589
838
  };
839
+ /** @description Subscription filters for the `market_volume_milestone` event. */
840
+ MarketVolumeMilestoneFilters: {
841
+ /** @description **Required.** Aggregation windows to monitor (e.g. \["1h", "24h"\]). */
842
+ timeframes: components["schemas"]["MetricFilterTimeframe"][];
843
+ /** @description Restrict to these markets. Empty = all markets. */
844
+ condition_ids?: string[] | null;
845
+ /** @description Specific USD milestones to trigger on (e.g. \[10000, 100000, 1000000\]). Empty = all milestones. */
846
+ milestone_amounts?: number[] | null;
847
+ };
848
+ /** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
849
+ MarketVolumeSpikeFilters: {
850
+ /**
851
+ * Format: double
852
+ * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. The snapshot is set automatically on first data and resets after each fire.
853
+ */
854
+ spike_ratio: number;
855
+ /**
856
+ * Format: int64
857
+ * @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
858
+ */
859
+ window_secs?: number | null;
860
+ /** @description Restrict to these markets. Empty = all markets. */
861
+ condition_ids?: string[] | null;
862
+ /** @description Restrict to these aggregation windows. Empty = all windows. */
863
+ timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
864
+ };
590
865
  /** @description Market volume spike webhook payload */
591
866
  MarketVolumeSpikePayload: {
592
867
  condition_id: string;
@@ -626,6 +901,11 @@ export interface components {
626
901
  */
627
902
  fees: number;
628
903
  };
904
+ /**
905
+ * @description Aggregation windows emitted by the metrics / milestone streams.
906
+ * @enum {string}
907
+ */
908
+ MetricFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
629
909
  /** @description NegRisk Adapter: outcome reported for a neg-risk market question. */
630
910
  NegRiskOutcomeReportedEvent: {
631
911
  id: string;
@@ -648,35 +928,32 @@ export interface components {
648
928
  slug?: string | null;
649
929
  event_slug?: string | null;
650
930
  };
651
- /**
652
- * @description New market entry webhook payload
653
- *
654
- * Fired when a trader places their first trade in a specific condition/market.
655
- * The payload contains the full details of the triggering trade.
656
- */
931
+ /** @description Payload delivered when a trader places their first trade in a specific market (fires once per trader+market pair) */
657
932
  NewMarketPayload: {
658
- /** @description Trader address (placed the limit order) */
933
+ /** @description Limit-order maker wallet address (lowercase) */
659
934
  trader: string;
660
- /** @description Taker address (filled the order — often the exchange contract) */
935
+ /** @description Order filler wallet address (lowercase) */
661
936
  taker: string;
662
- /** @description Position ID (ERC1155 token ID) */
937
+ /** @description ERC-1155 outcome token ID */
663
938
  position_id: string;
664
- /** @description Condition ID (market condition) */
939
+ /** @description Parent market condition ID */
665
940
  condition_id?: string | null;
666
941
  /** @description Outcome name (e.g. "Yes", "No") */
667
942
  outcome?: string | null;
668
943
  /**
669
944
  * Format: int32
670
- * @description Outcome index (0 = Yes, 1 = No)
945
+ * @description Outcome index: 0 = Yes/Up, 1 = No
671
946
  */
672
947
  outcome_index?: number | null;
673
- /** @description Market question */
948
+ /** @description Market question text */
674
949
  question?: string | null;
675
950
  /** @description Market slug */
676
951
  market_slug?: string | null;
677
- /** @description Event slug (parent event) */
952
+ /** @description Parent event slug */
678
953
  event_slug?: string | null;
679
- /** @description Trade ID */
954
+ /** @description Market image URL */
955
+ image_url?: string | null;
956
+ /** @description Unique trade identifier */
680
957
  trade_id: string;
681
958
  /** @description Transaction hash */
682
959
  hash: string;
@@ -687,63 +964,73 @@ export interface components {
687
964
  block: number;
688
965
  /**
689
966
  * Format: int64
690
- * @description Confirmed timestamp (Unix seconds)
967
+ * @description Block confirmation timestamp (Unix seconds)
691
968
  */
692
969
  confirmed_at: number;
693
970
  /**
694
971
  * Format: double
695
- * @description USD size of the trade
972
+ * @description USD size of the trade (6 decimal places)
696
973
  */
697
974
  amount_usd: number;
698
975
  /**
699
976
  * Format: double
700
- * @description Outcome shares traded
977
+ * @description Outcome shares traded (6 decimal places)
701
978
  */
702
979
  shares_amount: number;
703
980
  /**
704
981
  * Format: double
705
- * @description Fee paid (USD)
982
+ * @description Fee paid in USD (6 decimal places)
706
983
  */
707
984
  fee: number;
708
- /** @description Trade side ("Buy" or "Sell") */
709
- side: string;
985
+ /** @description Trade direction */
986
+ side: "Buy" | "Sell";
710
987
  /**
711
988
  * Format: double
712
- * @description Price per share (0.0–1.0)
989
+ * @description Outcome token price (0.0–1.0)
713
990
  */
714
991
  price: number;
715
992
  /**
716
993
  * Format: double
717
- * @description Implied probability (0.0–1.0); None when outcome is unknown
994
+ * @description Implied probability (0.0–1.0); null when outcome is unknown
718
995
  */
719
996
  probability?: number | null;
720
- exchange: string;
721
- trade_type: string;
997
+ /** @description Exchange contract that processed the trade */
998
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
999
+ /** @description Trade type (webhook events only fire on order fills) */
1000
+ trade_type: "OrderFilled" | "OrdersMatched";
722
1001
  };
723
- /** @description New trade webhook payload */
1002
+ /**
1003
+ * @description Trade types accepted by `trader_new_trade.trade_types`. Webhook fires on
1004
+ * fill-style trades only.
1005
+ * @enum {string}
1006
+ */
1007
+ NewTradeFilterType: "OrderFilled" | "OrdersMatched";
1008
+ /** @description Payload delivered on every order-filled trade */
724
1009
  NewTradePayload: {
725
- /** @description Trader address (the limit-order maker) */
1010
+ /** @description Limit-order maker wallet address (lowercase) */
726
1011
  trader: string;
727
- /** @description Taker address (the order filler often the exchange contract) */
1012
+ /** @description Order filler wallet address (lowercase) */
728
1013
  taker: string;
729
- /** @description Position ID (ERC1155 token ID) */
1014
+ /** @description ERC-1155 outcome token ID */
730
1015
  position_id: string;
731
- /** @description Condition ID */
1016
+ /** @description Parent market condition ID */
732
1017
  condition_id?: string | null;
733
1018
  /** @description Outcome name (e.g. "Yes", "No") */
734
1019
  outcome?: string | null;
735
1020
  /**
736
1021
  * Format: int32
737
- * @description Outcome index (0 = Yes, 1 = No)
1022
+ * @description Outcome index: 0 = Yes/Up, 1 = No
738
1023
  */
739
1024
  outcome_index?: number | null;
740
- /** @description Market question */
1025
+ /** @description Market question text */
741
1026
  question?: string | null;
742
1027
  /** @description Market slug */
743
1028
  market_slug?: string | null;
744
- /** @description Event slug */
1029
+ /** @description Parent event slug */
745
1030
  event_slug?: string | null;
746
- /** @description Trade ID */
1031
+ /** @description Market image URL */
1032
+ image_url?: string | null;
1033
+ /** @description Unique trade identifier */
747
1034
  trade_id: string;
748
1035
  /** @description Transaction hash */
749
1036
  hash: string;
@@ -754,39 +1041,46 @@ export interface components {
754
1041
  block: number;
755
1042
  /**
756
1043
  * Format: int64
757
- * @description Confirmed timestamp (Unix seconds)
1044
+ * @description Block confirmation timestamp (Unix seconds)
758
1045
  */
759
1046
  confirmed_at: number;
760
1047
  /**
761
1048
  * Format: double
762
- * @description USD size of the trade
1049
+ * @description USD size of the trade (6 decimal places)
763
1050
  */
764
1051
  amount_usd: number;
765
1052
  /**
766
1053
  * Format: double
767
- * @description Outcome shares traded
1054
+ * @description Outcome shares traded (6 decimal places)
768
1055
  */
769
1056
  shares_amount: number;
770
1057
  /**
771
1058
  * Format: double
772
- * @description Fee paid (USD)
1059
+ * @description Fee paid in USD (6 decimal places)
773
1060
  */
774
1061
  fee: number;
775
- /** @description Trade side ("Buy" or "Sell") */
776
- side: string;
1062
+ /** @description Trade direction */
1063
+ side: "Buy" | "Sell";
777
1064
  /**
778
1065
  * Format: double
779
- * @description Price per share (0.0–1.0)
1066
+ * @description Outcome token price (0.0–1.0)
780
1067
  */
781
1068
  price: number;
782
1069
  /**
783
1070
  * Format: double
784
- * @description Implied probability of the event (0.0–1.0); None when outcome is unknown
1071
+ * @description Implied probability (0.0–1.0); null when outcome is unknown
785
1072
  */
786
1073
  probability?: number | null;
787
- exchange: string;
788
- trade_type: string;
1074
+ /** @description Exchange contract that processed the trade */
1075
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
1076
+ /** @description Trade type (webhook events only fire on order fills) */
1077
+ trade_type: "OrderFilled" | "OrdersMatched";
789
1078
  };
1079
+ /**
1080
+ * @description Oracle event variants accepted by `oracle_events.oracle_event_types`.
1081
+ * @enum {string}
1082
+ */
1083
+ OracleEventFilterType: "AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported";
790
1084
  /**
791
1085
  * @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
792
1086
  * and only includes fields relevant to each type.
@@ -843,6 +1137,18 @@ export interface components {
843
1137
  /** @enum {string} */
844
1138
  event_type: "NegRiskOutcomeReported";
845
1139
  });
1140
+ /** @description Subscription filters for the `oracle_events` event. All fields are optional. */
1141
+ OracleEventsFilters: {
1142
+ /** @description Restrict to these event types (case-insensitive). Empty = all. */
1143
+ oracle_event_types?: components["schemas"]["OracleEventFilterType"][] | null;
1144
+ /** @description Restrict to events for these condition IDs. */
1145
+ condition_ids?: string[] | null;
1146
+ };
1147
+ /**
1148
+ * @description PnL aggregation windows accepted by `*_pnl.timeframes`.
1149
+ * @enum {string}
1150
+ */
1151
+ PnlFilterTimeframe: "1d" | "7d" | "30d" | "lifetime";
846
1152
  /**
847
1153
  * @description PnL timeframe enum for webhook filtering
848
1154
  * @enum {string}
@@ -852,7 +1158,7 @@ export interface components {
852
1158
  * @description Polymarket webhook event types
853
1159
  * @enum {string}
854
1160
  */
855
- PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update" | "price_spike" | "oracle_events";
1161
+ PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "tag_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update" | "price_spike" | "oracle_events";
856
1162
  /**
857
1163
  * @description Polymarket-specific webhook filters
858
1164
  *
@@ -865,11 +1171,12 @@ export interface components {
865
1171
  * - event_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, event_slugs, min_markets_traded
866
1172
  * - condition_metrics: condition_ids, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
867
1173
  * - event_metrics: event_slugs, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
1174
+ * - tag_metrics: tags, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
868
1175
  * - position_metrics: position_ids, condition_ids, outcomes, min_volume_usd, max_volume_usd, min_buy_usd, min_sell_volume_usd, min_fees, min_txns, min_price_change_pct, min_probability_change_pct, timeframes
869
1176
  * - volume_milestone: condition_ids, timeframes, milestone_amounts
870
1177
  * - close_to_bond: min_probability (high zone threshold), max_probability (low zone threshold), condition_ids, position_ids, outcomes, position_outcome_indices, event_slugs, exclude_shortterm_markets
871
1178
  * - market_created: event_slugs, tags, exclude_shortterm_markets
872
- * - probability_spike: condition_ids, event_slugs, outcomes, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
1179
+ * - probability_spike: condition_ids, event_slugs, outcomes, min_probability, max_probability, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
873
1180
  * - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
874
1181
  * - trader_new_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
875
1182
  * - trader_trade_event: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
@@ -1040,37 +1347,151 @@ export interface components {
1040
1347
  */
1041
1348
  oracle_event_types?: string[];
1042
1349
  };
1043
- /** @description Position metrics webhook payload. */
1044
- PositionMetricsPayload: {
1045
- position_id?: string | null;
1046
- outcome?: string | null;
1047
- /** Format: int32 */
1048
- outcome_index?: number | null;
1049
- timeframe?: string | null;
1050
- /** Format: double */
1051
- volume_usd?: number | null;
1350
+ /** @description Subscription filters for the `position_metrics` event. All fields are optional. */
1351
+ PositionMetricsFilters: {
1352
+ /** @description Restrict to these outcome token IDs. */
1353
+ position_ids?: string[] | null;
1354
+ /** @description Restrict to positions within these markets. */
1355
+ condition_ids?: string[] | null;
1356
+ /** @description Restrict to positions with these outcome names (e.g. \["Yes", "No"\]). */
1357
+ outcomes?: string[] | null;
1358
+ /** @description Restrict to these aggregation windows. */
1359
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
1360
+ /**
1361
+ * Format: double
1362
+ * @description Only fire when position volume ≥ this value (USD).
1363
+ */
1364
+ min_volume_usd?: number | null;
1052
1365
  /** Format: double */
1053
- buy_volume_usd?: number | null;
1366
+ max_volume_usd?: number | null;
1054
1367
  /** Format: double */
1055
- sell_volume_usd?: number | null;
1368
+ min_buy_usd?: number | null;
1056
1369
  /** Format: double */
1057
- fees?: number | null;
1058
- /** Format: int64 */
1059
- txns?: number | null;
1060
- /** Format: int64 */
1061
- buys?: number | null;
1370
+ min_sell_volume_usd?: number | null;
1062
1371
  /** Format: int64 */
1063
- sells?: number | null;
1372
+ min_txns?: number | null;
1064
1373
  /** Format: int64 */
1065
- unique_traders?: number | null;
1066
- /** Format: double */
1067
- price_open?: number | null;
1068
- /** Format: double */
1069
- price_close?: number | null;
1070
- /** Format: double */
1071
- price_high?: number | null;
1072
- /** Format: double */
1073
- price_low?: number | null;
1374
+ min_unique_traders?: number | null;
1375
+ /**
1376
+ * Format: double
1377
+ * @description Only fire when price change % ≥ this value.
1378
+ */
1379
+ min_price_change_pct?: number | null;
1380
+ /**
1381
+ * Format: double
1382
+ * @description Only fire when probability change % ≥ this value.
1383
+ */
1384
+ min_probability_change_pct?: number | null;
1385
+ /** Format: double */
1386
+ min_fees?: number | null;
1387
+ };
1388
+ /** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
1389
+ PositionMetricsPayload: {
1390
+ /** @description ERC-1155 outcome token ID */
1391
+ position_id?: string | null;
1392
+ /** @description Outcome name (e.g. "Yes", "No") */
1393
+ outcome?: string | null;
1394
+ /**
1395
+ * Format: int32
1396
+ * @description Outcome index
1397
+ */
1398
+ outcome_index?: number | null;
1399
+ /** @description Aggregation window */
1400
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
1401
+ /**
1402
+ * Format: double
1403
+ * @description Total trading volume in USD
1404
+ */
1405
+ volume_usd?: number | null;
1406
+ /**
1407
+ * Format: double
1408
+ * @description Buy volume in USD
1409
+ */
1410
+ buy_volume_usd?: number | null;
1411
+ /**
1412
+ * Format: double
1413
+ * @description Sell volume in USD
1414
+ */
1415
+ sell_volume_usd?: number | null;
1416
+ /**
1417
+ * Format: double
1418
+ * @description Total shares/contracts volume
1419
+ */
1420
+ shares_volume?: number | null;
1421
+ /**
1422
+ * Format: double
1423
+ * @description Buy shares/contracts volume
1424
+ */
1425
+ shares_buy_volume?: number | null;
1426
+ /**
1427
+ * Format: double
1428
+ * @description Sell shares/contracts volume
1429
+ */
1430
+ shares_sell_volume?: number | null;
1431
+ /**
1432
+ * Format: double
1433
+ * @description Builder-attributed volume in USD
1434
+ */
1435
+ builder_usd_volume?: number | null;
1436
+ /**
1437
+ * Format: double
1438
+ * @description Builder-attributed buy volume in USD
1439
+ */
1440
+ builder_usd_buy_volume?: number | null;
1441
+ /**
1442
+ * Format: double
1443
+ * @description Builder-attributed sell volume in USD
1444
+ */
1445
+ builder_usd_sell_volume?: number | null;
1446
+ /**
1447
+ * Format: double
1448
+ * @description Builder-attributed shares/contracts volume
1449
+ */
1450
+ builder_shares_volume?: number | null;
1451
+ /**
1452
+ * Format: double
1453
+ * @description Builder-attributed buy shares/contracts volume
1454
+ */
1455
+ builder_shares_buy_volume?: number | null;
1456
+ /**
1457
+ * Format: double
1458
+ * @description Builder-attributed sell shares/contracts volume
1459
+ */
1460
+ builder_shares_sell_volume?: number | null;
1461
+ /**
1462
+ * Format: double
1463
+ * @description Total fees in USD
1464
+ */
1465
+ fees?: number | null;
1466
+ /**
1467
+ * Format: double
1468
+ * @description Builder-attributed fees in USD
1469
+ */
1470
+ builder_fees?: number | null;
1471
+ /** Format: int64 */
1472
+ txns?: number | null;
1473
+ /** Format: int64 */
1474
+ buys?: number | null;
1475
+ /** Format: int64 */
1476
+ sells?: number | null;
1477
+ /** Format: int64 */
1478
+ builder_txns?: number | null;
1479
+ /** Format: int64 */
1480
+ builder_buys?: number | null;
1481
+ /** Format: int64 */
1482
+ builder_sells?: number | null;
1483
+ /** Format: int64 */
1484
+ unique_traders?: number | null;
1485
+ /** Format: int64 */
1486
+ unique_builder_traders?: number | null;
1487
+ /** Format: double */
1488
+ price_open?: number | null;
1489
+ /** Format: double */
1490
+ price_close?: number | null;
1491
+ /** Format: double */
1492
+ price_high?: number | null;
1493
+ /** Format: double */
1494
+ price_low?: number | null;
1074
1495
  /** Format: double */
1075
1496
  probability_open?: number | null;
1076
1497
  /** Format: double */
@@ -1079,6 +1500,25 @@ export interface components {
1079
1500
  probability_high?: number | null;
1080
1501
  /** Format: double */
1081
1502
  probability_low?: number | null;
1503
+ /** Format: double */
1504
+ avg_trade_shares?: number | null;
1505
+ /** Format: double */
1506
+ avg_buy_shares?: number | null;
1507
+ /** Format: double */
1508
+ avg_sell_shares?: number | null;
1509
+ };
1510
+ /** @description Subscription filters for the `position_volume_milestone` event. */
1511
+ PositionVolumeMilestoneFilters: {
1512
+ /** @description **Required.** Aggregation windows to monitor. */
1513
+ timeframes: components["schemas"]["MetricFilterTimeframe"][];
1514
+ /** @description Restrict to these outcome token IDs. */
1515
+ position_ids?: string[] | null;
1516
+ /** @description Restrict to positions within these markets. */
1517
+ condition_ids?: string[] | null;
1518
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
1519
+ outcomes?: string[] | null;
1520
+ /** @description Specific USD milestones to trigger on. */
1521
+ milestone_amounts?: number[] | null;
1082
1522
  };
1083
1523
  /** @description Position volume milestone webhook payload */
1084
1524
  PositionVolumeMilestonePayload: {
@@ -1129,6 +1569,27 @@ export interface components {
1129
1569
  */
1130
1570
  sells: number;
1131
1571
  };
1572
+ /** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
1573
+ PositionVolumeSpikeFilters: {
1574
+ /**
1575
+ * Format: double
1576
+ * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
1577
+ */
1578
+ spike_ratio: number;
1579
+ /**
1580
+ * Format: int64
1581
+ * @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
1582
+ */
1583
+ window_secs?: number | null;
1584
+ /** @description Restrict to these outcome token IDs. */
1585
+ position_ids?: string[] | null;
1586
+ /** @description Restrict to positions within these markets. */
1587
+ condition_ids?: string[] | null;
1588
+ /** @description Restrict to these outcome names. */
1589
+ outcomes?: string[] | null;
1590
+ /** @description Restrict to these aggregation windows. */
1591
+ timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
1592
+ };
1132
1593
  /** @description Position volume spike webhook payload */
1133
1594
  PositionVolumeSpikePayload: {
1134
1595
  position_id: string;
@@ -1172,6 +1633,50 @@ export interface components {
1172
1633
  */
1173
1634
  fees: number;
1174
1635
  };
1636
+ /** @description Subscription filters for the `price_spike` event. */
1637
+ PriceSpikeFilters: {
1638
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1639
+ position_ids?: string[] | null;
1640
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
1641
+ condition_ids?: string[] | null;
1642
+ /** @description Restrict to specific events. Empty = all events. */
1643
+ event_slugs?: string[] | null;
1644
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
1645
+ outcomes?: string[] | null;
1646
+ /**
1647
+ * Format: double
1648
+ * @description Minimum price percentage move to trigger (e.g. `10` for a 10% move).
1649
+ */
1650
+ min_price_change_pct?: number | null;
1651
+ /**
1652
+ * Format: double
1653
+ * @description Minimum YES probability (0-1).
1654
+ */
1655
+ min_probability?: number | null;
1656
+ /**
1657
+ * Format: double
1658
+ * @description Maximum YES probability (0-1).
1659
+ */
1660
+ max_probability?: number | null;
1661
+ /**
1662
+ * Format: int64
1663
+ * @description Minimum trades accumulated in the observation window before firing.
1664
+ */
1665
+ min_txns?: number | null;
1666
+ /**
1667
+ * Format: double
1668
+ * @description Minimum USD volume accumulated in the observation window before firing.
1669
+ */
1670
+ min_volume_usd?: number | null;
1671
+ spike_direction?: null | components["schemas"]["SpikeDirection"];
1672
+ /**
1673
+ * Format: int64
1674
+ * @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds.
1675
+ */
1676
+ window_secs?: number | null;
1677
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1678
+ exclude_shortterm_markets?: boolean | null;
1679
+ };
1175
1680
  /** @description Position price spike webhook payload */
1176
1681
  PriceSpikePayload: {
1177
1682
  position_id: string;
@@ -1201,6 +1706,50 @@ export interface components {
1201
1706
  */
1202
1707
  spike_pct: number;
1203
1708
  };
1709
+ /** @description Subscription filters for the `probability_spike` event. */
1710
+ ProbabilitySpikeFilters: {
1711
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1712
+ position_ids?: string[] | null;
1713
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
1714
+ condition_ids?: string[] | null;
1715
+ /** @description Restrict to specific events. Empty = all events. */
1716
+ event_slugs?: string[] | null;
1717
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
1718
+ outcomes?: string[] | null;
1719
+ /**
1720
+ * Format: double
1721
+ * @description Minimum YES probability (0-1). At least one of `min_probability`/`max_probability` is enforced at runtime if you want a probability gate.
1722
+ */
1723
+ min_probability?: number | null;
1724
+ /**
1725
+ * Format: double
1726
+ * @description Maximum YES probability (0-1).
1727
+ */
1728
+ max_probability?: number | null;
1729
+ /**
1730
+ * Format: double
1731
+ * @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move).
1732
+ */
1733
+ min_probability_change_pct?: number | null;
1734
+ /**
1735
+ * Format: int64
1736
+ * @description Minimum trades accumulated in the observation window before firing.
1737
+ */
1738
+ min_txns?: number | null;
1739
+ /**
1740
+ * Format: double
1741
+ * @description Minimum USD volume accumulated in the observation window before firing.
1742
+ */
1743
+ min_volume_usd?: number | null;
1744
+ spike_direction?: null | components["schemas"]["SpikeDirection"];
1745
+ /**
1746
+ * Format: int64
1747
+ * @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds.
1748
+ */
1749
+ window_secs?: number | null;
1750
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1751
+ exclude_shortterm_markets?: boolean | null;
1752
+ };
1204
1753
  /** @description Position probability spike webhook payload */
1205
1754
  ProbabilitySpikePayload: {
1206
1755
  position_id: string;
@@ -1437,88 +1986,446 @@ export interface components {
1437
1986
  slug?: string | null;
1438
1987
  event_slug?: string | null;
1439
1988
  };
1440
- /** @description V2 UMA OOv2: a price request was made (market initialization). */
1441
- RequestPriceEvent: {
1442
- id: string;
1443
- hash: string;
1444
- /** Format: int64 */
1445
- block?: number | null;
1446
- /** Format: int64 */
1447
- confirmed_at?: number | null;
1448
- /** Format: int64 */
1449
- received_at?: number | null;
1450
- /** Format: int64 */
1451
- log_index?: number | null;
1452
- /** Format: int64 */
1453
- block_index?: number | null;
1454
- oracle_contract: string;
1455
- requester: string;
1456
- identifier: string;
1989
+ /** @description V2 UMA OOv2: a price request was made (market initialization). */
1990
+ RequestPriceEvent: {
1991
+ id: string;
1992
+ hash: string;
1993
+ /** Format: int64 */
1994
+ block?: number | null;
1995
+ /** Format: int64 */
1996
+ confirmed_at?: number | null;
1997
+ /** Format: int64 */
1998
+ received_at?: number | null;
1999
+ /** Format: int64 */
2000
+ log_index?: number | null;
2001
+ /** Format: int64 */
2002
+ block_index?: number | null;
2003
+ oracle_contract: string;
2004
+ requester: string;
2005
+ identifier: string;
2006
+ /**
2007
+ * @description UMA request timestamp (seconds, decimal string).
2008
+ * The point in time the requester is asking the oracle to resolve the
2009
+ * price for — part of the request identity tuple
2010
+ * `(requester, identifier, timestamp, ancillaryData)`. Not the block
2011
+ * timestamp of this event; see `confirmed_at` for that.
2012
+ */
2013
+ timestamp: string;
2014
+ ancillary_data: string;
2015
+ currency: string;
2016
+ reward: string;
2017
+ final_fee: string;
2018
+ condition_id?: string | null;
2019
+ question?: string | null;
2020
+ image_url?: string | null;
2021
+ slug?: string | null;
2022
+ event_slug?: string | null;
2023
+ };
2024
+ /** @description Response for POST /v1/webhook/{id}/rotate-secret */
2025
+ RotateSecretResponse: {
2026
+ /** @description The new HMAC secret (only returned once — store it securely) */
2027
+ secret: string;
2028
+ /**
2029
+ * Format: int64
2030
+ * @description Timestamp of rotation (ms since epoch)
2031
+ */
2032
+ rotated_at: number;
2033
+ };
2034
+ /** @description V2 UMA OOv2: a price request was settled (final resolution). */
2035
+ SettleEvent: {
2036
+ id: string;
2037
+ hash: string;
2038
+ /** Format: int64 */
2039
+ block?: number | null;
2040
+ /** Format: int64 */
2041
+ confirmed_at?: number | null;
2042
+ /** Format: int64 */
2043
+ received_at?: number | null;
2044
+ /** Format: int64 */
2045
+ log_index?: number | null;
2046
+ /** Format: int64 */
2047
+ block_index?: number | null;
2048
+ oracle_contract: string;
2049
+ requester: string;
2050
+ proposer: string;
2051
+ disputer: string;
2052
+ identifier: string;
2053
+ timestamp: string;
2054
+ ancillary_data: string;
2055
+ /** Format: int64 */
2056
+ proposed_price: number;
2057
+ payout: string;
2058
+ disputed: boolean;
2059
+ condition_id?: string | null;
2060
+ proposed_outcome?: string | null;
2061
+ question?: string | null;
2062
+ image_url?: string | null;
2063
+ slug?: string | null;
2064
+ event_slug?: string | null;
2065
+ };
2066
+ /**
2067
+ * @description Direction filter for spike webhooks.
2068
+ * @enum {string}
2069
+ */
2070
+ SpikeDirection: "up" | "down" | "both";
2071
+ /** @description Subscription filters for the `tag_metrics` event. All fields are optional. */
2072
+ TagMetricsFilters: {
2073
+ /** @description Restrict to these tags. Empty = all tags. */
2074
+ tags?: string[] | null;
2075
+ /** @description Restrict to these aggregation windows. */
2076
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
2077
+ /**
2078
+ * Format: double
2079
+ * @description Only fire when aggregated tag volume >= this value (USD).
2080
+ */
2081
+ min_volume_usd?: number | null;
2082
+ /** Format: double */
2083
+ max_volume_usd?: number | null;
2084
+ /** Format: int64 */
2085
+ min_txns?: number | null;
2086
+ /** Format: int64 */
2087
+ min_unique_traders?: number | null;
2088
+ /** Format: double */
2089
+ min_fees?: number | null;
2090
+ };
2091
+ /** @description Payload delivered when a tag's aggregated volume or transaction metrics cross a configured threshold */
2092
+ TagMetricsPayload: {
2093
+ /** @description Tag label or slug */
2094
+ tag?: string | null;
2095
+ /** @description Aggregation window */
2096
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
2097
+ /**
2098
+ * Format: double
2099
+ * @description Total aggregated volume for the tag (USD)
2100
+ */
2101
+ volume_usd?: number | null;
2102
+ /**
2103
+ * Format: double
2104
+ * @description Total aggregated shares/contracts volume for the tag
2105
+ */
2106
+ shares_volume?: number | null;
2107
+ /**
2108
+ * Format: double
2109
+ * @description Builder-attributed aggregated volume in USD
2110
+ */
2111
+ builder_usd_volume?: number | null;
2112
+ /**
2113
+ * Format: double
2114
+ * @description Builder-attributed aggregated shares/contracts volume
2115
+ */
2116
+ builder_shares_volume?: number | null;
2117
+ /**
2118
+ * Format: double
2119
+ * @description Total fees collected in USD
2120
+ */
2121
+ fees?: number | null;
2122
+ /**
2123
+ * Format: double
2124
+ * @description Builder-attributed fees in USD
2125
+ */
2126
+ builder_fees?: number | null;
2127
+ /**
2128
+ * Format: int64
2129
+ * @description Total number of transactions
2130
+ */
2131
+ txns?: number | null;
2132
+ /**
2133
+ * Format: int64
2134
+ * @description Builder-attributed transaction count
2135
+ */
2136
+ builder_txns?: number | null;
2137
+ /**
2138
+ * Format: int64
2139
+ * @description Number of unique traders
2140
+ */
2141
+ unique_traders?: number | null;
2142
+ /**
2143
+ * Format: int64
2144
+ * @description Number of unique builder-attributed traders
2145
+ */
2146
+ unique_builder_traders?: number | null;
2147
+ };
2148
+ /**
2149
+ * @description Trade-event types accepted by `trader_trade_event.trade_types`. Covers the
2150
+ * full set of typed prediction-trade variants.
2151
+ * @enum {string}
2152
+ */
2153
+ TradeEventFilterType: "OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval";
2154
+ /** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
2155
+ TraderEventPnlFilters: {
2156
+ /** @description Track only these trader wallet addresses. */
2157
+ traders?: string[] | null;
2158
+ /** @description Restrict to these events. */
2159
+ event_slugs?: string[] | null;
2160
+ /**
2161
+ * Format: double
2162
+ * @description Only fire when per-event realized PnL ≥ this value (USD).
2163
+ */
2164
+ min_realized_pnl_usd?: number | null;
2165
+ /**
2166
+ * Format: double
2167
+ * @description Only fire when per-event realized PnL ≤ this value (USD).
2168
+ */
2169
+ max_realized_pnl_usd?: number | null;
2170
+ /**
2171
+ * Format: double
2172
+ * @description Only fire when total event volume ≥ this value (USD).
2173
+ */
2174
+ min_volume_usd?: number | null;
2175
+ /**
2176
+ * Format: double
2177
+ * @description Only fire when total event volume ≤ this value (USD).
2178
+ */
2179
+ max_volume_usd?: number | null;
2180
+ /**
2181
+ * Format: double
2182
+ * @description Only fire when buy volume within the event ≥ this value (USD).
2183
+ */
2184
+ min_buy_usd?: number | null;
2185
+ /**
2186
+ * Format: double
2187
+ * @description Only fire when sell volume within the event ≥ this value (USD).
2188
+ */
2189
+ min_sell_volume_usd?: number | null;
2190
+ /**
2191
+ * Format: int64
2192
+ * @description Only fire when the trader has traded in ≥ this many markets within the event.
2193
+ */
2194
+ min_markets_traded?: number | null;
2195
+ /** @description Restrict to these PnL windows. */
2196
+ timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
2197
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2198
+ exclude_shortterm_markets?: boolean | null;
2199
+ };
2200
+ /** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
2201
+ TraderFirstTradeFilters: {
2202
+ /** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
2203
+ wallet_addresses?: string[] | null;
2204
+ /** @description Restrict to trades in these markets. Empty = all markets. */
2205
+ condition_ids?: string[] | null;
2206
+ /** @description Restrict to trades in markets belonging to these events. */
2207
+ event_slugs?: string[] | null;
2208
+ /**
2209
+ * Format: double
2210
+ * @description Minimum trade size in USD. Omit to match all sizes.
2211
+ */
2212
+ min_usd_value?: number | null;
2213
+ /**
2214
+ * Format: double
2215
+ * @description Only fire when the outcome probability is ≥ this value.
2216
+ */
2217
+ min_probability?: number | null;
2218
+ /**
2219
+ * Format: double
2220
+ * @description Only fire when the outcome probability is ≤ this value.
2221
+ */
2222
+ max_probability?: number | null;
2223
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
2224
+ exclude_shortterm_markets?: boolean | null;
2225
+ };
2226
+ /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
2227
+ TraderGlobalPnlFilters: {
2228
+ /** @description Track only these trader wallet addresses. Empty = all traders. */
2229
+ traders?: string[] | null;
2230
+ /**
2231
+ * Format: double
2232
+ * @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds.
2233
+ */
2234
+ min_realized_pnl_usd?: number | null;
2235
+ /**
2236
+ * Format: double
2237
+ * @description Only fire when realized PnL ≤ this value (USD).
2238
+ */
2239
+ max_realized_pnl_usd?: number | null;
2240
+ /**
2241
+ * Format: double
2242
+ * @description Only fire when total trading volume ≥ this value (USD).
2243
+ */
2244
+ min_volume_usd?: number | null;
2245
+ /**
2246
+ * Format: double
2247
+ * @description Only fire when total trading volume ≤ this value (USD).
2248
+ */
2249
+ max_volume_usd?: number | null;
2250
+ /**
2251
+ * Format: double
2252
+ * @description Only fire when buy volume ≥ this value (USD).
2253
+ */
2254
+ min_buy_usd?: number | null;
2255
+ /**
2256
+ * Format: double
2257
+ * @description Only fire when sell volume ≥ this value (USD).
2258
+ */
2259
+ min_sell_volume_usd?: number | null;
2260
+ /**
2261
+ * Format: double
2262
+ * @description Only fire when market win rate ≥ this percentage (0.0–100.0).
2263
+ */
2264
+ min_win_rate?: number | null;
2265
+ /**
2266
+ * Format: int64
2267
+ * @description Only fire when the trader has traded in ≥ this many markets.
2268
+ */
2269
+ min_markets_traded?: number | null;
2270
+ /** @description Restrict to these PnL windows. Empty = all windows. */
2271
+ timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
2272
+ };
2273
+ /** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
2274
+ TraderMarketPnlFilters: {
2275
+ /** @description Track only these trader wallet addresses. */
2276
+ traders?: string[] | null;
2277
+ /** @description Restrict to these markets. */
2278
+ condition_ids?: string[] | null;
2279
+ /** @description Restrict to markets in these events. */
2280
+ event_slugs?: string[] | null;
1457
2281
  /**
1458
- * @description UMA request timestamp (seconds, decimal string).
1459
- * The point in time the requester is asking the oracle to resolve the
1460
- * price for — part of the request identity tuple
1461
- * `(requester, identifier, timestamp, ancillaryData)`. Not the block
1462
- * timestamp of this event; see `confirmed_at` for that.
2282
+ * Format: double
2283
+ * @description Only fire when per-market realized PnL this value (USD).
1463
2284
  */
1464
- timestamp: string;
1465
- ancillary_data: string;
1466
- currency: string;
1467
- reward: string;
1468
- final_fee: string;
1469
- condition_id?: string | null;
1470
- question?: string | null;
1471
- image_url?: string | null;
1472
- slug?: string | null;
1473
- event_slug?: string | null;
2285
+ min_realized_pnl_usd?: number | null;
2286
+ /**
2287
+ * Format: double
2288
+ * @description Only fire when per-market realized PnL ≤ this value (USD).
2289
+ */
2290
+ max_realized_pnl_usd?: number | null;
2291
+ /**
2292
+ * Format: double
2293
+ * @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD).
2294
+ */
2295
+ min_volume_usd?: number | null;
2296
+ /**
2297
+ * Format: double
2298
+ * @description Only fire when total volume ≤ this value (USD).
2299
+ */
2300
+ max_volume_usd?: number | null;
2301
+ /**
2302
+ * Format: double
2303
+ * @description Only fire when buy volume in the market ≥ this value (USD).
2304
+ */
2305
+ min_buy_usd?: number | null;
2306
+ /**
2307
+ * Format: double
2308
+ * @description Only fire when sell volume in the market ≥ this value (USD).
2309
+ */
2310
+ min_sell_volume_usd?: number | null;
2311
+ /** @description Restrict to these PnL windows. */
2312
+ timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
2313
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2314
+ exclude_shortterm_markets?: boolean | null;
1474
2315
  };
1475
- /** @description Response for POST /v1/webhook/{id}/rotate-secret */
1476
- RotateSecretResponse: {
1477
- /** @description The new HMAC secret (only returned once store it securely) */
1478
- secret: string;
2316
+ /** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
2317
+ TraderNewMarketFilters: {
2318
+ /** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
2319
+ wallet_addresses?: string[] | null;
2320
+ /** @description Restrict to these markets. */
2321
+ condition_ids?: string[] | null;
2322
+ /** @description Restrict to markets belonging to these events. */
2323
+ event_slugs?: string[] | null;
1479
2324
  /**
1480
- * Format: int64
1481
- * @description Timestamp of rotation (ms since epoch)
2325
+ * Format: double
2326
+ * @description Minimum trade size in USD. Omit to match all sizes.
1482
2327
  */
1483
- rotated_at: number;
2328
+ min_usd_value?: number | null;
2329
+ /**
2330
+ * Format: double
2331
+ * @description Only fire when the outcome probability is ≥ this value.
2332
+ */
2333
+ min_probability?: number | null;
2334
+ /**
2335
+ * Format: double
2336
+ * @description Only fire when the outcome probability is ≤ this value.
2337
+ */
2338
+ max_probability?: number | null;
2339
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2340
+ exclude_shortterm_markets?: boolean | null;
1484
2341
  };
1485
- /** @description V2 UMA OOv2: a price request was settled (final resolution). */
1486
- SettleEvent: {
1487
- id: string;
1488
- hash: string;
1489
- /** Format: int64 */
1490
- block?: number | null;
1491
- /** Format: int64 */
1492
- confirmed_at?: number | null;
1493
- /** Format: int64 */
1494
- received_at?: number | null;
1495
- /** Format: int64 */
1496
- log_index?: number | null;
1497
- /** Format: int64 */
1498
- block_index?: number | null;
1499
- oracle_contract: string;
1500
- requester: string;
1501
- proposer: string;
1502
- disputer: string;
1503
- identifier: string;
1504
- timestamp: string;
1505
- ancillary_data: string;
1506
- /** Format: int64 */
1507
- proposed_price: number;
1508
- payout: string;
1509
- disputed: boolean;
1510
- condition_id?: string | null;
1511
- proposed_outcome?: string | null;
1512
- question?: string | null;
1513
- image_url?: string | null;
1514
- slug?: string | null;
1515
- event_slug?: string | null;
2342
+ /** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
2343
+ TraderNewTradeFilters: {
2344
+ /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2345
+ wallet_addresses?: string[] | null;
2346
+ /** @description Restrict to these markets. */
2347
+ condition_ids?: string[] | null;
2348
+ /** @description Restrict to markets belonging to these events. */
2349
+ event_slugs?: string[] | null;
2350
+ /**
2351
+ * Format: double
2352
+ * @description Minimum trade size in USD. Defaults to 0 (matches all trades).
2353
+ */
2354
+ min_usd_value?: number | null;
2355
+ /**
2356
+ * Format: double
2357
+ * @description Only fire when outcome probability is ≥ this value.
2358
+ */
2359
+ min_probability?: number | null;
2360
+ /**
2361
+ * Format: double
2362
+ * @description Only fire when outcome probability is ≤ this value.
2363
+ */
2364
+ max_probability?: number | null;
2365
+ /** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
2366
+ trade_types?: ("OrderFilled" | "OrdersMatched")[] | null;
2367
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2368
+ exclude_shortterm_markets?: boolean | null;
1516
2369
  };
1517
2370
  /**
1518
- * @description Direction filter for spike webhooks.
1519
- * @enum {string}
2371
+ * @description Subscription filters for the `trader_trade_event` event. All fields are optional.
2372
+ * `event_slugs` and `exclude_shortterm_markets` require explicit `trade_types` that
2373
+ * exclude `PositionsConverted`, because conversion events do not currently carry
2374
+ * `event_slug` in the typed webhook payload.
1520
2375
  */
1521
- SpikeDirection: "up" | "down" | "both";
2376
+ TraderTradeEventFilters: {
2377
+ /** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
2378
+ wallet_addresses?: string[] | null;
2379
+ /** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
2380
+ condition_ids?: string[] | null;
2381
+ /** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
2382
+ event_slugs?: string[] | null;
2383
+ /**
2384
+ * Format: double
2385
+ * @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events).
2386
+ */
2387
+ min_usd_value?: number | null;
2388
+ /**
2389
+ * Format: double
2390
+ * @description Only fire when event probability is ≥ this value. Events without probability data do not match.
2391
+ */
2392
+ min_probability?: number | null;
2393
+ /**
2394
+ * Format: double
2395
+ * @description Only fire when event probability is ≤ this value. Events without probability data do not match.
2396
+ */
2397
+ max_probability?: number | null;
2398
+ /** @description Only fire for these trade types. Empty = all supported trade-event variants. */
2399
+ trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[] | null;
2400
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
2401
+ exclude_shortterm_markets?: boolean | null;
2402
+ };
2403
+ /** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
2404
+ TraderWhaleTradeFilters: {
2405
+ /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2406
+ wallet_addresses?: string[] | null;
2407
+ /** @description Restrict to these markets. */
2408
+ condition_ids?: string[] | null;
2409
+ /** @description Restrict to markets belonging to these events. */
2410
+ event_slugs?: string[] | null;
2411
+ /**
2412
+ * Format: double
2413
+ * @description Minimum trade size in USD. Defaults to 0 (matches all trades).
2414
+ */
2415
+ min_usd_value?: number | null;
2416
+ /**
2417
+ * Format: double
2418
+ * @description Only fire when outcome probability is ≥ this value.
2419
+ */
2420
+ min_probability?: number | null;
2421
+ /**
2422
+ * Format: double
2423
+ * @description Only fire when outcome probability is ≤ this value.
2424
+ */
2425
+ max_probability?: number | null;
2426
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2427
+ exclude_shortterm_markets?: boolean | null;
2428
+ };
1522
2429
  /** @description Request body for updating a webhook */
1523
2430
  UpdateWebhookRequestBody: {
1524
2431
  /** @description Destination URL for webhook deliveries (must be HTTPS) */
@@ -1556,6 +2463,12 @@ export interface components {
1556
2463
  */
1557
2464
  txns: number;
1558
2465
  };
2466
+ /**
2467
+ * @description Aggregation windows accepted by `*_volume_spike.timeframes`. Includes `1d`
2468
+ * in addition to the metric set.
2469
+ * @enum {string}
2470
+ */
2471
+ VolumeSpikeFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
1559
2472
  /**
1560
2473
  * @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
1561
2474
  * @enum {string}
@@ -1780,30 +2693,32 @@ export interface components {
1780
2693
  * @enum {string}
1781
2694
  */
1782
2695
  WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d";
1783
- /** @description Whale trade webhook payload */
2696
+ /** @description Payload delivered when a trade exceeds the configured size and probability thresholds */
1784
2697
  WhaleTradePayload: {
1785
- /** @description Trader address (the limit-order maker) */
2698
+ /** @description Limit-order maker wallet address (lowercase) */
1786
2699
  trader: string;
1787
- /** @description Taker address (the order filler often the exchange contract) */
2700
+ /** @description Order filler wallet address (lowercase) */
1788
2701
  taker: string;
1789
- /** @description Position ID (ERC1155 token ID) */
2702
+ /** @description ERC-1155 outcome token ID */
1790
2703
  position_id: string;
1791
- /** @description Condition ID */
2704
+ /** @description Parent market condition ID */
1792
2705
  condition_id?: string | null;
1793
2706
  /** @description Outcome name (e.g. "Yes", "No") */
1794
2707
  outcome?: string | null;
1795
2708
  /**
1796
2709
  * Format: int32
1797
- * @description Outcome index (0 = Yes, 1 = No)
2710
+ * @description Outcome index: 0 = Yes/Up, 1 = No
1798
2711
  */
1799
2712
  outcome_index?: number | null;
1800
- /** @description Market question */
2713
+ /** @description Market question text */
1801
2714
  question?: string | null;
1802
2715
  /** @description Market slug */
1803
2716
  market_slug?: string | null;
1804
- /** @description Event slug */
2717
+ /** @description Parent event slug */
1805
2718
  event_slug?: string | null;
1806
- /** @description Trade ID */
2719
+ /** @description Market image URL */
2720
+ image_url?: string | null;
2721
+ /** @description Unique trade identifier */
1807
2722
  trade_id: string;
1808
2723
  /** @description Transaction hash */
1809
2724
  hash: string;
@@ -1814,38 +2729,40 @@ export interface components {
1814
2729
  block: number;
1815
2730
  /**
1816
2731
  * Format: int64
1817
- * @description Confirmed timestamp (Unix seconds)
2732
+ * @description Block confirmation timestamp (Unix seconds)
1818
2733
  */
1819
2734
  confirmed_at: number;
1820
2735
  /**
1821
2736
  * Format: double
1822
- * @description USD size of the trade
2737
+ * @description USD size of the trade (6 decimal places)
1823
2738
  */
1824
2739
  amount_usd: number;
1825
2740
  /**
1826
2741
  * Format: double
1827
- * @description Outcome shares traded
2742
+ * @description Outcome shares traded (6 decimal places)
1828
2743
  */
1829
2744
  shares_amount: number;
1830
2745
  /**
1831
2746
  * Format: double
1832
- * @description Fee paid (USD)
2747
+ * @description Fee paid in USD (6 decimal places)
1833
2748
  */
1834
2749
  fee: number;
1835
- /** @description Trade side ("Buy" or "Sell") */
1836
- side: string;
2750
+ /** @description Trade direction */
2751
+ side: "Buy" | "Sell";
1837
2752
  /**
1838
2753
  * Format: double
1839
- * @description Price per share (0.0–1.0)
2754
+ * @description Outcome token price (0.0–1.0)
1840
2755
  */
1841
2756
  price: number;
1842
2757
  /**
1843
2758
  * Format: double
1844
- * @description Implied probability of the event (0.0–1.0); None when outcome is unknown
2759
+ * @description Implied probability (0.0–1.0); null when outcome is unknown
1845
2760
  */
1846
2761
  probability?: number | null;
1847
- exchange: string;
1848
- trade_type: string;
2762
+ /** @description Exchange contract that processed the trade */
2763
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
2764
+ /** @description Trade type (webhook events only fire on order fills) */
2765
+ trade_type: "OrderFilled" | "OrdersMatched";
1849
2766
  };
1850
2767
  /** @description Server acknowledgement for an oracle events stream subscription */
1851
2768
  OracleEventsStreamSubscribeResponse: {
@@ -1959,7 +2876,7 @@ export interface components {
1959
2876
  /** @description Trader wallet addresses (lowercase 0x-prefixed) */
1960
2877
  traders?: string[];
1961
2878
  /** @description Only receive events of these types. Empty array = all types. */
1962
- trade_types?: ("OrderFilled" | "OrdersMatched" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "MakerRebate" | "Reward" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[];
2879
+ trade_types?: ("OrderFilled" | "OrdersMatched" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "MakerRebate" | "Reward" | "Yield" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken")[];
1963
2880
  /**
1964
2881
  * @description Trade status filter: "confirmed" (default) = on-chain only, "pending" = mempool only, "all" = both
1965
2882
  * @enum {string}
@@ -2039,7 +2956,7 @@ export interface components {
2039
2956
  exchange: number;
2040
2957
  } | {
2041
2958
  /** @enum {string} */
2042
- trade_type: "MakerRebate" | "Reward";
2959
+ trade_type: "MakerRebate" | "Reward" | "Yield";
2043
2960
  id: string;
2044
2961
  hash: string;
2045
2962
  block?: number;
@@ -2248,37 +3165,12 @@ export interface components {
2248
3165
  slug?: string | null;
2249
3166
  event_slug?: string | null;
2250
3167
  exchange: number;
2251
- } | {
2252
- /** @enum {string} */
2253
- trade_type: "Approval";
2254
- id: string;
2255
- hash: string;
2256
- block?: number;
2257
- confirmed_at?: number;
2258
- received_at?: number;
2259
- log_index?: number;
2260
- block_index?: number;
2261
- trader: {
2262
- address?: string;
2263
- name?: string | null;
2264
- pseudonym?: string | null;
2265
- profile_image?: string | null;
2266
- x_username?: string | null;
2267
- verified_badge?: boolean;
2268
- };
2269
- operator?: string;
2270
- approved?: boolean;
2271
- question?: string | null;
2272
- image_url?: string | null;
2273
- slug?: string | null;
2274
- event_slug?: string | null;
2275
- exchange: number;
2276
3168
  };
2277
3169
  /** @description Subscribe to the asset prices stream. Empty asset_symbols = all assets. */
2278
3170
  AssetPricesSubscribeMessage: {
2279
3171
  /** @enum {string} */
2280
3172
  action: "subscribe" | "unsubscribe_all";
2281
- /** @description Uppercase asset symbols (e.g. "BTC", "ETH"). Empty = subscribe to all. */
3173
+ /** @description Uppercase asset symbols (BTC, ETH, SOL, XRP, DOGE, BNB, HYPE). Empty = subscribe to all. */
2282
3174
  asset_symbols?: string[];
2283
3175
  };
2284
3176
  /** @description Server acknowledgement for an asset prices subscription */
@@ -2290,7 +3182,7 @@ export interface components {
2290
3182
  AssetPriceTickEvent: {
2291
3183
  /** @description Always "asset_price_tick" */
2292
3184
  event_type: string;
2293
- /** @description Uppercase asset symbol (e.g. "BTC") */
3185
+ /** @description Uppercase asset symbol (BTC, ETH, SOL, XRP, DOGE, BNB, HYPE) */
2294
3186
  symbol: string;
2295
3187
  /** @description Current price in USD */
2296
3188
  price: number;
@@ -2309,7 +3201,7 @@ export interface components {
2309
3201
  AssetPriceWindowUpdateEvent: {
2310
3202
  /** @description Always "asset_price_window_update" */
2311
3203
  event_type: string;
2312
- /** @description Uppercase asset symbol (e.g. "BTC") */
3204
+ /** @description Uppercase asset symbol (BTC, ETH, SOL, XRP, DOGE, BNB, HYPE) */
2313
3205
  symbol: string;
2314
3206
  /** @description Candle size / timeframe (e.g. "5m", "1h", "1d") */
2315
3207
  variant: string;
@@ -2339,7 +3231,7 @@ export interface components {
2339
3231
  AssetWindowUpdatesSubscribeMessage: {
2340
3232
  /** @enum {string} */
2341
3233
  action: "subscribe" | "unsubscribe_all";
2342
- /** @description Uppercase asset symbols (e.g. "BTC", "ETH") */
3234
+ /** @description Uppercase asset symbols (BTC, ETH, SOL, XRP, DOGE, BNB, HYPE) */
2343
3235
  asset_symbols?: string[];
2344
3236
  /** @description Candle sizes to filter by. "1d" and "24h" are treated as equivalent. */
2345
3237
  timeframes?: ("5m" | "15m" | "1h" | "4h" | "1d" | "24h")[];
@@ -2381,15 +3273,30 @@ export interface components {
2381
3273
  timestamp?: number | null;
2382
3274
  /** @description USD volume in this timeframe window (decimal string) */
2383
3275
  usd_volume: string;
3276
+ /** @description Shares/contracts volume in this timeframe window (decimal string) */
3277
+ shares_volume: string;
3278
+ /** @description Builder-attributed USD volume in this timeframe window (decimal string) */
3279
+ builder_usd_volume: string;
3280
+ /** @description Builder-attributed shares/contracts volume in this timeframe window (decimal string) */
3281
+ builder_shares_volume: string;
2384
3282
  /** @description Total fees in this window */
2385
3283
  fees: number;
3284
+ /** @description Builder-attributed fees in this window */
3285
+ builder_fees: number;
2386
3286
  /**
2387
3287
  * Format: int64
2388
3288
  * @description Number of transactions
2389
3289
  */
2390
3290
  txns: number;
3291
+ /**
3292
+ * Format: int64
3293
+ * @description Builder-attributed transactions
3294
+ */
3295
+ builder_txns: number;
2391
3296
  /** Format: int64 */
2392
3297
  unique_traders: number;
3298
+ /** Format: int64 */
3299
+ unique_builder_traders: number;
2393
3300
  };
2394
3301
  /** @description Subscribe to the event metrics stream. event_slugs is required and must be non-empty. */
2395
3302
  EventMetricsSubscribeMessage: {
@@ -2416,11 +3323,64 @@ export interface components {
2416
3323
  timestamp?: number | null;
2417
3324
  /** @description USD volume in this timeframe window (decimal string) */
2418
3325
  usd_volume: string;
3326
+ /** @description Shares/contracts volume in this timeframe window (decimal string) */
3327
+ shares_volume: string;
3328
+ /** @description Builder-attributed USD volume in this timeframe window (decimal string) */
3329
+ builder_usd_volume: string;
3330
+ /** @description Builder-attributed shares/contracts volume in this timeframe window (decimal string) */
3331
+ builder_shares_volume: string;
3332
+ fees: number;
3333
+ builder_fees: number;
3334
+ /** Format: int64 */
3335
+ txns: number;
3336
+ /** Format: int64 */
3337
+ builder_txns: number;
3338
+ /** Format: int64 */
3339
+ unique_traders: number;
3340
+ /** Format: int64 */
3341
+ unique_builder_traders: number;
3342
+ };
3343
+ /** @description Subscribe to the tag metrics stream. tags is required and must be non-empty. */
3344
+ TagMetricsSubscribeMessage: {
3345
+ /** @enum {string} */
3346
+ action: "subscribe" | "unsubscribe_all";
3347
+ /** @description Tag labels or slugs, matched case-insensitively */
3348
+ tags: string[];
3349
+ };
3350
+ /** @description Server acknowledgement for a tag metrics subscription */
3351
+ TagMetricsSubscribeResponse: {
3352
+ tags?: string[];
3353
+ rejected?: string[];
3354
+ error?: string | null;
3355
+ };
3356
+ /** @description Server-pushed event: aggregated metrics update for one timeframe of a tag. Envelope type: "tag_metrics_update". One event is emitted per timeframe window on each update. */
3357
+ TagMetricsEvent: {
3358
+ tag: string;
3359
+ /** @enum {string} */
3360
+ timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
3361
+ /**
3362
+ * Format: int64
3363
+ * @description Optional event timestamp (Unix seconds)
3364
+ */
3365
+ timestamp?: number | null;
3366
+ /** @description USD volume in this timeframe window (decimal string) */
3367
+ usd_volume: string;
3368
+ /** @description Shares/contracts volume in this timeframe window (decimal string) */
3369
+ shares_volume: string;
3370
+ /** @description Builder-attributed USD volume in this timeframe window (decimal string) */
3371
+ builder_usd_volume: string;
3372
+ /** @description Builder-attributed shares/contracts volume in this timeframe window (decimal string) */
3373
+ builder_shares_volume: string;
2419
3374
  fees: number;
3375
+ builder_fees: number;
2420
3376
  /** Format: int64 */
2421
3377
  txns: number;
2422
3378
  /** Format: int64 */
3379
+ builder_txns: number;
3380
+ /** Format: int64 */
2423
3381
  unique_traders: number;
3382
+ /** Format: int64 */
3383
+ unique_builder_traders: number;
2424
3384
  };
2425
3385
  /** @description Subscribe to the position metrics stream. position_ids is required and must be non-empty. */
2426
3386
  PositionMetricsSubscribeMessage: {
@@ -2457,7 +3417,26 @@ export interface components {
2457
3417
  usd_buy_volume: string;
2458
3418
  /** @description USD sell volume (decimal string) */
2459
3419
  usd_sell_volume: string;
3420
+ /** @description Total shares/contracts volume (decimal string) */
3421
+ shares_volume: string;
3422
+ /** @description Buy shares/contracts volume (decimal string) */
3423
+ shares_buy_volume: string;
3424
+ /** @description Sell shares/contracts volume (decimal string) */
3425
+ shares_sell_volume: string;
3426
+ /** @description Builder-attributed USD volume (decimal string) */
3427
+ builder_usd_volume: string;
3428
+ /** @description Builder-attributed USD buy volume (decimal string) */
3429
+ builder_usd_buy_volume: string;
3430
+ /** @description Builder-attributed USD sell volume (decimal string) */
3431
+ builder_usd_sell_volume: string;
3432
+ /** @description Builder-attributed shares/contracts volume (decimal string) */
3433
+ builder_shares_volume: string;
3434
+ /** @description Builder-attributed buy shares/contracts volume (decimal string) */
3435
+ builder_shares_buy_volume: string;
3436
+ /** @description Builder-attributed sell shares/contracts volume (decimal string) */
3437
+ builder_shares_sell_volume: string;
2460
3438
  fees: number;
3439
+ builder_fees: number;
2461
3440
  /** Format: int64 */
2462
3441
  txns: number;
2463
3442
  /** Format: int64 */
@@ -2465,7 +3444,15 @@ export interface components {
2465
3444
  /** Format: int64 */
2466
3445
  sells: number;
2467
3446
  /** Format: int64 */
3447
+ builder_txns: number;
3448
+ /** Format: int64 */
3449
+ builder_buys: number;
3450
+ /** Format: int64 */
3451
+ builder_sells: number;
3452
+ /** Format: int64 */
2468
3453
  unique_traders: number;
3454
+ /** Format: int64 */
3455
+ unique_builder_traders: number;
2469
3456
  /** @description OHLC open price (0–1) */
2470
3457
  price_open: number;
2471
3458
  /** @description OHLC close price (0–1) */
@@ -2482,6 +3469,9 @@ export interface components {
2482
3469
  probability_high: number;
2483
3470
  /** @description Lowest implied probability in window (0–1) */
2484
3471
  probability_low: number;
3472
+ avg_trade_shares: number;
3473
+ avg_buy_shares: number;
3474
+ avg_sell_shares: number;
2485
3475
  };
2486
3476
  /** @description Subscribe to the trader PnL stream. `traders` is required and must be non-empty. `update_types` and `timeframes` are optional narrowing filters — omit or leave empty to receive all update types / timeframes. */
2487
3477
  TraderPnlSubscribeMessage: {
@@ -3058,12 +4048,12 @@ export interface components {
3058
4048
  exchange: number;
3059
4049
  };
3060
4050
  /**
3061
- * MakerRebate / Reward
4051
+ * MakerRebate / Reward / Yield
3062
4052
  * @description pUSD credit paid directly to the trader wallet.
3063
4053
  */
3064
4054
  TradeRedemptionEvent: {
3065
4055
  /** @enum {string} */
3066
- trade_type: "MakerRebate" | "Reward";
4056
+ trade_type: "MakerRebate" | "Reward" | "Yield";
3067
4057
  id: string;
3068
4058
  hash: string;
3069
4059
  block?: number;
@@ -3285,29 +4275,6 @@ export interface components {
3285
4275
  reward?: string | null;
3286
4276
  proposal_bond?: string | null;
3287
4277
  };
3288
- /**
3289
- * RegisterToken
3290
- * @description YES/NO token pair registered for a condition.
3291
- */
3292
- TradeApprovalEvent: {
3293
- /** @enum {string} */
3294
- trade_type: "RegisterToken";
3295
- id: string;
3296
- hash: string;
3297
- block?: number;
3298
- confirmed_at?: number;
3299
- received_at?: number;
3300
- log_index?: number;
3301
- block_index?: number;
3302
- condition_id: string;
3303
- token0?: string;
3304
- token1?: string;
3305
- question?: string | null;
3306
- image_url?: string | null;
3307
- slug?: string | null;
3308
- event_slug?: string | null;
3309
- exchange: number;
3310
- };
3311
4278
  };
3312
4279
  responses: never;
3313
4280
  parameters: never;