@structbuild/sdk 0.2.11 → 0.3.1

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.
@@ -0,0 +1,2599 @@
1
+ export type paths = Record<string, never>;
2
+ export type webhooks = Record<string, never>;
3
+ export interface components {
4
+ schemas: {
5
+ /** @description Outer envelope for every webhook HTTP POST delivery. The `data` field contains the event-specific payload. Delivery headers sent with every POST: `X-Webhook-ID` (subscription UUID), `X-Delivery-ID` (this attempt's UUID), `X-Event-Type` (event name string, e.g. `trader_first_trade`), `X-Attempt` (attempt number, 1-indexed). When the webhook has a secret configured, `X-Webhook-Signature: sha256=<hmac-hex>` is also included — compute HMAC-SHA256 over the raw request body using your secret to verify. */
6
+ WebhookDeliveryEnvelope: {
7
+ /**
8
+ * Format: uuid
9
+ * @description UUID of this specific delivery attempt (matches X-Delivery-ID header)
10
+ */
11
+ id: string;
12
+ /** @description Event name (e.g. `trader_first_trade`). On test deliveries the suffix `_test` is appended. */
13
+ event: string;
14
+ /** @description Event-specific payload — schema varies by event type; see the individual callback definitions */
15
+ data: Record<string, never>;
16
+ /**
17
+ * Format: int64
18
+ * @description Unix timestamp in milliseconds when this delivery was created
19
+ */
20
+ timestamp: number;
21
+ /**
22
+ * Format: uuid
23
+ * @description UUID of the webhook subscription that fired (matches X-Webhook-ID header)
24
+ */
25
+ webhook_id: string;
26
+ /** @description Delivery attempt number. 1 = first attempt; increments on each retry. */
27
+ attempt: number;
28
+ };
29
+ /** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
30
+ FirstTradePayload: {
31
+ /** @description Limit-order maker wallet address (lowercase) */
32
+ trader: string;
33
+ /** @description Order filler wallet address (lowercase) */
34
+ taker: string;
35
+ /** @description ERC-1155 outcome token ID */
36
+ position_id: string;
37
+ /** @description Parent market condition ID (0x-prefixed hex) */
38
+ condition_id?: string | null;
39
+ /** @description Outcome name (e.g. "Yes", "No") */
40
+ outcome?: string | null;
41
+ /** @description Outcome index: 0 = Yes/Up, 1 = No */
42
+ outcome_index?: number | null;
43
+ /** @description Market question text */
44
+ question?: string | null;
45
+ /** @description Market slug */
46
+ market_slug?: string | null;
47
+ /** @description Parent event slug */
48
+ event_slug?: string | null;
49
+ /** @description Unique trade identifier */
50
+ trade_id: string;
51
+ /** @description Transaction hash */
52
+ hash: string;
53
+ /**
54
+ * Format: int64
55
+ * @description Block number
56
+ */
57
+ block: number;
58
+ /**
59
+ * Format: int64
60
+ * @description Block confirmation timestamp (Unix seconds)
61
+ */
62
+ confirmed_at: number;
63
+ /** @description USD size of the trade (6 decimal places) */
64
+ amount_usd: number;
65
+ /** @description Outcome shares traded (6 decimal places) */
66
+ shares_amount: number;
67
+ /** @description Fee paid in USD (6 decimal places) */
68
+ fee: number;
69
+ /**
70
+ * @description Trade direction
71
+ * @enum {string}
72
+ */
73
+ side: "Buy" | "Sell";
74
+ /** @description Outcome token price (0.0–1.0) */
75
+ price: number;
76
+ /** @description Exchange identifier */
77
+ exchange: string;
78
+ /** @description Trade type identifier */
79
+ trade_type: string;
80
+ };
81
+ /** @description Payload delivered when a trader places their first trade in a specific market (fires once per trader+market pair) */
82
+ NewMarketPayload: {
83
+ /** @description Limit-order maker wallet address (lowercase) */
84
+ trader: string;
85
+ /** @description Order filler wallet address (lowercase) */
86
+ taker: string;
87
+ /** @description ERC-1155 outcome token ID */
88
+ position_id: string;
89
+ /** @description Parent market condition ID */
90
+ condition_id?: string | null;
91
+ /** @description Outcome name (e.g. "Yes", "No") */
92
+ outcome?: string | null;
93
+ /** @description Outcome index: 0 = Yes/Up, 1 = No */
94
+ outcome_index?: number | null;
95
+ /** @description Market question text */
96
+ question?: string | null;
97
+ /** @description Market slug */
98
+ market_slug?: string | null;
99
+ /** @description Parent event slug */
100
+ event_slug?: string | null;
101
+ /** @description Unique trade identifier */
102
+ trade_id: string;
103
+ /** @description Transaction hash */
104
+ hash: string;
105
+ /**
106
+ * Format: int64
107
+ * @description Block number
108
+ */
109
+ block: number;
110
+ /**
111
+ * Format: int64
112
+ * @description Block confirmation timestamp (Unix seconds)
113
+ */
114
+ confirmed_at: number;
115
+ /** @description USD size of the trade (6 decimal places) */
116
+ amount_usd: number;
117
+ /** @description Outcome shares traded (6 decimal places) */
118
+ shares_amount: number;
119
+ /** @description Fee paid in USD (6 decimal places) */
120
+ fee: number;
121
+ /**
122
+ * @description Trade direction
123
+ * @enum {string}
124
+ */
125
+ side: "Buy" | "Sell";
126
+ /** @description Outcome token price (0.0–1.0) */
127
+ price: number;
128
+ /** @description Implied probability (0.0–1.0); null when outcome is unknown */
129
+ probability?: number | null;
130
+ /** @description Exchange identifier */
131
+ exchange: string;
132
+ /** @description Trade type identifier */
133
+ trade_type: string;
134
+ };
135
+ /** @description Payload delivered when a trade exceeds the configured size and probability thresholds */
136
+ WhaleTradePayload: {
137
+ /** @description Limit-order maker wallet address (lowercase) */
138
+ trader: string;
139
+ /** @description Order filler wallet address (lowercase) */
140
+ taker: string;
141
+ /** @description ERC-1155 outcome token ID */
142
+ position_id: string;
143
+ /** @description Parent market condition ID */
144
+ condition_id?: string | null;
145
+ /** @description Outcome name (e.g. "Yes", "No") */
146
+ outcome?: string | null;
147
+ /** @description Outcome index: 0 = Yes/Up, 1 = No */
148
+ outcome_index?: number | null;
149
+ /** @description Market question text */
150
+ question?: string | null;
151
+ /** @description Market slug */
152
+ market_slug?: string | null;
153
+ /** @description Parent event slug */
154
+ event_slug?: string | null;
155
+ /** @description Unique trade identifier */
156
+ trade_id: string;
157
+ /** @description Transaction hash */
158
+ hash: string;
159
+ /**
160
+ * Format: int64
161
+ * @description Block number
162
+ */
163
+ block: number;
164
+ /**
165
+ * Format: int64
166
+ * @description Block confirmation timestamp (Unix seconds)
167
+ */
168
+ confirmed_at: number;
169
+ /** @description USD size of the trade (6 decimal places) */
170
+ amount_usd: number;
171
+ /** @description Outcome shares traded (6 decimal places) */
172
+ shares_amount: number;
173
+ /** @description Fee paid in USD (6 decimal places) */
174
+ fee: number;
175
+ /**
176
+ * @description Trade direction
177
+ * @enum {string}
178
+ */
179
+ side: "Buy" | "Sell";
180
+ /** @description Outcome token price (0.0–1.0) */
181
+ price: number;
182
+ /** @description Implied probability (0.0–1.0); null when outcome is unknown */
183
+ probability?: number | null;
184
+ /** @description Exchange identifier */
185
+ exchange: string;
186
+ /** @description Trade type identifier */
187
+ trade_type: string;
188
+ };
189
+ /** @description Payload delivered on every order-filled trade */
190
+ NewTradePayload: {
191
+ /** @description Limit-order maker wallet address (lowercase) */
192
+ trader: string;
193
+ /** @description Order filler wallet address (lowercase) */
194
+ taker: string;
195
+ /** @description ERC-1155 outcome token ID */
196
+ position_id: string;
197
+ /** @description Parent market condition ID */
198
+ condition_id?: string | null;
199
+ /** @description Outcome name (e.g. "Yes", "No") */
200
+ outcome?: string | null;
201
+ /** @description Outcome index: 0 = Yes/Up, 1 = No */
202
+ outcome_index?: number | null;
203
+ /** @description Market question text */
204
+ question?: string | null;
205
+ /** @description Market slug */
206
+ market_slug?: string | null;
207
+ /** @description Parent event slug */
208
+ event_slug?: string | null;
209
+ /** @description Unique trade identifier */
210
+ trade_id: string;
211
+ /** @description Transaction hash */
212
+ hash: string;
213
+ /**
214
+ * Format: int64
215
+ * @description Block number
216
+ */
217
+ block: number;
218
+ /**
219
+ * Format: int64
220
+ * @description Block confirmation timestamp (Unix seconds)
221
+ */
222
+ confirmed_at: number;
223
+ /** @description USD size of the trade (6 decimal places) */
224
+ amount_usd: number;
225
+ /** @description Outcome shares traded (6 decimal places) */
226
+ shares_amount: number;
227
+ /** @description Fee paid in USD (6 decimal places) */
228
+ fee: number;
229
+ /**
230
+ * @description Trade direction
231
+ * @enum {string}
232
+ */
233
+ side: "Buy" | "Sell";
234
+ /** @description Outcome token price (0.0–1.0) */
235
+ price: number;
236
+ /** @description Implied probability (0.0–1.0); null when outcome is unknown */
237
+ probability?: number | null;
238
+ /** @description Exchange identifier */
239
+ exchange: string;
240
+ /** @description Trade type identifier */
241
+ trade_type: string;
242
+ };
243
+ /** @description Payload delivered when a trader's global PnL (across all markets) crosses a configured threshold */
244
+ GlobalPnlPayload: {
245
+ /** @description Trader wallet address (lowercase) */
246
+ trader?: string | null;
247
+ /**
248
+ * @description PnL aggregation window
249
+ * @enum {string}
250
+ */
251
+ timeframe: "1d" | "7d" | "30d" | "lifetime";
252
+ /** @description Realized PnL in USD (positive = profit, negative = loss) */
253
+ realized_pnl_usd?: number | null;
254
+ /**
255
+ * Format: int64
256
+ * @description Number of distinct events traded
257
+ */
258
+ events_traded?: number | null;
259
+ /**
260
+ * Format: int64
261
+ * @description Number of distinct markets traded
262
+ */
263
+ markets_traded?: number | null;
264
+ /**
265
+ * Format: int64
266
+ * @description Total buy transactions
267
+ */
268
+ total_buys?: number | null;
269
+ /**
270
+ * Format: int64
271
+ * @description Total sell transactions
272
+ */
273
+ total_sells?: number | null;
274
+ /**
275
+ * Format: int64
276
+ * @description Total redemption transactions
277
+ */
278
+ total_redemptions?: number | null;
279
+ /**
280
+ * Format: int64
281
+ * @description Total merge transactions
282
+ */
283
+ total_merges?: number | null;
284
+ /** @description Total USD volume (buys + sells + redemptions + merges) */
285
+ total_volume_usd?: number | null;
286
+ /** @description Total buy volume in USD */
287
+ buy_volume_usd?: number | null;
288
+ /** @description Total sell volume in USD */
289
+ sell_volume_usd?: number | null;
290
+ /** @description Total redemption volume in USD */
291
+ redemption_volume_usd?: number | null;
292
+ /** @description Total merge volume in USD */
293
+ merge_volume_usd?: number | null;
294
+ /**
295
+ * Format: int64
296
+ * @description Number of markets where trader realised a profit
297
+ */
298
+ markets_won?: number | null;
299
+ /**
300
+ * Format: int64
301
+ * @description Number of markets where trader realised a loss
302
+ */
303
+ markets_lost?: number | null;
304
+ /** @description Market win rate as a percentage (0.0–100.0) */
305
+ market_win_rate_pct?: number | null;
306
+ /** @description Average PnL per market in USD */
307
+ avg_pnl_per_market?: number | null;
308
+ /** @description Average PnL per trade in USD */
309
+ avg_pnl_per_trade?: number | null;
310
+ /** @description Average hold time across all positions (seconds) */
311
+ avg_hold_time_seconds?: number | null;
312
+ /** @description Total fees paid in USD */
313
+ total_fees?: number | null;
314
+ /** @description Best single-trade PnL in USD */
315
+ best_trade_pnl_usd?: number | null;
316
+ /** @description Condition ID of the best trade */
317
+ best_trade_condition_id?: string | null;
318
+ /**
319
+ * Format: int64
320
+ * @description Timestamp of the first trade (Unix seconds)
321
+ */
322
+ first_trade_at?: number | null;
323
+ /**
324
+ * Format: int64
325
+ * @description Timestamp of the most recent trade (Unix seconds)
326
+ */
327
+ last_trade_at?: number | null;
328
+ };
329
+ /** @description Payload delivered when a trader's per-market PnL crosses a configured threshold */
330
+ MarketPnlPayload: {
331
+ /** @description Trader wallet address (lowercase) */
332
+ trader?: string | null;
333
+ /** @description Market condition ID */
334
+ condition_id?: string | null;
335
+ /** @description Parent event slug */
336
+ event_slug?: string | null;
337
+ /**
338
+ * @description PnL aggregation window
339
+ * @enum {string}
340
+ */
341
+ timeframe: "1d" | "7d" | "30d" | "lifetime";
342
+ /**
343
+ * Format: int64
344
+ * @description Number of distinct outcomes traded in this market
345
+ */
346
+ outcomes_traded?: number | null;
347
+ /** Format: int64 */
348
+ total_buys?: number | null;
349
+ /** Format: int64 */
350
+ total_sells?: number | null;
351
+ /** Format: int64 */
352
+ total_redemptions?: number | null;
353
+ /** Format: int64 */
354
+ total_merges?: number | null;
355
+ /** @description Total buy volume in USD */
356
+ buy_usd?: number | null;
357
+ /** @description Total sell volume in USD */
358
+ sell_usd?: number | null;
359
+ /** @description Total redemption volume in USD */
360
+ redemption_usd?: number | null;
361
+ /** @description Total merge volume in USD */
362
+ merge_usd?: number | null;
363
+ /** @description Realized PnL in USD for this market */
364
+ realized_pnl_usd?: number | null;
365
+ /**
366
+ * Format: int64
367
+ * @description Number of outcomes with positive PnL
368
+ */
369
+ winning_outcomes?: number | null;
370
+ /** @description Total fees paid in USD for this market */
371
+ total_fees?: number | null;
372
+ /**
373
+ * Format: int64
374
+ * @description Timestamp of first trade in market (Unix seconds)
375
+ */
376
+ first_trade_at?: number | null;
377
+ /**
378
+ * Format: int64
379
+ * @description Timestamp of most recent trade in market (Unix seconds)
380
+ */
381
+ last_trade_at?: number | null;
382
+ };
383
+ /** @description Payload delivered when a trader's per-event PnL crosses a configured threshold */
384
+ EventPnlPayload: {
385
+ /** @description Trader wallet address (lowercase) */
386
+ trader?: string | null;
387
+ /** @description Event slug */
388
+ event_slug?: string | null;
389
+ /**
390
+ * @description PnL aggregation window
391
+ * @enum {string}
392
+ */
393
+ timeframe: "1d" | "7d" | "30d" | "lifetime";
394
+ /**
395
+ * Format: int64
396
+ * @description Number of distinct markets traded in this event
397
+ */
398
+ markets_traded?: number | null;
399
+ /** Format: int64 */
400
+ outcomes_traded?: number | null;
401
+ /** Format: int64 */
402
+ total_buys?: number | null;
403
+ /** Format: int64 */
404
+ total_sells?: number | null;
405
+ /** Format: int64 */
406
+ total_redemptions?: number | null;
407
+ /** Format: int64 */
408
+ total_merges?: number | null;
409
+ /** @description Total volume in USD */
410
+ total_volume_usd?: number | null;
411
+ buy_usd?: number | null;
412
+ sell_usd?: number | null;
413
+ redemption_usd?: number | null;
414
+ merge_usd?: number | null;
415
+ /** @description Realized PnL in USD for this event */
416
+ realized_pnl_usd?: number | null;
417
+ /** Format: int64 */
418
+ winning_markets?: number | null;
419
+ /** Format: int64 */
420
+ losing_markets?: number | null;
421
+ total_fees?: number | null;
422
+ /**
423
+ * Format: int64
424
+ * @description Unix seconds
425
+ */
426
+ first_trade_at?: number | null;
427
+ /**
428
+ * Format: int64
429
+ * @description Unix seconds
430
+ */
431
+ last_trade_at?: number | null;
432
+ };
433
+ /** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
434
+ ConditionMetricsPayload: {
435
+ /** @description Market condition ID */
436
+ condition_id?: string | null;
437
+ /** @description Aggregation window (e.g. "1h", "24h") */
438
+ timeframe?: string | null;
439
+ /** @description Total trading volume in USD for this timeframe */
440
+ volume_usd?: number | null;
441
+ /** @description Total fees collected in USD */
442
+ fees?: number | null;
443
+ /**
444
+ * Format: int64
445
+ * @description Total number of transactions
446
+ */
447
+ txns?: number | null;
448
+ /**
449
+ * Format: int64
450
+ * @description Number of unique traders
451
+ */
452
+ unique_traders?: number | null;
453
+ };
454
+ /** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
455
+ EventMetricsPayload: {
456
+ /** @description Event slug */
457
+ event_slug?: string | null;
458
+ /** @description Aggregation window (e.g. "1h", "24h") */
459
+ timeframe?: string | null;
460
+ /** @description Total aggregated volume across all markets in the event (USD) */
461
+ volume_usd?: number | null;
462
+ /** @description Total fees collected in USD */
463
+ fees?: number | null;
464
+ /**
465
+ * Format: int64
466
+ * @description Total number of transactions
467
+ */
468
+ txns?: number | null;
469
+ /**
470
+ * Format: int64
471
+ * @description Number of unique traders
472
+ */
473
+ unique_traders?: number | null;
474
+ };
475
+ /** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
476
+ PositionMetricsPayload: {
477
+ /** @description ERC-1155 outcome token ID */
478
+ position_id?: string | null;
479
+ /** @description Outcome name (e.g. "Yes", "No") */
480
+ outcome?: string | null;
481
+ /**
482
+ * Format: int16
483
+ * @description Outcome index
484
+ */
485
+ outcome_index?: number | null;
486
+ /** @description Aggregation window (e.g. "1h", "24h") */
487
+ timeframe?: string | null;
488
+ /** @description Total trading volume in USD */
489
+ volume_usd?: number | null;
490
+ /** @description Buy volume in USD */
491
+ buy_volume_usd?: number | null;
492
+ /** @description Sell volume in USD */
493
+ sell_volume_usd?: number | null;
494
+ /** @description Total fees in USD */
495
+ fees?: number | null;
496
+ /** Format: int64 */
497
+ txns?: number | null;
498
+ /** Format: int64 */
499
+ buys?: number | null;
500
+ /** Format: int64 */
501
+ sells?: number | null;
502
+ /** Format: int64 */
503
+ unique_traders?: number | null;
504
+ price_open?: number | null;
505
+ price_close?: number | null;
506
+ price_high?: number | null;
507
+ price_low?: number | null;
508
+ probability_open?: number | null;
509
+ probability_close?: number | null;
510
+ probability_high?: number | null;
511
+ probability_low?: number | null;
512
+ };
513
+ /** @description Payload delivered when a market's trading volume crosses a USD milestone in the specified timeframe */
514
+ VolumeMilestonePayload: {
515
+ /** @description Market condition ID */
516
+ condition_id: string;
517
+ /** @description Aggregation window that crossed the milestone (e.g. "1h", "24h") */
518
+ timeframe: string;
519
+ /** @description The USD milestone amount that was crossed */
520
+ milestone_usd: number;
521
+ /** @description Current volume at time of trigger (USD) */
522
+ current_volume_usd: number;
523
+ /** @description Total fees in USD for this timeframe */
524
+ fees: number;
525
+ /**
526
+ * Format: int64
527
+ * @description Total transactions in this timeframe
528
+ */
529
+ txns: number;
530
+ };
531
+ /** @description Payload delivered when an event's aggregated trading volume crosses a USD milestone */
532
+ EventVolumeMilestonePayload: {
533
+ /** @description Event slug */
534
+ event_slug: string;
535
+ /** @description Aggregation window (e.g. "1h", "24h") */
536
+ timeframe: string;
537
+ /** @description The USD milestone amount that was crossed */
538
+ milestone_usd: number;
539
+ /** @description Current aggregated event volume at time of trigger (USD) */
540
+ current_volume_usd: number;
541
+ /** @description Total fees in USD for this timeframe */
542
+ fees: number;
543
+ /**
544
+ * Format: int64
545
+ * @description Total transactions in this timeframe
546
+ */
547
+ txns: number;
548
+ };
549
+ /** @description Payload delivered when a position's trading volume crosses a USD milestone */
550
+ PositionVolumeMilestonePayload: {
551
+ /** @description Parent market condition ID */
552
+ condition_id?: string | null;
553
+ /** @description ERC-1155 outcome token ID */
554
+ position_id: string;
555
+ /** @description Outcome name (e.g. "Yes", "No") */
556
+ outcome?: string | null;
557
+ /**
558
+ * Format: int16
559
+ * @description Outcome index
560
+ */
561
+ outcome_index?: number | null;
562
+ /** @description Aggregation window (e.g. "1h", "24h") */
563
+ timeframe: string;
564
+ /** @description The USD milestone amount that was crossed */
565
+ milestone_usd: number;
566
+ /** @description Current position volume at time of trigger (USD) */
567
+ current_volume_usd: number;
568
+ /** @description Buy volume in USD for this timeframe */
569
+ buy_volume_usd: number;
570
+ /** @description Sell volume in USD for this timeframe */
571
+ sell_volume_usd: number;
572
+ /** @description Total fees in USD */
573
+ fees: number;
574
+ /** Format: int64 */
575
+ txns: number;
576
+ /** Format: int64 */
577
+ buys: number;
578
+ /** Format: int64 */
579
+ sells: number;
580
+ };
581
+ ProbabilitySpikePayload: {
582
+ /** @description Outcome token ID */
583
+ position_id: string;
584
+ /** @description Market condition ID */
585
+ condition_id?: string | null;
586
+ /** @description Event slug */
587
+ event_slug?: string | null;
588
+ /** @description Outcome name (e.g. "Yes", "No") */
589
+ outcome?: string | null;
590
+ /**
591
+ * Format: int16
592
+ * @description Outcome index
593
+ */
594
+ outcome_index?: number | null;
595
+ /** @description Probability at the start of the observation window (baseline snapshot, 0.0–1.0) */
596
+ previous_probability: number;
597
+ /** @description Current probability that triggered the spike (0.0–1.0) */
598
+ current_probability: number;
599
+ /**
600
+ * @description `"up"` = probability rising, `"down"` = probability falling
601
+ * @enum {string}
602
+ */
603
+ spike_direction: "up" | "down";
604
+ /** @description Percentage move that triggered this notification. Positive = up, negative = down. */
605
+ spike_pct: number;
606
+ };
607
+ PriceSpikePayload: {
608
+ /** @description Outcome token ID */
609
+ position_id: string;
610
+ /** @description Market condition ID */
611
+ condition_id?: string | null;
612
+ /** @description Event slug */
613
+ event_slug?: string | null;
614
+ /** @description Outcome name (e.g. "Yes", "No") */
615
+ outcome?: string | null;
616
+ /**
617
+ * Format: int16
618
+ * @description Outcome index
619
+ */
620
+ outcome_index?: number | null;
621
+ /** @description Price at the start of the observation window (baseline snapshot, 0.0–1.0) */
622
+ previous_price: number;
623
+ /** @description Current price that triggered the spike (0.0–1.0) */
624
+ current_price: number;
625
+ /**
626
+ * @description `"up"` = price rising, `"down"` = price falling
627
+ * @enum {string}
628
+ */
629
+ spike_direction: "up" | "down";
630
+ /** @description Percentage move that triggered this notification. Positive = up, negative = down. */
631
+ spike_pct: number;
632
+ };
633
+ /** @description Payload delivered when a market's volume has spiked since the last snapshot */
634
+ MarketVolumeSpikePayload: {
635
+ /** @description Market condition ID */
636
+ condition_id: string;
637
+ /** @description Aggregation window (e.g. "1h", "24h") */
638
+ timeframe: string;
639
+ /** @description Current volume at the time of the spike (USD) */
640
+ current_volume_usd: number;
641
+ /** @description Volume at the snapshot baseline (USD) */
642
+ snapshot_volume_usd: number;
643
+ /** @description New volume since the snapshot that triggered this notification (USD) */
644
+ delta_volume_usd: number;
645
+ /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
646
+ spike_pct: number;
647
+ /**
648
+ * Format: int64
649
+ * @description Total transactions in this timeframe
650
+ */
651
+ txns: number;
652
+ /** @description Total fees in USD for this timeframe */
653
+ fees: number;
654
+ };
655
+ /** @description Payload delivered when an event's aggregated volume has spiked since the last snapshot */
656
+ EventVolumeSpikePayload: {
657
+ /** @description Event slug */
658
+ event_slug: string;
659
+ /** @description Aggregation window (e.g. "1h", "24h") */
660
+ timeframe: string;
661
+ /** @description Current aggregated event volume at time of the spike (USD) */
662
+ current_volume_usd: number;
663
+ /** @description Volume at the snapshot baseline (USD) */
664
+ snapshot_volume_usd: number;
665
+ /** @description New volume since the snapshot that triggered this notification (USD) */
666
+ delta_volume_usd: number;
667
+ /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
668
+ spike_pct: number;
669
+ /** Format: int64 */
670
+ txns: number;
671
+ fees: number;
672
+ };
673
+ /** @description Payload delivered when a position's volume has spiked since the last snapshot */
674
+ PositionVolumeSpikePayload: {
675
+ /** @description ERC-1155 outcome token ID */
676
+ position_id: string;
677
+ /** @description Parent market condition ID */
678
+ condition_id: string;
679
+ /** @description Outcome name (e.g. "Yes", "No") */
680
+ outcome?: string | null;
681
+ /** Format: int16 */
682
+ outcome_index?: number | null;
683
+ /** @description Aggregation window (e.g. "1h", "24h") */
684
+ timeframe: string;
685
+ /** @description Current position volume at the time of the spike (USD) */
686
+ current_volume_usd: number;
687
+ /** @description Volume at the snapshot baseline (USD) */
688
+ snapshot_volume_usd: number;
689
+ /** @description New volume since the snapshot that triggered this notification (USD) */
690
+ delta_volume_usd: number;
691
+ /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
692
+ spike_pct: number;
693
+ /** Format: int64 */
694
+ txns: number;
695
+ fees: number;
696
+ };
697
+ /** @description Payload delivered when a trade occurs at a near-certain-outcome price */
698
+ CloseToBondPayload: {
699
+ /** @description Limit-order maker wallet address (lowercase) */
700
+ trader: string;
701
+ /** @description Order filler wallet address (lowercase) */
702
+ taker: string;
703
+ /** @description ERC-1155 outcome token ID */
704
+ position_id: string;
705
+ /** @description Parent market condition ID */
706
+ condition_id?: string | null;
707
+ /** @description Outcome name (e.g. "Yes", "No") */
708
+ outcome?: string | null;
709
+ /** @description 0 = Yes/Up, 1 = No */
710
+ outcome_index?: number | null;
711
+ question?: string | null;
712
+ market_slug?: string | null;
713
+ event_slug?: string | null;
714
+ trade_id: string;
715
+ /** @description Transaction hash */
716
+ hash: string;
717
+ /** Format: int64 */
718
+ block: number;
719
+ /**
720
+ * Format: int64
721
+ * @description Unix seconds
722
+ */
723
+ confirmed_at: number;
724
+ /** @description USD size of the trade */
725
+ amount_usd: number;
726
+ shares_amount: number;
727
+ /** @description Fee paid in USD */
728
+ fee: number;
729
+ /** @enum {string} */
730
+ side: "Buy" | "Sell";
731
+ /** @description Price that triggered the notification (0.0–1.0) */
732
+ price: number;
733
+ /** @description Implied probability (0.0–1.0) */
734
+ probability?: number | null;
735
+ /**
736
+ * @description "high" when near YES (price ≥ threshold), "low" when near NO (price ≤ threshold)
737
+ * @enum {string}
738
+ */
739
+ bond_side: "high" | "low";
740
+ /** @description The probability threshold from the subscription filter that was breached */
741
+ threshold: number;
742
+ };
743
+ /** @description An outcome entry within a newly created market */
744
+ MarketCreatedOutcome: {
745
+ /** @description Outcome index (0 = Yes, 1 = No) */
746
+ index: number;
747
+ /** @description Outcome name (e.g. "Yes", "No") */
748
+ name: string;
749
+ /** @description ERC-1155 position token ID for this outcome */
750
+ position_id: string;
751
+ };
752
+ /** @description Payload delivered when a new prediction market is detected on-chain and enriched with Gamma API metadata */
753
+ MarketCreatedPayload: {
754
+ /** @description Condition ID (0x-prefixed hex, lowercase) */
755
+ condition_id: string;
756
+ /** @description Market slug */
757
+ market_slug: string;
758
+ /** @description Parent event slug */
759
+ event_slug?: string | null;
760
+ /** @description Parent event ID */
761
+ event_id?: string | null;
762
+ /** @description Parent event title */
763
+ event_title?: string | null;
764
+ /** @description Series slug (for recurring markets) */
765
+ series_slug?: string | null;
766
+ /** @description List of market outcomes with their position IDs */
767
+ outcomes: components["schemas"]["MarketCreatedOutcome"][];
768
+ /** @description Full market question text */
769
+ question: string;
770
+ /** @description Short display title */
771
+ title?: string | null;
772
+ /** @description Market description */
773
+ description: string;
774
+ /** @description Market category (e.g. "Sports", "Politics") */
775
+ category?: string | null;
776
+ /** @description Market tags */
777
+ tags: string[];
778
+ /** @description Cover image URL */
779
+ image_url?: string | null;
780
+ /** @description Whether this is a neg-risk market */
781
+ neg_risk: boolean;
782
+ };
783
+ /** @description Payload delivered on every raw Chainlink price tick for a tracked crypto asset */
784
+ AssetPriceTickPayload: {
785
+ /**
786
+ * @description Asset symbol
787
+ * @enum {string}
788
+ */
789
+ symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
790
+ /** @description Current asset price in USD from the Chainlink feed */
791
+ price: number;
792
+ /**
793
+ * Format: int64
794
+ * @description Tick timestamp (milliseconds since Unix epoch)
795
+ */
796
+ timestamp_ms: number;
797
+ };
798
+ /** @description Payload delivered twice per candle — once on open and once on close. `close_price` is 0.0 on the "open" update. */
799
+ AssetPriceWindowUpdatePayload: {
800
+ /**
801
+ * @description Asset symbol
802
+ * @enum {string}
803
+ */
804
+ symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
805
+ /**
806
+ * @description Candle / window size
807
+ * @enum {string}
808
+ */
809
+ variant: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
810
+ /**
811
+ * Format: int64
812
+ * @description Window start timestamp (milliseconds since Unix epoch)
813
+ */
814
+ start_time: number;
815
+ /**
816
+ * Format: int64
817
+ * @description Window end timestamp (milliseconds since Unix epoch)
818
+ */
819
+ end_time: number;
820
+ /** @description Opening price at start_time (USD) */
821
+ open_price: number;
822
+ /** @description Closing price at end_time (USD). 0.0 when update_type is "open" (not yet available). */
823
+ close_price: number;
824
+ /**
825
+ * @description "open" when the candle opens, "close" when it closes with a confirmed price
826
+ * @enum {string}
827
+ */
828
+ update_type: "open" | "close";
829
+ };
830
+ /** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
831
+ TraderFirstTradeFilters: {
832
+ /** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
833
+ wallet_addresses?: string[];
834
+ /** @description Restrict to trades in these markets. Empty = all markets. */
835
+ condition_ids?: string[];
836
+ /** @description Restrict to trades in markets belonging to these events. */
837
+ event_slugs?: string[];
838
+ /** @description Minimum trade size in USD. Omit to match all sizes. */
839
+ min_usd_value?: number;
840
+ /** @description Only fire when the outcome probability is ≥ this value. */
841
+ min_probability?: number;
842
+ /** @description Only fire when the outcome probability is ≤ this value. */
843
+ max_probability?: number;
844
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
845
+ exclude_shortterm_markets?: boolean;
846
+ };
847
+ /** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
848
+ TraderNewMarketFilters: {
849
+ /** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
850
+ wallet_addresses?: string[];
851
+ /** @description Restrict to these markets. */
852
+ condition_ids?: string[];
853
+ /** @description Restrict to markets belonging to these events. */
854
+ event_slugs?: string[];
855
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
856
+ exclude_shortterm_markets?: boolean;
857
+ };
858
+ /** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
859
+ TraderWhaleTradeFilters: {
860
+ /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
861
+ wallet_addresses?: string[];
862
+ /** @description Restrict to these markets. */
863
+ condition_ids?: string[];
864
+ /** @description Restrict to markets belonging to these events. */
865
+ event_slugs?: string[];
866
+ /** @description Minimum trade size in USD. Defaults to 0 (matches all trades). */
867
+ min_usd_value?: number;
868
+ /** @description Only fire when outcome probability is ≥ this value. */
869
+ min_probability?: number;
870
+ /** @description Only fire when outcome probability is ≤ this value. */
871
+ max_probability?: number;
872
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
873
+ exclude_shortterm_markets?: boolean;
874
+ };
875
+ /** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
876
+ TraderNewTradeFilters: {
877
+ /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
878
+ wallet_addresses?: string[];
879
+ /** @description Restrict to these markets. */
880
+ condition_ids?: string[];
881
+ /** @description Restrict to markets belonging to these events. */
882
+ event_slugs?: string[];
883
+ /** @description Minimum trade size in USD. Defaults to 0 (matches all trades). */
884
+ min_usd_value?: number;
885
+ /** @description Only fire when outcome probability is ≥ this value. */
886
+ min_probability?: number;
887
+ /** @description Only fire when outcome probability is ≤ this value. */
888
+ max_probability?: number;
889
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
890
+ exclude_shortterm_markets?: boolean;
891
+ };
892
+ /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
893
+ TraderGlobalPnlFilters: {
894
+ /** @description Track only these trader wallet addresses. Empty = all traders. */
895
+ traders?: string[];
896
+ /** @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds. */
897
+ min_realized_pnl_usd?: number;
898
+ /** @description Only fire when realized PnL ≤ this value (USD). */
899
+ max_realized_pnl_usd?: number;
900
+ /** @description Only fire when total trading volume ≥ this value (USD). */
901
+ min_volume_usd?: number;
902
+ /** @description Only fire when total trading volume ≤ this value (USD). */
903
+ max_volume_usd?: number;
904
+ /** @description Only fire when buy volume ≥ this value (USD). */
905
+ min_buy_usd?: number;
906
+ /** @description Only fire when sell volume ≥ this value (USD). */
907
+ min_sell_volume_usd?: number;
908
+ /** @description Only fire when market win rate ≥ this percentage (0.0–100.0). */
909
+ min_win_rate?: number;
910
+ /**
911
+ * Format: int64
912
+ * @description Only fire when the trader has traded in ≥ this many markets.
913
+ */
914
+ min_markets_traded?: number;
915
+ /** @description Restrict to these PnL windows. Empty = all windows. */
916
+ timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
917
+ };
918
+ /** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
919
+ TraderMarketPnlFilters: {
920
+ /** @description Track only these trader wallet addresses. */
921
+ traders?: string[];
922
+ /** @description Restrict to these markets. */
923
+ condition_ids?: string[];
924
+ /** @description Restrict to markets in these events. */
925
+ event_slugs?: string[];
926
+ /** @description Only fire when per-market realized PnL ≥ this value (USD). */
927
+ min_realized_pnl_usd?: number;
928
+ /** @description Only fire when per-market realized PnL ≤ this value (USD). */
929
+ max_realized_pnl_usd?: number;
930
+ /** @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD). */
931
+ min_volume_usd?: number;
932
+ /** @description Only fire when total volume ≤ this value (USD). */
933
+ max_volume_usd?: number;
934
+ /** @description Only fire when buy volume in the market ≥ this value (USD). */
935
+ min_buy_usd?: number;
936
+ /** @description Only fire when sell volume in the market ≥ this value (USD). */
937
+ min_sell_volume_usd?: number;
938
+ /** @description Restrict to these PnL windows. */
939
+ timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
940
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
941
+ exclude_shortterm_markets?: boolean;
942
+ };
943
+ /** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
944
+ TraderEventPnlFilters: {
945
+ /** @description Track only these trader wallet addresses. */
946
+ traders?: string[];
947
+ /** @description Restrict to these events. */
948
+ event_slugs?: string[];
949
+ /** @description Only fire when per-event realized PnL ≥ this value (USD). */
950
+ min_realized_pnl_usd?: number;
951
+ /** @description Only fire when per-event realized PnL ≤ this value (USD). */
952
+ max_realized_pnl_usd?: number;
953
+ /** @description Only fire when total event volume ≥ this value (USD). */
954
+ min_volume_usd?: number;
955
+ /** @description Only fire when total event volume ≤ this value (USD). */
956
+ max_volume_usd?: number;
957
+ /** @description Only fire when buy volume within the event ≥ this value (USD). */
958
+ min_buy_usd?: number;
959
+ /** @description Only fire when sell volume within the event ≥ this value (USD). */
960
+ min_sell_volume_usd?: number;
961
+ /**
962
+ * Format: int64
963
+ * @description Only fire when the trader has traded in ≥ this many markets within the event.
964
+ */
965
+ min_markets_traded?: number;
966
+ /** @description Restrict to these PnL windows. */
967
+ timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
968
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
969
+ exclude_shortterm_markets?: boolean;
970
+ };
971
+ /** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
972
+ MarketMetricsFilters: {
973
+ /** @description Restrict to these markets. Empty = all markets. */
974
+ condition_ids?: string[];
975
+ /** @description Restrict to markets in these events. */
976
+ event_slugs?: string[];
977
+ /** @description Restrict to these aggregation windows. Empty = all windows. */
978
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
979
+ /** @description Only fire when volume ≥ this value (USD). */
980
+ min_volume_usd?: number;
981
+ /** @description Only fire when volume ≤ this value (USD). */
982
+ max_volume_usd?: number;
983
+ /**
984
+ * Format: int64
985
+ * @description Only fire when transaction count ≥ this value.
986
+ */
987
+ min_txns?: number;
988
+ /**
989
+ * Format: int64
990
+ * @description Only fire when unique trader count ≥ this value.
991
+ */
992
+ min_unique_traders?: number;
993
+ /** @description Only fire when total fees ≥ this value (USD). */
994
+ min_fees?: number;
995
+ };
996
+ /** @description Subscription filters for the `event_metrics` event. All fields are optional. */
997
+ EventMetricsFilters: {
998
+ /** @description Restrict to these events. Empty = all events. */
999
+ event_slugs?: string[];
1000
+ /** @description Restrict to these aggregation windows. */
1001
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1002
+ /** @description Only fire when aggregated event volume ≥ this value (USD). */
1003
+ min_volume_usd?: number;
1004
+ max_volume_usd?: number;
1005
+ /** Format: int64 */
1006
+ min_txns?: number;
1007
+ /** Format: int64 */
1008
+ min_unique_traders?: number;
1009
+ min_fees?: number;
1010
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1011
+ exclude_shortterm_markets?: boolean;
1012
+ };
1013
+ /** @description Subscription filters for the `position_metrics` event. All fields are optional. */
1014
+ PositionMetricsFilters: {
1015
+ /** @description Restrict to these outcome token IDs. */
1016
+ position_ids?: string[];
1017
+ /** @description Restrict to positions within these markets. */
1018
+ condition_ids?: string[];
1019
+ /** @description Restrict to positions with these outcome names (e.g. ["Yes", "No"]). */
1020
+ outcomes?: string[];
1021
+ /** @description Restrict to these aggregation windows. */
1022
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1023
+ /** @description Only fire when position volume ≥ this value (USD). */
1024
+ min_volume_usd?: number;
1025
+ max_volume_usd?: number;
1026
+ min_buy_usd?: number;
1027
+ min_sell_volume_usd?: number;
1028
+ /** Format: int64 */
1029
+ min_txns?: number;
1030
+ /** Format: int64 */
1031
+ min_unique_traders?: number;
1032
+ /** @description Only fire when price change % ≥ this value. */
1033
+ min_price_change_pct?: number;
1034
+ /** @description Only fire when probability change % ≥ this value. */
1035
+ min_probability_change_pct?: number;
1036
+ min_fees?: number;
1037
+ };
1038
+ /** @description Subscription filters for the `market_volume_milestone` event. */
1039
+ MarketVolumeMilestoneFilters: {
1040
+ /** @description **Required.** Aggregation windows to monitor (e.g. ["1h", "24h"]). */
1041
+ timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1042
+ /** @description Restrict to these markets. Empty = all markets. */
1043
+ condition_ids?: string[];
1044
+ /** @description Specific USD milestones to trigger on (e.g. [10000, 100000, 1000000]). Empty = all milestones. */
1045
+ milestone_amounts?: number[];
1046
+ };
1047
+ /** @description Subscription filters for the `event_volume_milestone` event. */
1048
+ EventVolumeMilestoneFilters: {
1049
+ /** @description **Required.** Aggregation windows to monitor. */
1050
+ timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1051
+ /** @description Restrict to these events. */
1052
+ event_slugs?: string[];
1053
+ /** @description Specific USD milestones to trigger on. */
1054
+ milestone_amounts?: number[];
1055
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1056
+ exclude_shortterm_markets?: boolean;
1057
+ };
1058
+ /** @description Subscription filters for the `position_volume_milestone` event. */
1059
+ PositionVolumeMilestoneFilters: {
1060
+ /** @description **Required.** Aggregation windows to monitor. */
1061
+ timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1062
+ /** @description Restrict to these outcome token IDs. */
1063
+ position_ids?: string[];
1064
+ /** @description Restrict to positions within these markets. */
1065
+ condition_ids?: string[];
1066
+ /** @description Specific USD milestones to trigger on. */
1067
+ milestone_amounts?: number[];
1068
+ };
1069
+ /** @description Subscription filters for the `probability_spike` event. */
1070
+ ProbabilitySpikeFilters: {
1071
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1072
+ position_ids?: string[];
1073
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
1074
+ condition_ids?: string[];
1075
+ /** @description Restrict to specific events. Empty = all events. */
1076
+ event_slugs?: string[];
1077
+ /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
1078
+ outcomes?: string[];
1079
+ /** @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move). */
1080
+ min_probability_change_pct?: number;
1081
+ /**
1082
+ * @description `"up"` = probability rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
1083
+ * @enum {string}
1084
+ */
1085
+ spike_direction?: "up" | "down" | "both";
1086
+ /** @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. */
1087
+ window_secs?: number;
1088
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1089
+ exclude_shortterm_markets?: boolean;
1090
+ };
1091
+ /** @description Subscription filters for the `price_spike` event. */
1092
+ PriceSpikeFilters: {
1093
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1094
+ position_ids?: string[];
1095
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
1096
+ condition_ids?: string[];
1097
+ /** @description Restrict to specific events. Empty = all events. */
1098
+ event_slugs?: string[];
1099
+ /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
1100
+ outcomes?: string[];
1101
+ /** @description Minimum price percentage move to trigger (e.g. `10` for a 10% move). */
1102
+ min_price_change_pct?: number;
1103
+ /**
1104
+ * @description `"up"` = price rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
1105
+ * @enum {string}
1106
+ */
1107
+ spike_direction?: "up" | "down" | "both";
1108
+ /** @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. */
1109
+ window_secs?: number;
1110
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1111
+ exclude_shortterm_markets?: boolean;
1112
+ };
1113
+ /** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
1114
+ MarketVolumeSpikeFilters: {
1115
+ /** @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. */
1116
+ spike_ratio: number;
1117
+ /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
1118
+ window_secs?: number;
1119
+ /** @description Restrict to these markets. Empty = all markets. */
1120
+ condition_ids?: string[];
1121
+ /** @description Restrict to these aggregation windows. Empty = all windows. */
1122
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
1123
+ };
1124
+ /** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
1125
+ EventVolumeSpikeFilters: {
1126
+ /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
1127
+ spike_ratio: number;
1128
+ /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
1129
+ window_secs?: number;
1130
+ /** @description Restrict to these events. */
1131
+ event_slugs?: string[];
1132
+ /** @description Restrict to these aggregation windows. */
1133
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
1134
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1135
+ exclude_shortterm_markets?: boolean;
1136
+ };
1137
+ /** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
1138
+ PositionVolumeSpikeFilters: {
1139
+ /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
1140
+ spike_ratio: number;
1141
+ /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
1142
+ window_secs?: number;
1143
+ /** @description Restrict to these outcome token IDs. */
1144
+ position_ids?: string[];
1145
+ /** @description Restrict to positions within these markets. */
1146
+ condition_ids?: string[];
1147
+ /** @description Restrict to these outcome names. */
1148
+ outcomes?: string[];
1149
+ /** @description Restrict to these aggregation windows. */
1150
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
1151
+ };
1152
+ /** @description Subscription filters for the `close_to_bond` event. At least one of `min_probability` or `max_probability` is required. */
1153
+ CloseToBondFilters: {
1154
+ /** @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. */
1155
+ min_probability?: number;
1156
+ /** @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO). */
1157
+ max_probability?: number;
1158
+ /** @description Restrict to these markets. */
1159
+ condition_ids?: string[];
1160
+ /** @description Restrict to these outcome token IDs. */
1161
+ position_ids?: string[];
1162
+ /** @description Restrict to markets in these events. */
1163
+ event_slugs?: string[];
1164
+ /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
1165
+ outcomes?: string[];
1166
+ /** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
1167
+ position_outcome_indices?: number[];
1168
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1169
+ exclude_shortterm_markets?: boolean;
1170
+ } | unknown | unknown;
1171
+ /** @description Subscription filters for the `market_created` event. All fields are optional. */
1172
+ MarketCreatedFilters: {
1173
+ /** @description Restrict to markets with these tags or category names (case-insensitive match). */
1174
+ tags?: string[];
1175
+ /** @description Restrict to these specific markets. */
1176
+ condition_ids?: string[];
1177
+ /** @description Restrict to markets belonging to these events. */
1178
+ event_slugs?: string[];
1179
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
1180
+ exclude_shortterm_markets?: boolean;
1181
+ };
1182
+ /** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
1183
+ AssetPriceTickFilters: {
1184
+ /** @description Restrict to these crypto assets. Empty = all assets. */
1185
+ asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
1186
+ };
1187
+ /** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
1188
+ AssetPriceWindowUpdateFilters: {
1189
+ /** @description Restrict to these crypto assets. Empty = all assets. */
1190
+ asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
1191
+ /** @description Restrict to these candle sizes. Empty = all sizes. */
1192
+ timeframes?: ("5m" | "15m" | "1h" | "4h" | "1d" | "24h")[];
1193
+ };
1194
+ /**
1195
+ * @description All alert event types supported by both HTTP webhooks and the alerts WebSocket.
1196
+ * @enum {string}
1197
+ */
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";
1199
+ /** @description Server acknowledgement for a successful alert subscription. */
1200
+ WsAlertSubscribedResponse: {
1201
+ /** @enum {string} */
1202
+ op: "subscribed";
1203
+ event: components["schemas"]["WsAlertEventType"];
1204
+ /** Format: uuid */
1205
+ subscription_id: string;
1206
+ };
1207
+ /** @description Server acknowledgement for a successful alert unsubscription. */
1208
+ WsAlertUnsubscribedResponse: {
1209
+ /** @enum {string} */
1210
+ op: "unsubscribed";
1211
+ event: components["schemas"]["WsAlertEventType"];
1212
+ };
1213
+ /** @description Error returned by the alerts WebSocket when a message is invalid or a subscription request fails. */
1214
+ WsAlertErrorResponse: {
1215
+ error: string;
1216
+ };
1217
+ WsAlertTraderFirstTradeSubscribeMessage: {
1218
+ /** @enum {string} */
1219
+ op: "subscribe";
1220
+ /** @enum {string} */
1221
+ event: "trader_first_trade";
1222
+ } & components["schemas"]["TraderFirstTradeFilters"] & {
1223
+ /**
1224
+ * @description discriminator enum property added by openapi-typescript
1225
+ * @enum {string}
1226
+ */
1227
+ event: "trader_first_trade";
1228
+ };
1229
+ WsAlertTraderFirstTradeUnsubscribeMessage: {
1230
+ /** @enum {string} */
1231
+ op: "unsubscribe";
1232
+ /** @enum {string} */
1233
+ event: "trader_first_trade";
1234
+ } & components["schemas"]["TraderFirstTradeFilters"] & {
1235
+ /**
1236
+ * @description discriminator enum property added by openapi-typescript
1237
+ * @enum {string}
1238
+ */
1239
+ event: "trader_first_trade";
1240
+ };
1241
+ /**
1242
+ * @description Pushed `trader_first_trade` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1243
+ * @example {
1244
+ * "event": "trader_first_trade",
1245
+ * "timestamp": 1743500000000,
1246
+ * "data": {
1247
+ * "trader": "0x0000000000000000000000000000000000000000",
1248
+ * "taker": "0x0000000000000000000000000000000000000000",
1249
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656",
1250
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
1251
+ * "outcome": "Yes",
1252
+ * "outcome_index": 0,
1253
+ * "question": "Will this test webhook fire correctly?",
1254
+ * "market_slug": "test-market-0000000000",
1255
+ * "event_slug": "test-event-0000000000",
1256
+ * "trade_id": "00000000-0000-0000-0000-000000000000",
1257
+ * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
1258
+ * "block": 0,
1259
+ * "confirmed_at": 1700000000,
1260
+ * "amount_usd": 125,
1261
+ * "shares_amount": 250,
1262
+ * "fee": 0.125,
1263
+ * "side": "Buy",
1264
+ * "price": 0.5,
1265
+ * "exchange": "polymarket",
1266
+ * "trade_type": "OrderFilled"
1267
+ * }
1268
+ * }
1269
+ */
1270
+ WsAlertTraderFirstTradeEvent: {
1271
+ /**
1272
+ * @description discriminator enum property added by openapi-typescript
1273
+ * @enum {string}
1274
+ */
1275
+ event: "trader_first_trade";
1276
+ /**
1277
+ * Format: int64
1278
+ * @description Unix timestamp in milliseconds
1279
+ */
1280
+ timestamp: number;
1281
+ data: components["schemas"]["FirstTradePayload"];
1282
+ };
1283
+ WsAlertTraderNewMarketSubscribeMessage: {
1284
+ /** @enum {string} */
1285
+ op: "subscribe";
1286
+ /** @enum {string} */
1287
+ event: "trader_new_market";
1288
+ } & components["schemas"]["TraderNewMarketFilters"] & {
1289
+ /**
1290
+ * @description discriminator enum property added by openapi-typescript
1291
+ * @enum {string}
1292
+ */
1293
+ event: "trader_new_market";
1294
+ };
1295
+ WsAlertTraderNewMarketUnsubscribeMessage: {
1296
+ /** @enum {string} */
1297
+ op: "unsubscribe";
1298
+ /** @enum {string} */
1299
+ event: "trader_new_market";
1300
+ } & components["schemas"]["TraderNewMarketFilters"] & {
1301
+ /**
1302
+ * @description discriminator enum property added by openapi-typescript
1303
+ * @enum {string}
1304
+ */
1305
+ event: "trader_new_market";
1306
+ };
1307
+ /**
1308
+ * @description Pushed `trader_new_market` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1309
+ * @example {
1310
+ * "event": "trader_new_market",
1311
+ * "timestamp": 1743500000000,
1312
+ * "data": {
1313
+ * "trader": "0x0000000000000000000000000000000000000000",
1314
+ * "taker": "0x0000000000000000000000000000000000000000",
1315
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656",
1316
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
1317
+ * "outcome": "Yes",
1318
+ * "outcome_index": 0,
1319
+ * "question": "Will this test webhook fire correctly?",
1320
+ * "market_slug": "test-market-0000000000",
1321
+ * "event_slug": "test-event-0000000000",
1322
+ * "trade_id": "00000000-0000-0000-0000-000000000000",
1323
+ * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
1324
+ * "block": 0,
1325
+ * "confirmed_at": 1700000000,
1326
+ * "amount_usd": 125,
1327
+ * "shares_amount": 250,
1328
+ * "fee": 0.125,
1329
+ * "side": "Buy",
1330
+ * "price": 0.5,
1331
+ * "probability": 0.5,
1332
+ * "exchange": "polymarket",
1333
+ * "trade_type": "OrderFilled"
1334
+ * }
1335
+ * }
1336
+ */
1337
+ WsAlertTraderNewMarketEvent: {
1338
+ /**
1339
+ * @description discriminator enum property added by openapi-typescript
1340
+ * @enum {string}
1341
+ */
1342
+ event: "trader_new_market";
1343
+ /**
1344
+ * Format: int64
1345
+ * @description Unix timestamp in milliseconds
1346
+ */
1347
+ timestamp: number;
1348
+ data: components["schemas"]["NewMarketPayload"];
1349
+ };
1350
+ WsAlertTraderWhaleTradeSubscribeMessage: {
1351
+ /** @enum {string} */
1352
+ op: "subscribe";
1353
+ /** @enum {string} */
1354
+ event: "trader_whale_trade";
1355
+ } & components["schemas"]["TraderWhaleTradeFilters"] & {
1356
+ /**
1357
+ * @description discriminator enum property added by openapi-typescript
1358
+ * @enum {string}
1359
+ */
1360
+ event: "trader_whale_trade";
1361
+ };
1362
+ WsAlertTraderWhaleTradeUnsubscribeMessage: {
1363
+ /** @enum {string} */
1364
+ op: "unsubscribe";
1365
+ /** @enum {string} */
1366
+ event: "trader_whale_trade";
1367
+ } & components["schemas"]["TraderWhaleTradeFilters"] & {
1368
+ /**
1369
+ * @description discriminator enum property added by openapi-typescript
1370
+ * @enum {string}
1371
+ */
1372
+ event: "trader_whale_trade";
1373
+ };
1374
+ /**
1375
+ * @description Pushed `trader_whale_trade` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1376
+ * @example {
1377
+ * "event": "trader_whale_trade",
1378
+ * "timestamp": 1743500000000,
1379
+ * "data": {
1380
+ * "trader": "0x0000000000000000000000000000000000000000",
1381
+ * "taker": "0x0000000000000000000000000000000000000000",
1382
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656",
1383
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
1384
+ * "outcome": "Yes",
1385
+ * "outcome_index": 0,
1386
+ * "question": "Will this test webhook fire correctly?",
1387
+ * "market_slug": "test-market-0000000000",
1388
+ * "event_slug": "test-event-0000000000",
1389
+ * "trade_id": "00000000-0000-0000-0000-000000000000",
1390
+ * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
1391
+ * "block": 0,
1392
+ * "confirmed_at": 1700000000,
1393
+ * "amount_usd": 125,
1394
+ * "shares_amount": 250,
1395
+ * "fee": 0.125,
1396
+ * "side": "Buy",
1397
+ * "price": 0.5,
1398
+ * "probability": 0.5,
1399
+ * "exchange": "polymarket",
1400
+ * "trade_type": "OrderFilled"
1401
+ * }
1402
+ * }
1403
+ */
1404
+ WsAlertTraderWhaleTradeEvent: {
1405
+ /**
1406
+ * @description discriminator enum property added by openapi-typescript
1407
+ * @enum {string}
1408
+ */
1409
+ event: "trader_whale_trade";
1410
+ /**
1411
+ * Format: int64
1412
+ * @description Unix timestamp in milliseconds
1413
+ */
1414
+ timestamp: number;
1415
+ data: components["schemas"]["WhaleTradePayload"];
1416
+ };
1417
+ WsAlertTraderNewTradeSubscribeMessage: {
1418
+ /** @enum {string} */
1419
+ op: "subscribe";
1420
+ /** @enum {string} */
1421
+ event: "trader_new_trade";
1422
+ } & components["schemas"]["TraderNewTradeFilters"] & {
1423
+ /**
1424
+ * @description discriminator enum property added by openapi-typescript
1425
+ * @enum {string}
1426
+ */
1427
+ event: "trader_new_trade";
1428
+ };
1429
+ WsAlertTraderNewTradeUnsubscribeMessage: {
1430
+ /** @enum {string} */
1431
+ op: "unsubscribe";
1432
+ /** @enum {string} */
1433
+ event: "trader_new_trade";
1434
+ } & components["schemas"]["TraderNewTradeFilters"] & {
1435
+ /**
1436
+ * @description discriminator enum property added by openapi-typescript
1437
+ * @enum {string}
1438
+ */
1439
+ event: "trader_new_trade";
1440
+ };
1441
+ /**
1442
+ * @description Pushed `trader_new_trade` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1443
+ * @example {
1444
+ * "event": "trader_new_trade",
1445
+ * "timestamp": 1743500000000,
1446
+ * "data": {
1447
+ * "trader": "0x0000000000000000000000000000000000000000",
1448
+ * "taker": "0x0000000000000000000000000000000000000000",
1449
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656",
1450
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
1451
+ * "outcome": "Yes",
1452
+ * "outcome_index": 0,
1453
+ * "question": "Will this test webhook fire correctly?",
1454
+ * "market_slug": "test-market-0000000000",
1455
+ * "event_slug": "test-event-0000000000",
1456
+ * "trade_id": "00000000-0000-0000-0000-000000000000",
1457
+ * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
1458
+ * "block": 0,
1459
+ * "confirmed_at": 1700000000,
1460
+ * "amount_usd": 25,
1461
+ * "shares_amount": 50,
1462
+ * "fee": 0.025,
1463
+ * "side": "Buy",
1464
+ * "price": 0.5,
1465
+ * "probability": 0.5,
1466
+ * "exchange": "polymarket",
1467
+ * "trade_type": "OrderFilled"
1468
+ * }
1469
+ * }
1470
+ */
1471
+ WsAlertTraderNewTradeEvent: {
1472
+ /**
1473
+ * @description discriminator enum property added by openapi-typescript
1474
+ * @enum {string}
1475
+ */
1476
+ event: "trader_new_trade";
1477
+ /**
1478
+ * Format: int64
1479
+ * @description Unix timestamp in milliseconds
1480
+ */
1481
+ timestamp: number;
1482
+ data: components["schemas"]["NewTradePayload"];
1483
+ };
1484
+ WsAlertTraderGlobalPnlSubscribeMessage: {
1485
+ /** @enum {string} */
1486
+ op: "subscribe";
1487
+ /** @enum {string} */
1488
+ event: "trader_global_pnl";
1489
+ } & components["schemas"]["TraderGlobalPnlFilters"] & {
1490
+ /**
1491
+ * @description discriminator enum property added by openapi-typescript
1492
+ * @enum {string}
1493
+ */
1494
+ event: "trader_global_pnl";
1495
+ };
1496
+ WsAlertTraderGlobalPnlUnsubscribeMessage: {
1497
+ /** @enum {string} */
1498
+ op: "unsubscribe";
1499
+ /** @enum {string} */
1500
+ event: "trader_global_pnl";
1501
+ } & components["schemas"]["TraderGlobalPnlFilters"] & {
1502
+ /**
1503
+ * @description discriminator enum property added by openapi-typescript
1504
+ * @enum {string}
1505
+ */
1506
+ event: "trader_global_pnl";
1507
+ };
1508
+ /**
1509
+ * @description Pushed `trader_global_pnl` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1510
+ * @example {
1511
+ * "event": "trader_global_pnl",
1512
+ * "timestamp": 1743500000000,
1513
+ * "data": {
1514
+ * "trader": "0x0000000000000000000000000000000000000000",
1515
+ * "timeframe": "7d",
1516
+ * "realized_pnl_usd": 250,
1517
+ * "events_traded": 3,
1518
+ * "markets_traded": 5,
1519
+ * "total_buys": 12,
1520
+ * "total_sells": 8,
1521
+ * "total_redemptions": 1,
1522
+ * "total_merges": 0,
1523
+ * "total_volume_usd": 1500,
1524
+ * "buy_volume_usd": 900,
1525
+ * "sell_volume_usd": 600,
1526
+ * "redemption_volume_usd": 50,
1527
+ * "merge_volume_usd": 0,
1528
+ * "markets_won": 3,
1529
+ * "markets_lost": 2,
1530
+ * "market_win_rate_pct": 60,
1531
+ * "avg_pnl_per_market": 50,
1532
+ * "avg_pnl_per_trade": 12.5,
1533
+ * "avg_hold_time_seconds": 86400,
1534
+ * "total_fees": 7.5,
1535
+ * "best_trade_pnl_usd": 180,
1536
+ * "best_trade_condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
1537
+ * "first_trade_at": 1700000000,
1538
+ * "last_trade_at": 1700000000
1539
+ * }
1540
+ * }
1541
+ */
1542
+ WsAlertTraderGlobalPnlEvent: {
1543
+ /**
1544
+ * @description discriminator enum property added by openapi-typescript
1545
+ * @enum {string}
1546
+ */
1547
+ event: "trader_global_pnl";
1548
+ /**
1549
+ * Format: int64
1550
+ * @description Unix timestamp in milliseconds
1551
+ */
1552
+ timestamp: number;
1553
+ data: components["schemas"]["GlobalPnlPayload"];
1554
+ };
1555
+ WsAlertTraderMarketPnlSubscribeMessage: {
1556
+ /** @enum {string} */
1557
+ op: "subscribe";
1558
+ /** @enum {string} */
1559
+ event: "trader_market_pnl";
1560
+ } & components["schemas"]["TraderMarketPnlFilters"] & {
1561
+ /**
1562
+ * @description discriminator enum property added by openapi-typescript
1563
+ * @enum {string}
1564
+ */
1565
+ event: "trader_market_pnl";
1566
+ };
1567
+ WsAlertTraderMarketPnlUnsubscribeMessage: {
1568
+ /** @enum {string} */
1569
+ op: "unsubscribe";
1570
+ /** @enum {string} */
1571
+ event: "trader_market_pnl";
1572
+ } & components["schemas"]["TraderMarketPnlFilters"] & {
1573
+ /**
1574
+ * @description discriminator enum property added by openapi-typescript
1575
+ * @enum {string}
1576
+ */
1577
+ event: "trader_market_pnl";
1578
+ };
1579
+ /**
1580
+ * @description Pushed `trader_market_pnl` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1581
+ * @example {
1582
+ * "event": "trader_market_pnl",
1583
+ * "timestamp": 1743500000000,
1584
+ * "data": {
1585
+ * "trader": "0x0000000000000000000000000000000000000000",
1586
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
1587
+ * "event_slug": "test-event-0000000000",
1588
+ * "timeframe": "7d",
1589
+ * "outcomes_traded": 2,
1590
+ * "total_buys": 4,
1591
+ * "total_sells": 3,
1592
+ * "total_redemptions": 1,
1593
+ * "total_merges": 0,
1594
+ * "buy_usd": 300,
1595
+ * "sell_usd": 200,
1596
+ * "redemption_usd": 50,
1597
+ * "merge_usd": 0,
1598
+ * "realized_pnl_usd": 100,
1599
+ * "winning_outcomes": 1,
1600
+ * "total_fees": 2.5,
1601
+ * "first_trade_at": 1700000000,
1602
+ * "last_trade_at": 1700000000
1603
+ * }
1604
+ * }
1605
+ */
1606
+ WsAlertTraderMarketPnlEvent: {
1607
+ /**
1608
+ * @description discriminator enum property added by openapi-typescript
1609
+ * @enum {string}
1610
+ */
1611
+ event: "trader_market_pnl";
1612
+ /**
1613
+ * Format: int64
1614
+ * @description Unix timestamp in milliseconds
1615
+ */
1616
+ timestamp: number;
1617
+ data: components["schemas"]["MarketPnlPayload"];
1618
+ };
1619
+ WsAlertTraderEventPnlSubscribeMessage: {
1620
+ /** @enum {string} */
1621
+ op: "subscribe";
1622
+ /** @enum {string} */
1623
+ event: "trader_event_pnl";
1624
+ } & components["schemas"]["TraderEventPnlFilters"] & {
1625
+ /**
1626
+ * @description discriminator enum property added by openapi-typescript
1627
+ * @enum {string}
1628
+ */
1629
+ event: "trader_event_pnl";
1630
+ };
1631
+ WsAlertTraderEventPnlUnsubscribeMessage: {
1632
+ /** @enum {string} */
1633
+ op: "unsubscribe";
1634
+ /** @enum {string} */
1635
+ event: "trader_event_pnl";
1636
+ } & components["schemas"]["TraderEventPnlFilters"] & {
1637
+ /**
1638
+ * @description discriminator enum property added by openapi-typescript
1639
+ * @enum {string}
1640
+ */
1641
+ event: "trader_event_pnl";
1642
+ };
1643
+ /**
1644
+ * @description Pushed `trader_event_pnl` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1645
+ * @example {
1646
+ * "event": "trader_event_pnl",
1647
+ * "timestamp": 1743500000000,
1648
+ * "data": {
1649
+ * "trader": "0x0000000000000000000000000000000000000000",
1650
+ * "event_slug": "test-event-0000000000",
1651
+ * "timeframe": "7d",
1652
+ * "markets_traded": 2,
1653
+ * "outcomes_traded": 3,
1654
+ * "total_buys": 6,
1655
+ * "total_sells": 4,
1656
+ * "total_redemptions": 1,
1657
+ * "total_merges": 0,
1658
+ * "total_volume_usd": 800,
1659
+ * "buy_usd": 480,
1660
+ * "sell_usd": 320,
1661
+ * "redemption_usd": 50,
1662
+ * "merge_usd": 0,
1663
+ * "realized_pnl_usd": 150,
1664
+ * "winning_markets": 1,
1665
+ * "losing_markets": 1,
1666
+ * "total_fees": 4,
1667
+ * "first_trade_at": 1700000000,
1668
+ * "last_trade_at": 1700000000
1669
+ * }
1670
+ * }
1671
+ */
1672
+ WsAlertTraderEventPnlEvent: {
1673
+ /**
1674
+ * @description discriminator enum property added by openapi-typescript
1675
+ * @enum {string}
1676
+ */
1677
+ event: "trader_event_pnl";
1678
+ /**
1679
+ * Format: int64
1680
+ * @description Unix timestamp in milliseconds
1681
+ */
1682
+ timestamp: number;
1683
+ data: components["schemas"]["EventPnlPayload"];
1684
+ };
1685
+ WsAlertConditionMetricsSubscribeMessage: {
1686
+ /** @enum {string} */
1687
+ op: "subscribe";
1688
+ /** @enum {string} */
1689
+ event: "condition_metrics";
1690
+ } & components["schemas"]["MarketMetricsFilters"] & {
1691
+ /**
1692
+ * @description discriminator enum property added by openapi-typescript
1693
+ * @enum {string}
1694
+ */
1695
+ event: "condition_metrics";
1696
+ };
1697
+ WsAlertConditionMetricsUnsubscribeMessage: {
1698
+ /** @enum {string} */
1699
+ op: "unsubscribe";
1700
+ /** @enum {string} */
1701
+ event: "condition_metrics";
1702
+ } & components["schemas"]["MarketMetricsFilters"] & {
1703
+ /**
1704
+ * @description discriminator enum property added by openapi-typescript
1705
+ * @enum {string}
1706
+ */
1707
+ event: "condition_metrics";
1708
+ };
1709
+ /**
1710
+ * @description Pushed `condition_metrics` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1711
+ * @example {
1712
+ * "event": "condition_metrics",
1713
+ * "timestamp": 1743500000000,
1714
+ * "data": {
1715
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
1716
+ * "timeframe": "1h",
1717
+ * "volume_usd": 50000,
1718
+ * "fees": 250,
1719
+ * "txns": 320,
1720
+ * "unique_traders": 85
1721
+ * }
1722
+ * }
1723
+ */
1724
+ WsAlertConditionMetricsEvent: {
1725
+ /**
1726
+ * @description discriminator enum property added by openapi-typescript
1727
+ * @enum {string}
1728
+ */
1729
+ event: "condition_metrics";
1730
+ /**
1731
+ * Format: int64
1732
+ * @description Unix timestamp in milliseconds
1733
+ */
1734
+ timestamp: number;
1735
+ data: components["schemas"]["ConditionMetricsPayload"];
1736
+ };
1737
+ WsAlertEventMetricsSubscribeMessage: {
1738
+ /** @enum {string} */
1739
+ op: "subscribe";
1740
+ /** @enum {string} */
1741
+ event: "event_metrics";
1742
+ } & components["schemas"]["EventMetricsFilters"] & {
1743
+ /**
1744
+ * @description discriminator enum property added by openapi-typescript
1745
+ * @enum {string}
1746
+ */
1747
+ event: "event_metrics";
1748
+ };
1749
+ WsAlertEventMetricsUnsubscribeMessage: {
1750
+ /** @enum {string} */
1751
+ op: "unsubscribe";
1752
+ /** @enum {string} */
1753
+ event: "event_metrics";
1754
+ } & components["schemas"]["EventMetricsFilters"] & {
1755
+ /**
1756
+ * @description discriminator enum property added by openapi-typescript
1757
+ * @enum {string}
1758
+ */
1759
+ event: "event_metrics";
1760
+ };
1761
+ /**
1762
+ * @description Pushed `event_metrics` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1763
+ * @example {
1764
+ * "event": "event_metrics",
1765
+ * "timestamp": 1743500000000,
1766
+ * "data": {
1767
+ * "event_slug": "test-event-0000000000",
1768
+ * "timeframe": "1h",
1769
+ * "volume_usd": 120000,
1770
+ * "fees": 600,
1771
+ * "txns": 740,
1772
+ * "unique_traders": 210
1773
+ * }
1774
+ * }
1775
+ */
1776
+ WsAlertEventMetricsEvent: {
1777
+ /**
1778
+ * @description discriminator enum property added by openapi-typescript
1779
+ * @enum {string}
1780
+ */
1781
+ event: "event_metrics";
1782
+ /**
1783
+ * Format: int64
1784
+ * @description Unix timestamp in milliseconds
1785
+ */
1786
+ timestamp: number;
1787
+ data: components["schemas"]["EventMetricsPayload"];
1788
+ };
1789
+ WsAlertPositionMetricsSubscribeMessage: {
1790
+ /** @enum {string} */
1791
+ op: "subscribe";
1792
+ /** @enum {string} */
1793
+ event: "position_metrics";
1794
+ } & components["schemas"]["PositionMetricsFilters"] & {
1795
+ /**
1796
+ * @description discriminator enum property added by openapi-typescript
1797
+ * @enum {string}
1798
+ */
1799
+ event: "position_metrics";
1800
+ };
1801
+ WsAlertPositionMetricsUnsubscribeMessage: {
1802
+ /** @enum {string} */
1803
+ op: "unsubscribe";
1804
+ /** @enum {string} */
1805
+ event: "position_metrics";
1806
+ } & components["schemas"]["PositionMetricsFilters"] & {
1807
+ /**
1808
+ * @description discriminator enum property added by openapi-typescript
1809
+ * @enum {string}
1810
+ */
1811
+ event: "position_metrics";
1812
+ };
1813
+ /**
1814
+ * @description Pushed `position_metrics` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1815
+ * @example {
1816
+ * "event": "position_metrics",
1817
+ * "timestamp": 1743500000000,
1818
+ * "data": {
1819
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656",
1820
+ * "outcome": "Yes",
1821
+ * "outcome_index": 0,
1822
+ * "timeframe": "1h",
1823
+ * "volume_usd": 25000,
1824
+ * "buy_volume_usd": 15000,
1825
+ * "sell_volume_usd": 10000,
1826
+ * "fees": 125,
1827
+ * "txns": 160,
1828
+ * "buys": 95,
1829
+ * "sells": 65,
1830
+ * "unique_traders": 48,
1831
+ * "price_open": 0.48,
1832
+ * "price_close": 0.52,
1833
+ * "price_high": 0.55,
1834
+ * "price_low": 0.46,
1835
+ * "probability_open": 0.48,
1836
+ * "probability_close": 0.52,
1837
+ * "probability_high": 0.55,
1838
+ * "probability_low": 0.46
1839
+ * }
1840
+ * }
1841
+ */
1842
+ WsAlertPositionMetricsEvent: {
1843
+ /**
1844
+ * @description discriminator enum property added by openapi-typescript
1845
+ * @enum {string}
1846
+ */
1847
+ event: "position_metrics";
1848
+ /**
1849
+ * Format: int64
1850
+ * @description Unix timestamp in milliseconds
1851
+ */
1852
+ timestamp: number;
1853
+ data: components["schemas"]["PositionMetricsPayload"];
1854
+ };
1855
+ WsAlertMarketVolumeMilestoneSubscribeMessage: {
1856
+ /** @enum {string} */
1857
+ op: "subscribe";
1858
+ /** @enum {string} */
1859
+ event: "market_volume_milestone";
1860
+ } & components["schemas"]["MarketVolumeMilestoneFilters"] & {
1861
+ /**
1862
+ * @description discriminator enum property added by openapi-typescript
1863
+ * @enum {string}
1864
+ */
1865
+ event: "market_volume_milestone";
1866
+ };
1867
+ WsAlertMarketVolumeMilestoneUnsubscribeMessage: {
1868
+ /** @enum {string} */
1869
+ op: "unsubscribe";
1870
+ /** @enum {string} */
1871
+ event: "market_volume_milestone";
1872
+ } & components["schemas"]["MarketVolumeMilestoneFilters"] & {
1873
+ /**
1874
+ * @description discriminator enum property added by openapi-typescript
1875
+ * @enum {string}
1876
+ */
1877
+ event: "market_volume_milestone";
1878
+ };
1879
+ /**
1880
+ * @description Pushed `market_volume_milestone` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1881
+ * @example {
1882
+ * "event": "market_volume_milestone",
1883
+ * "timestamp": 1743500000000,
1884
+ * "data": {
1885
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
1886
+ * "timeframe": "24h",
1887
+ * "milestone_usd": 100000,
1888
+ * "current_volume_usd": 100125,
1889
+ * "fees": 500,
1890
+ * "txns": 650
1891
+ * }
1892
+ * }
1893
+ */
1894
+ WsAlertMarketVolumeMilestoneEvent: {
1895
+ /**
1896
+ * @description discriminator enum property added by openapi-typescript
1897
+ * @enum {string}
1898
+ */
1899
+ event: "market_volume_milestone";
1900
+ /**
1901
+ * Format: int64
1902
+ * @description Unix timestamp in milliseconds
1903
+ */
1904
+ timestamp: number;
1905
+ data: components["schemas"]["VolumeMilestonePayload"];
1906
+ };
1907
+ WsAlertEventVolumeMilestoneSubscribeMessage: {
1908
+ /** @enum {string} */
1909
+ op: "subscribe";
1910
+ /** @enum {string} */
1911
+ event: "event_volume_milestone";
1912
+ } & components["schemas"]["EventVolumeMilestoneFilters"] & {
1913
+ /**
1914
+ * @description discriminator enum property added by openapi-typescript
1915
+ * @enum {string}
1916
+ */
1917
+ event: "event_volume_milestone";
1918
+ };
1919
+ WsAlertEventVolumeMilestoneUnsubscribeMessage: {
1920
+ /** @enum {string} */
1921
+ op: "unsubscribe";
1922
+ /** @enum {string} */
1923
+ event: "event_volume_milestone";
1924
+ } & components["schemas"]["EventVolumeMilestoneFilters"] & {
1925
+ /**
1926
+ * @description discriminator enum property added by openapi-typescript
1927
+ * @enum {string}
1928
+ */
1929
+ event: "event_volume_milestone";
1930
+ };
1931
+ /**
1932
+ * @description Pushed `event_volume_milestone` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1933
+ * @example {
1934
+ * "event": "event_volume_milestone",
1935
+ * "timestamp": 1743500000000,
1936
+ * "data": {
1937
+ * "event_slug": "test-event-0000000000",
1938
+ * "timeframe": "24h",
1939
+ * "milestone_usd": 500000,
1940
+ * "current_volume_usd": 500250,
1941
+ * "fees": 2500,
1942
+ * "txns": 3200
1943
+ * }
1944
+ * }
1945
+ */
1946
+ WsAlertEventVolumeMilestoneEvent: {
1947
+ /**
1948
+ * @description discriminator enum property added by openapi-typescript
1949
+ * @enum {string}
1950
+ */
1951
+ event: "event_volume_milestone";
1952
+ /**
1953
+ * Format: int64
1954
+ * @description Unix timestamp in milliseconds
1955
+ */
1956
+ timestamp: number;
1957
+ data: components["schemas"]["EventVolumeMilestonePayload"];
1958
+ };
1959
+ WsAlertPositionVolumeMilestoneSubscribeMessage: {
1960
+ /** @enum {string} */
1961
+ op: "subscribe";
1962
+ /** @enum {string} */
1963
+ event: "position_volume_milestone";
1964
+ } & components["schemas"]["PositionVolumeMilestoneFilters"] & {
1965
+ /**
1966
+ * @description discriminator enum property added by openapi-typescript
1967
+ * @enum {string}
1968
+ */
1969
+ event: "position_volume_milestone";
1970
+ };
1971
+ WsAlertPositionVolumeMilestoneUnsubscribeMessage: {
1972
+ /** @enum {string} */
1973
+ op: "unsubscribe";
1974
+ /** @enum {string} */
1975
+ event: "position_volume_milestone";
1976
+ } & components["schemas"]["PositionVolumeMilestoneFilters"] & {
1977
+ /**
1978
+ * @description discriminator enum property added by openapi-typescript
1979
+ * @enum {string}
1980
+ */
1981
+ event: "position_volume_milestone";
1982
+ };
1983
+ /**
1984
+ * @description Pushed `position_volume_milestone` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
1985
+ * @example {
1986
+ * "event": "position_volume_milestone",
1987
+ * "timestamp": 1743500000000,
1988
+ * "data": {
1989
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
1990
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656",
1991
+ * "outcome": "Yes",
1992
+ * "outcome_index": 0,
1993
+ * "timeframe": "24h",
1994
+ * "milestone_usd": 50000,
1995
+ * "current_volume_usd": 50125,
1996
+ * "buy_volume_usd": 30000,
1997
+ * "sell_volume_usd": 20000,
1998
+ * "fees": 250,
1999
+ * "txns": 320,
2000
+ * "buys": 190,
2001
+ * "sells": 130
2002
+ * }
2003
+ * }
2004
+ */
2005
+ WsAlertPositionVolumeMilestoneEvent: {
2006
+ /**
2007
+ * @description discriminator enum property added by openapi-typescript
2008
+ * @enum {string}
2009
+ */
2010
+ event: "position_volume_milestone";
2011
+ /**
2012
+ * Format: int64
2013
+ * @description Unix timestamp in milliseconds
2014
+ */
2015
+ timestamp: number;
2016
+ data: components["schemas"]["PositionVolumeMilestonePayload"];
2017
+ };
2018
+ WsAlertProbabilitySpikeSubscribeMessage: {
2019
+ /** @enum {string} */
2020
+ op: "subscribe";
2021
+ /** @enum {string} */
2022
+ event: "probability_spike";
2023
+ } & components["schemas"]["ProbabilitySpikeFilters"] & {
2024
+ /**
2025
+ * @description discriminator enum property added by openapi-typescript
2026
+ * @enum {string}
2027
+ */
2028
+ event: "probability_spike";
2029
+ };
2030
+ WsAlertProbabilitySpikeUnsubscribeMessage: {
2031
+ /** @enum {string} */
2032
+ op: "unsubscribe";
2033
+ /** @enum {string} */
2034
+ event: "probability_spike";
2035
+ } & components["schemas"]["ProbabilitySpikeFilters"] & {
2036
+ /**
2037
+ * @description discriminator enum property added by openapi-typescript
2038
+ * @enum {string}
2039
+ */
2040
+ event: "probability_spike";
2041
+ };
2042
+ /**
2043
+ * @description Pushed `probability_spike` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
2044
+ * @example {
2045
+ * "event": "probability_spike",
2046
+ * "timestamp": 1743500000000,
2047
+ * "data": {
2048
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656",
2049
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
2050
+ * "event_slug": "test-event-0000000000",
2051
+ * "outcome": "Yes",
2052
+ * "outcome_index": 0,
2053
+ * "previous_probability": 0.4,
2054
+ * "current_probability": 0.5,
2055
+ * "spike_direction": "up",
2056
+ * "spike_pct": 25
2057
+ * }
2058
+ * }
2059
+ */
2060
+ WsAlertProbabilitySpikeEvent: {
2061
+ /**
2062
+ * @description discriminator enum property added by openapi-typescript
2063
+ * @enum {string}
2064
+ */
2065
+ event: "probability_spike";
2066
+ /**
2067
+ * Format: int64
2068
+ * @description Unix timestamp in milliseconds
2069
+ */
2070
+ timestamp: number;
2071
+ data: components["schemas"]["ProbabilitySpikePayload"];
2072
+ };
2073
+ WsAlertPriceSpikeSubscribeMessage: {
2074
+ /** @enum {string} */
2075
+ op: "subscribe";
2076
+ /** @enum {string} */
2077
+ event: "price_spike";
2078
+ } & components["schemas"]["PriceSpikeFilters"] & {
2079
+ /**
2080
+ * @description discriminator enum property added by openapi-typescript
2081
+ * @enum {string}
2082
+ */
2083
+ event: "price_spike";
2084
+ };
2085
+ WsAlertPriceSpikeUnsubscribeMessage: {
2086
+ /** @enum {string} */
2087
+ op: "unsubscribe";
2088
+ /** @enum {string} */
2089
+ event: "price_spike";
2090
+ } & components["schemas"]["PriceSpikeFilters"] & {
2091
+ /**
2092
+ * @description discriminator enum property added by openapi-typescript
2093
+ * @enum {string}
2094
+ */
2095
+ event: "price_spike";
2096
+ };
2097
+ /**
2098
+ * @description Pushed `price_spike` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
2099
+ * @example {
2100
+ * "event": "price_spike",
2101
+ * "timestamp": 1743500000000,
2102
+ * "data": {
2103
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656",
2104
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
2105
+ * "event_slug": "test-event-0000000000",
2106
+ * "outcome": "Yes",
2107
+ * "outcome_index": 0,
2108
+ * "previous_price": 0.4,
2109
+ * "current_price": 0.5,
2110
+ * "spike_direction": "up",
2111
+ * "spike_pct": 25
2112
+ * }
2113
+ * }
2114
+ */
2115
+ WsAlertPriceSpikeEvent: {
2116
+ /**
2117
+ * @description discriminator enum property added by openapi-typescript
2118
+ * @enum {string}
2119
+ */
2120
+ event: "price_spike";
2121
+ /**
2122
+ * Format: int64
2123
+ * @description Unix timestamp in milliseconds
2124
+ */
2125
+ timestamp: number;
2126
+ data: components["schemas"]["PriceSpikePayload"];
2127
+ };
2128
+ WsAlertMarketVolumeSpikeSubscribeMessage: {
2129
+ /** @enum {string} */
2130
+ op: "subscribe";
2131
+ /** @enum {string} */
2132
+ event: "market_volume_spike";
2133
+ } & components["schemas"]["MarketVolumeSpikeFilters"] & {
2134
+ /**
2135
+ * @description discriminator enum property added by openapi-typescript
2136
+ * @enum {string}
2137
+ */
2138
+ event: "market_volume_spike";
2139
+ };
2140
+ WsAlertMarketVolumeSpikeUnsubscribeMessage: {
2141
+ /** @enum {string} */
2142
+ op: "unsubscribe";
2143
+ /** @enum {string} */
2144
+ event: "market_volume_spike";
2145
+ } & components["schemas"]["MarketVolumeSpikeFilters"] & {
2146
+ /**
2147
+ * @description discriminator enum property added by openapi-typescript
2148
+ * @enum {string}
2149
+ */
2150
+ event: "market_volume_spike";
2151
+ };
2152
+ /**
2153
+ * @description Pushed `market_volume_spike` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
2154
+ * @example {
2155
+ * "event": "market_volume_spike",
2156
+ * "timestamp": 1743500000000,
2157
+ * "data": {
2158
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
2159
+ * "timeframe": "1h",
2160
+ * "current_volume_usd": 32000,
2161
+ * "snapshot_volume_usd": 10000,
2162
+ * "delta_volume_usd": 22000,
2163
+ * "spike_pct": 220,
2164
+ * "txns": 480,
2165
+ * "fees": 160
2166
+ * }
2167
+ * }
2168
+ */
2169
+ WsAlertMarketVolumeSpikeEvent: {
2170
+ /**
2171
+ * @description discriminator enum property added by openapi-typescript
2172
+ * @enum {string}
2173
+ */
2174
+ event: "market_volume_spike";
2175
+ /**
2176
+ * Format: int64
2177
+ * @description Unix timestamp in milliseconds
2178
+ */
2179
+ timestamp: number;
2180
+ data: components["schemas"]["MarketVolumeSpikePayload"];
2181
+ };
2182
+ WsAlertEventVolumeSpikeSubscribeMessage: {
2183
+ /** @enum {string} */
2184
+ op: "subscribe";
2185
+ /** @enum {string} */
2186
+ event: "event_volume_spike";
2187
+ } & components["schemas"]["EventVolumeSpikeFilters"] & {
2188
+ /**
2189
+ * @description discriminator enum property added by openapi-typescript
2190
+ * @enum {string}
2191
+ */
2192
+ event: "event_volume_spike";
2193
+ };
2194
+ WsAlertEventVolumeSpikeUnsubscribeMessage: {
2195
+ /** @enum {string} */
2196
+ op: "unsubscribe";
2197
+ /** @enum {string} */
2198
+ event: "event_volume_spike";
2199
+ } & components["schemas"]["EventVolumeSpikeFilters"] & {
2200
+ /**
2201
+ * @description discriminator enum property added by openapi-typescript
2202
+ * @enum {string}
2203
+ */
2204
+ event: "event_volume_spike";
2205
+ };
2206
+ /**
2207
+ * @description Pushed `event_volume_spike` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
2208
+ * @example {
2209
+ * "event": "event_volume_spike",
2210
+ * "timestamp": 1743500000000,
2211
+ * "data": {
2212
+ * "event_slug": "test-event-0000000000",
2213
+ * "timeframe": "1h",
2214
+ * "current_volume_usd": 140000,
2215
+ * "snapshot_volume_usd": 50000,
2216
+ * "delta_volume_usd": 90000,
2217
+ * "spike_pct": 180,
2218
+ * "txns": 1100,
2219
+ * "fees": 700
2220
+ * }
2221
+ * }
2222
+ */
2223
+ WsAlertEventVolumeSpikeEvent: {
2224
+ /**
2225
+ * @description discriminator enum property added by openapi-typescript
2226
+ * @enum {string}
2227
+ */
2228
+ event: "event_volume_spike";
2229
+ /**
2230
+ * Format: int64
2231
+ * @description Unix timestamp in milliseconds
2232
+ */
2233
+ timestamp: number;
2234
+ data: components["schemas"]["EventVolumeSpikePayload"];
2235
+ };
2236
+ WsAlertPositionVolumeSpikeSubscribeMessage: {
2237
+ /** @enum {string} */
2238
+ op: "subscribe";
2239
+ /** @enum {string} */
2240
+ event: "position_volume_spike";
2241
+ } & components["schemas"]["PositionVolumeSpikeFilters"] & {
2242
+ /**
2243
+ * @description discriminator enum property added by openapi-typescript
2244
+ * @enum {string}
2245
+ */
2246
+ event: "position_volume_spike";
2247
+ };
2248
+ WsAlertPositionVolumeSpikeUnsubscribeMessage: {
2249
+ /** @enum {string} */
2250
+ op: "unsubscribe";
2251
+ /** @enum {string} */
2252
+ event: "position_volume_spike";
2253
+ } & components["schemas"]["PositionVolumeSpikeFilters"] & {
2254
+ /**
2255
+ * @description discriminator enum property added by openapi-typescript
2256
+ * @enum {string}
2257
+ */
2258
+ event: "position_volume_spike";
2259
+ };
2260
+ /**
2261
+ * @description Pushed `position_volume_spike` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
2262
+ * @example {
2263
+ * "event": "position_volume_spike",
2264
+ * "timestamp": 1743500000000,
2265
+ * "data": {
2266
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656",
2267
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
2268
+ * "outcome": "Yes",
2269
+ * "outcome_index": 0,
2270
+ * "timeframe": "1h",
2271
+ * "current_volume_usd": 20500,
2272
+ * "snapshot_volume_usd": 5000,
2273
+ * "delta_volume_usd": 15500,
2274
+ * "spike_pct": 310,
2275
+ * "txns": 240,
2276
+ * "fees": 102.5
2277
+ * }
2278
+ * }
2279
+ */
2280
+ WsAlertPositionVolumeSpikeEvent: {
2281
+ /**
2282
+ * @description discriminator enum property added by openapi-typescript
2283
+ * @enum {string}
2284
+ */
2285
+ event: "position_volume_spike";
2286
+ /**
2287
+ * Format: int64
2288
+ * @description Unix timestamp in milliseconds
2289
+ */
2290
+ timestamp: number;
2291
+ data: components["schemas"]["PositionVolumeSpikePayload"];
2292
+ };
2293
+ WsAlertCloseToBondSubscribeMessage: ({
2294
+ /** @enum {string} */
2295
+ op: "subscribe";
2296
+ /** @enum {string} */
2297
+ event: "close_to_bond";
2298
+ } & components["schemas"]["CloseToBondFilters"] & {
2299
+ /**
2300
+ * @description discriminator enum property added by openapi-typescript
2301
+ * @enum {string}
2302
+ */
2303
+ event: "close_to_bond";
2304
+ }) | unknown | unknown;
2305
+ WsAlertCloseToBondUnsubscribeMessage: ({
2306
+ /** @enum {string} */
2307
+ op: "unsubscribe";
2308
+ /** @enum {string} */
2309
+ event: "close_to_bond";
2310
+ } & components["schemas"]["CloseToBondFilters"] & {
2311
+ /**
2312
+ * @description discriminator enum property added by openapi-typescript
2313
+ * @enum {string}
2314
+ */
2315
+ event: "close_to_bond";
2316
+ }) | unknown | unknown;
2317
+ /**
2318
+ * @description Pushed `close_to_bond` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
2319
+ * @example {
2320
+ * "event": "close_to_bond",
2321
+ * "timestamp": 1743500000000,
2322
+ * "data": {
2323
+ * "trader": "0x0000000000000000000000000000000000000000",
2324
+ * "taker": "0x0000000000000000000000000000000000000000",
2325
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656",
2326
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
2327
+ * "outcome": "Yes",
2328
+ * "outcome_index": 0,
2329
+ * "question": "Will this test webhook fire correctly?",
2330
+ * "market_slug": "test-market-0000000000",
2331
+ * "event_slug": "test-event-0000000000",
2332
+ * "trade_id": "00000000-0000-0000-0000-000000000000",
2333
+ * "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
2334
+ * "block": 0,
2335
+ * "confirmed_at": 1700000000,
2336
+ * "amount_usd": 500,
2337
+ * "shares_amount": 515.46,
2338
+ * "fee": 2.5,
2339
+ * "side": "Buy",
2340
+ * "price": 0.97,
2341
+ * "probability": 0.97,
2342
+ * "bond_side": "high",
2343
+ * "threshold": 0.95
2344
+ * }
2345
+ * }
2346
+ */
2347
+ WsAlertCloseToBondEvent: {
2348
+ /**
2349
+ * @description discriminator enum property added by openapi-typescript
2350
+ * @enum {string}
2351
+ */
2352
+ event: "close_to_bond";
2353
+ /**
2354
+ * Format: int64
2355
+ * @description Unix timestamp in milliseconds
2356
+ */
2357
+ timestamp: number;
2358
+ data: components["schemas"]["CloseToBondPayload"];
2359
+ };
2360
+ WsAlertMarketCreatedSubscribeMessage: {
2361
+ /** @enum {string} */
2362
+ op: "subscribe";
2363
+ /** @enum {string} */
2364
+ event: "market_created";
2365
+ } & components["schemas"]["MarketCreatedFilters"] & {
2366
+ /**
2367
+ * @description discriminator enum property added by openapi-typescript
2368
+ * @enum {string}
2369
+ */
2370
+ event: "market_created";
2371
+ };
2372
+ WsAlertMarketCreatedUnsubscribeMessage: {
2373
+ /** @enum {string} */
2374
+ op: "unsubscribe";
2375
+ /** @enum {string} */
2376
+ event: "market_created";
2377
+ } & components["schemas"]["MarketCreatedFilters"] & {
2378
+ /**
2379
+ * @description discriminator enum property added by openapi-typescript
2380
+ * @enum {string}
2381
+ */
2382
+ event: "market_created";
2383
+ };
2384
+ /**
2385
+ * @description Pushed `market_created` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
2386
+ * @example {
2387
+ * "event": "market_created",
2388
+ * "timestamp": 1743500000000,
2389
+ * "data": {
2390
+ * "condition_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
2391
+ * "market_slug": "test-market-0000000000",
2392
+ * "event_slug": "test-event-0000000000",
2393
+ * "event_id": null,
2394
+ * "event_title": "Test Event 0000",
2395
+ * "series_slug": null,
2396
+ * "outcomes": [
2397
+ * {
2398
+ * "index": 0,
2399
+ * "name": "Yes",
2400
+ * "position_id": "452312848583266388373324160190187140051835877600158453279131187530910662656"
2401
+ * },
2402
+ * {
2403
+ * "index": 1,
2404
+ * "name": "No",
2405
+ * "position_id": "0"
2406
+ * }
2407
+ * ],
2408
+ * "question": "Will this test webhook fire correctly?",
2409
+ * "title": "Test Market 0000",
2410
+ * "description": "A test market for webhook payload verification.",
2411
+ * "category": "Crypto",
2412
+ * "tags": [
2413
+ * "test",
2414
+ * "crypto"
2415
+ * ],
2416
+ * "image_url": null,
2417
+ * "neg_risk": false
2418
+ * }
2419
+ * }
2420
+ */
2421
+ WsAlertMarketCreatedEvent: {
2422
+ /**
2423
+ * @description discriminator enum property added by openapi-typescript
2424
+ * @enum {string}
2425
+ */
2426
+ event: "market_created";
2427
+ /**
2428
+ * Format: int64
2429
+ * @description Unix timestamp in milliseconds
2430
+ */
2431
+ timestamp: number;
2432
+ data: components["schemas"]["MarketCreatedPayload"];
2433
+ };
2434
+ WsAlertAssetPriceTickSubscribeMessage: {
2435
+ /** @enum {string} */
2436
+ op: "subscribe";
2437
+ /** @enum {string} */
2438
+ event: "asset_price_tick";
2439
+ } & components["schemas"]["AssetPriceTickFilters"] & {
2440
+ /**
2441
+ * @description discriminator enum property added by openapi-typescript
2442
+ * @enum {string}
2443
+ */
2444
+ event: "asset_price_tick";
2445
+ };
2446
+ WsAlertAssetPriceTickUnsubscribeMessage: {
2447
+ /** @enum {string} */
2448
+ op: "unsubscribe";
2449
+ /** @enum {string} */
2450
+ event: "asset_price_tick";
2451
+ } & components["schemas"]["AssetPriceTickFilters"] & {
2452
+ /**
2453
+ * @description discriminator enum property added by openapi-typescript
2454
+ * @enum {string}
2455
+ */
2456
+ event: "asset_price_tick";
2457
+ };
2458
+ /**
2459
+ * @description Pushed `asset_price_tick` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
2460
+ * @example {
2461
+ * "event": "asset_price_tick",
2462
+ * "timestamp": 1743500000000,
2463
+ * "data": {
2464
+ * "symbol": "BTC",
2465
+ * "price": 65000,
2466
+ * "timestamp_ms": 1700000000000
2467
+ * }
2468
+ * }
2469
+ */
2470
+ WsAlertAssetPriceTickEvent: {
2471
+ /**
2472
+ * @description discriminator enum property added by openapi-typescript
2473
+ * @enum {string}
2474
+ */
2475
+ event: "asset_price_tick";
2476
+ /**
2477
+ * Format: int64
2478
+ * @description Unix timestamp in milliseconds
2479
+ */
2480
+ timestamp: number;
2481
+ data: components["schemas"]["AssetPriceTickPayload"];
2482
+ };
2483
+ WsAlertAssetPriceWindowUpdateSubscribeMessage: {
2484
+ /** @enum {string} */
2485
+ op: "subscribe";
2486
+ /** @enum {string} */
2487
+ event: "asset_price_window_update";
2488
+ } & components["schemas"]["AssetPriceWindowUpdateFilters"] & {
2489
+ /**
2490
+ * @description discriminator enum property added by openapi-typescript
2491
+ * @enum {string}
2492
+ */
2493
+ event: "asset_price_window_update";
2494
+ };
2495
+ WsAlertAssetPriceWindowUpdateUnsubscribeMessage: {
2496
+ /** @enum {string} */
2497
+ op: "unsubscribe";
2498
+ /** @enum {string} */
2499
+ event: "asset_price_window_update";
2500
+ } & components["schemas"]["AssetPriceWindowUpdateFilters"] & {
2501
+ /**
2502
+ * @description discriminator enum property added by openapi-typescript
2503
+ * @enum {string}
2504
+ */
2505
+ event: "asset_price_window_update";
2506
+ };
2507
+ /**
2508
+ * @description Pushed `asset_price_window_update` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
2509
+ * @example {
2510
+ * "event": "asset_price_window_update",
2511
+ * "timestamp": 1743500000000,
2512
+ * "data": {
2513
+ * "symbol": "BTC",
2514
+ * "variant": "1h",
2515
+ * "start_time": 1700000000000,
2516
+ * "end_time": 1700003600000,
2517
+ * "open_price": 64800,
2518
+ * "close_price": 65200,
2519
+ * "update_type": "close"
2520
+ * }
2521
+ * }
2522
+ */
2523
+ WsAlertAssetPriceWindowUpdateEvent: {
2524
+ /**
2525
+ * @description discriminator enum property added by openapi-typescript
2526
+ * @enum {string}
2527
+ */
2528
+ event: "asset_price_window_update";
2529
+ /**
2530
+ * Format: int64
2531
+ * @description Unix timestamp in milliseconds
2532
+ */
2533
+ timestamp: number;
2534
+ data: components["schemas"]["AssetPriceWindowUpdatePayload"];
2535
+ };
2536
+ /** @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"];
2538
+ /** @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"];
2540
+ /** @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"];
2542
+ };
2543
+ responses: never;
2544
+ parameters: never;
2545
+ requestBodies: never;
2546
+ headers: never;
2547
+ pathItems: never;
2548
+ }
2549
+ export type $defs = Record<string, never>;
2550
+ export type operations = Record<string, never>;
2551
+ export interface WsAlertSubscribeMap {
2552
+ trader_first_trade: components["schemas"]["WsAlertTraderFirstTradeSubscribeMessage"];
2553
+ trader_new_market: components["schemas"]["WsAlertTraderNewMarketSubscribeMessage"];
2554
+ trader_whale_trade: components["schemas"]["WsAlertTraderWhaleTradeSubscribeMessage"];
2555
+ trader_new_trade: components["schemas"]["WsAlertTraderNewTradeSubscribeMessage"];
2556
+ trader_global_pnl: components["schemas"]["WsAlertTraderGlobalPnlSubscribeMessage"];
2557
+ trader_market_pnl: components["schemas"]["WsAlertTraderMarketPnlSubscribeMessage"];
2558
+ trader_event_pnl: components["schemas"]["WsAlertTraderEventPnlSubscribeMessage"];
2559
+ condition_metrics: components["schemas"]["WsAlertConditionMetricsSubscribeMessage"];
2560
+ event_metrics: components["schemas"]["WsAlertEventMetricsSubscribeMessage"];
2561
+ position_metrics: components["schemas"]["WsAlertPositionMetricsSubscribeMessage"];
2562
+ market_volume_milestone: components["schemas"]["WsAlertMarketVolumeMilestoneSubscribeMessage"];
2563
+ event_volume_milestone: components["schemas"]["WsAlertEventVolumeMilestoneSubscribeMessage"];
2564
+ position_volume_milestone: components["schemas"]["WsAlertPositionVolumeMilestoneSubscribeMessage"];
2565
+ probability_spike: components["schemas"]["WsAlertProbabilitySpikeSubscribeMessage"];
2566
+ price_spike: components["schemas"]["WsAlertPriceSpikeSubscribeMessage"];
2567
+ market_volume_spike: components["schemas"]["WsAlertMarketVolumeSpikeSubscribeMessage"];
2568
+ event_volume_spike: components["schemas"]["WsAlertEventVolumeSpikeSubscribeMessage"];
2569
+ position_volume_spike: components["schemas"]["WsAlertPositionVolumeSpikeSubscribeMessage"];
2570
+ close_to_bond: components["schemas"]["WsAlertCloseToBondSubscribeMessage"];
2571
+ market_created: components["schemas"]["WsAlertMarketCreatedSubscribeMessage"];
2572
+ asset_price_tick: components["schemas"]["WsAlertAssetPriceTickSubscribeMessage"];
2573
+ asset_price_window_update: components["schemas"]["WsAlertAssetPriceWindowUpdateSubscribeMessage"];
2574
+ }
2575
+ export interface WsAlertEventDataMap {
2576
+ trader_first_trade: components["schemas"]["FirstTradePayload"];
2577
+ trader_new_market: components["schemas"]["NewMarketPayload"];
2578
+ trader_whale_trade: components["schemas"]["WhaleTradePayload"];
2579
+ trader_new_trade: components["schemas"]["NewTradePayload"];
2580
+ trader_global_pnl: components["schemas"]["GlobalPnlPayload"];
2581
+ trader_market_pnl: components["schemas"]["MarketPnlPayload"];
2582
+ trader_event_pnl: components["schemas"]["EventPnlPayload"];
2583
+ condition_metrics: components["schemas"]["ConditionMetricsPayload"];
2584
+ event_metrics: components["schemas"]["EventMetricsPayload"];
2585
+ position_metrics: components["schemas"]["PositionMetricsPayload"];
2586
+ market_volume_milestone: components["schemas"]["VolumeMilestonePayload"];
2587
+ event_volume_milestone: components["schemas"]["EventVolumeMilestonePayload"];
2588
+ position_volume_milestone: components["schemas"]["PositionVolumeMilestonePayload"];
2589
+ probability_spike: components["schemas"]["ProbabilitySpikePayload"];
2590
+ price_spike: components["schemas"]["PriceSpikePayload"];
2591
+ market_volume_spike: components["schemas"]["MarketVolumeSpikePayload"];
2592
+ event_volume_spike: components["schemas"]["EventVolumeSpikePayload"];
2593
+ position_volume_spike: components["schemas"]["PositionVolumeSpikePayload"];
2594
+ close_to_bond: components["schemas"]["CloseToBondPayload"];
2595
+ market_created: components["schemas"]["MarketCreatedPayload"];
2596
+ asset_price_tick: components["schemas"]["AssetPriceTickPayload"];
2597
+ asset_price_window_update: components["schemas"]["AssetPriceWindowUpdatePayload"];
2598
+ }
2599
+ export type WsAlertEventName = keyof WsAlertSubscribeMap;