@structbuild/sdk 0.3.10-staging.9 → 0.4.0

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.
@@ -2,44 +2,1834 @@ export type paths = Record<string, never>;
2
2
  export type webhooks = Record<string, never>;
3
3
  export interface components {
4
4
  schemas: {
5
+ /** @description V3 UMA OOv3: an assertion was disputed. */
6
+ AssertionDisputedEvent: {
7
+ id: string;
8
+ hash: string;
9
+ /** Format: int64 */
10
+ block?: number | null;
11
+ /** Format: int64 */
12
+ confirmed_at?: number | null;
13
+ /** Format: int64 */
14
+ received_at?: number | null;
15
+ /** Format: int64 */
16
+ log_index?: number | null;
17
+ /** Format: int64 */
18
+ block_index?: number | null;
19
+ oracle_contract: string;
20
+ assertion_id: string;
21
+ caller: string;
22
+ disputer: string;
23
+ condition_id?: string | null;
24
+ question?: string | null;
25
+ image_url?: string | null;
26
+ slug?: string | null;
27
+ event_slug?: string | null;
28
+ };
29
+ /** @description V3 UMA OOv3: a new assertion (resolution proposal) was made. */
30
+ AssertionMadeEvent: {
31
+ id: string;
32
+ hash: string;
33
+ /** Format: int64 */
34
+ block?: number | null;
35
+ /** Format: int64 */
36
+ confirmed_at?: number | null;
37
+ /** Format: int64 */
38
+ received_at?: number | null;
39
+ /** Format: int64 */
40
+ log_index?: number | null;
41
+ /** Format: int64 */
42
+ block_index?: number | null;
43
+ oracle_contract: string;
44
+ assertion_id: string;
45
+ domain_id: string;
46
+ claim: string;
47
+ asserter: string;
48
+ callback_recipient: string;
49
+ escalation_manager: string;
50
+ caller: string;
51
+ /** Format: int64 */
52
+ expiration_time: number;
53
+ currency: string;
54
+ bond: string;
55
+ identifier: string;
56
+ condition_id?: string | null;
57
+ proposed_outcome?: string | null;
58
+ question?: string | null;
59
+ image_url?: string | null;
60
+ slug?: string | null;
61
+ event_slug?: string | null;
62
+ };
63
+ /** @description V3 UMA OOv3: an assertion liveness period expired and was settled. */
64
+ AssertionSettledEvent: {
65
+ id: string;
66
+ hash: string;
67
+ /** Format: int64 */
68
+ block?: number | null;
69
+ /** Format: int64 */
70
+ confirmed_at?: number | null;
71
+ /** Format: int64 */
72
+ received_at?: number | null;
73
+ /** Format: int64 */
74
+ log_index?: number | null;
75
+ /** Format: int64 */
76
+ block_index?: number | null;
77
+ oracle_contract: string;
78
+ assertion_id: string;
79
+ bond_recipient: string;
80
+ disputed: boolean;
81
+ settlement_resolution: boolean;
82
+ settle_caller: string;
83
+ condition_id?: string | null;
84
+ question?: string | null;
85
+ image_url?: string | null;
86
+ slug?: string | null;
87
+ event_slug?: string | null;
88
+ };
89
+ /** @description Webhook payload for an asset price tick. */
90
+ AssetPriceTickPayload: {
91
+ /** @description Asset symbol: "BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", or "HYPE" */
92
+ symbol: string;
93
+ /**
94
+ * Format: double
95
+ * @description Current price from the Chainlink feed
96
+ */
97
+ price: number;
98
+ /**
99
+ * Format: int64
100
+ * @description Tick timestamp as reported by the WebSocket feed (milliseconds since epoch)
101
+ */
102
+ timestamp_ms: number;
103
+ };
104
+ /** @description Webhook payload for an asset price window open or close. */
105
+ AssetPriceWindowUpdatePayload: {
106
+ /** @description Asset symbol: "BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", or "HYPE" */
107
+ symbol: string;
108
+ /** @description Time-window variant: "5m", "15m", "1h", "4h", "1d", or "24h" */
109
+ variant: string;
110
+ /**
111
+ * Format: int64
112
+ * @description Window start timestamp (milliseconds since epoch)
113
+ */
114
+ start_time: number;
115
+ /**
116
+ * Format: int64
117
+ * @description Window end timestamp (milliseconds since epoch)
118
+ */
119
+ end_time: number;
120
+ /**
121
+ * Format: double
122
+ * @description Opening price at start_time
123
+ */
124
+ open_price: number;
125
+ /**
126
+ * Format: double
127
+ * @description Closing price at end_time (0.0 on an "open" update — not yet available)
128
+ */
129
+ close_price: number;
130
+ /** @description "open" when the window starts, "close" when the window is complete */
131
+ update_type: string;
132
+ };
133
+ /** @description Close-to-bond webhook payload */
134
+ CloseToBondPayload: {
135
+ /** @description Trader address (the limit-order maker) */
136
+ trader: string;
137
+ /** @description Taker address (the order filler — often the exchange contract) */
138
+ taker: string;
139
+ /** @description Position ID (ERC1155 token ID) */
140
+ position_id: string;
141
+ /** @description Condition ID (parent market) */
142
+ condition_id?: string | null;
143
+ /** @description Outcome name (e.g. "Yes", "No") */
144
+ outcome?: string | null;
145
+ /**
146
+ * Format: int32
147
+ * @description Outcome index (0 = Yes/Up, 1 = No). Position 0 usually represents Yes/Up.
148
+ */
149
+ outcome_index?: number | null;
150
+ /** @description Market question */
151
+ question?: string | null;
152
+ /** @description Market slug */
153
+ market_slug?: string | null;
154
+ /** @description Event slug */
155
+ event_slug?: string | null;
156
+ /** @description Trade ID */
157
+ trade_id: string;
158
+ /** @description Transaction hash */
159
+ hash: string;
160
+ /**
161
+ * Format: int64
162
+ * @description Block number
163
+ */
164
+ block: number;
165
+ /**
166
+ * Format: int64
167
+ * @description Confirmed timestamp (Unix seconds)
168
+ */
169
+ confirmed_at: number;
170
+ /**
171
+ * Format: double
172
+ * @description USD size of the trade
173
+ */
174
+ amount_usd: number;
175
+ /**
176
+ * Format: double
177
+ * @description Outcome shares traded
178
+ */
179
+ shares_amount: number;
180
+ /**
181
+ * Format: double
182
+ * @description Fee paid (USD)
183
+ */
184
+ fee: number;
185
+ /** @description Trade side ("Buy" or "Sell") */
186
+ side: string;
187
+ /**
188
+ * Format: double
189
+ * @description Price per share (0.0–1.0) — the value that triggered the notification
190
+ */
191
+ price: number;
192
+ /**
193
+ * Format: double
194
+ * @description Implied probability of the outcome (0.0–1.0)
195
+ */
196
+ probability?: number | null;
197
+ /** @description Which bond zone was entered: `"high"` (YES near-certain) or `"low"` (NO near-certain) */
198
+ bond_side: string;
199
+ /**
200
+ * Format: double
201
+ * @description The probability threshold from the subscriber's filter that was breached
202
+ */
203
+ threshold: number;
204
+ };
205
+ /** @description Condition metrics webhook payload (Arc-optimized, no internal metadata) */
206
+ ConditionMetricsPayload: {
207
+ condition_id?: string | null;
208
+ timeframe?: string | null;
209
+ /** Format: double */
210
+ volume_usd?: number | null;
211
+ /** Format: double */
212
+ fees?: number | null;
213
+ /** Format: int64 */
214
+ txns?: number | null;
215
+ /** Format: int64 */
216
+ unique_traders?: number | null;
217
+ };
218
+ /** @description CTF ConditionResolution: positions become redeemable on the Conditional Tokens contract. */
219
+ ConditionResolutionEvent: {
220
+ id: string;
221
+ hash: string;
222
+ /** Format: int64 */
223
+ block?: number | null;
224
+ /** Format: int64 */
225
+ confirmed_at?: number | null;
226
+ /** Format: int64 */
227
+ received_at?: number | null;
228
+ /** Format: int64 */
229
+ log_index?: number | null;
230
+ /** Format: int64 */
231
+ block_index?: number | null;
232
+ oracle_contract: string;
233
+ condition_id: string;
234
+ oracle: string;
235
+ proposed_outcome?: string | null;
236
+ question?: string | null;
237
+ image_url?: string | null;
238
+ slug?: string | null;
239
+ event_slug?: string | null;
240
+ };
241
+ /** @description Request body for creating a webhook */
242
+ CreateWebhookRequestBody: {
243
+ /** @description Destination URL for webhook deliveries (must be HTTPS) */
244
+ url: string;
245
+ /** @description Event to subscribe to */
246
+ event: components["schemas"]["PolymarketWebhookEvent"];
247
+ /** @description Optional secret for HMAC signature verification */
248
+ secret?: string | null;
249
+ filters?: null | components["schemas"]["WebhookFiltersBody"];
250
+ /** @description Optional description/name */
251
+ description?: string | null;
252
+ };
253
+ /** @description Delete webhook response */
254
+ DeleteWebhookResponse: {
255
+ deleted: boolean;
256
+ };
257
+ /** @description V2 UMA OOv2: a proposed price was disputed. */
258
+ DisputePriceEvent: {
259
+ id: string;
260
+ hash: string;
261
+ /** Format: int64 */
262
+ block?: number | null;
263
+ /** Format: int64 */
264
+ confirmed_at?: number | null;
265
+ /** Format: int64 */
266
+ received_at?: number | null;
267
+ /** Format: int64 */
268
+ log_index?: number | null;
269
+ /** Format: int64 */
270
+ block_index?: number | null;
271
+ oracle_contract: string;
272
+ requester: string;
273
+ proposer: string;
274
+ disputer: string;
275
+ identifier: string;
276
+ timestamp: string;
277
+ ancillary_data: string;
278
+ /** Format: int64 */
279
+ proposed_price: number;
280
+ condition_id?: string | null;
281
+ proposed_outcome?: string | null;
282
+ question?: string | null;
283
+ image_url?: string | null;
284
+ slug?: string | null;
285
+ event_slug?: string | null;
286
+ };
287
+ /** @description Event metrics webhook payload (Arc-optimized, no internal metadata) */
288
+ EventMetricsPayload: {
289
+ event_slug?: string | null;
290
+ timeframe?: string | null;
291
+ /** Format: double */
292
+ volume_usd?: number | null;
293
+ /** Format: double */
294
+ fees?: number | null;
295
+ /** Format: int64 */
296
+ txns?: number | null;
297
+ /** Format: int64 */
298
+ unique_traders?: number | null;
299
+ };
300
+ /** @description Event PnL webhook payload (Arc-optimized) */
301
+ EventPnlPayload: {
302
+ trader?: string | null;
303
+ event_slug?: string | null;
304
+ /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
305
+ timeframe: string;
306
+ /** Format: int64 */
307
+ markets_traded?: number | null;
308
+ /** Format: int64 */
309
+ outcomes_traded?: number | null;
310
+ /** Format: int64 */
311
+ total_buys?: number | null;
312
+ /** Format: int64 */
313
+ total_sells?: number | null;
314
+ /** Format: int64 */
315
+ total_redemptions?: number | null;
316
+ /** Format: int64 */
317
+ total_merges?: number | null;
318
+ /** Format: double */
319
+ total_volume_usd?: number | null;
320
+ /** Format: double */
321
+ buy_usd?: number | null;
322
+ /** Format: double */
323
+ sell_usd?: number | null;
324
+ /** Format: double */
325
+ redemption_usd?: number | null;
326
+ /** Format: double */
327
+ merge_usd?: number | null;
328
+ /** Format: double */
329
+ realized_pnl_usd?: number | null;
330
+ /** Format: int64 */
331
+ winning_markets?: number | null;
332
+ /** Format: int64 */
333
+ losing_markets?: number | null;
334
+ /** Format: double */
335
+ total_fees?: number | null;
336
+ /** Format: int64 */
337
+ first_trade_at?: number | null;
338
+ /** Format: int64 */
339
+ last_trade_at?: number | null;
340
+ };
341
+ /** @description Event volume milestone webhook payload */
342
+ EventVolumeMilestonePayload: {
343
+ event_slug: string;
344
+ timeframe: string;
345
+ /**
346
+ * Format: double
347
+ * @description Milestone amount reached (USD)
348
+ */
349
+ milestone_usd: number;
350
+ /**
351
+ * Format: double
352
+ * @description Current volume (USD) that triggered the milestone
353
+ */
354
+ current_volume_usd: number;
355
+ /**
356
+ * Format: double
357
+ * @description Total fees collected in this timeframe
358
+ */
359
+ fees: number;
360
+ /**
361
+ * Format: int64
362
+ * @description Total transactions in this timeframe
363
+ */
364
+ txns: number;
365
+ };
366
+ /** @description Event volume spike webhook payload */
367
+ EventVolumeSpikePayload: {
368
+ event_slug: string;
369
+ timeframe: string;
370
+ /**
371
+ * Format: double
372
+ * @description Current aggregated event volume at the time of the spike (USD)
373
+ */
374
+ current_volume_usd: number;
375
+ /**
376
+ * Format: double
377
+ * @description Volume at the snapshot baseline (USD)
378
+ */
379
+ snapshot_volume_usd: number;
380
+ /**
381
+ * Format: double
382
+ * @description New volume since the snapshot that triggered this notification (USD)
383
+ */
384
+ delta_volume_usd: number;
385
+ /**
386
+ * Format: double
387
+ * @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
388
+ */
389
+ spike_pct: number;
390
+ /**
391
+ * Format: int64
392
+ * @description Total transactions in this timeframe
393
+ */
394
+ txns: number;
395
+ /**
396
+ * Format: double
397
+ * @description Total fees in this timeframe
398
+ */
399
+ fees: number;
400
+ };
401
+ /** @description First trade webhook payload with zero-copy Arc<str> for string sharing */
402
+ FirstTradePayload: {
403
+ /** @description Trader/taker address (zero-copy Arc) */
404
+ trader: string;
405
+ /** @description Taker address (same as trader, zero-copy Arc) */
406
+ taker: string;
407
+ /** @description Position ID (ERC1155 token ID, zero-copy Arc) */
408
+ position_id: string;
409
+ /** @description Condition ID (market condition, zero-copy Arc) */
410
+ condition_id?: string | null;
411
+ /** @description Market outcome (e.g., "Yes", "No", zero-copy Arc) */
412
+ outcome?: string | null;
413
+ /**
414
+ * Format: int32
415
+ * @description Outcome index (0 = Yes, 1 = No)
416
+ */
417
+ outcome_index?: number | null;
418
+ /** @description Market question (zero-copy Arc) */
419
+ question?: string | null;
420
+ /** @description Market slug (zero-copy Arc) */
421
+ market_slug?: string | null;
422
+ /** @description Event slug (parent event, zero-copy Arc) */
423
+ event_slug?: string | null;
424
+ /** @description Trade ID (zero-copy Arc) */
425
+ trade_id: string;
426
+ /** @description Transaction hash (zero-copy Arc) */
427
+ hash: string;
428
+ /**
429
+ * Format: int64
430
+ * @description Block number
431
+ */
432
+ block: number;
433
+ /**
434
+ * Format: int64
435
+ * @description Confirmed timestamp (Unix seconds)
436
+ */
437
+ confirmed_at: number;
438
+ /** Format: double */
439
+ amount_usd: number;
440
+ /** Format: double */
441
+ shares_amount: number;
442
+ /** Format: double */
443
+ fee: number;
444
+ /** @description Trade side (Buy/Sell, zero-copy Arc) */
445
+ side: string;
446
+ /**
447
+ * Format: double
448
+ * @description Price per share (0.0 - 1.0)
449
+ */
450
+ price: number;
451
+ exchange: string;
452
+ trade_type: string;
453
+ };
454
+ /** @description Global PnL webhook payload (Arc-optimized) */
455
+ GlobalPnlPayload: {
456
+ trader?: string | null;
457
+ /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
458
+ timeframe: string;
459
+ /** Format: double */
460
+ realized_pnl_usd?: number | null;
461
+ /** Format: int64 */
462
+ events_traded?: number | null;
463
+ /** Format: int64 */
464
+ markets_traded?: number | null;
465
+ /** Format: int64 */
466
+ total_buys?: number | null;
467
+ /** Format: int64 */
468
+ total_sells?: number | null;
469
+ /** Format: int64 */
470
+ total_redemptions?: number | null;
471
+ /** Format: int64 */
472
+ total_merges?: number | null;
473
+ /** Format: double */
474
+ total_volume_usd?: number | null;
475
+ /** Format: double */
476
+ buy_volume_usd?: number | null;
477
+ /** Format: double */
478
+ sell_volume_usd?: number | null;
479
+ /** Format: double */
480
+ redemption_volume_usd?: number | null;
481
+ /** Format: double */
482
+ merge_volume_usd?: number | null;
483
+ /** Format: int64 */
484
+ markets_won?: number | null;
485
+ /** Format: int64 */
486
+ markets_lost?: number | null;
487
+ /** Format: double */
488
+ market_win_rate_pct?: number | null;
489
+ /** Format: double */
490
+ avg_pnl_per_market?: number | null;
491
+ /** Format: double */
492
+ avg_pnl_per_trade?: number | null;
493
+ /** Format: double */
494
+ avg_hold_time_seconds?: number | null;
495
+ /** Format: double */
496
+ total_fees?: number | null;
497
+ /** Format: double */
498
+ best_trade_pnl_usd?: number | null;
499
+ best_trade_condition_id?: string | null;
500
+ /** Format: int64 */
501
+ first_trade_at?: number | null;
502
+ /** Format: int64 */
503
+ last_trade_at?: number | null;
504
+ };
505
+ /** @description Response for GET /v1/webhook/events */
506
+ ListEventsResponse: {
507
+ events: components["schemas"]["WebhookEventInfo"][];
508
+ };
509
+ /** @description Outcome entry in the market created payload — mirrors `NewMarketOutcome` */
510
+ MarketCreatedOutcome: {
511
+ /**
512
+ * Format: int32
513
+ * @description Outcome index (0 = Yes, 1 = No)
514
+ */
515
+ index: number;
516
+ /** @description Outcome name (e.g. "Yes", "No") */
517
+ name: string;
518
+ /** @description ERC1155 position token ID */
519
+ position_id: string;
520
+ };
521
+ /** @description Market created webhook payload — mirrors `NewMarketPayload` field-for-field */
522
+ MarketCreatedPayload: {
523
+ /** @description Condition ID (0x-prefixed hex, lowercase) */
524
+ condition_id: string;
525
+ /** @description Market slug */
526
+ market_slug: string;
527
+ /** @description Event slug (parent event) */
528
+ event_slug?: string | null;
529
+ /** @description Event ID */
530
+ event_id?: string | null;
531
+ /** @description Event title */
532
+ event_title?: string | null;
533
+ /** @description Series slug */
534
+ series_slug?: string | null;
535
+ /** @description Outcomes with their position IDs, index, and name */
536
+ outcomes: components["schemas"]["MarketCreatedOutcome"][];
537
+ /** @description Market question */
538
+ question: string;
539
+ /** @description Market title (short display name) */
540
+ title?: string | null;
541
+ /** @description Market description */
542
+ description: string;
543
+ /** @description Market category (e.g. "Sports", "Politics") */
544
+ category?: string | null;
545
+ /** @description Market tags */
546
+ tags: string[];
547
+ /** @description Cover image URL */
548
+ image_url?: string | null;
549
+ /** @description Whether this is a neg-risk market */
550
+ neg_risk: boolean;
551
+ };
552
+ /** @description Market PnL webhook payload (Arc-optimized) */
553
+ MarketPnlPayload: {
554
+ trader?: string | null;
555
+ condition_id?: string | null;
556
+ event_slug?: string | null;
557
+ /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
558
+ timeframe: string;
559
+ /** Format: int64 */
560
+ outcomes_traded?: number | null;
561
+ /** Format: int64 */
562
+ total_buys?: number | null;
563
+ /** Format: int64 */
564
+ total_sells?: number | null;
565
+ /** Format: int64 */
566
+ total_redemptions?: number | null;
567
+ /** Format: int64 */
568
+ total_merges?: number | null;
569
+ /** Format: double */
570
+ buy_usd?: number | null;
571
+ /** Format: double */
572
+ sell_usd?: number | null;
573
+ /** Format: double */
574
+ redemption_usd?: number | null;
575
+ /** Format: double */
576
+ merge_usd?: number | null;
577
+ /** Format: double */
578
+ realized_pnl_usd?: number | null;
579
+ /** Format: int64 */
580
+ winning_outcomes?: number | null;
581
+ /** Format: double */
582
+ total_fees?: number | null;
583
+ /** Format: int64 */
584
+ first_trade_at?: number | null;
585
+ /** Format: int64 */
586
+ last_trade_at?: number | null;
587
+ };
588
+ /** @description Market volume spike webhook payload */
589
+ MarketVolumeSpikePayload: {
590
+ condition_id: string;
591
+ timeframe: string;
592
+ /**
593
+ * Format: double
594
+ * @description Current window volume at the time of the spike (USD)
595
+ */
596
+ current_volume_usd: number;
597
+ /**
598
+ * Format: double
599
+ * @description Volume at the snapshot baseline (USD)
600
+ */
601
+ snapshot_volume_usd: number;
602
+ /**
603
+ * Format: double
604
+ * @description New volume since the snapshot that triggered this notification (USD)
605
+ */
606
+ delta_volume_usd: number;
607
+ /**
608
+ * Format: double
609
+ * @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
610
+ */
611
+ spike_pct: number;
612
+ /**
613
+ * Format: int64
614
+ * @description Total transactions in this timeframe
615
+ */
616
+ txns: number;
617
+ /**
618
+ * Format: double
619
+ * @description Total fees in this timeframe
620
+ */
621
+ fees: number;
622
+ };
623
+ /** @description NegRisk Adapter: outcome reported for a neg-risk market question. */
624
+ NegRiskOutcomeReportedEvent: {
625
+ id: string;
626
+ hash: string;
627
+ /** Format: int64 */
628
+ block?: number | null;
629
+ /** Format: int64 */
630
+ confirmed_at?: number | null;
631
+ /** Format: int64 */
632
+ received_at?: number | null;
633
+ /** Format: int64 */
634
+ log_index?: number | null;
635
+ /** Format: int64 */
636
+ block_index?: number | null;
637
+ oracle_contract: string;
638
+ condition_id: string;
639
+ proposed_outcome?: string | null;
640
+ question?: string | null;
641
+ image_url?: string | null;
642
+ slug?: string | null;
643
+ event_slug?: string | null;
644
+ };
5
645
  /**
6
- * @description Server-pushed event. Discriminated by `event_type` — each variant only includes relevant fields.
646
+ * @description New market entry webhook payload
7
647
  *
8
- * Envelope: `{"type": "oracle_event_update", "room_id": "polymarket_oracle_events", "status": "confirmed"|"pending", "data": {...}}`
9
- *
10
- * **Pending events:** `block`, `confirmed_at`, `log_index`, `block_index` are absent. `received_at` (milliseconds) is included instead. Some confirmation-time fields (`assertion_id`, `settled_price`, `bond_recipient`, `disputed`, `settlement_resolution`, `payout`) may be empty until the event is confirmed on-chain.
648
+ * Fired when a trader places their first trade in a specific condition/market.
649
+ * The payload contains the full details of the triggering trade.
650
+ */
651
+ NewMarketPayload: {
652
+ /** @description Trader address (placed the limit order) */
653
+ trader: string;
654
+ /** @description Taker address (filled the order — often the exchange contract) */
655
+ taker: string;
656
+ /** @description Position ID (ERC1155 token ID) */
657
+ position_id: string;
658
+ /** @description Condition ID (market condition) */
659
+ condition_id?: string | null;
660
+ /** @description Outcome name (e.g. "Yes", "No") */
661
+ outcome?: string | null;
662
+ /**
663
+ * Format: int32
664
+ * @description Outcome index (0 = Yes, 1 = No)
665
+ */
666
+ outcome_index?: number | null;
667
+ /** @description Market question */
668
+ question?: string | null;
669
+ /** @description Market slug */
670
+ market_slug?: string | null;
671
+ /** @description Event slug (parent event) */
672
+ event_slug?: string | null;
673
+ /** @description Trade ID */
674
+ trade_id: string;
675
+ /** @description Transaction hash */
676
+ hash: string;
677
+ /**
678
+ * Format: int64
679
+ * @description Block number
680
+ */
681
+ block: number;
682
+ /**
683
+ * Format: int64
684
+ * @description Confirmed timestamp (Unix seconds)
685
+ */
686
+ confirmed_at: number;
687
+ /**
688
+ * Format: double
689
+ * @description USD size of the trade
690
+ */
691
+ amount_usd: number;
692
+ /**
693
+ * Format: double
694
+ * @description Outcome shares traded
695
+ */
696
+ shares_amount: number;
697
+ /**
698
+ * Format: double
699
+ * @description Fee paid (USD)
700
+ */
701
+ fee: number;
702
+ /** @description Trade side ("Buy" or "Sell") */
703
+ side: string;
704
+ /**
705
+ * Format: double
706
+ * @description Price per share (0.0–1.0)
707
+ */
708
+ price: number;
709
+ /**
710
+ * Format: double
711
+ * @description Implied probability (0.0–1.0); None when outcome is unknown
712
+ */
713
+ probability?: number | null;
714
+ exchange: string;
715
+ trade_type: string;
716
+ };
717
+ /** @description New trade webhook payload */
718
+ NewTradePayload: {
719
+ /** @description Trader address (the limit-order maker) */
720
+ trader: string;
721
+ /** @description Taker address (the order filler — often the exchange contract) */
722
+ taker: string;
723
+ /** @description Position ID (ERC1155 token ID) */
724
+ position_id: string;
725
+ /** @description Condition ID */
726
+ condition_id?: string | null;
727
+ /** @description Outcome name (e.g. "Yes", "No") */
728
+ outcome?: string | null;
729
+ /**
730
+ * Format: int32
731
+ * @description Outcome index (0 = Yes, 1 = No)
732
+ */
733
+ outcome_index?: number | null;
734
+ /** @description Market question */
735
+ question?: string | null;
736
+ /** @description Market slug */
737
+ market_slug?: string | null;
738
+ /** @description Event slug */
739
+ event_slug?: string | null;
740
+ /** @description Trade ID */
741
+ trade_id: string;
742
+ /** @description Transaction hash */
743
+ hash: string;
744
+ /**
745
+ * Format: int64
746
+ * @description Block number
747
+ */
748
+ block: number;
749
+ /**
750
+ * Format: int64
751
+ * @description Confirmed timestamp (Unix seconds)
752
+ */
753
+ confirmed_at: number;
754
+ /**
755
+ * Format: double
756
+ * @description USD size of the trade
757
+ */
758
+ amount_usd: number;
759
+ /**
760
+ * Format: double
761
+ * @description Outcome shares traded
762
+ */
763
+ shares_amount: number;
764
+ /**
765
+ * Format: double
766
+ * @description Fee paid (USD)
767
+ */
768
+ fee: number;
769
+ /** @description Trade side ("Buy" or "Sell") */
770
+ side: string;
771
+ /**
772
+ * Format: double
773
+ * @description Price per share (0.0–1.0)
774
+ */
775
+ price: number;
776
+ /**
777
+ * Format: double
778
+ * @description Implied probability of the event (0.0–1.0); None when outcome is unknown
779
+ */
780
+ probability?: number | null;
781
+ exchange: string;
782
+ trade_type: string;
783
+ };
784
+ /**
785
+ * @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
786
+ * and only includes fields relevant to each type.
11
787
  */
12
- OracleEventStreamEvent: {
788
+ OracleEventTyped: (components["schemas"]["AssertionMadeEvent"] & {
789
+ /** @enum {string} */
790
+ event_type: "AssertionMade";
791
+ }) | (components["schemas"]["AssertionDisputedEvent"] & {
792
+ /** @enum {string} */
793
+ event_type: "AssertionDisputed";
794
+ }) | (components["schemas"]["AssertionSettledEvent"] & {
795
+ /** @enum {string} */
796
+ event_type: "AssertionSettled";
797
+ }) | (components["schemas"]["RequestPriceEvent"] & {
798
+ /** @enum {string} */
799
+ event_type: "RequestPrice";
800
+ }) | (components["schemas"]["ProposePriceEvent"] & {
801
+ /** @enum {string} */
802
+ event_type: "ProposePrice";
803
+ }) | (components["schemas"]["DisputePriceEvent"] & {
804
+ /** @enum {string} */
805
+ event_type: "DisputePrice";
806
+ }) | (components["schemas"]["SettleEvent"] & {
807
+ /** @enum {string} */
808
+ event_type: "Settle";
809
+ }) | (components["schemas"]["QuestionResolvedEvent"] & {
810
+ /** @enum {string} */
811
+ event_type: "QuestionResolved";
812
+ }) | (components["schemas"]["QuestionEmergencyResolvedEvent"] & {
813
+ /** @enum {string} */
814
+ event_type: "QuestionEmergencyResolved";
815
+ }) | (components["schemas"]["QuestionResetEvent"] & {
13
816
  /** @enum {string} */
14
- event_type: "AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported";
817
+ event_type: "QuestionReset";
818
+ }) | (components["schemas"]["QuestionInitializedEvent"] & {
819
+ /** @enum {string} */
820
+ event_type: "QuestionInitialized";
821
+ }) | (components["schemas"]["QuestionPausedEvent"] & {
822
+ /** @enum {string} */
823
+ event_type: "QuestionPaused";
824
+ }) | (components["schemas"]["QuestionUnpausedEvent"] & {
825
+ /** @enum {string} */
826
+ event_type: "QuestionUnpaused";
827
+ }) | (components["schemas"]["QuestionFlaggedEvent"] & {
828
+ /** @enum {string} */
829
+ event_type: "QuestionFlagged";
830
+ }) | (components["schemas"]["QuestionUnflaggedEvent"] & {
831
+ /** @enum {string} */
832
+ event_type: "QuestionUnflagged";
833
+ }) | (components["schemas"]["ConditionResolutionEvent"] & {
834
+ /** @enum {string} */
835
+ event_type: "ConditionResolution";
836
+ }) | (components["schemas"]["NegRiskOutcomeReportedEvent"] & {
837
+ /** @enum {string} */
838
+ event_type: "NegRiskOutcomeReported";
839
+ });
840
+ /**
841
+ * @description PnL timeframe enum for webhook filtering
842
+ * @enum {string}
843
+ */
844
+ PnlTimeframeFilter: "1d" | "7d" | "30d" | "lifetime";
845
+ /**
846
+ * @description Polymarket webhook event types
847
+ * @enum {string}
848
+ */
849
+ PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update" | "price_spike" | "oracle_events";
850
+ /**
851
+ * @description Polymarket-specific webhook filters
852
+ *
853
+ * Different webhook handlers use different subsets of these fields:
854
+ * - first_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, tags
855
+ * - new_market: wallet_addresses, condition_ids, event_slugs, min_usd_value, min_probability, max_probability
856
+ * - whale_trade: min_usd_value (required), min_probability, max_probability, condition_ids, event_slugs
857
+ * - global_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, min_win_rate, min_markets_traded
858
+ * - market_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_buy_usd, condition_ids, event_slugs
859
+ * - event_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, event_slugs, min_markets_traded
860
+ * - condition_metrics: condition_ids, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
861
+ * - event_metrics: event_slugs, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
862
+ * - position_metrics: position_ids, condition_ids, outcomes, min_volume_usd, max_volume_usd, min_buy_usd, min_sell_volume_usd, min_fees, min_txns, min_price_change_pct, min_probability_change_pct, timeframes
863
+ * - volume_milestone: condition_ids, timeframes, milestone_amounts
864
+ * - close_to_bond: min_probability (high zone threshold), max_probability (low zone threshold), condition_ids, position_ids, outcomes, position_outcome_indices, event_slugs, exclude_shortterm_markets
865
+ * - market_created: event_slugs, tags, exclude_shortterm_markets
866
+ * - probability_spike: condition_ids, event_slugs, outcomes, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
867
+ * - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
868
+ * - trader_new_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
869
+ * - trader_trade_event: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
870
+ * - trader_first_trade: wallet_addresses, min_usd_value, min_probability, max_probability, exclude_shortterm_markets
871
+ * - trader_new_market: wallet_addresses, condition_ids, event_slugs, min_usd_value, min_probability, max_probability, exclude_shortterm_markets
872
+ * - trader_whale_trade: min_usd_value (required), min_probability, max_probability, condition_ids, event_slugs, exclude_shortterm_markets
873
+ * - trader_event_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, event_slugs, min_markets_traded, exclude_shortterm_markets
874
+ * - trader_market_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_buy_usd, condition_ids, event_slugs, exclude_shortterm_markets
875
+ *
876
+ * Implements Hash + Eq manually (f64 fields use bit representation)
877
+ */
878
+ PolymarketWebhookFilter: {
879
+ /** @description Filter by wallet addresses (for first_trade, normalized to lowercase). Max 500 entries. */
880
+ wallet_addresses?: string[];
881
+ /** @description Filter by trader addresses (for PnL webhooks, normalized to lowercase). Max 500 entries. */
882
+ traders?: string[];
883
+ /** @description Filter by market/condition IDs. Max 500 entries. */
884
+ condition_ids?: string[];
885
+ /**
886
+ * Format: double
887
+ * @description Filter by minimum USD value (for trades)
888
+ */
889
+ min_usd_value?: number | null;
890
+ /** @description Filter by event slugs. Max 500 entries. */
891
+ event_slugs?: string[];
892
+ /** @description Filter by tags. Max 500 entries. */
893
+ tags?: string[];
894
+ /**
895
+ * Format: double
896
+ * @description Minimum probability threshold (0.0 - 1.0)
897
+ */
898
+ min_probability?: number | null;
899
+ /**
900
+ * Format: double
901
+ * @description Maximum probability threshold (0.0 - 1.0)
902
+ */
903
+ max_probability?: number | null;
904
+ /**
905
+ * Format: double
906
+ * @description Minimum realized PnL (USD) - for PnL webhooks
907
+ */
908
+ min_realized_pnl_usd?: number | null;
909
+ /**
910
+ * Format: double
911
+ * @description Maximum realized PnL (USD) - for PnL webhooks
912
+ */
913
+ max_realized_pnl_usd?: number | null;
914
+ /**
915
+ * Format: double
916
+ * @description Minimum volume (USD) - for PnL and metrics webhooks
917
+ */
918
+ min_volume_usd?: number | null;
919
+ /**
920
+ * Format: double
921
+ * @description Maximum volume (USD) - for metrics webhooks
922
+ */
923
+ max_volume_usd?: number | null;
924
+ /**
925
+ * Format: double
926
+ * @description Minimum buy volume (USD) - for PnL and metrics webhooks
927
+ */
928
+ min_buy_usd?: number | null;
929
+ /**
930
+ * Format: double
931
+ * @description Minimum win rate (0.0 - 100.0) - for global PnL webhooks
932
+ */
933
+ min_win_rate?: number | null;
934
+ /**
935
+ * Format: int64
936
+ * @description Minimum markets traded - for PnL webhooks
937
+ */
938
+ min_markets_traded?: number | null;
939
+ /**
940
+ * Format: double
941
+ * @description Minimum net shares - for position PnL webhooks
942
+ */
943
+ min_net_shares?: number | null;
944
+ /**
945
+ * Format: double
946
+ * @description Maximum net shares - for position PnL webhooks
947
+ */
948
+ max_net_shares?: number | null;
949
+ /** @description Filter by position IDs - for position PnL webhooks. Max 500 entries. */
950
+ position_ids?: string[];
951
+ /** @description Filter by outcomes (e.g., "Yes", "No") - for position PnL webhooks. Max 500 entries. */
952
+ outcomes?: string[];
953
+ /**
954
+ * @description Filter by position outcome index — for close_to_bond. Position 0 usually represents Yes/Up, 1 = No.
955
+ * When non-empty, only trades whose outcome_index is in this list will match. Max 500 entries.
956
+ */
957
+ position_outcome_indices?: number[];
958
+ /** @description Filter by trade type (e.g. "OrderFilled", "Redemption", "Merge", "Split"). Empty = default behavior per handler. */
959
+ trade_types?: string[];
960
+ /**
961
+ * Format: double
962
+ * @description Minimum fees - for metrics webhooks
963
+ */
964
+ min_fees?: number | null;
965
+ /**
966
+ * Format: int64
967
+ * @description Minimum transaction count - for metrics webhooks
968
+ */
969
+ min_txns?: number | null;
970
+ /**
971
+ * Format: int64
972
+ * @description Minimum unique traders - for metrics webhooks
973
+ */
974
+ min_unique_traders?: number | null;
975
+ /**
976
+ * Format: double
977
+ * @description Minimum sell volume (USD) - for position metrics webhooks
978
+ */
979
+ min_sell_volume_usd?: number | null;
980
+ /**
981
+ * Format: double
982
+ * @description Minimum price change percentage - for position metrics webhooks
983
+ */
984
+ min_price_change_pct?: number | null;
985
+ /**
986
+ * Format: double
987
+ * @description Minimum probability change percentage - for position metrics webhooks
988
+ */
989
+ min_probability_change_pct?: number | null;
990
+ /** @description Timeframes to track - for metrics webhooks (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d). */
991
+ timeframes?: components["schemas"]["WebhookTimeframe"][];
992
+ /** @description Milestone amounts to track - for volume milestone webhooks (e.g., 10000, 100000, 1000000). Max 500 entries. */
993
+ milestone_amounts?: number[];
994
+ /**
995
+ * Format: double
996
+ * @description Spike ratio multiplier (must be > 1.0) - for volume spike webhooks
997
+ * Example: 2.0 for 2x, 5.0 for 5x, 10.0 for 10x
998
+ */
999
+ spike_ratio?: number | null;
1000
+ /**
1001
+ * @description When `true`, exclude all short-term "updown" markets (event slugs containing "updown").
1002
+ * These are short-duration crypto price markets (e.g., "btc-updown-5m-…", "eth-updown-1h-…").
1003
+ * Supported by: close_to_bond, market_created, price_spike, probability_spike,
1004
+ * trader_first_trade, trader_new_market, trader_whale_trade, trader_event_pnl, trader_market_pnl,
1005
+ * event_metrics, event_volume_milestone, event_volume_spike.
1006
+ */
1007
+ exclude_shortterm_markets?: boolean;
1008
+ /**
1009
+ * @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update` webhooks.
1010
+ * Valid values: "BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", "HYPE". Empty = all assets.
1011
+ */
1012
+ asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
1013
+ spike_direction?: null | components["schemas"]["SpikeDirection"];
1014
+ /**
1015
+ * Format: int64
1016
+ * @description Observation window in seconds for `probability_spike` and `price_spike`.
1017
+ *
1018
+ * When set, the first trade seen for a position opens a window of this duration.
1019
+ * The opening price becomes the baseline, and every subsequent trade within the
1020
+ * window is compared to it. When the window expires the next trade starts a new
1021
+ * window. If omitted, the baseline accumulates indefinitely until a spike fires.
1022
+ *
1023
+ * Example: `60` to detect spikes that happen within 60 seconds.
1024
+ */
1025
+ window_secs?: number | null;
1026
+ /**
1027
+ * @description Filter for `oracle_events` by event name (case-insensitive).
1028
+ * Valid values: `AssertionMade`, `AssertionDisputed`, `AssertionSettled`,
1029
+ * `RequestPrice`, `ProposePrice`, `DisputePrice`, `Settle`,
1030
+ * `QuestionResolved`, `QuestionEmergencyResolved`, `QuestionReset`,
1031
+ * `QuestionInitialized`, `QuestionPaused`, `QuestionUnpaused`,
1032
+ * `QuestionFlagged`, `QuestionUnflagged`, `ConditionResolution`,
1033
+ * `NegRiskOutcomeReported`. Empty = all types.
1034
+ */
1035
+ oracle_event_types?: string[];
1036
+ };
1037
+ /** @description Position metrics webhook payload (Arc-optimized, no internal metadata) */
1038
+ PositionMetricsPayload: {
1039
+ position_id?: string | null;
1040
+ outcome?: string | null;
1041
+ /** Format: int32 */
1042
+ outcome_index?: number | null;
1043
+ timeframe?: string | null;
1044
+ /** Format: double */
1045
+ volume_usd?: number | null;
1046
+ /** Format: double */
1047
+ buy_volume_usd?: number | null;
1048
+ /** Format: double */
1049
+ sell_volume_usd?: number | null;
1050
+ /** Format: double */
1051
+ fees?: number | null;
1052
+ /** Format: int64 */
1053
+ txns?: number | null;
1054
+ /** Format: int64 */
1055
+ buys?: number | null;
1056
+ /** Format: int64 */
1057
+ sells?: number | null;
1058
+ /** Format: int64 */
1059
+ unique_traders?: number | null;
1060
+ /** Format: double */
1061
+ price_open?: number | null;
1062
+ /** Format: double */
1063
+ price_close?: number | null;
1064
+ /** Format: double */
1065
+ price_high?: number | null;
1066
+ /** Format: double */
1067
+ price_low?: number | null;
1068
+ /** Format: double */
1069
+ probability_open?: number | null;
1070
+ /** Format: double */
1071
+ probability_close?: number | null;
1072
+ /** Format: double */
1073
+ probability_high?: number | null;
1074
+ /** Format: double */
1075
+ probability_low?: number | null;
1076
+ };
1077
+ /** @description Position volume milestone webhook payload */
1078
+ PositionVolumeMilestonePayload: {
1079
+ condition_id?: string | null;
1080
+ position_id: string;
1081
+ outcome?: string | null;
1082
+ /** Format: int32 */
1083
+ outcome_index?: number | null;
1084
+ timeframe: string;
1085
+ /**
1086
+ * Format: double
1087
+ * @description Milestone amount reached (USD)
1088
+ */
1089
+ milestone_usd: number;
1090
+ /**
1091
+ * Format: double
1092
+ * @description Current volume (USD) that triggered the milestone
1093
+ */
1094
+ current_volume_usd: number;
1095
+ /**
1096
+ * Format: double
1097
+ * @description Buy volume (USD)
1098
+ */
1099
+ buy_volume_usd: number;
1100
+ /**
1101
+ * Format: double
1102
+ * @description Sell volume (USD)
1103
+ */
1104
+ sell_volume_usd: number;
1105
+ /**
1106
+ * Format: double
1107
+ * @description Total fees collected in this timeframe
1108
+ */
1109
+ fees: number;
1110
+ /**
1111
+ * Format: int64
1112
+ * @description Total transactions in this timeframe
1113
+ */
1114
+ txns: number;
1115
+ /**
1116
+ * Format: int64
1117
+ * @description Buy transactions
1118
+ */
1119
+ buys: number;
1120
+ /**
1121
+ * Format: int64
1122
+ * @description Sell transactions
1123
+ */
1124
+ sells: number;
1125
+ };
1126
+ /** @description Position volume spike webhook payload */
1127
+ PositionVolumeSpikePayload: {
1128
+ position_id: string;
1129
+ condition_id: string;
1130
+ outcome?: string | null;
1131
+ /** Format: int32 */
1132
+ outcome_index?: number | null;
1133
+ timeframe: string;
1134
+ /**
1135
+ * Format: double
1136
+ * @description Current position volume at the time of the spike (USD)
1137
+ */
1138
+ current_volume_usd: number;
1139
+ /**
1140
+ * Format: double
1141
+ * @description Volume at the snapshot baseline (USD)
1142
+ */
1143
+ snapshot_volume_usd: number;
1144
+ /**
1145
+ * Format: double
1146
+ * @description New volume since the snapshot that triggered this notification (USD)
1147
+ */
1148
+ delta_volume_usd: number;
1149
+ /**
1150
+ * Format: double
1151
+ * @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
1152
+ */
1153
+ spike_pct: number;
1154
+ /**
1155
+ * Format: int64
1156
+ * @description Total transactions in this timeframe
1157
+ */
1158
+ txns: number;
1159
+ /**
1160
+ * Format: double
1161
+ * @description Total fees in this timeframe
1162
+ */
1163
+ fees: number;
1164
+ };
1165
+ /** @description Position price spike webhook payload */
1166
+ PriceSpikePayload: {
1167
+ position_id: string;
1168
+ condition_id?: string | null;
1169
+ event_slug?: string | null;
1170
+ outcome?: string | null;
1171
+ /** Format: int32 */
1172
+ outcome_index?: number | null;
1173
+ /**
1174
+ * Format: double
1175
+ * @description Price at the start of the observation window (the baseline snapshot)
1176
+ */
1177
+ previous_price: number;
1178
+ /**
1179
+ * Format: double
1180
+ * @description Current price that triggered the spike
1181
+ */
1182
+ current_price: number;
1183
+ /** @description Direction of the spike: `"up"` (price rising) or `"down"` (price falling) */
1184
+ spike_direction: string;
1185
+ /**
1186
+ * Format: double
1187
+ * @description Detected spike percentage from the snapshot baseline. Positive = rising, negative = falling.
1188
+ */
1189
+ spike_pct: number;
1190
+ };
1191
+ /** @description Position probability spike webhook payload */
1192
+ ProbabilitySpikePayload: {
1193
+ position_id: string;
1194
+ condition_id?: string | null;
1195
+ event_slug?: string | null;
1196
+ outcome?: string | null;
1197
+ /** Format: int32 */
1198
+ outcome_index?: number | null;
1199
+ /**
1200
+ * Format: double
1201
+ * @description Probability at the start of the observation window (the baseline snapshot)
1202
+ */
1203
+ previous_probability: number;
1204
+ /**
1205
+ * Format: double
1206
+ * @description Current probability that triggered the spike
1207
+ */
1208
+ current_probability: number;
1209
+ /** @description Direction of the spike: `"up"` (probability rising) or `"down"` (probability falling) */
1210
+ spike_direction: string;
1211
+ /**
1212
+ * Format: double
1213
+ * @description Detected spike percentage from the snapshot baseline. Positive = rising, negative = falling.
1214
+ */
1215
+ spike_pct: number;
1216
+ };
1217
+ /** @description V2 UMA OOv2: a price was proposed (resolution proposal). */
1218
+ ProposePriceEvent: {
1219
+ id: string;
1220
+ hash: string;
1221
+ /** Format: int64 */
1222
+ block?: number | null;
1223
+ /** Format: int64 */
1224
+ confirmed_at?: number | null;
1225
+ /** Format: int64 */
1226
+ received_at?: number | null;
1227
+ /** Format: int64 */
1228
+ log_index?: number | null;
1229
+ /** Format: int64 */
1230
+ block_index?: number | null;
1231
+ oracle_contract: string;
1232
+ requester: string;
1233
+ proposer: string;
1234
+ identifier: string;
1235
+ timestamp: string;
1236
+ ancillary_data: string;
1237
+ /** Format: int64 */
1238
+ proposed_price: number;
1239
+ expiration_timestamp: string;
1240
+ currency: string;
1241
+ condition_id?: string | null;
1242
+ proposed_outcome?: string | null;
1243
+ question?: string | null;
1244
+ image_url?: string | null;
1245
+ slug?: string | null;
1246
+ event_slug?: string | null;
1247
+ };
1248
+ /** @description UMA CTF Adapter: admin emergency resolution. */
1249
+ QuestionEmergencyResolvedEvent: {
1250
+ id: string;
1251
+ hash: string;
1252
+ /** Format: int64 */
1253
+ block?: number | null;
1254
+ /** Format: int64 */
1255
+ confirmed_at?: number | null;
1256
+ /** Format: int64 */
1257
+ received_at?: number | null;
1258
+ /** Format: int64 */
1259
+ log_index?: number | null;
1260
+ /** Format: int64 */
1261
+ block_index?: number | null;
1262
+ oracle_contract: string;
1263
+ condition_id: string;
1264
+ proposed_outcome?: string | null;
1265
+ question?: string | null;
1266
+ image_url?: string | null;
1267
+ slug?: string | null;
1268
+ event_slug?: string | null;
1269
+ };
1270
+ /** @description UMA CTF Adapter: market flagged for emergency resolution. */
1271
+ QuestionFlaggedEvent: {
1272
+ id: string;
1273
+ hash: string;
1274
+ /** Format: int64 */
1275
+ block?: number | null;
1276
+ /** Format: int64 */
1277
+ confirmed_at?: number | null;
1278
+ /** Format: int64 */
1279
+ received_at?: number | null;
1280
+ /** Format: int64 */
1281
+ log_index?: number | null;
1282
+ /** Format: int64 */
1283
+ block_index?: number | null;
1284
+ oracle_contract: string;
1285
+ condition_id: string;
1286
+ question?: string | null;
1287
+ image_url?: string | null;
1288
+ slug?: string | null;
1289
+ event_slug?: string | null;
1290
+ };
1291
+ /** @description UMA CTF Adapter: questionID first initialized on-chain. */
1292
+ QuestionInitializedEvent: {
1293
+ id: string;
1294
+ hash: string;
1295
+ /** Format: int64 */
1296
+ block?: number | null;
1297
+ /** Format: int64 */
1298
+ confirmed_at?: number | null;
1299
+ /** Format: int64 */
1300
+ received_at?: number | null;
1301
+ /** Format: int64 */
1302
+ log_index?: number | null;
1303
+ /** Format: int64 */
1304
+ block_index?: number | null;
1305
+ oracle_contract: string;
1306
+ condition_id: string;
1307
+ creator: string;
1308
+ reward_token: string;
1309
+ reward: string;
1310
+ proposal_bond: string;
1311
+ question?: string | null;
1312
+ image_url?: string | null;
1313
+ slug?: string | null;
1314
+ event_slug?: string | null;
1315
+ };
1316
+ /** @description UMA CTF Adapter: market paused by admin. */
1317
+ QuestionPausedEvent: {
1318
+ id: string;
1319
+ hash: string;
1320
+ /** Format: int64 */
1321
+ block?: number | null;
1322
+ /** Format: int64 */
1323
+ confirmed_at?: number | null;
1324
+ /** Format: int64 */
1325
+ received_at?: number | null;
1326
+ /** Format: int64 */
1327
+ log_index?: number | null;
1328
+ /** Format: int64 */
1329
+ block_index?: number | null;
1330
+ oracle_contract: string;
1331
+ condition_id: string;
1332
+ question?: string | null;
1333
+ image_url?: string | null;
1334
+ slug?: string | null;
1335
+ event_slug?: string | null;
1336
+ };
1337
+ /** @description UMA CTF Adapter: dispute succeeded, market returns to active. */
1338
+ QuestionResetEvent: {
1339
+ id: string;
1340
+ hash: string;
1341
+ /** Format: int64 */
1342
+ block?: number | null;
1343
+ /** Format: int64 */
1344
+ confirmed_at?: number | null;
1345
+ /** Format: int64 */
1346
+ received_at?: number | null;
1347
+ /** Format: int64 */
1348
+ log_index?: number | null;
1349
+ /** Format: int64 */
1350
+ block_index?: number | null;
1351
+ oracle_contract: string;
1352
+ condition_id: string;
1353
+ question?: string | null;
1354
+ image_url?: string | null;
1355
+ slug?: string | null;
1356
+ event_slug?: string | null;
1357
+ };
1358
+ /** @description UMA CTF Adapter: market resolved with definitive outcome. */
1359
+ QuestionResolvedEvent: {
1360
+ id: string;
1361
+ hash: string;
1362
+ /** Format: int64 */
1363
+ block?: number | null;
1364
+ /** Format: int64 */
1365
+ confirmed_at?: number | null;
1366
+ /** Format: int64 */
1367
+ received_at?: number | null;
1368
+ /** Format: int64 */
1369
+ log_index?: number | null;
1370
+ /** Format: int64 */
1371
+ block_index?: number | null;
1372
+ oracle_contract: string;
1373
+ condition_id: string;
1374
+ /** Format: int64 */
1375
+ settled_price: number;
1376
+ proposed_outcome?: string | null;
1377
+ question?: string | null;
1378
+ image_url?: string | null;
1379
+ slug?: string | null;
1380
+ event_slug?: string | null;
1381
+ };
1382
+ /** @description UMA CTF Adapter: flag removed. */
1383
+ QuestionUnflaggedEvent: {
1384
+ id: string;
1385
+ hash: string;
1386
+ /** Format: int64 */
1387
+ block?: number | null;
1388
+ /** Format: int64 */
1389
+ confirmed_at?: number | null;
1390
+ /** Format: int64 */
1391
+ received_at?: number | null;
1392
+ /** Format: int64 */
1393
+ log_index?: number | null;
1394
+ /** Format: int64 */
1395
+ block_index?: number | null;
1396
+ oracle_contract: string;
1397
+ condition_id: string;
1398
+ question?: string | null;
1399
+ image_url?: string | null;
1400
+ slug?: string | null;
1401
+ event_slug?: string | null;
1402
+ };
1403
+ /** @description UMA CTF Adapter: market unpaused. */
1404
+ QuestionUnpausedEvent: {
1405
+ id: string;
1406
+ hash: string;
1407
+ /** Format: int64 */
1408
+ block?: number | null;
1409
+ /** Format: int64 */
1410
+ confirmed_at?: number | null;
1411
+ /** Format: int64 */
1412
+ received_at?: number | null;
1413
+ /** Format: int64 */
1414
+ log_index?: number | null;
1415
+ /** Format: int64 */
1416
+ block_index?: number | null;
1417
+ oracle_contract: string;
1418
+ condition_id: string;
1419
+ question?: string | null;
1420
+ image_url?: string | null;
1421
+ slug?: string | null;
1422
+ event_slug?: string | null;
1423
+ };
1424
+ /** @description V2 UMA OOv2: a price request was made (market initialization). */
1425
+ RequestPriceEvent: {
15
1426
  id: string;
16
1427
  hash: string;
17
- /** @description Absent for pending events */
1428
+ /** Format: int64 */
18
1429
  block?: number | null;
19
- /** @description Unix seconds. Absent for pending events */
1430
+ /** Format: int64 */
20
1431
  confirmed_at?: number | null;
21
- /** @description Unix milliseconds. Present for pending events only */
1432
+ /** Format: int64 */
22
1433
  received_at?: number | null;
23
- /** @description Absent for pending events */
1434
+ /** Format: int64 */
24
1435
  log_index?: number | null;
25
- /** @description Absent for pending events */
1436
+ /** Format: int64 */
26
1437
  block_index?: number | null;
27
1438
  oracle_contract: string;
1439
+ requester: string;
1440
+ identifier: string;
1441
+ /**
1442
+ * @description UMA request timestamp (seconds, decimal string).
1443
+ * The point in time the requester is asking the oracle to resolve the
1444
+ * price for — part of the request identity tuple
1445
+ * `(requester, identifier, timestamp, ancillaryData)`. Not the block
1446
+ * timestamp of this event; see `confirmed_at` for that.
1447
+ */
1448
+ timestamp: string;
1449
+ ancillary_data: string;
1450
+ currency: string;
1451
+ reward: string;
1452
+ final_fee: string;
28
1453
  condition_id?: string | null;
29
1454
  question?: string | null;
30
1455
  image_url?: string | null;
31
1456
  slug?: string | null;
32
1457
  event_slug?: string | null;
33
- assertion_id?: string | null;
34
- proposer?: string | null;
35
- disputer?: string | null;
36
- asserter?: string | null;
37
- requester?: string | null;
38
- settled_price?: number | null;
39
- proposed_price?: number | null;
1458
+ };
1459
+ /** @description Response for POST /v1/webhook/{id}/rotate-secret */
1460
+ RotateSecretResponse: {
1461
+ /** @description The new HMAC secret (only returned once — store it securely) */
1462
+ secret: string;
1463
+ /**
1464
+ * Format: int64
1465
+ * @description Timestamp of rotation (ms since epoch)
1466
+ */
1467
+ rotated_at: number;
1468
+ };
1469
+ /** @description V2 UMA OOv2: a price request was settled (final resolution). */
1470
+ SettleEvent: {
1471
+ id: string;
1472
+ hash: string;
1473
+ /** Format: int64 */
1474
+ block?: number | null;
1475
+ /** Format: int64 */
1476
+ confirmed_at?: number | null;
1477
+ /** Format: int64 */
1478
+ received_at?: number | null;
1479
+ /** Format: int64 */
1480
+ log_index?: number | null;
1481
+ /** Format: int64 */
1482
+ block_index?: number | null;
1483
+ oracle_contract: string;
1484
+ requester: string;
1485
+ proposer: string;
1486
+ disputer: string;
1487
+ identifier: string;
1488
+ timestamp: string;
1489
+ ancillary_data: string;
1490
+ /** Format: int64 */
1491
+ proposed_price: number;
1492
+ payout: string;
1493
+ disputed: boolean;
1494
+ condition_id?: string | null;
40
1495
  proposed_outcome?: string | null;
41
- disputed?: boolean | null;
42
- settlement_resolution?: boolean | null;
1496
+ question?: string | null;
1497
+ image_url?: string | null;
1498
+ slug?: string | null;
1499
+ event_slug?: string | null;
1500
+ };
1501
+ /**
1502
+ * @description Direction filter for spike webhooks.
1503
+ * @enum {string}
1504
+ */
1505
+ SpikeDirection: "up" | "down" | "both";
1506
+ /** @description Request body for updating a webhook */
1507
+ UpdateWebhookRequestBody: {
1508
+ /** @description Destination URL for webhook deliveries (must be HTTPS) */
1509
+ url?: string | null;
1510
+ event?: null | components["schemas"]["PolymarketWebhookEvent"];
1511
+ /** @description New secret for HMAC signature verification */
1512
+ secret?: string | null;
1513
+ filters?: null | components["schemas"]["WebhookFiltersBody"];
1514
+ status?: null | components["schemas"]["WebhookStatusBody"];
1515
+ /** @description Description/name */
1516
+ description?: string | null;
1517
+ };
1518
+ /** @description Volume milestone webhook payload */
1519
+ VolumeMilestonePayload: {
1520
+ condition_id: string;
1521
+ timeframe: string;
1522
+ /**
1523
+ * Format: double
1524
+ * @description Milestone amount reached (USD)
1525
+ */
1526
+ milestone_usd: number;
1527
+ /**
1528
+ * Format: double
1529
+ * @description Current volume (USD) that triggered the milestone
1530
+ */
1531
+ current_volume_usd: number;
1532
+ /**
1533
+ * Format: double
1534
+ * @description Total fees collected in this timeframe
1535
+ */
1536
+ fees: number;
1537
+ /**
1538
+ * Format: int64
1539
+ * @description Total transactions in this timeframe
1540
+ */
1541
+ txns: number;
1542
+ };
1543
+ /**
1544
+ * @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
1545
+ * @enum {string}
1546
+ */
1547
+ WebhookAssetSymbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
1548
+ /** @description Single event type entry for the events list */
1549
+ WebhookEventInfo: {
1550
+ /** @description Event type identifier (e.g. "first_trade") */
1551
+ event: string;
1552
+ /** @description Human-readable description */
1553
+ description: string;
1554
+ /** @description Category grouping: "trader", "market", "event", or "position" */
1555
+ category: string;
1556
+ /**
1557
+ * Format: int64
1558
+ * @description Millicredits consumed per webhook delivery (1 credit = 1000 mc)
1559
+ */
1560
+ millicredits_cost: number;
1561
+ /** @description Filter field names that apply to this event type */
1562
+ applicable_filters: string[];
1563
+ };
1564
+ /** @description Webhook filters request body */
1565
+ WebhookFiltersBody: {
1566
+ /** @description Filter by wallet addresses (for first_trade / new_market / whale_trade). Max 500 entries. */
1567
+ wallet_addresses?: string[];
1568
+ /** @description Filter by trader addresses (for PnL webhooks). Max 500 entries. */
1569
+ traders?: string[];
1570
+ /** @description Filter by market/condition IDs. Max 500 entries. */
1571
+ condition_ids?: string[];
1572
+ /** @description Filter by position IDs (for position metrics / close_to_bond). Max 500 entries. */
1573
+ position_ids?: string[];
1574
+ /** @description Filter by event slugs. Max 500 entries. */
1575
+ event_slugs?: string[];
1576
+ /** @description Filter by tags or category names (case-insensitive) — for market_created. Max 500 entries. */
1577
+ tags?: string[];
1578
+ /** @description Filter by outcomes (e.g. "Yes", "No") — for position metrics / close_to_bond. Max 500 entries. */
1579
+ outcomes?: string[];
1580
+ /** @description Filter by position outcome index — for close_to_bond. Position 0 = Yes/Up, 1 = No. Max 500 entries. */
1581
+ position_outcome_indices?: number[];
1582
+ /** @description Filter by trade type — for `trader_new_trade` and `trader_trade_event`. Max 500 entries. */
1583
+ trade_types?: string[];
1584
+ /**
1585
+ * Format: double
1586
+ * @description Minimum USD trade size (for whale_trade / first_trade)
1587
+ */
1588
+ min_usd_value?: number | null;
1589
+ /**
1590
+ * Format: double
1591
+ * @description Minimum probability threshold (0.0 - 1.0)
1592
+ */
1593
+ min_probability?: number | null;
1594
+ /**
1595
+ * Format: double
1596
+ * @description Maximum probability threshold (0.0 - 1.0)
1597
+ */
1598
+ max_probability?: number | null;
1599
+ /**
1600
+ * Format: double
1601
+ * @description Minimum realized PnL (USD) — for global_pnl / market_pnl / event_pnl
1602
+ */
1603
+ min_realized_pnl_usd?: number | null;
1604
+ /**
1605
+ * Format: double
1606
+ * @description Maximum realized PnL (USD) — for global_pnl / market_pnl / event_pnl
1607
+ */
1608
+ max_realized_pnl_usd?: number | null;
1609
+ /**
1610
+ * Format: double
1611
+ * @description Minimum total volume (USD) — for global_pnl / event_pnl / metrics
1612
+ */
1613
+ min_volume_usd?: number | null;
1614
+ /**
1615
+ * Format: double
1616
+ * @description Maximum total volume (USD) — for metrics webhooks
1617
+ */
1618
+ max_volume_usd?: number | null;
1619
+ /**
1620
+ * Format: double
1621
+ * @description Minimum buy volume (USD) — for market_pnl / position metrics
1622
+ */
1623
+ min_buy_usd?: number | null;
1624
+ /**
1625
+ * Format: double
1626
+ * @description Minimum sell volume (USD) — for position metrics
1627
+ */
1628
+ min_sell_volume_usd?: number | null;
1629
+ /**
1630
+ * Format: double
1631
+ * @description Minimum win rate (0.0 - 100.0) — for global_pnl
1632
+ */
1633
+ min_win_rate?: number | null;
1634
+ /**
1635
+ * Format: int64
1636
+ * @description Minimum markets traded — for global_pnl / event_pnl
1637
+ */
1638
+ min_markets_traded?: number | null;
1639
+ /**
1640
+ * Format: double
1641
+ * @description Minimum net shares held — for position-level filters
1642
+ */
1643
+ min_net_shares?: number | null;
1644
+ /**
1645
+ * Format: double
1646
+ * @description Maximum net shares held — for position-level filters
1647
+ */
1648
+ max_net_shares?: number | null;
1649
+ /**
1650
+ * Format: double
1651
+ * @description Minimum fees (USD) — for metrics webhooks
1652
+ */
1653
+ min_fees?: number | null;
1654
+ /**
1655
+ * Format: int64
1656
+ * @description Minimum transaction count — for metrics webhooks
1657
+ */
1658
+ min_txns?: number | null;
1659
+ /**
1660
+ * Format: int64
1661
+ * @description Minimum unique traders — for metrics webhooks
1662
+ */
1663
+ min_unique_traders?: number | null;
1664
+ /**
1665
+ * Format: double
1666
+ * @description Minimum price change percentage — for position metrics
1667
+ */
1668
+ min_price_change_pct?: number | null;
1669
+ /**
1670
+ * Format: double
1671
+ * @description Minimum probability change percentage — for probability_spike
1672
+ */
1673
+ min_probability_change_pct?: number | null;
1674
+ /**
1675
+ * @description Timeframes to filter by (e.g. ["1h", "24h", "7d"]) — **required** for volume_milestone
1676
+ * webhooks (market/event/position), optional for metrics webhooks.
1677
+ * Valid values: "1m", "5m", "30m", "1h", "6h", "24h", "7d", "30d".
1678
+ */
1679
+ timeframes?: components["schemas"]["WebhookTimeframe"][];
1680
+ /** @description Milestone amounts to trigger on (USD) — for volume_milestone webhooks. Max 500 entries. */
1681
+ milestone_amounts?: number[];
1682
+ /**
1683
+ * Format: double
1684
+ * @description Spike ratio multiplier (must be > 1.0) — for volume_spike. E.g. 2.0 for 2x baseline
1685
+ */
1686
+ spike_ratio?: number | null;
1687
+ spike_direction?: null | components["schemas"]["SpikeDirection"];
1688
+ /**
1689
+ * Format: int64
1690
+ * @description Observation window in seconds (max 600) — for probability_spike, price_spike, volume_spike
1691
+ */
1692
+ window_secs?: number | null;
1693
+ /** @description When true, suppress webhooks for short-term "updown" markets */
1694
+ exclude_shortterm_markets?: boolean;
1695
+ /**
1696
+ * @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update`.
1697
+ * Valid values: "BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", "HYPE". Empty = all assets (send everything).
1698
+ */
1699
+ asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
1700
+ };
1701
+ /** @description List webhooks response */
1702
+ WebhookListResponseBody: {
1703
+ /** @description List of webhooks */
1704
+ webhooks: components["schemas"]["WebhookResponse"][];
1705
+ /** @description Total count */
1706
+ total: number;
1707
+ };
1708
+ /** @description Webhook response (returned from API) */
1709
+ WebhookResponse: {
1710
+ /** @description Unique webhook ID */
1711
+ id: string;
1712
+ /** @description Destination URL */
1713
+ url: string;
1714
+ /** @description Subscribed event */
1715
+ event: components["schemas"]["PolymarketWebhookEvent"];
1716
+ /** @description Active filters (omitted when no filters are set) */
1717
+ filters?: components["schemas"]["PolymarketWebhookFilter"];
1718
+ /** @description Current status: "active", "paused", or "disabled" */
1719
+ status: string;
1720
+ /**
1721
+ * Format: int64
1722
+ * @description Created timestamp (ms)
1723
+ */
1724
+ created_at: number;
1725
+ /**
1726
+ * Format: int64
1727
+ * @description Updated timestamp (ms)
1728
+ */
1729
+ updated_at: number;
1730
+ /** @description Description/name */
1731
+ description?: string | null;
1732
+ /** @description Whether an HMAC secret is configured */
1733
+ has_secret: boolean;
1734
+ /**
1735
+ * Format: int64
1736
+ * @description Credits consumed by this webhook in the last 24 hours
1737
+ */
1738
+ credits_used_24h?: number;
1739
+ };
1740
+ /**
1741
+ * @description Webhook status
1742
+ * @enum {string}
1743
+ */
1744
+ WebhookStatusBody: "active" | "paused";
1745
+ /** @description Test webhook response */
1746
+ WebhookTestResponseBody: {
1747
+ /** @description Whether the test delivery succeeded */
1748
+ success: boolean;
1749
+ /**
1750
+ * Format: int32
1751
+ * @description HTTP status code from the endpoint
1752
+ */
1753
+ status_code?: number | null;
1754
+ /** @description Error message if failed */
1755
+ error?: string | null;
1756
+ /**
1757
+ * Format: int64
1758
+ * @description Delivery duration in milliseconds
1759
+ */
1760
+ duration_ms: number;
1761
+ };
1762
+ /**
1763
+ * @description Timeframe values accepted by webhook metric, milestone, spike, and asset-price filters.
1764
+ * @enum {string}
1765
+ */
1766
+ WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d";
1767
+ /** @description Whale trade webhook payload */
1768
+ WhaleTradePayload: {
1769
+ /** @description Trader address (the limit-order maker) */
1770
+ trader: string;
1771
+ /** @description Taker address (the order filler — often the exchange contract) */
1772
+ taker: string;
1773
+ /** @description Position ID (ERC1155 token ID) */
1774
+ position_id: string;
1775
+ /** @description Condition ID */
1776
+ condition_id?: string | null;
1777
+ /** @description Outcome name (e.g. "Yes", "No") */
1778
+ outcome?: string | null;
1779
+ /**
1780
+ * Format: int32
1781
+ * @description Outcome index (0 = Yes, 1 = No)
1782
+ */
1783
+ outcome_index?: number | null;
1784
+ /** @description Market question */
1785
+ question?: string | null;
1786
+ /** @description Market slug */
1787
+ market_slug?: string | null;
1788
+ /** @description Event slug */
1789
+ event_slug?: string | null;
1790
+ /** @description Trade ID */
1791
+ trade_id: string;
1792
+ /** @description Transaction hash */
1793
+ hash: string;
1794
+ /**
1795
+ * Format: int64
1796
+ * @description Block number
1797
+ */
1798
+ block: number;
1799
+ /**
1800
+ * Format: int64
1801
+ * @description Confirmed timestamp (Unix seconds)
1802
+ */
1803
+ confirmed_at: number;
1804
+ /**
1805
+ * Format: double
1806
+ * @description USD size of the trade
1807
+ */
1808
+ amount_usd: number;
1809
+ /**
1810
+ * Format: double
1811
+ * @description Outcome shares traded
1812
+ */
1813
+ shares_amount: number;
1814
+ /**
1815
+ * Format: double
1816
+ * @description Fee paid (USD)
1817
+ */
1818
+ fee: number;
1819
+ /** @description Trade side ("Buy" or "Sell") */
1820
+ side: string;
1821
+ /**
1822
+ * Format: double
1823
+ * @description Price per share (0.0–1.0)
1824
+ */
1825
+ price: number;
1826
+ /**
1827
+ * Format: double
1828
+ * @description Implied probability of the event (0.0–1.0); None when outcome is unknown
1829
+ */
1830
+ probability?: number | null;
1831
+ exchange: string;
1832
+ trade_type: string;
43
1833
  };
44
1834
  /** @description Server acknowledgement for an oracle events stream subscription */
45
1835
  OracleEventsStreamSubscribeResponse: {
@@ -100,6 +1890,44 @@ export interface components {
100
1890
  /** @description Non-null when the subscribe was rejected. */
101
1891
  error?: string | null;
102
1892
  };
1893
+ /** @description List-API-shaped filter evaluated in-memory against changed rows. `status` is NOT accepted — the cache only holds open markets. */
1894
+ MarketsStreamFilter: {
1895
+ /** @description Case-insensitive substring match on `title`. 3–100 chars. */
1896
+ search?: string;
1897
+ categories?: string[];
1898
+ exclude_categories?: string[];
1899
+ tags?: string[];
1900
+ exclude_tags?: string[];
1901
+ min_volume?: number;
1902
+ max_volume?: number;
1903
+ min_txns?: number;
1904
+ max_txns?: number;
1905
+ min_unique_traders?: number;
1906
+ max_unique_traders?: number;
1907
+ min_liquidity?: number;
1908
+ max_liquidity?: number;
1909
+ /** Format: int64 */
1910
+ min_holders?: number;
1911
+ /** Format: int64 */
1912
+ max_holders?: number;
1913
+ /**
1914
+ * Format: int64
1915
+ * @description Filter markets with `end_time >= start_time` (Unix seconds).
1916
+ */
1917
+ start_time?: number;
1918
+ /**
1919
+ * Format: int64
1920
+ * @description Filter markets with `end_time <= end_time` (Unix seconds).
1921
+ */
1922
+ end_time?: number;
1923
+ /** @description When true, only markets with at least one CLOB reward. */
1924
+ has_rewards?: boolean;
1925
+ /**
1926
+ * @description Timeframe that `volume`/`txns`/`unique_traders` thresholds are evaluated against. Default `24h`.
1927
+ * @enum {string}
1928
+ */
1929
+ timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
1930
+ };
103
1931
  /** @description Subscribe to the trades stream. No filters = subscribe to all trades. */
104
1932
  TradesStreamSubscribeMessage: {
105
1933
  /** @enum {string} */
@@ -827,14 +2655,16 @@ export interface components {
827
2655
  /** @description Realized PnL as a percentage of cost basis */
828
2656
  realized_pnl_pct?: number | null;
829
2657
  };
830
- /** @description Subscribe to the accounts stream. `wallets` is required. Share balance updates (`accounts_update`) are always delivered. Set `include_usdce` or `include_matic` to also receive those balance streams. */
2658
+ /** @description Subscribe to the accounts stream. `wallets` is required. Share balance updates (`accounts_update`) are always delivered. Set `include_usdce`, `include_pusd`, or `include_matic` to also receive those balance streams. */
831
2659
  AccountsSubscribeMessage: {
832
2660
  /** @enum {string} */
833
2661
  action: "subscribe" | "unsubscribe_all";
834
2662
  /** @description EVM wallet addresses */
835
2663
  wallets: string[];
836
- /** @description Also stream USDCe collateral balance updates for subscribed wallets */
2664
+ /** @description Also stream USDCe collateral balance updates for subscribed wallets (V1) */
837
2665
  include_usdce?: boolean;
2666
+ /** @description Also stream pUSD collateral balance updates for subscribed wallets (V2 CLOB) */
2667
+ include_pusd?: boolean;
838
2668
  /** @description Also stream MATIC gas balance updates for subscribed wallets */
839
2669
  include_matic?: boolean;
840
2670
  };
@@ -844,6 +2674,7 @@ export interface components {
844
2674
  /** @description Addresses rejected (invalid format) */
845
2675
  rejected?: string[];
846
2676
  include_usdce?: boolean;
2677
+ include_pusd?: boolean;
847
2678
  include_matic?: boolean;
848
2679
  error?: string | null;
849
2680
  };
@@ -883,6 +2714,22 @@ export interface components {
883
2714
  */
884
2715
  updated_at: number;
885
2716
  };
2717
+ /** @description Server-pushed event: pUSD (V2 CLOB collateral) balance change for a wallet. Envelope type: "pusd_update". Only delivered when `include_pusd: true`. */
2718
+ PusdUpdateEvent: {
2719
+ /** @description Wallet address (0x-prefixed hex) */
2720
+ address: string;
2721
+ /** @description pUSD contract address — omitted when not available */
2722
+ token_address?: string;
2723
+ /** @description Current pUSD balance (decimal string) — omitted when not available */
2724
+ balance?: string;
2725
+ /** Format: uint64 */
2726
+ block_number: number;
2727
+ /**
2728
+ * Format: int64
2729
+ * @description Unix seconds
2730
+ */
2731
+ updated_at: number;
2732
+ };
886
2733
  /** @description Server-pushed event: MATIC native balance change for a wallet. Envelope type: "matic_update". Only delivered when `include_matic: true`. */
887
2734
  MaticUpdateEvent: {
888
2735
  /** @description Wallet address (0x-prefixed hex) */
@@ -1108,44 +2955,6 @@ export interface components {
1108
2955
  /** @description Ids mode: event slug strings — matches every child market of each event. */
1109
2956
  event_slugs?: string[];
1110
2957
  };
1111
- /** @description List-API-shaped filter evaluated in-memory against changed rows. `status` is NOT accepted — the cache only holds open markets. */
1112
- MarketsStreamFilter: {
1113
- /** @description Case-insensitive substring match on `title`. 3–100 chars. */
1114
- search?: string;
1115
- categories?: string[];
1116
- exclude_categories?: string[];
1117
- tags?: string[];
1118
- exclude_tags?: string[];
1119
- min_volume?: number;
1120
- max_volume?: number;
1121
- min_txns?: number;
1122
- max_txns?: number;
1123
- min_unique_traders?: number;
1124
- max_unique_traders?: number;
1125
- min_liquidity?: number;
1126
- max_liquidity?: number;
1127
- /** Format: int64 */
1128
- min_holders?: number;
1129
- /** Format: int64 */
1130
- max_holders?: number;
1131
- /**
1132
- * Format: int64
1133
- * @description Filter markets with `end_time >= start_time` (Unix seconds).
1134
- */
1135
- start_time?: number;
1136
- /**
1137
- * Format: int64
1138
- * @description Filter markets with `end_time <= end_time` (Unix seconds).
1139
- */
1140
- end_time?: number;
1141
- /** @description When true, only markets with at least one CLOB reward. */
1142
- has_rewards?: boolean;
1143
- /**
1144
- * @description Timeframe that `volume`/`txns`/`unique_traders` thresholds are evaluated against. Default `24h`.
1145
- * @enum {string}
1146
- */
1147
- timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
1148
- };
1149
2958
  /**
1150
2959
  * OrderFilled / OrdersMatched
1151
2960
  * @description A buy/sell trade was matched on the exchange.