@structbuild/sdk 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,10 +73,16 @@ export interface components {
73
73
  side: "Buy" | "Sell";
74
74
  /** @description Outcome token price (0.0–1.0) */
75
75
  price: number;
76
- /** @description Exchange identifier */
77
- exchange: string;
78
- /** @description Trade type identifier */
79
- trade_type: string;
76
+ /**
77
+ * @description Exchange contract that processed the trade
78
+ * @enum {string}
79
+ */
80
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
81
+ /**
82
+ * @description Trade type (webhook events only fire on order fills)
83
+ * @enum {string}
84
+ */
85
+ trade_type: "OrderFilled" | "OrdersMatched";
80
86
  };
81
87
  /** @description Payload delivered when a trader places their first trade in a specific market (fires once per trader+market pair) */
82
88
  NewMarketPayload: {
@@ -127,10 +133,16 @@ export interface components {
127
133
  price: number;
128
134
  /** @description Implied probability (0.0–1.0); null when outcome is unknown */
129
135
  probability?: number | null;
130
- /** @description Exchange identifier */
131
- exchange: string;
132
- /** @description Trade type identifier */
133
- trade_type: string;
136
+ /**
137
+ * @description Exchange contract that processed the trade
138
+ * @enum {string}
139
+ */
140
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
141
+ /**
142
+ * @description Trade type (webhook events only fire on order fills)
143
+ * @enum {string}
144
+ */
145
+ trade_type: "OrderFilled" | "OrdersMatched";
134
146
  };
135
147
  /** @description Payload delivered when a trade exceeds the configured size and probability thresholds */
136
148
  WhaleTradePayload: {
@@ -181,10 +193,16 @@ export interface components {
181
193
  price: number;
182
194
  /** @description Implied probability (0.0–1.0); null when outcome is unknown */
183
195
  probability?: number | null;
184
- /** @description Exchange identifier */
185
- exchange: string;
186
- /** @description Trade type identifier */
187
- trade_type: string;
196
+ /**
197
+ * @description Exchange contract that processed the trade
198
+ * @enum {string}
199
+ */
200
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
201
+ /**
202
+ * @description Trade type (webhook events only fire on order fills)
203
+ * @enum {string}
204
+ */
205
+ trade_type: "OrderFilled" | "OrdersMatched";
188
206
  };
189
207
  /** @description Payload delivered on every order-filled trade */
190
208
  NewTradePayload: {
@@ -235,10 +253,492 @@ export interface components {
235
253
  price: number;
236
254
  /** @description Implied probability (0.0–1.0); null when outcome is unknown */
237
255
  probability?: number | null;
238
- /** @description Exchange identifier */
239
- exchange: string;
240
- /** @description Trade type identifier */
241
- trade_type: string;
256
+ /**
257
+ * @description Exchange contract that processed the trade
258
+ * @enum {string}
259
+ */
260
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
261
+ /**
262
+ * @description Trade type (webhook events only fire on order fills)
263
+ * @enum {string}
264
+ */
265
+ trade_type: "OrderFilled" | "OrdersMatched";
266
+ };
267
+ /** @description Exact payload union for `trade_event` webhook deliveries. These callbacks are emitted from the live confirmed trade pipeline, so pending-only fields such as `received_at` are absent. */
268
+ WebhookTradeEventPayload: {
269
+ id: string;
270
+ hash: string;
271
+ /** Format: int64 */
272
+ block: number;
273
+ /** Format: int64 */
274
+ confirmed_at: number;
275
+ /** Format: int64 */
276
+ log_index: number;
277
+ /** Format: int64 */
278
+ block_index: number;
279
+ order_hash: string;
280
+ trader: {
281
+ address: string;
282
+ name: string | null;
283
+ pseudonym: string | null;
284
+ profile_image: string | null;
285
+ x_username: string | null;
286
+ verified_badge: boolean;
287
+ };
288
+ taker: string;
289
+ /** @enum {string} */
290
+ side: "Buy" | "Sell";
291
+ condition_id: string | null;
292
+ position_id: string;
293
+ outcome?: string;
294
+ outcome_index: number | null;
295
+ question?: string;
296
+ image_url?: string;
297
+ slug?: string;
298
+ event_slug?: string;
299
+ usd_amount: number;
300
+ shares_amount: number;
301
+ price: number;
302
+ probability?: number;
303
+ fee: number;
304
+ fee_shares: number;
305
+ fee_pct: number;
306
+ /**
307
+ * @description Exchange contract that processed the event
308
+ * @enum {string}
309
+ */
310
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
311
+ /** @enum {string} */
312
+ trade_type: "OrderFilled" | "OrdersMatched";
313
+ } | {
314
+ id: string;
315
+ hash: string;
316
+ /** Format: int64 */
317
+ block: number;
318
+ /** Format: int64 */
319
+ confirmed_at: number;
320
+ /** Format: int64 */
321
+ log_index: number;
322
+ /** Format: int64 */
323
+ block_index: number;
324
+ trader: {
325
+ address: string;
326
+ name: string | null;
327
+ pseudonym: string | null;
328
+ profile_image: string | null;
329
+ x_username: string | null;
330
+ verified_badge: boolean;
331
+ };
332
+ condition_id: string | null;
333
+ outcome?: string;
334
+ outcome_index: number | null;
335
+ question?: string;
336
+ image_url?: string;
337
+ slug?: string;
338
+ event_slug?: string;
339
+ usd_amount: number;
340
+ winning_outcome_index?: number;
341
+ position_details?: {
342
+ position_id: string;
343
+ outcome_index: number;
344
+ outcome?: string;
345
+ amount: string;
346
+ }[];
347
+ /**
348
+ * @description Exchange contract that processed the event
349
+ * @enum {string}
350
+ */
351
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
352
+ /** @enum {string} */
353
+ trade_type: "Redemption";
354
+ } | {
355
+ id: string;
356
+ hash: string;
357
+ /** Format: int64 */
358
+ block: number;
359
+ /** Format: int64 */
360
+ confirmed_at: number;
361
+ /** Format: int64 */
362
+ log_index: number;
363
+ /** Format: int64 */
364
+ block_index: number;
365
+ trader: {
366
+ address: string;
367
+ name: string | null;
368
+ pseudonym: string | null;
369
+ profile_image: string | null;
370
+ x_username: string | null;
371
+ verified_badge: boolean;
372
+ };
373
+ condition_id: string | null;
374
+ question?: string;
375
+ image_url?: string;
376
+ slug?: string;
377
+ event_slug?: string;
378
+ usd_amount: number;
379
+ position_details?: {
380
+ position_id: string;
381
+ outcome_index: number;
382
+ outcome?: string;
383
+ amount: string;
384
+ }[];
385
+ /**
386
+ * @description Exchange contract that processed the event
387
+ * @enum {string}
388
+ */
389
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
390
+ /** @enum {string} */
391
+ trade_type: "Merge";
392
+ } | {
393
+ id: string;
394
+ hash: string;
395
+ /** Format: int64 */
396
+ block: number;
397
+ /** Format: int64 */
398
+ confirmed_at: number;
399
+ /** Format: int64 */
400
+ log_index: number;
401
+ /** Format: int64 */
402
+ block_index: number;
403
+ trader: {
404
+ address: string;
405
+ name: string | null;
406
+ pseudonym: string | null;
407
+ profile_image: string | null;
408
+ x_username: string | null;
409
+ verified_badge: boolean;
410
+ };
411
+ condition_id: string | null;
412
+ question?: string;
413
+ image_url?: string;
414
+ slug?: string;
415
+ event_slug?: string;
416
+ usd_amount: number;
417
+ position_details?: {
418
+ position_id: string;
419
+ outcome_index: number;
420
+ outcome?: string;
421
+ amount: string;
422
+ }[];
423
+ /**
424
+ * @description Exchange contract that processed the event
425
+ * @enum {string}
426
+ */
427
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
428
+ /** @enum {string} */
429
+ trade_type: "Split";
430
+ } | {
431
+ id: string;
432
+ hash: string;
433
+ /** Format: int64 */
434
+ block: number;
435
+ /** Format: int64 */
436
+ confirmed_at: number;
437
+ /** Format: int64 */
438
+ log_index: number;
439
+ /** Format: int64 */
440
+ block_index: number;
441
+ trader: {
442
+ address: string;
443
+ name: string | null;
444
+ pseudonym: string | null;
445
+ profile_image: string | null;
446
+ x_username: string | null;
447
+ verified_badge: boolean;
448
+ };
449
+ market_id: string;
450
+ index_set: string;
451
+ shares_amount: number;
452
+ /**
453
+ * @description Exchange contract that processed the event
454
+ * @enum {string}
455
+ */
456
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
457
+ /** @enum {string} */
458
+ trade_type: "PositionsConverted";
459
+ } | {
460
+ id: string;
461
+ hash: string;
462
+ /** Format: int64 */
463
+ block: number;
464
+ /** Format: int64 */
465
+ confirmed_at: number;
466
+ /** Format: int64 */
467
+ log_index: number;
468
+ /** Format: int64 */
469
+ block_index: number;
470
+ order_hash: string;
471
+ question?: string;
472
+ image_url?: string;
473
+ slug?: string;
474
+ event_slug?: string;
475
+ /**
476
+ * @description Exchange contract that processed the event
477
+ * @enum {string}
478
+ */
479
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
480
+ /** @enum {string} */
481
+ trade_type: "Cancelled";
482
+ } | {
483
+ id: string;
484
+ hash: string;
485
+ /** Format: int64 */
486
+ block: number;
487
+ /** Format: int64 */
488
+ confirmed_at: number;
489
+ /** Format: int64 */
490
+ log_index: number;
491
+ /** Format: int64 */
492
+ block_index: number;
493
+ oracle_contract: string;
494
+ condition_id: string;
495
+ creator: string;
496
+ reward_token: string;
497
+ reward: string;
498
+ proposal_bond: string;
499
+ question?: string;
500
+ image_url?: string;
501
+ slug?: string;
502
+ event_slug?: string;
503
+ /** @enum {string} */
504
+ trade_type: "Initialization";
505
+ } | {
506
+ id: string;
507
+ hash: string;
508
+ /** Format: int64 */
509
+ block: number;
510
+ /** Format: int64 */
511
+ confirmed_at: number;
512
+ /** Format: int64 */
513
+ log_index: number;
514
+ /** Format: int64 */
515
+ block_index: number;
516
+ oracle_contract: string;
517
+ condition_id: string;
518
+ assertion_id: string;
519
+ domain_id: string;
520
+ claim: string;
521
+ asserter: string;
522
+ callback_recipient: string;
523
+ escalation_manager: string;
524
+ caller: string;
525
+ /** Format: int64 */
526
+ expiration_time: number;
527
+ currency: string;
528
+ bond: string;
529
+ identifier: string;
530
+ proposed_outcome?: string;
531
+ question?: string;
532
+ image_url?: string;
533
+ slug?: string;
534
+ event_slug?: string;
535
+ /** @enum {string} */
536
+ trade_type: "Proposal";
537
+ } | {
538
+ id: string;
539
+ hash: string;
540
+ /** Format: int64 */
541
+ block: number;
542
+ /** Format: int64 */
543
+ confirmed_at: number;
544
+ /** Format: int64 */
545
+ log_index: number;
546
+ /** Format: int64 */
547
+ block_index: number;
548
+ oracle_contract: string;
549
+ condition_id: string;
550
+ assertion_id: string;
551
+ caller: string;
552
+ disputer: string;
553
+ question?: string;
554
+ image_url?: string;
555
+ slug?: string;
556
+ event_slug?: string;
557
+ /** @enum {string} */
558
+ trade_type: "Dispute";
559
+ } | {
560
+ id: string;
561
+ hash: string;
562
+ /** Format: int64 */
563
+ block: number;
564
+ /** Format: int64 */
565
+ confirmed_at: number;
566
+ /** Format: int64 */
567
+ log_index: number;
568
+ /** Format: int64 */
569
+ block_index: number;
570
+ oracle_contract: string;
571
+ condition_id: string;
572
+ assertion_id: string;
573
+ bond_recipient: string;
574
+ disputed: boolean;
575
+ settlement_resolution: boolean;
576
+ settle_caller: string;
577
+ question?: string;
578
+ image_url?: string;
579
+ slug?: string;
580
+ event_slug?: string;
581
+ /** @enum {string} */
582
+ trade_type: "Settled";
583
+ } | {
584
+ id: string;
585
+ hash: string;
586
+ /** Format: int64 */
587
+ block: number;
588
+ /** Format: int64 */
589
+ confirmed_at: number;
590
+ /** Format: int64 */
591
+ log_index: number;
592
+ /** Format: int64 */
593
+ block_index: number;
594
+ oracle_contract: string;
595
+ condition_id: string;
596
+ /** Format: int64 */
597
+ settled_price: number;
598
+ proposed_outcome?: string;
599
+ question?: string;
600
+ image_url?: string;
601
+ slug?: string;
602
+ event_slug?: string;
603
+ /** @enum {string} */
604
+ trade_type: "Resolution";
605
+ } | {
606
+ id: string;
607
+ hash: string;
608
+ /** Format: int64 */
609
+ block: number;
610
+ /** Format: int64 */
611
+ confirmed_at: number;
612
+ /** Format: int64 */
613
+ log_index: number;
614
+ /** Format: int64 */
615
+ block_index: number;
616
+ oracle_contract: string;
617
+ condition_id: string;
618
+ oracle: string;
619
+ proposed_outcome?: string;
620
+ question?: string;
621
+ image_url?: string;
622
+ slug?: string;
623
+ event_slug?: string;
624
+ /** @enum {string} */
625
+ trade_type: "ConditionResolution";
626
+ } | {
627
+ id: string;
628
+ hash: string;
629
+ /** Format: int64 */
630
+ block: number;
631
+ /** Format: int64 */
632
+ confirmed_at: number;
633
+ /** Format: int64 */
634
+ log_index: number;
635
+ /** Format: int64 */
636
+ block_index: number;
637
+ oracle_contract: string;
638
+ condition_id: string;
639
+ question?: string;
640
+ image_url?: string;
641
+ slug?: string;
642
+ event_slug?: string;
643
+ /** @enum {string} */
644
+ trade_type: "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause";
645
+ } | {
646
+ id: string;
647
+ hash: string;
648
+ /** Format: int64 */
649
+ block: number;
650
+ /** Format: int64 */
651
+ confirmed_at: number;
652
+ /** Format: int64 */
653
+ log_index: number;
654
+ /** Format: int64 */
655
+ block_index: number;
656
+ oracle_contract: string;
657
+ condition_id: string;
658
+ proposed_outcome?: string;
659
+ question?: string;
660
+ image_url?: string;
661
+ slug?: string;
662
+ event_slug?: string;
663
+ /** @enum {string} */
664
+ trade_type: "ManualResolution";
665
+ } | {
666
+ id: string;
667
+ hash: string;
668
+ /** Format: int64 */
669
+ block: number;
670
+ /** Format: int64 */
671
+ confirmed_at: number;
672
+ /** Format: int64 */
673
+ log_index: number;
674
+ /** Format: int64 */
675
+ block_index: number;
676
+ oracle_contract: string;
677
+ condition_id: string;
678
+ proposed_outcome?: string;
679
+ question?: string;
680
+ image_url?: string;
681
+ slug?: string;
682
+ event_slug?: string;
683
+ /** @enum {string} */
684
+ trade_type: "NegRiskOutcomeReported";
685
+ } | {
686
+ id: string;
687
+ hash: string;
688
+ /** Format: int64 */
689
+ block: number;
690
+ /** Format: int64 */
691
+ confirmed_at: number;
692
+ /** Format: int64 */
693
+ log_index: number;
694
+ /** Format: int64 */
695
+ block_index: number;
696
+ condition_id: string;
697
+ token0: string;
698
+ token1: string;
699
+ question?: string;
700
+ image_url?: string;
701
+ slug?: string;
702
+ event_slug?: string;
703
+ /**
704
+ * @description Exchange contract that processed the event
705
+ * @enum {string}
706
+ */
707
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
708
+ /** @enum {string} */
709
+ trade_type: "RegisterToken";
710
+ } | {
711
+ id: string;
712
+ hash: string;
713
+ /** Format: int64 */
714
+ block: number;
715
+ /** Format: int64 */
716
+ confirmed_at: number;
717
+ /** Format: int64 */
718
+ log_index: number;
719
+ /** Format: int64 */
720
+ block_index: number;
721
+ trader: {
722
+ address: string;
723
+ name: string | null;
724
+ pseudonym: string | null;
725
+ profile_image: string | null;
726
+ x_username: string | null;
727
+ verified_badge: boolean;
728
+ };
729
+ operator: string;
730
+ approved: boolean;
731
+ question?: string;
732
+ image_url?: string;
733
+ slug?: string;
734
+ event_slug?: string;
735
+ /**
736
+ * @description Exchange contract that processed the event
737
+ * @enum {string}
738
+ */
739
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
740
+ /** @enum {string} */
741
+ trade_type: "Approval";
242
742
  };
243
743
  /** @description Payload delivered when a trader's global PnL (across all markets) crosses a configured threshold */
244
744
  GlobalPnlPayload: {
@@ -434,8 +934,11 @@ export interface components {
434
934
  ConditionMetricsPayload: {
435
935
  /** @description Market condition ID */
436
936
  condition_id?: string | null;
437
- /** @description Aggregation window (e.g. "1h", "24h") */
438
- timeframe?: string | null;
937
+ /**
938
+ * @description Aggregation window
939
+ * @enum {string|null}
940
+ */
941
+ timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
439
942
  /** @description Total trading volume in USD for this timeframe */
440
943
  volume_usd?: number | null;
441
944
  /** @description Total fees collected in USD */
@@ -455,8 +958,11 @@ export interface components {
455
958
  EventMetricsPayload: {
456
959
  /** @description Event slug */
457
960
  event_slug?: string | null;
458
- /** @description Aggregation window (e.g. "1h", "24h") */
459
- timeframe?: string | null;
961
+ /**
962
+ * @description Aggregation window
963
+ * @enum {string|null}
964
+ */
965
+ timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
460
966
  /** @description Total aggregated volume across all markets in the event (USD) */
461
967
  volume_usd?: number | null;
462
968
  /** @description Total fees collected in USD */
@@ -483,8 +989,11 @@ export interface components {
483
989
  * @description Outcome index
484
990
  */
485
991
  outcome_index?: number | null;
486
- /** @description Aggregation window (e.g. "1h", "24h") */
487
- timeframe?: string | null;
992
+ /**
993
+ * @description Aggregation window
994
+ * @enum {string|null}
995
+ */
996
+ timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
488
997
  /** @description Total trading volume in USD */
489
998
  volume_usd?: number | null;
490
999
  /** @description Buy volume in USD */
@@ -514,8 +1023,11 @@ export interface components {
514
1023
  VolumeMilestonePayload: {
515
1024
  /** @description Market condition ID */
516
1025
  condition_id: string;
517
- /** @description Aggregation window that crossed the milestone (e.g. "1h", "24h") */
518
- timeframe: string;
1026
+ /**
1027
+ * @description Aggregation window that crossed the milestone
1028
+ * @enum {string}
1029
+ */
1030
+ timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
519
1031
  /** @description The USD milestone amount that was crossed */
520
1032
  milestone_usd: number;
521
1033
  /** @description Current volume at time of trigger (USD) */
@@ -532,8 +1044,11 @@ export interface components {
532
1044
  EventVolumeMilestonePayload: {
533
1045
  /** @description Event slug */
534
1046
  event_slug: string;
535
- /** @description Aggregation window (e.g. "1h", "24h") */
536
- timeframe: string;
1047
+ /**
1048
+ * @description Aggregation window
1049
+ * @enum {string}
1050
+ */
1051
+ timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
537
1052
  /** @description The USD milestone amount that was crossed */
538
1053
  milestone_usd: number;
539
1054
  /** @description Current aggregated event volume at time of trigger (USD) */
@@ -559,8 +1074,11 @@ export interface components {
559
1074
  * @description Outcome index
560
1075
  */
561
1076
  outcome_index?: number | null;
562
- /** @description Aggregation window (e.g. "1h", "24h") */
563
- timeframe: string;
1077
+ /**
1078
+ * @description Aggregation window
1079
+ * @enum {string}
1080
+ */
1081
+ timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
564
1082
  /** @description The USD milestone amount that was crossed */
565
1083
  milestone_usd: number;
566
1084
  /** @description Current position volume at time of trigger (USD) */
@@ -634,8 +1152,11 @@ export interface components {
634
1152
  MarketVolumeSpikePayload: {
635
1153
  /** @description Market condition ID */
636
1154
  condition_id: string;
637
- /** @description Aggregation window (e.g. "1h", "24h") */
638
- timeframe: string;
1155
+ /**
1156
+ * @description Aggregation window
1157
+ * @enum {string}
1158
+ */
1159
+ timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
639
1160
  /** @description Current volume at the time of the spike (USD) */
640
1161
  current_volume_usd: number;
641
1162
  /** @description Volume at the snapshot baseline (USD) */
@@ -656,8 +1177,11 @@ export interface components {
656
1177
  EventVolumeSpikePayload: {
657
1178
  /** @description Event slug */
658
1179
  event_slug: string;
659
- /** @description Aggregation window (e.g. "1h", "24h") */
660
- timeframe: string;
1180
+ /**
1181
+ * @description Aggregation window
1182
+ * @enum {string}
1183
+ */
1184
+ timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
661
1185
  /** @description Current aggregated event volume at time of the spike (USD) */
662
1186
  current_volume_usd: number;
663
1187
  /** @description Volume at the snapshot baseline (USD) */
@@ -680,8 +1204,11 @@ export interface components {
680
1204
  outcome?: string | null;
681
1205
  /** Format: int16 */
682
1206
  outcome_index?: number | null;
683
- /** @description Aggregation window (e.g. "1h", "24h") */
684
- timeframe: string;
1207
+ /**
1208
+ * @description Aggregation window
1209
+ * @enum {string}
1210
+ */
1211
+ timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
685
1212
  /** @description Current position volume at the time of the spike (USD) */
686
1213
  current_volume_usd: number;
687
1214
  /** @description Volume at the snapshot baseline (USD) */
@@ -852,6 +1379,12 @@ export interface components {
852
1379
  condition_ids?: string[];
853
1380
  /** @description Restrict to markets belonging to these events. */
854
1381
  event_slugs?: string[];
1382
+ /** @description Minimum trade size in USD. Omit to match all sizes. */
1383
+ min_usd_value?: number;
1384
+ /** @description Only fire when the outcome probability is ≥ this value. */
1385
+ min_probability?: number;
1386
+ /** @description Only fire when the outcome probability is ≤ this value. */
1387
+ max_probability?: number;
855
1388
  /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
856
1389
  exclude_shortterm_markets?: boolean;
857
1390
  };
@@ -886,9 +1419,30 @@ export interface components {
886
1419
  min_probability?: number;
887
1420
  /** @description Only fire when outcome probability is ≤ this value. */
888
1421
  max_probability?: number;
1422
+ /** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
1423
+ trade_types?: ("OrderFilled" | "OrdersMatched")[];
889
1424
  /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
890
1425
  exclude_shortterm_markets?: boolean;
891
1426
  };
1427
+ /** @description Subscription filters for the `trade_event` event. All fields are optional. `event_slugs` and `exclude_shortterm_markets` require explicit `trade_types` that exclude `PositionsConverted`, because conversion events do not currently carry `event_slug` in the typed webhook payload. */
1428
+ TradeEventFilters: {
1429
+ /** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
1430
+ wallet_addresses?: string[];
1431
+ /** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
1432
+ condition_ids?: string[];
1433
+ /** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
1434
+ event_slugs?: string[];
1435
+ /** @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events). */
1436
+ min_usd_value?: number;
1437
+ /** @description Only fire when event probability is ≥ this value. Events without probability data do not match. */
1438
+ min_probability?: number;
1439
+ /** @description Only fire when event probability is ≤ this value. Events without probability data do not match. */
1440
+ max_probability?: number;
1441
+ /** @description Only fire for these trade types currently emitted through the webhook pipeline. Empty = all supported trade-event variants. */
1442
+ trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[];
1443
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
1444
+ exclude_shortterm_markets?: boolean;
1445
+ };
892
1446
  /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
893
1447
  TraderGlobalPnlFilters: {
894
1448
  /** @description Track only these trader wallet addresses. Empty = all traders. */
@@ -972,8 +1526,6 @@ export interface components {
972
1526
  MarketMetricsFilters: {
973
1527
  /** @description Restrict to these markets. Empty = all markets. */
974
1528
  condition_ids?: string[];
975
- /** @description Restrict to markets in these events. */
976
- event_slugs?: string[];
977
1529
  /** @description Restrict to these aggregation windows. Empty = all windows. */
978
1530
  timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
979
1531
  /** @description Only fire when volume ≥ this value (USD). */
@@ -1172,8 +1724,6 @@ export interface components {
1172
1724
  MarketCreatedFilters: {
1173
1725
  /** @description Restrict to markets with these tags or category names (case-insensitive match). */
1174
1726
  tags?: string[];
1175
- /** @description Restrict to these specific markets. */
1176
- condition_ids?: string[];
1177
1727
  /** @description Restrict to markets belonging to these events. */
1178
1728
  event_slugs?: string[];
1179
1729
  /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
@@ -1195,7 +1745,7 @@ export interface components {
1195
1745
  * @description All alert event types supported by both HTTP webhooks and the alerts WebSocket.
1196
1746
  * @enum {string}
1197
1747
  */
1198
- WsAlertEventType: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_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" | "price_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update";
1748
+ WsAlertEventType: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "price_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update";
1199
1749
  /** @description Server acknowledgement for a successful alert subscription. */
1200
1750
  WsAlertSubscribedResponse: {
1201
1751
  /** @enum {string} */
@@ -1481,6 +2031,80 @@ export interface components {
1481
2031
  timestamp: number;
1482
2032
  data: components["schemas"]["NewTradePayload"];
1483
2033
  };
2034
+ WsAlertTradeEventSubscribeMessage: {
2035
+ /** @enum {string} */
2036
+ op: "subscribe";
2037
+ /** @enum {string} */
2038
+ event: "trade_event";
2039
+ } & components["schemas"]["TradeEventFilters"] & {
2040
+ /**
2041
+ * @description discriminator enum property added by openapi-typescript
2042
+ * @enum {string}
2043
+ */
2044
+ event: "trade_event";
2045
+ };
2046
+ WsAlertTradeEventUnsubscribeMessage: {
2047
+ /** @enum {string} */
2048
+ op: "unsubscribe";
2049
+ /** @enum {string} */
2050
+ event: "trade_event";
2051
+ } & components["schemas"]["TradeEventFilters"] & {
2052
+ /**
2053
+ * @description discriminator enum property added by openapi-typescript
2054
+ * @enum {string}
2055
+ */
2056
+ event: "trade_event";
2057
+ };
2058
+ /**
2059
+ * @description Pushed `trade_event` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
2060
+ * @example {
2061
+ * "event": "trade_event",
2062
+ * "timestamp": 1743500000000,
2063
+ * "data": {
2064
+ * "trade_type": "OrderFilled",
2065
+ * "id": "00000000-0000-0000-0000-000000000000",
2066
+ * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
2067
+ * "block": 65000000,
2068
+ * "confirmed_at": 1700000000,
2069
+ * "log_index": 0,
2070
+ * "block_index": 0,
2071
+ * "order_hash": "0x1111111111111111111111111111111111111111111111111111111111111111",
2072
+ * "trader": {
2073
+ * "address": "0x0000000000000000000000000000000000000000"
2074
+ * },
2075
+ * "taker": "0x0000000000000000000000000000000000000000",
2076
+ * "side": "Buy",
2077
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
2078
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656",
2079
+ * "outcome": "Yes",
2080
+ * "outcome_index": 0,
2081
+ * "question": "Will this typed trade-event webhook fire correctly?",
2082
+ * "slug": "test-market-0000000000",
2083
+ * "event_slug": "test-event-0000000000",
2084
+ * "usd_amount": 25,
2085
+ * "shares_amount": 50,
2086
+ * "price": 0.5,
2087
+ * "probability": 0.5,
2088
+ * "fee": 0.025,
2089
+ * "fee_shares": 0,
2090
+ * "fee_pct": 0.1,
2091
+ * "exchange": "CTFExchange"
2092
+ * }
2093
+ * }
2094
+ */
2095
+ WsAlertTradeEventEvent: {
2096
+ /**
2097
+ * @description discriminator enum property added by openapi-typescript
2098
+ * @enum {string}
2099
+ */
2100
+ event: "trade_event";
2101
+ /**
2102
+ * Format: int64
2103
+ * @description Unix timestamp in milliseconds
2104
+ */
2105
+ timestamp: number;
2106
+ data: components["schemas"]["WebhookTradeEventPayload"];
2107
+ };
1484
2108
  WsAlertTraderGlobalPnlSubscribeMessage: {
1485
2109
  /** @enum {string} */
1486
2110
  op: "subscribe";
@@ -2534,11 +3158,11 @@ export interface components {
2534
3158
  data: components["schemas"]["AssetPriceWindowUpdatePayload"];
2535
3159
  };
2536
3160
  /** @description Typed subscribe request for the alerts WebSocket. The request shape depends on `event` and reuses the matching webhook filter schema. */
2537
- WsAlertSubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketSubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderGlobalPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderMarketPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderEventPnlSubscribeMessage"] | components["schemas"]["WsAlertConditionMetricsSubscribeMessage"] | components["schemas"]["WsAlertEventMetricsSubscribeMessage"] | components["schemas"]["WsAlertPositionMetricsSubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertEventVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertProbabilitySpikeSubscribeMessage"] | components["schemas"]["WsAlertPriceSpikeSubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertEventVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertCloseToBondSubscribeMessage"] | components["schemas"]["WsAlertMarketCreatedSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateSubscribeMessage"];
3161
+ WsAlertSubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketSubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeSubscribeMessage"] | components["schemas"]["WsAlertTradeEventSubscribeMessage"] | components["schemas"]["WsAlertTraderGlobalPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderMarketPnlSubscribeMessage"] | components["schemas"]["WsAlertTraderEventPnlSubscribeMessage"] | components["schemas"]["WsAlertConditionMetricsSubscribeMessage"] | components["schemas"]["WsAlertEventMetricsSubscribeMessage"] | components["schemas"]["WsAlertPositionMetricsSubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertEventVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeMilestoneSubscribeMessage"] | components["schemas"]["WsAlertProbabilitySpikeSubscribeMessage"] | components["schemas"]["WsAlertPriceSpikeSubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertEventVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeSpikeSubscribeMessage"] | components["schemas"]["WsAlertCloseToBondSubscribeMessage"] | components["schemas"]["WsAlertMarketCreatedSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateSubscribeMessage"];
2538
3162
  /** @description Typed unsubscribe request for the alerts WebSocket. The request shape depends on `event` and must match the original subscription filters. */
2539
- WsAlertUnsubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketUnsubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderGlobalPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderMarketPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderEventPnlUnsubscribeMessage"] | components["schemas"]["WsAlertConditionMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertEventMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertPositionMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertEventVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertProbabilitySpikeUnsubscribeMessage"] | components["schemas"]["WsAlertPriceSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertEventVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertCloseToBondUnsubscribeMessage"] | components["schemas"]["WsAlertMarketCreatedUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateUnsubscribeMessage"];
3163
+ WsAlertUnsubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketUnsubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTradeEventUnsubscribeMessage"] | components["schemas"]["WsAlertTraderGlobalPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderMarketPnlUnsubscribeMessage"] | components["schemas"]["WsAlertTraderEventPnlUnsubscribeMessage"] | components["schemas"]["WsAlertConditionMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertEventMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertPositionMetricsUnsubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertEventVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeMilestoneUnsubscribeMessage"] | components["schemas"]["WsAlertProbabilitySpikeUnsubscribeMessage"] | components["schemas"]["WsAlertPriceSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertMarketVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertEventVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertPositionVolumeSpikeUnsubscribeMessage"] | components["schemas"]["WsAlertCloseToBondUnsubscribeMessage"] | components["schemas"]["WsAlertMarketCreatedUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateUnsubscribeMessage"];
2540
3164
  /** @description Typed pushed-event envelope for the alerts WebSocket. The `data` payload depends on `event` and matches the corresponding HTTP webhook payload schema. */
2541
- WsAlertEventPayload: components["schemas"]["WsAlertTraderFirstTradeEvent"] | components["schemas"]["WsAlertTraderNewMarketEvent"] | components["schemas"]["WsAlertTraderWhaleTradeEvent"] | components["schemas"]["WsAlertTraderNewTradeEvent"] | components["schemas"]["WsAlertTraderGlobalPnlEvent"] | components["schemas"]["WsAlertTraderMarketPnlEvent"] | components["schemas"]["WsAlertTraderEventPnlEvent"] | components["schemas"]["WsAlertConditionMetricsEvent"] | components["schemas"]["WsAlertEventMetricsEvent"] | components["schemas"]["WsAlertPositionMetricsEvent"] | components["schemas"]["WsAlertMarketVolumeMilestoneEvent"] | components["schemas"]["WsAlertEventVolumeMilestoneEvent"] | components["schemas"]["WsAlertPositionVolumeMilestoneEvent"] | components["schemas"]["WsAlertProbabilitySpikeEvent"] | components["schemas"]["WsAlertPriceSpikeEvent"] | components["schemas"]["WsAlertMarketVolumeSpikeEvent"] | components["schemas"]["WsAlertEventVolumeSpikeEvent"] | components["schemas"]["WsAlertPositionVolumeSpikeEvent"] | components["schemas"]["WsAlertCloseToBondEvent"] | components["schemas"]["WsAlertMarketCreatedEvent"] | components["schemas"]["WsAlertAssetPriceTickEvent"] | components["schemas"]["WsAlertAssetPriceWindowUpdateEvent"];
3165
+ WsAlertEventPayload: components["schemas"]["WsAlertTraderFirstTradeEvent"] | components["schemas"]["WsAlertTraderNewMarketEvent"] | components["schemas"]["WsAlertTraderWhaleTradeEvent"] | components["schemas"]["WsAlertTraderNewTradeEvent"] | components["schemas"]["WsAlertTradeEventEvent"] | components["schemas"]["WsAlertTraderGlobalPnlEvent"] | components["schemas"]["WsAlertTraderMarketPnlEvent"] | components["schemas"]["WsAlertTraderEventPnlEvent"] | components["schemas"]["WsAlertConditionMetricsEvent"] | components["schemas"]["WsAlertEventMetricsEvent"] | components["schemas"]["WsAlertPositionMetricsEvent"] | components["schemas"]["WsAlertMarketVolumeMilestoneEvent"] | components["schemas"]["WsAlertEventVolumeMilestoneEvent"] | components["schemas"]["WsAlertPositionVolumeMilestoneEvent"] | components["schemas"]["WsAlertProbabilitySpikeEvent"] | components["schemas"]["WsAlertPriceSpikeEvent"] | components["schemas"]["WsAlertMarketVolumeSpikeEvent"] | components["schemas"]["WsAlertEventVolumeSpikeEvent"] | components["schemas"]["WsAlertPositionVolumeSpikeEvent"] | components["schemas"]["WsAlertCloseToBondEvent"] | components["schemas"]["WsAlertMarketCreatedEvent"] | components["schemas"]["WsAlertAssetPriceTickEvent"] | components["schemas"]["WsAlertAssetPriceWindowUpdateEvent"];
2542
3166
  };
2543
3167
  responses: never;
2544
3168
  parameters: never;
@@ -2553,6 +3177,7 @@ export interface WsAlertSubscribeMap {
2553
3177
  trader_new_market: components["schemas"]["WsAlertTraderNewMarketSubscribeMessage"];
2554
3178
  trader_whale_trade: components["schemas"]["WsAlertTraderWhaleTradeSubscribeMessage"];
2555
3179
  trader_new_trade: components["schemas"]["WsAlertTraderNewTradeSubscribeMessage"];
3180
+ trade_event: components["schemas"]["WsAlertTradeEventSubscribeMessage"];
2556
3181
  trader_global_pnl: components["schemas"]["WsAlertTraderGlobalPnlSubscribeMessage"];
2557
3182
  trader_market_pnl: components["schemas"]["WsAlertTraderMarketPnlSubscribeMessage"];
2558
3183
  trader_event_pnl: components["schemas"]["WsAlertTraderEventPnlSubscribeMessage"];
@@ -2577,6 +3202,7 @@ export interface WsAlertEventDataMap {
2577
3202
  trader_new_market: components["schemas"]["NewMarketPayload"];
2578
3203
  trader_whale_trade: components["schemas"]["WhaleTradePayload"];
2579
3204
  trader_new_trade: components["schemas"]["NewTradePayload"];
3205
+ trade_event: components["schemas"]["WebhookTradeEventPayload"];
2580
3206
  trader_global_pnl: components["schemas"]["GlobalPnlPayload"];
2581
3207
  trader_market_pnl: components["schemas"]["MarketPnlPayload"];
2582
3208
  trader_event_pnl: components["schemas"]["EventPnlPayload"];