@structbuild/sdk 0.5.2 → 0.5.4
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.
- package/dist/generated/polymarket.d.ts +81 -7
- package/dist/generated/webhooks.d.ts +1085 -742
- package/dist/generated/ws-alerts.d.ts +1089 -740
- package/dist/generated/ws.d.ts +821 -114
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +4 -1
- package/dist/index.js.map +3 -3
- package/dist/namespaces/builders.d.ts +2 -1
- package/dist/types/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/generated/ws.d.ts
CHANGED
|
@@ -86,10 +86,15 @@ export interface components {
|
|
|
86
86
|
slug?: string | null;
|
|
87
87
|
event_slug?: string | null;
|
|
88
88
|
};
|
|
89
|
+
/** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
|
|
90
|
+
AssetPriceTickFilters: {
|
|
91
|
+
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
92
|
+
asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
|
|
93
|
+
};
|
|
89
94
|
/** @description Webhook payload for an asset price tick. */
|
|
90
95
|
AssetPriceTickPayload: {
|
|
91
|
-
/** @description Asset symbol
|
|
92
|
-
symbol:
|
|
96
|
+
/** @description Asset symbol */
|
|
97
|
+
symbol: components["schemas"]["WebhookAssetSymbol"];
|
|
93
98
|
/**
|
|
94
99
|
* Format: double
|
|
95
100
|
* @description Current price from the Chainlink feed
|
|
@@ -101,12 +106,19 @@ export interface components {
|
|
|
101
106
|
*/
|
|
102
107
|
timestamp_ms: number;
|
|
103
108
|
};
|
|
109
|
+
/** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
|
|
110
|
+
AssetPriceWindowUpdateFilters: {
|
|
111
|
+
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
112
|
+
asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
|
|
113
|
+
/** @description Restrict to these candle sizes. Empty = all sizes. */
|
|
114
|
+
timeframes?: components["schemas"]["AssetWindowFilterTimeframe"][] | null;
|
|
115
|
+
};
|
|
104
116
|
/** @description Webhook payload for an asset price window open or close. */
|
|
105
117
|
AssetPriceWindowUpdatePayload: {
|
|
106
|
-
/** @description Asset symbol
|
|
107
|
-
symbol:
|
|
108
|
-
/** @description Time-window variant
|
|
109
|
-
variant:
|
|
118
|
+
/** @description Asset symbol */
|
|
119
|
+
symbol: components["schemas"]["WebhookAssetSymbol"];
|
|
120
|
+
/** @description Time-window variant */
|
|
121
|
+
variant: components["schemas"]["AssetPriceWindowVariant"];
|
|
110
122
|
/**
|
|
111
123
|
* Format: int64
|
|
112
124
|
* @description Window start timestamp (milliseconds since epoch)
|
|
@@ -128,7 +140,50 @@ export interface components {
|
|
|
128
140
|
*/
|
|
129
141
|
close_price: number;
|
|
130
142
|
/** @description "open" when the window starts, "close" when the window is complete */
|
|
131
|
-
update_type:
|
|
143
|
+
update_type: components["schemas"]["AssetPriceWindowUpdateType"];
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* @description Whether this update is the open or the close of a candle.
|
|
147
|
+
* @enum {string}
|
|
148
|
+
*/
|
|
149
|
+
AssetPriceWindowUpdateType: "open" | "close";
|
|
150
|
+
/**
|
|
151
|
+
* @description Time-window variant emitted by the asset price window stream.
|
|
152
|
+
* @enum {string}
|
|
153
|
+
*/
|
|
154
|
+
AssetPriceWindowVariant: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
|
|
155
|
+
/**
|
|
156
|
+
* @description Candle sizes accepted by `asset_price_window_update.timeframes`.
|
|
157
|
+
* @enum {string}
|
|
158
|
+
*/
|
|
159
|
+
AssetWindowFilterTimeframe: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
|
|
160
|
+
/**
|
|
161
|
+
* @description Subscription filters for the `close_to_bond` event. At least one of
|
|
162
|
+
* `min_probability` or `max_probability` is required (enforced at runtime).
|
|
163
|
+
*/
|
|
164
|
+
CloseToBondFilters: {
|
|
165
|
+
/**
|
|
166
|
+
* Format: double
|
|
167
|
+
* @description Trigger when the YES outcome price is ≥ this value (e.g. 0.95 for 95% certainty). At least one of `min_probability` or `max_probability` must be set.
|
|
168
|
+
*/
|
|
169
|
+
min_probability?: number | null;
|
|
170
|
+
/**
|
|
171
|
+
* Format: double
|
|
172
|
+
* @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO).
|
|
173
|
+
*/
|
|
174
|
+
max_probability?: number | null;
|
|
175
|
+
/** @description Restrict to these markets. */
|
|
176
|
+
condition_ids?: string[] | null;
|
|
177
|
+
/** @description Restrict to these outcome token IDs. */
|
|
178
|
+
position_ids?: string[] | null;
|
|
179
|
+
/** @description Restrict to markets in these events. */
|
|
180
|
+
event_slugs?: string[] | null;
|
|
181
|
+
/** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
|
|
182
|
+
outcomes?: string[] | null;
|
|
183
|
+
/** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
|
|
184
|
+
position_outcome_indices?: number[] | null;
|
|
185
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
186
|
+
exclude_shortterm_markets?: boolean | null;
|
|
132
187
|
};
|
|
133
188
|
/** @description Close-to-bond webhook payload */
|
|
134
189
|
CloseToBondPayload: {
|
|
@@ -202,17 +257,31 @@ export interface components {
|
|
|
202
257
|
*/
|
|
203
258
|
threshold: number;
|
|
204
259
|
};
|
|
205
|
-
/** @description
|
|
260
|
+
/** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
|
|
206
261
|
ConditionMetricsPayload: {
|
|
262
|
+
/** @description Market condition ID */
|
|
207
263
|
condition_id?: string | null;
|
|
208
|
-
|
|
209
|
-
|
|
264
|
+
/** @description Aggregation window */
|
|
265
|
+
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
266
|
+
/**
|
|
267
|
+
* Format: double
|
|
268
|
+
* @description Total trading volume in USD for this timeframe
|
|
269
|
+
*/
|
|
210
270
|
volume_usd?: number | null;
|
|
211
|
-
/**
|
|
271
|
+
/**
|
|
272
|
+
* Format: double
|
|
273
|
+
* @description Total fees collected in USD
|
|
274
|
+
*/
|
|
212
275
|
fees?: number | null;
|
|
213
|
-
/**
|
|
276
|
+
/**
|
|
277
|
+
* Format: int64
|
|
278
|
+
* @description Total number of transactions
|
|
279
|
+
*/
|
|
214
280
|
txns?: number | null;
|
|
215
|
-
/**
|
|
281
|
+
/**
|
|
282
|
+
* Format: int64
|
|
283
|
+
* @description Number of unique traders
|
|
284
|
+
*/
|
|
216
285
|
unique_traders?: number | null;
|
|
217
286
|
};
|
|
218
287
|
/** @description CTF ConditionResolution: positions become redeemable on the Conditional Tokens contract. */
|
|
@@ -284,17 +353,53 @@ export interface components {
|
|
|
284
353
|
slug?: string | null;
|
|
285
354
|
event_slug?: string | null;
|
|
286
355
|
};
|
|
287
|
-
/** @description
|
|
356
|
+
/** @description Subscription filters for the `event_metrics` event. All fields are optional. */
|
|
357
|
+
EventMetricsFilters: {
|
|
358
|
+
/** @description Restrict to these events. Empty = all events. */
|
|
359
|
+
event_slugs?: string[] | null;
|
|
360
|
+
/** @description Restrict to these aggregation windows. */
|
|
361
|
+
timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
|
|
362
|
+
/**
|
|
363
|
+
* Format: double
|
|
364
|
+
* @description Only fire when aggregated event volume ≥ this value (USD).
|
|
365
|
+
*/
|
|
366
|
+
min_volume_usd?: number | null;
|
|
367
|
+
/** Format: double */
|
|
368
|
+
max_volume_usd?: number | null;
|
|
369
|
+
/** Format: int64 */
|
|
370
|
+
min_txns?: number | null;
|
|
371
|
+
/** Format: int64 */
|
|
372
|
+
min_unique_traders?: number | null;
|
|
373
|
+
/** Format: double */
|
|
374
|
+
min_fees?: number | null;
|
|
375
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
376
|
+
exclude_shortterm_markets?: boolean | null;
|
|
377
|
+
};
|
|
378
|
+
/** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
|
|
288
379
|
EventMetricsPayload: {
|
|
380
|
+
/** @description Event slug */
|
|
289
381
|
event_slug?: string | null;
|
|
290
|
-
|
|
291
|
-
|
|
382
|
+
/** @description Aggregation window */
|
|
383
|
+
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
384
|
+
/**
|
|
385
|
+
* Format: double
|
|
386
|
+
* @description Total aggregated volume across all markets in the event (USD)
|
|
387
|
+
*/
|
|
292
388
|
volume_usd?: number | null;
|
|
293
|
-
/**
|
|
389
|
+
/**
|
|
390
|
+
* Format: double
|
|
391
|
+
* @description Total fees collected in USD
|
|
392
|
+
*/
|
|
294
393
|
fees?: number | null;
|
|
295
|
-
/**
|
|
394
|
+
/**
|
|
395
|
+
* Format: int64
|
|
396
|
+
* @description Total number of transactions
|
|
397
|
+
*/
|
|
296
398
|
txns?: number | null;
|
|
297
|
-
/**
|
|
399
|
+
/**
|
|
400
|
+
* Format: int64
|
|
401
|
+
* @description Number of unique traders
|
|
402
|
+
*/
|
|
298
403
|
unique_traders?: number | null;
|
|
299
404
|
};
|
|
300
405
|
/** @description Event PnL webhook payload (Arc-optimized) */
|
|
@@ -338,6 +443,17 @@ export interface components {
|
|
|
338
443
|
/** Format: int64 */
|
|
339
444
|
last_trade_at?: number | null;
|
|
340
445
|
};
|
|
446
|
+
/** @description Subscription filters for the `event_volume_milestone` event. */
|
|
447
|
+
EventVolumeMilestoneFilters: {
|
|
448
|
+
/** @description **Required.** Aggregation windows to monitor. */
|
|
449
|
+
timeframes: components["schemas"]["MetricFilterTimeframe"][];
|
|
450
|
+
/** @description Restrict to these events. */
|
|
451
|
+
event_slugs?: string[] | null;
|
|
452
|
+
/** @description Specific USD milestones to trigger on. */
|
|
453
|
+
milestone_amounts?: number[] | null;
|
|
454
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
455
|
+
exclude_shortterm_markets?: boolean | null;
|
|
456
|
+
};
|
|
341
457
|
/** @description Event volume milestone webhook payload */
|
|
342
458
|
EventVolumeMilestonePayload: {
|
|
343
459
|
event_slug: string;
|
|
@@ -363,6 +479,25 @@ export interface components {
|
|
|
363
479
|
*/
|
|
364
480
|
txns: number;
|
|
365
481
|
};
|
|
482
|
+
/** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
|
|
483
|
+
EventVolumeSpikeFilters: {
|
|
484
|
+
/**
|
|
485
|
+
* Format: double
|
|
486
|
+
* @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
|
|
487
|
+
*/
|
|
488
|
+
spike_ratio: number;
|
|
489
|
+
/**
|
|
490
|
+
* Format: int64
|
|
491
|
+
* @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
|
|
492
|
+
*/
|
|
493
|
+
window_secs?: number | null;
|
|
494
|
+
/** @description Restrict to these events. */
|
|
495
|
+
event_slugs?: string[] | null;
|
|
496
|
+
/** @description Restrict to these aggregation windows. */
|
|
497
|
+
timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
|
|
498
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
499
|
+
exclude_shortterm_markets?: boolean | null;
|
|
500
|
+
};
|
|
366
501
|
/** @description Event volume spike webhook payload */
|
|
367
502
|
EventVolumeSpikePayload: {
|
|
368
503
|
event_slug: string;
|
|
@@ -400,32 +535,32 @@ export interface components {
|
|
|
400
535
|
*/
|
|
401
536
|
fees: number;
|
|
402
537
|
};
|
|
403
|
-
/** @description
|
|
538
|
+
/** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
|
|
404
539
|
FirstTradePayload: {
|
|
405
|
-
/** @description
|
|
540
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
406
541
|
trader: string;
|
|
407
|
-
/** @description
|
|
542
|
+
/** @description Order filler wallet address (lowercase) */
|
|
408
543
|
taker: string;
|
|
409
|
-
/** @description
|
|
544
|
+
/** @description ERC-1155 outcome token ID */
|
|
410
545
|
position_id: string;
|
|
411
|
-
/** @description
|
|
546
|
+
/** @description Parent market condition ID (0x-prefixed hex) */
|
|
412
547
|
condition_id?: string | null;
|
|
413
|
-
/** @description
|
|
548
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
414
549
|
outcome?: string | null;
|
|
415
550
|
/**
|
|
416
551
|
* Format: int32
|
|
417
|
-
* @description Outcome index
|
|
552
|
+
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
418
553
|
*/
|
|
419
554
|
outcome_index?: number | null;
|
|
420
|
-
/** @description Market question
|
|
555
|
+
/** @description Market question text */
|
|
421
556
|
question?: string | null;
|
|
422
|
-
/** @description Market slug
|
|
557
|
+
/** @description Market slug */
|
|
423
558
|
market_slug?: string | null;
|
|
424
|
-
/** @description
|
|
559
|
+
/** @description Parent event slug */
|
|
425
560
|
event_slug?: string | null;
|
|
426
|
-
/** @description
|
|
561
|
+
/** @description Unique trade identifier */
|
|
427
562
|
trade_id: string;
|
|
428
|
-
/** @description Transaction hash
|
|
563
|
+
/** @description Transaction hash */
|
|
429
564
|
hash: string;
|
|
430
565
|
/**
|
|
431
566
|
* Format: int64
|
|
@@ -434,24 +569,35 @@ export interface components {
|
|
|
434
569
|
block: number;
|
|
435
570
|
/**
|
|
436
571
|
* Format: int64
|
|
437
|
-
* @description
|
|
572
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
438
573
|
*/
|
|
439
574
|
confirmed_at: number;
|
|
440
|
-
/**
|
|
575
|
+
/**
|
|
576
|
+
* Format: double
|
|
577
|
+
* @description USD size of the trade (6 decimal places)
|
|
578
|
+
*/
|
|
441
579
|
amount_usd: number;
|
|
442
|
-
/**
|
|
580
|
+
/**
|
|
581
|
+
* Format: double
|
|
582
|
+
* @description Outcome shares traded (6 decimal places)
|
|
583
|
+
*/
|
|
443
584
|
shares_amount: number;
|
|
444
|
-
/**
|
|
585
|
+
/**
|
|
586
|
+
* Format: double
|
|
587
|
+
* @description Fee paid in USD (6 decimal places)
|
|
588
|
+
*/
|
|
445
589
|
fee: number;
|
|
446
|
-
/** @description Trade
|
|
447
|
-
side:
|
|
590
|
+
/** @description Trade direction */
|
|
591
|
+
side: "Buy" | "Sell";
|
|
448
592
|
/**
|
|
449
593
|
* Format: double
|
|
450
|
-
* @description
|
|
594
|
+
* @description Outcome token price (0.0–1.0)
|
|
451
595
|
*/
|
|
452
596
|
price: number;
|
|
453
|
-
|
|
454
|
-
|
|
597
|
+
/** @description Exchange contract that processed the trade */
|
|
598
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
599
|
+
/** @description Trade type (webhook events only fire on order fills) */
|
|
600
|
+
trade_type: "OrderFilled" | "OrdersMatched";
|
|
455
601
|
};
|
|
456
602
|
/** @description Global PnL webhook payload (Arc-optimized) */
|
|
457
603
|
GlobalPnlPayload: {
|
|
@@ -508,6 +654,15 @@ export interface components {
|
|
|
508
654
|
ListEventsResponse: {
|
|
509
655
|
events: components["schemas"]["WebhookEventInfo"][];
|
|
510
656
|
};
|
|
657
|
+
/** @description Subscription filters for the `market_created` event. All fields are optional. */
|
|
658
|
+
MarketCreatedFilters: {
|
|
659
|
+
/** @description Restrict to markets with these tags or category names (case-insensitive match). */
|
|
660
|
+
tags?: string[] | null;
|
|
661
|
+
/** @description Restrict to markets belonging to these events. */
|
|
662
|
+
event_slugs?: string[] | null;
|
|
663
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
|
|
664
|
+
exclude_shortterm_markets?: boolean | null;
|
|
665
|
+
};
|
|
511
666
|
/** @description Outcome entry in the market created payload — mirrors `NewMarketOutcome` */
|
|
512
667
|
MarketCreatedOutcome: {
|
|
513
668
|
/**
|
|
@@ -551,6 +706,38 @@ export interface components {
|
|
|
551
706
|
/** @description Whether this is a neg-risk market */
|
|
552
707
|
neg_risk: boolean;
|
|
553
708
|
};
|
|
709
|
+
/** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
|
|
710
|
+
MarketMetricsFilters: {
|
|
711
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
712
|
+
condition_ids?: string[] | null;
|
|
713
|
+
/** @description Restrict to these aggregation windows. Empty = all windows. */
|
|
714
|
+
timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
|
|
715
|
+
/**
|
|
716
|
+
* Format: double
|
|
717
|
+
* @description Only fire when volume ≥ this value (USD).
|
|
718
|
+
*/
|
|
719
|
+
min_volume_usd?: number | null;
|
|
720
|
+
/**
|
|
721
|
+
* Format: double
|
|
722
|
+
* @description Only fire when volume ≤ this value (USD).
|
|
723
|
+
*/
|
|
724
|
+
max_volume_usd?: number | null;
|
|
725
|
+
/**
|
|
726
|
+
* Format: int64
|
|
727
|
+
* @description Only fire when transaction count ≥ this value.
|
|
728
|
+
*/
|
|
729
|
+
min_txns?: number | null;
|
|
730
|
+
/**
|
|
731
|
+
* Format: int64
|
|
732
|
+
* @description Only fire when unique trader count ≥ this value.
|
|
733
|
+
*/
|
|
734
|
+
min_unique_traders?: number | null;
|
|
735
|
+
/**
|
|
736
|
+
* Format: double
|
|
737
|
+
* @description Only fire when total fees ≥ this value (USD).
|
|
738
|
+
*/
|
|
739
|
+
min_fees?: number | null;
|
|
740
|
+
};
|
|
554
741
|
/** @description Market PnL webhook payload (Arc-optimized) */
|
|
555
742
|
MarketPnlPayload: {
|
|
556
743
|
trader?: string | null;
|
|
@@ -587,6 +774,32 @@ export interface components {
|
|
|
587
774
|
/** Format: int64 */
|
|
588
775
|
last_trade_at?: number | null;
|
|
589
776
|
};
|
|
777
|
+
/** @description Subscription filters for the `market_volume_milestone` event. */
|
|
778
|
+
MarketVolumeMilestoneFilters: {
|
|
779
|
+
/** @description **Required.** Aggregation windows to monitor (e.g. \["1h", "24h"\]). */
|
|
780
|
+
timeframes: components["schemas"]["MetricFilterTimeframe"][];
|
|
781
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
782
|
+
condition_ids?: string[] | null;
|
|
783
|
+
/** @description Specific USD milestones to trigger on (e.g. \[10000, 100000, 1000000\]). Empty = all milestones. */
|
|
784
|
+
milestone_amounts?: number[] | null;
|
|
785
|
+
};
|
|
786
|
+
/** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
|
|
787
|
+
MarketVolumeSpikeFilters: {
|
|
788
|
+
/**
|
|
789
|
+
* Format: double
|
|
790
|
+
* @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.
|
|
791
|
+
*/
|
|
792
|
+
spike_ratio: number;
|
|
793
|
+
/**
|
|
794
|
+
* Format: int64
|
|
795
|
+
* @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
|
|
796
|
+
*/
|
|
797
|
+
window_secs?: number | null;
|
|
798
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
799
|
+
condition_ids?: string[] | null;
|
|
800
|
+
/** @description Restrict to these aggregation windows. Empty = all windows. */
|
|
801
|
+
timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
|
|
802
|
+
};
|
|
590
803
|
/** @description Market volume spike webhook payload */
|
|
591
804
|
MarketVolumeSpikePayload: {
|
|
592
805
|
condition_id: string;
|
|
@@ -626,6 +839,11 @@ export interface components {
|
|
|
626
839
|
*/
|
|
627
840
|
fees: number;
|
|
628
841
|
};
|
|
842
|
+
/**
|
|
843
|
+
* @description Aggregation windows emitted by the metrics / milestone streams.
|
|
844
|
+
* @enum {string}
|
|
845
|
+
*/
|
|
846
|
+
MetricFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
629
847
|
/** @description NegRisk Adapter: outcome reported for a neg-risk market question. */
|
|
630
848
|
NegRiskOutcomeReportedEvent: {
|
|
631
849
|
id: string;
|
|
@@ -648,35 +866,30 @@ export interface components {
|
|
|
648
866
|
slug?: string | null;
|
|
649
867
|
event_slug?: string | null;
|
|
650
868
|
};
|
|
651
|
-
/**
|
|
652
|
-
* @description New market entry webhook payload
|
|
653
|
-
*
|
|
654
|
-
* Fired when a trader places their first trade in a specific condition/market.
|
|
655
|
-
* The payload contains the full details of the triggering trade.
|
|
656
|
-
*/
|
|
869
|
+
/** @description Payload delivered when a trader places their first trade in a specific market (fires once per trader+market pair) */
|
|
657
870
|
NewMarketPayload: {
|
|
658
|
-
/** @description
|
|
871
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
659
872
|
trader: string;
|
|
660
|
-
/** @description
|
|
873
|
+
/** @description Order filler wallet address (lowercase) */
|
|
661
874
|
taker: string;
|
|
662
|
-
/** @description
|
|
875
|
+
/** @description ERC-1155 outcome token ID */
|
|
663
876
|
position_id: string;
|
|
664
|
-
/** @description
|
|
877
|
+
/** @description Parent market condition ID */
|
|
665
878
|
condition_id?: string | null;
|
|
666
879
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
667
880
|
outcome?: string | null;
|
|
668
881
|
/**
|
|
669
882
|
* Format: int32
|
|
670
|
-
* @description Outcome index
|
|
883
|
+
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
671
884
|
*/
|
|
672
885
|
outcome_index?: number | null;
|
|
673
|
-
/** @description Market question */
|
|
886
|
+
/** @description Market question text */
|
|
674
887
|
question?: string | null;
|
|
675
888
|
/** @description Market slug */
|
|
676
889
|
market_slug?: string | null;
|
|
677
|
-
/** @description
|
|
890
|
+
/** @description Parent event slug */
|
|
678
891
|
event_slug?: string | null;
|
|
679
|
-
/** @description
|
|
892
|
+
/** @description Unique trade identifier */
|
|
680
893
|
trade_id: string;
|
|
681
894
|
/** @description Transaction hash */
|
|
682
895
|
hash: string;
|
|
@@ -687,63 +900,71 @@ export interface components {
|
|
|
687
900
|
block: number;
|
|
688
901
|
/**
|
|
689
902
|
* Format: int64
|
|
690
|
-
* @description
|
|
903
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
691
904
|
*/
|
|
692
905
|
confirmed_at: number;
|
|
693
906
|
/**
|
|
694
907
|
* Format: double
|
|
695
|
-
* @description USD size of the trade
|
|
908
|
+
* @description USD size of the trade (6 decimal places)
|
|
696
909
|
*/
|
|
697
910
|
amount_usd: number;
|
|
698
911
|
/**
|
|
699
912
|
* Format: double
|
|
700
|
-
* @description Outcome shares traded
|
|
913
|
+
* @description Outcome shares traded (6 decimal places)
|
|
701
914
|
*/
|
|
702
915
|
shares_amount: number;
|
|
703
916
|
/**
|
|
704
917
|
* Format: double
|
|
705
|
-
* @description Fee paid (
|
|
918
|
+
* @description Fee paid in USD (6 decimal places)
|
|
706
919
|
*/
|
|
707
920
|
fee: number;
|
|
708
|
-
/** @description Trade
|
|
709
|
-
side:
|
|
921
|
+
/** @description Trade direction */
|
|
922
|
+
side: "Buy" | "Sell";
|
|
710
923
|
/**
|
|
711
924
|
* Format: double
|
|
712
|
-
* @description
|
|
925
|
+
* @description Outcome token price (0.0–1.0)
|
|
713
926
|
*/
|
|
714
927
|
price: number;
|
|
715
928
|
/**
|
|
716
929
|
* Format: double
|
|
717
|
-
* @description Implied probability (0.0–1.0);
|
|
930
|
+
* @description Implied probability (0.0–1.0); null when outcome is unknown
|
|
718
931
|
*/
|
|
719
932
|
probability?: number | null;
|
|
720
|
-
|
|
721
|
-
|
|
933
|
+
/** @description Exchange contract that processed the trade */
|
|
934
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
935
|
+
/** @description Trade type (webhook events only fire on order fills) */
|
|
936
|
+
trade_type: "OrderFilled" | "OrdersMatched";
|
|
722
937
|
};
|
|
723
|
-
/**
|
|
938
|
+
/**
|
|
939
|
+
* @description Trade types accepted by `trader_new_trade.trade_types`. Webhook fires on
|
|
940
|
+
* fill-style trades only.
|
|
941
|
+
* @enum {string}
|
|
942
|
+
*/
|
|
943
|
+
NewTradeFilterType: "OrderFilled" | "OrdersMatched";
|
|
944
|
+
/** @description Payload delivered on every order-filled trade */
|
|
724
945
|
NewTradePayload: {
|
|
725
|
-
/** @description
|
|
946
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
726
947
|
trader: string;
|
|
727
|
-
/** @description
|
|
948
|
+
/** @description Order filler wallet address (lowercase) */
|
|
728
949
|
taker: string;
|
|
729
|
-
/** @description
|
|
950
|
+
/** @description ERC-1155 outcome token ID */
|
|
730
951
|
position_id: string;
|
|
731
|
-
/** @description
|
|
952
|
+
/** @description Parent market condition ID */
|
|
732
953
|
condition_id?: string | null;
|
|
733
954
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
734
955
|
outcome?: string | null;
|
|
735
956
|
/**
|
|
736
957
|
* Format: int32
|
|
737
|
-
* @description Outcome index
|
|
958
|
+
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
738
959
|
*/
|
|
739
960
|
outcome_index?: number | null;
|
|
740
|
-
/** @description Market question */
|
|
961
|
+
/** @description Market question text */
|
|
741
962
|
question?: string | null;
|
|
742
963
|
/** @description Market slug */
|
|
743
964
|
market_slug?: string | null;
|
|
744
|
-
/** @description
|
|
965
|
+
/** @description Parent event slug */
|
|
745
966
|
event_slug?: string | null;
|
|
746
|
-
/** @description
|
|
967
|
+
/** @description Unique trade identifier */
|
|
747
968
|
trade_id: string;
|
|
748
969
|
/** @description Transaction hash */
|
|
749
970
|
hash: string;
|
|
@@ -754,39 +975,46 @@ export interface components {
|
|
|
754
975
|
block: number;
|
|
755
976
|
/**
|
|
756
977
|
* Format: int64
|
|
757
|
-
* @description
|
|
978
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
758
979
|
*/
|
|
759
980
|
confirmed_at: number;
|
|
760
981
|
/**
|
|
761
982
|
* Format: double
|
|
762
|
-
* @description USD size of the trade
|
|
983
|
+
* @description USD size of the trade (6 decimal places)
|
|
763
984
|
*/
|
|
764
985
|
amount_usd: number;
|
|
765
986
|
/**
|
|
766
987
|
* Format: double
|
|
767
|
-
* @description Outcome shares traded
|
|
988
|
+
* @description Outcome shares traded (6 decimal places)
|
|
768
989
|
*/
|
|
769
990
|
shares_amount: number;
|
|
770
991
|
/**
|
|
771
992
|
* Format: double
|
|
772
|
-
* @description Fee paid (
|
|
993
|
+
* @description Fee paid in USD (6 decimal places)
|
|
773
994
|
*/
|
|
774
995
|
fee: number;
|
|
775
|
-
/** @description Trade
|
|
776
|
-
side:
|
|
996
|
+
/** @description Trade direction */
|
|
997
|
+
side: "Buy" | "Sell";
|
|
777
998
|
/**
|
|
778
999
|
* Format: double
|
|
779
|
-
* @description
|
|
1000
|
+
* @description Outcome token price (0.0–1.0)
|
|
780
1001
|
*/
|
|
781
1002
|
price: number;
|
|
782
1003
|
/**
|
|
783
1004
|
* Format: double
|
|
784
|
-
* @description Implied probability
|
|
1005
|
+
* @description Implied probability (0.0–1.0); null when outcome is unknown
|
|
785
1006
|
*/
|
|
786
1007
|
probability?: number | null;
|
|
787
|
-
|
|
788
|
-
|
|
1008
|
+
/** @description Exchange contract that processed the trade */
|
|
1009
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
1010
|
+
/** @description Trade type (webhook events only fire on order fills) */
|
|
1011
|
+
trade_type: "OrderFilled" | "OrdersMatched";
|
|
789
1012
|
};
|
|
1013
|
+
/**
|
|
1014
|
+
* @description Oracle event variants accepted by `oracle_events.oracle_event_types`.
|
|
1015
|
+
* @enum {string}
|
|
1016
|
+
*/
|
|
1017
|
+
OracleEventFilterType: "AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported";
|
|
790
1018
|
/**
|
|
791
1019
|
* @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
|
|
792
1020
|
* and only includes fields relevant to each type.
|
|
@@ -843,6 +1071,18 @@ export interface components {
|
|
|
843
1071
|
/** @enum {string} */
|
|
844
1072
|
event_type: "NegRiskOutcomeReported";
|
|
845
1073
|
});
|
|
1074
|
+
/** @description Subscription filters for the `oracle_events` event. All fields are optional. */
|
|
1075
|
+
OracleEventsFilters: {
|
|
1076
|
+
/** @description Restrict to these event types (case-insensitive). Empty = all. */
|
|
1077
|
+
oracle_event_types?: components["schemas"]["OracleEventFilterType"][] | null;
|
|
1078
|
+
/** @description Restrict to events for these condition IDs. */
|
|
1079
|
+
condition_ids?: string[] | null;
|
|
1080
|
+
};
|
|
1081
|
+
/**
|
|
1082
|
+
* @description PnL aggregation windows accepted by `*_pnl.timeframes`.
|
|
1083
|
+
* @enum {string}
|
|
1084
|
+
*/
|
|
1085
|
+
PnlFilterTimeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
846
1086
|
/**
|
|
847
1087
|
* @description PnL timeframe enum for webhook filtering
|
|
848
1088
|
* @enum {string}
|
|
@@ -869,7 +1109,7 @@ export interface components {
|
|
|
869
1109
|
* - volume_milestone: condition_ids, timeframes, milestone_amounts
|
|
870
1110
|
* - close_to_bond: min_probability (high zone threshold), max_probability (low zone threshold), condition_ids, position_ids, outcomes, position_outcome_indices, event_slugs, exclude_shortterm_markets
|
|
871
1111
|
* - market_created: event_slugs, tags, exclude_shortterm_markets
|
|
872
|
-
* - probability_spike: condition_ids, event_slugs, outcomes, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
1112
|
+
* - probability_spike: condition_ids, event_slugs, outcomes, min_probability, max_probability, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
873
1113
|
* - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
874
1114
|
* - trader_new_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
|
|
875
1115
|
* - trader_trade_event: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
|
|
@@ -1040,20 +1280,76 @@ export interface components {
|
|
|
1040
1280
|
*/
|
|
1041
1281
|
oracle_event_types?: string[];
|
|
1042
1282
|
};
|
|
1043
|
-
/** @description
|
|
1283
|
+
/** @description Subscription filters for the `position_metrics` event. All fields are optional. */
|
|
1284
|
+
PositionMetricsFilters: {
|
|
1285
|
+
/** @description Restrict to these outcome token IDs. */
|
|
1286
|
+
position_ids?: string[] | null;
|
|
1287
|
+
/** @description Restrict to positions within these markets. */
|
|
1288
|
+
condition_ids?: string[] | null;
|
|
1289
|
+
/** @description Restrict to positions with these outcome names (e.g. \["Yes", "No"\]). */
|
|
1290
|
+
outcomes?: string[] | null;
|
|
1291
|
+
/** @description Restrict to these aggregation windows. */
|
|
1292
|
+
timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
|
|
1293
|
+
/**
|
|
1294
|
+
* Format: double
|
|
1295
|
+
* @description Only fire when position volume ≥ this value (USD).
|
|
1296
|
+
*/
|
|
1297
|
+
min_volume_usd?: number | null;
|
|
1298
|
+
/** Format: double */
|
|
1299
|
+
max_volume_usd?: number | null;
|
|
1300
|
+
/** Format: double */
|
|
1301
|
+
min_buy_usd?: number | null;
|
|
1302
|
+
/** Format: double */
|
|
1303
|
+
min_sell_volume_usd?: number | null;
|
|
1304
|
+
/** Format: int64 */
|
|
1305
|
+
min_txns?: number | null;
|
|
1306
|
+
/** Format: int64 */
|
|
1307
|
+
min_unique_traders?: number | null;
|
|
1308
|
+
/**
|
|
1309
|
+
* Format: double
|
|
1310
|
+
* @description Only fire when price change % ≥ this value.
|
|
1311
|
+
*/
|
|
1312
|
+
min_price_change_pct?: number | null;
|
|
1313
|
+
/**
|
|
1314
|
+
* Format: double
|
|
1315
|
+
* @description Only fire when probability change % ≥ this value.
|
|
1316
|
+
*/
|
|
1317
|
+
min_probability_change_pct?: number | null;
|
|
1318
|
+
/** Format: double */
|
|
1319
|
+
min_fees?: number | null;
|
|
1320
|
+
};
|
|
1321
|
+
/** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
|
|
1044
1322
|
PositionMetricsPayload: {
|
|
1323
|
+
/** @description ERC-1155 outcome token ID */
|
|
1045
1324
|
position_id?: string | null;
|
|
1325
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1046
1326
|
outcome?: string | null;
|
|
1047
|
-
/**
|
|
1327
|
+
/**
|
|
1328
|
+
* Format: int32
|
|
1329
|
+
* @description Outcome index
|
|
1330
|
+
*/
|
|
1048
1331
|
outcome_index?: number | null;
|
|
1049
|
-
|
|
1050
|
-
|
|
1332
|
+
/** @description Aggregation window */
|
|
1333
|
+
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
1334
|
+
/**
|
|
1335
|
+
* Format: double
|
|
1336
|
+
* @description Total trading volume in USD
|
|
1337
|
+
*/
|
|
1051
1338
|
volume_usd?: number | null;
|
|
1052
|
-
/**
|
|
1339
|
+
/**
|
|
1340
|
+
* Format: double
|
|
1341
|
+
* @description Buy volume in USD
|
|
1342
|
+
*/
|
|
1053
1343
|
buy_volume_usd?: number | null;
|
|
1054
|
-
/**
|
|
1344
|
+
/**
|
|
1345
|
+
* Format: double
|
|
1346
|
+
* @description Sell volume in USD
|
|
1347
|
+
*/
|
|
1055
1348
|
sell_volume_usd?: number | null;
|
|
1056
|
-
/**
|
|
1349
|
+
/**
|
|
1350
|
+
* Format: double
|
|
1351
|
+
* @description Total fees in USD
|
|
1352
|
+
*/
|
|
1057
1353
|
fees?: number | null;
|
|
1058
1354
|
/** Format: int64 */
|
|
1059
1355
|
txns?: number | null;
|
|
@@ -1080,6 +1376,19 @@ export interface components {
|
|
|
1080
1376
|
/** Format: double */
|
|
1081
1377
|
probability_low?: number | null;
|
|
1082
1378
|
};
|
|
1379
|
+
/** @description Subscription filters for the `position_volume_milestone` event. */
|
|
1380
|
+
PositionVolumeMilestoneFilters: {
|
|
1381
|
+
/** @description **Required.** Aggregation windows to monitor. */
|
|
1382
|
+
timeframes: components["schemas"]["MetricFilterTimeframe"][];
|
|
1383
|
+
/** @description Restrict to these outcome token IDs. */
|
|
1384
|
+
position_ids?: string[] | null;
|
|
1385
|
+
/** @description Restrict to positions within these markets. */
|
|
1386
|
+
condition_ids?: string[] | null;
|
|
1387
|
+
/** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
|
|
1388
|
+
outcomes?: string[] | null;
|
|
1389
|
+
/** @description Specific USD milestones to trigger on. */
|
|
1390
|
+
milestone_amounts?: number[] | null;
|
|
1391
|
+
};
|
|
1083
1392
|
/** @description Position volume milestone webhook payload */
|
|
1084
1393
|
PositionVolumeMilestonePayload: {
|
|
1085
1394
|
condition_id?: string | null;
|
|
@@ -1129,6 +1438,27 @@ export interface components {
|
|
|
1129
1438
|
*/
|
|
1130
1439
|
sells: number;
|
|
1131
1440
|
};
|
|
1441
|
+
/** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
|
|
1442
|
+
PositionVolumeSpikeFilters: {
|
|
1443
|
+
/**
|
|
1444
|
+
* Format: double
|
|
1445
|
+
* @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
|
|
1446
|
+
*/
|
|
1447
|
+
spike_ratio: number;
|
|
1448
|
+
/**
|
|
1449
|
+
* Format: int64
|
|
1450
|
+
* @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
|
|
1451
|
+
*/
|
|
1452
|
+
window_secs?: number | null;
|
|
1453
|
+
/** @description Restrict to these outcome token IDs. */
|
|
1454
|
+
position_ids?: string[] | null;
|
|
1455
|
+
/** @description Restrict to positions within these markets. */
|
|
1456
|
+
condition_ids?: string[] | null;
|
|
1457
|
+
/** @description Restrict to these outcome names. */
|
|
1458
|
+
outcomes?: string[] | null;
|
|
1459
|
+
/** @description Restrict to these aggregation windows. */
|
|
1460
|
+
timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
|
|
1461
|
+
};
|
|
1132
1462
|
/** @description Position volume spike webhook payload */
|
|
1133
1463
|
PositionVolumeSpikePayload: {
|
|
1134
1464
|
position_id: string;
|
|
@@ -1172,6 +1502,50 @@ export interface components {
|
|
|
1172
1502
|
*/
|
|
1173
1503
|
fees: number;
|
|
1174
1504
|
};
|
|
1505
|
+
/** @description Subscription filters for the `price_spike` event. */
|
|
1506
|
+
PriceSpikeFilters: {
|
|
1507
|
+
/** @description Restrict to specific outcome token IDs. Empty = all positions. */
|
|
1508
|
+
position_ids?: string[] | null;
|
|
1509
|
+
/** @description Restrict to specific market condition IDs. Empty = all markets. */
|
|
1510
|
+
condition_ids?: string[] | null;
|
|
1511
|
+
/** @description Restrict to specific events. Empty = all events. */
|
|
1512
|
+
event_slugs?: string[] | null;
|
|
1513
|
+
/** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
|
|
1514
|
+
outcomes?: string[] | null;
|
|
1515
|
+
/**
|
|
1516
|
+
* Format: double
|
|
1517
|
+
* @description Minimum price percentage move to trigger (e.g. `10` for a 10% move).
|
|
1518
|
+
*/
|
|
1519
|
+
min_price_change_pct?: number | null;
|
|
1520
|
+
/**
|
|
1521
|
+
* Format: double
|
|
1522
|
+
* @description Minimum YES probability (0-1).
|
|
1523
|
+
*/
|
|
1524
|
+
min_probability?: number | null;
|
|
1525
|
+
/**
|
|
1526
|
+
* Format: double
|
|
1527
|
+
* @description Maximum YES probability (0-1).
|
|
1528
|
+
*/
|
|
1529
|
+
max_probability?: number | null;
|
|
1530
|
+
/**
|
|
1531
|
+
* Format: int64
|
|
1532
|
+
* @description Minimum trades accumulated in the observation window before firing.
|
|
1533
|
+
*/
|
|
1534
|
+
min_txns?: number | null;
|
|
1535
|
+
/**
|
|
1536
|
+
* Format: double
|
|
1537
|
+
* @description Minimum USD volume accumulated in the observation window before firing.
|
|
1538
|
+
*/
|
|
1539
|
+
min_volume_usd?: number | null;
|
|
1540
|
+
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
1541
|
+
/**
|
|
1542
|
+
* Format: int64
|
|
1543
|
+
* @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.
|
|
1544
|
+
*/
|
|
1545
|
+
window_secs?: number | null;
|
|
1546
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
1547
|
+
exclude_shortterm_markets?: boolean | null;
|
|
1548
|
+
};
|
|
1175
1549
|
/** @description Position price spike webhook payload */
|
|
1176
1550
|
PriceSpikePayload: {
|
|
1177
1551
|
position_id: string;
|
|
@@ -1201,6 +1575,50 @@ export interface components {
|
|
|
1201
1575
|
*/
|
|
1202
1576
|
spike_pct: number;
|
|
1203
1577
|
};
|
|
1578
|
+
/** @description Subscription filters for the `probability_spike` event. */
|
|
1579
|
+
ProbabilitySpikeFilters: {
|
|
1580
|
+
/** @description Restrict to specific outcome token IDs. Empty = all positions. */
|
|
1581
|
+
position_ids?: string[] | null;
|
|
1582
|
+
/** @description Restrict to specific market condition IDs. Empty = all markets. */
|
|
1583
|
+
condition_ids?: string[] | null;
|
|
1584
|
+
/** @description Restrict to specific events. Empty = all events. */
|
|
1585
|
+
event_slugs?: string[] | null;
|
|
1586
|
+
/** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
|
|
1587
|
+
outcomes?: string[] | null;
|
|
1588
|
+
/**
|
|
1589
|
+
* Format: double
|
|
1590
|
+
* @description Minimum YES probability (0-1). At least one of `min_probability`/`max_probability` is enforced at runtime if you want a probability gate.
|
|
1591
|
+
*/
|
|
1592
|
+
min_probability?: number | null;
|
|
1593
|
+
/**
|
|
1594
|
+
* Format: double
|
|
1595
|
+
* @description Maximum YES probability (0-1).
|
|
1596
|
+
*/
|
|
1597
|
+
max_probability?: number | null;
|
|
1598
|
+
/**
|
|
1599
|
+
* Format: double
|
|
1600
|
+
* @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move).
|
|
1601
|
+
*/
|
|
1602
|
+
min_probability_change_pct?: number | null;
|
|
1603
|
+
/**
|
|
1604
|
+
* Format: int64
|
|
1605
|
+
* @description Minimum trades accumulated in the observation window before firing.
|
|
1606
|
+
*/
|
|
1607
|
+
min_txns?: number | null;
|
|
1608
|
+
/**
|
|
1609
|
+
* Format: double
|
|
1610
|
+
* @description Minimum USD volume accumulated in the observation window before firing.
|
|
1611
|
+
*/
|
|
1612
|
+
min_volume_usd?: number | null;
|
|
1613
|
+
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
1614
|
+
/**
|
|
1615
|
+
* Format: int64
|
|
1616
|
+
* @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.
|
|
1617
|
+
*/
|
|
1618
|
+
window_secs?: number | null;
|
|
1619
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
1620
|
+
exclude_shortterm_markets?: boolean | null;
|
|
1621
|
+
};
|
|
1204
1622
|
/** @description Position probability spike webhook payload */
|
|
1205
1623
|
ProbabilitySpikePayload: {
|
|
1206
1624
|
position_id: string;
|
|
@@ -1519,6 +1937,287 @@ export interface components {
|
|
|
1519
1937
|
* @enum {string}
|
|
1520
1938
|
*/
|
|
1521
1939
|
SpikeDirection: "up" | "down" | "both";
|
|
1940
|
+
/**
|
|
1941
|
+
* @description Trade-event types accepted by `trader_trade_event.trade_types`. Covers the
|
|
1942
|
+
* full set of typed prediction-trade variants.
|
|
1943
|
+
* @enum {string}
|
|
1944
|
+
*/
|
|
1945
|
+
TradeEventFilterType: "OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval";
|
|
1946
|
+
/** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
|
|
1947
|
+
TraderEventPnlFilters: {
|
|
1948
|
+
/** @description Track only these trader wallet addresses. */
|
|
1949
|
+
traders?: string[] | null;
|
|
1950
|
+
/** @description Restrict to these events. */
|
|
1951
|
+
event_slugs?: string[] | null;
|
|
1952
|
+
/**
|
|
1953
|
+
* Format: double
|
|
1954
|
+
* @description Only fire when per-event realized PnL ≥ this value (USD).
|
|
1955
|
+
*/
|
|
1956
|
+
min_realized_pnl_usd?: number | null;
|
|
1957
|
+
/**
|
|
1958
|
+
* Format: double
|
|
1959
|
+
* @description Only fire when per-event realized PnL ≤ this value (USD).
|
|
1960
|
+
*/
|
|
1961
|
+
max_realized_pnl_usd?: number | null;
|
|
1962
|
+
/**
|
|
1963
|
+
* Format: double
|
|
1964
|
+
* @description Only fire when total event volume ≥ this value (USD).
|
|
1965
|
+
*/
|
|
1966
|
+
min_volume_usd?: number | null;
|
|
1967
|
+
/**
|
|
1968
|
+
* Format: double
|
|
1969
|
+
* @description Only fire when total event volume ≤ this value (USD).
|
|
1970
|
+
*/
|
|
1971
|
+
max_volume_usd?: number | null;
|
|
1972
|
+
/**
|
|
1973
|
+
* Format: double
|
|
1974
|
+
* @description Only fire when buy volume within the event ≥ this value (USD).
|
|
1975
|
+
*/
|
|
1976
|
+
min_buy_usd?: number | null;
|
|
1977
|
+
/**
|
|
1978
|
+
* Format: double
|
|
1979
|
+
* @description Only fire when sell volume within the event ≥ this value (USD).
|
|
1980
|
+
*/
|
|
1981
|
+
min_sell_volume_usd?: number | null;
|
|
1982
|
+
/**
|
|
1983
|
+
* Format: int64
|
|
1984
|
+
* @description Only fire when the trader has traded in ≥ this many markets within the event.
|
|
1985
|
+
*/
|
|
1986
|
+
min_markets_traded?: number | null;
|
|
1987
|
+
/** @description Restrict to these PnL windows. */
|
|
1988
|
+
timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
|
|
1989
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
1990
|
+
exclude_shortterm_markets?: boolean | null;
|
|
1991
|
+
};
|
|
1992
|
+
/** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
|
|
1993
|
+
TraderFirstTradeFilters: {
|
|
1994
|
+
/** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
|
|
1995
|
+
wallet_addresses?: string[] | null;
|
|
1996
|
+
/** @description Restrict to trades in these markets. Empty = all markets. */
|
|
1997
|
+
condition_ids?: string[] | null;
|
|
1998
|
+
/** @description Restrict to trades in markets belonging to these events. */
|
|
1999
|
+
event_slugs?: string[] | null;
|
|
2000
|
+
/**
|
|
2001
|
+
* Format: double
|
|
2002
|
+
* @description Minimum trade size in USD. Omit to match all sizes.
|
|
2003
|
+
*/
|
|
2004
|
+
min_usd_value?: number | null;
|
|
2005
|
+
/**
|
|
2006
|
+
* Format: double
|
|
2007
|
+
* @description Only fire when the outcome probability is ≥ this value.
|
|
2008
|
+
*/
|
|
2009
|
+
min_probability?: number | null;
|
|
2010
|
+
/**
|
|
2011
|
+
* Format: double
|
|
2012
|
+
* @description Only fire when the outcome probability is ≤ this value.
|
|
2013
|
+
*/
|
|
2014
|
+
max_probability?: number | null;
|
|
2015
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
|
|
2016
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2017
|
+
};
|
|
2018
|
+
/** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
|
|
2019
|
+
TraderGlobalPnlFilters: {
|
|
2020
|
+
/** @description Track only these trader wallet addresses. Empty = all traders. */
|
|
2021
|
+
traders?: string[] | null;
|
|
2022
|
+
/**
|
|
2023
|
+
* Format: double
|
|
2024
|
+
* @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds.
|
|
2025
|
+
*/
|
|
2026
|
+
min_realized_pnl_usd?: number | null;
|
|
2027
|
+
/**
|
|
2028
|
+
* Format: double
|
|
2029
|
+
* @description Only fire when realized PnL ≤ this value (USD).
|
|
2030
|
+
*/
|
|
2031
|
+
max_realized_pnl_usd?: number | null;
|
|
2032
|
+
/**
|
|
2033
|
+
* Format: double
|
|
2034
|
+
* @description Only fire when total trading volume ≥ this value (USD).
|
|
2035
|
+
*/
|
|
2036
|
+
min_volume_usd?: number | null;
|
|
2037
|
+
/**
|
|
2038
|
+
* Format: double
|
|
2039
|
+
* @description Only fire when total trading volume ≤ this value (USD).
|
|
2040
|
+
*/
|
|
2041
|
+
max_volume_usd?: number | null;
|
|
2042
|
+
/**
|
|
2043
|
+
* Format: double
|
|
2044
|
+
* @description Only fire when buy volume ≥ this value (USD).
|
|
2045
|
+
*/
|
|
2046
|
+
min_buy_usd?: number | null;
|
|
2047
|
+
/**
|
|
2048
|
+
* Format: double
|
|
2049
|
+
* @description Only fire when sell volume ≥ this value (USD).
|
|
2050
|
+
*/
|
|
2051
|
+
min_sell_volume_usd?: number | null;
|
|
2052
|
+
/**
|
|
2053
|
+
* Format: double
|
|
2054
|
+
* @description Only fire when market win rate ≥ this percentage (0.0–100.0).
|
|
2055
|
+
*/
|
|
2056
|
+
min_win_rate?: number | null;
|
|
2057
|
+
/**
|
|
2058
|
+
* Format: int64
|
|
2059
|
+
* @description Only fire when the trader has traded in ≥ this many markets.
|
|
2060
|
+
*/
|
|
2061
|
+
min_markets_traded?: number | null;
|
|
2062
|
+
/** @description Restrict to these PnL windows. Empty = all windows. */
|
|
2063
|
+
timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
|
|
2064
|
+
};
|
|
2065
|
+
/** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
|
|
2066
|
+
TraderMarketPnlFilters: {
|
|
2067
|
+
/** @description Track only these trader wallet addresses. */
|
|
2068
|
+
traders?: string[] | null;
|
|
2069
|
+
/** @description Restrict to these markets. */
|
|
2070
|
+
condition_ids?: string[] | null;
|
|
2071
|
+
/** @description Restrict to markets in these events. */
|
|
2072
|
+
event_slugs?: string[] | null;
|
|
2073
|
+
/**
|
|
2074
|
+
* Format: double
|
|
2075
|
+
* @description Only fire when per-market realized PnL ≥ this value (USD).
|
|
2076
|
+
*/
|
|
2077
|
+
min_realized_pnl_usd?: number | null;
|
|
2078
|
+
/**
|
|
2079
|
+
* Format: double
|
|
2080
|
+
* @description Only fire when per-market realized PnL ≤ this value (USD).
|
|
2081
|
+
*/
|
|
2082
|
+
max_realized_pnl_usd?: number | null;
|
|
2083
|
+
/**
|
|
2084
|
+
* Format: double
|
|
2085
|
+
* @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD).
|
|
2086
|
+
*/
|
|
2087
|
+
min_volume_usd?: number | null;
|
|
2088
|
+
/**
|
|
2089
|
+
* Format: double
|
|
2090
|
+
* @description Only fire when total volume ≤ this value (USD).
|
|
2091
|
+
*/
|
|
2092
|
+
max_volume_usd?: number | null;
|
|
2093
|
+
/**
|
|
2094
|
+
* Format: double
|
|
2095
|
+
* @description Only fire when buy volume in the market ≥ this value (USD).
|
|
2096
|
+
*/
|
|
2097
|
+
min_buy_usd?: number | null;
|
|
2098
|
+
/**
|
|
2099
|
+
* Format: double
|
|
2100
|
+
* @description Only fire when sell volume in the market ≥ this value (USD).
|
|
2101
|
+
*/
|
|
2102
|
+
min_sell_volume_usd?: number | null;
|
|
2103
|
+
/** @description Restrict to these PnL windows. */
|
|
2104
|
+
timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
|
|
2105
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2106
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2107
|
+
};
|
|
2108
|
+
/** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
|
|
2109
|
+
TraderNewMarketFilters: {
|
|
2110
|
+
/** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
|
|
2111
|
+
wallet_addresses?: string[] | null;
|
|
2112
|
+
/** @description Restrict to these markets. */
|
|
2113
|
+
condition_ids?: string[] | null;
|
|
2114
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2115
|
+
event_slugs?: string[] | null;
|
|
2116
|
+
/**
|
|
2117
|
+
* Format: double
|
|
2118
|
+
* @description Minimum trade size in USD. Omit to match all sizes.
|
|
2119
|
+
*/
|
|
2120
|
+
min_usd_value?: number | null;
|
|
2121
|
+
/**
|
|
2122
|
+
* Format: double
|
|
2123
|
+
* @description Only fire when the outcome probability is ≥ this value.
|
|
2124
|
+
*/
|
|
2125
|
+
min_probability?: number | null;
|
|
2126
|
+
/**
|
|
2127
|
+
* Format: double
|
|
2128
|
+
* @description Only fire when the outcome probability is ≤ this value.
|
|
2129
|
+
*/
|
|
2130
|
+
max_probability?: number | null;
|
|
2131
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2132
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2133
|
+
};
|
|
2134
|
+
/** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
|
|
2135
|
+
TraderNewTradeFilters: {
|
|
2136
|
+
/** @description Only fire for trades by these wallet addresses. Empty = all traders. */
|
|
2137
|
+
wallet_addresses?: string[] | null;
|
|
2138
|
+
/** @description Restrict to these markets. */
|
|
2139
|
+
condition_ids?: string[] | null;
|
|
2140
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2141
|
+
event_slugs?: string[] | null;
|
|
2142
|
+
/**
|
|
2143
|
+
* Format: double
|
|
2144
|
+
* @description Minimum trade size in USD. Defaults to 0 (matches all trades).
|
|
2145
|
+
*/
|
|
2146
|
+
min_usd_value?: number | null;
|
|
2147
|
+
/**
|
|
2148
|
+
* Format: double
|
|
2149
|
+
* @description Only fire when outcome probability is ≥ this value.
|
|
2150
|
+
*/
|
|
2151
|
+
min_probability?: number | null;
|
|
2152
|
+
/**
|
|
2153
|
+
* Format: double
|
|
2154
|
+
* @description Only fire when outcome probability is ≤ this value.
|
|
2155
|
+
*/
|
|
2156
|
+
max_probability?: number | null;
|
|
2157
|
+
/** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
|
|
2158
|
+
trade_types?: ("OrderFilled" | "OrdersMatched")[] | null;
|
|
2159
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2160
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2161
|
+
};
|
|
2162
|
+
/**
|
|
2163
|
+
* @description Subscription filters for the `trader_trade_event` event. All fields are optional.
|
|
2164
|
+
* `event_slugs` and `exclude_shortterm_markets` require explicit `trade_types` that
|
|
2165
|
+
* exclude `PositionsConverted`, because conversion events do not currently carry
|
|
2166
|
+
* `event_slug` in the typed webhook payload.
|
|
2167
|
+
*/
|
|
2168
|
+
TraderTradeEventFilters: {
|
|
2169
|
+
/** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
|
|
2170
|
+
wallet_addresses?: string[] | null;
|
|
2171
|
+
/** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
|
|
2172
|
+
condition_ids?: string[] | null;
|
|
2173
|
+
/** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
|
|
2174
|
+
event_slugs?: string[] | null;
|
|
2175
|
+
/**
|
|
2176
|
+
* Format: double
|
|
2177
|
+
* @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events).
|
|
2178
|
+
*/
|
|
2179
|
+
min_usd_value?: number | null;
|
|
2180
|
+
/**
|
|
2181
|
+
* Format: double
|
|
2182
|
+
* @description Only fire when event probability is ≥ this value. Events without probability data do not match.
|
|
2183
|
+
*/
|
|
2184
|
+
min_probability?: number | null;
|
|
2185
|
+
/**
|
|
2186
|
+
* Format: double
|
|
2187
|
+
* @description Only fire when event probability is ≤ this value. Events without probability data do not match.
|
|
2188
|
+
*/
|
|
2189
|
+
max_probability?: number | null;
|
|
2190
|
+
/** @description Only fire for these trade types. Empty = all supported trade-event variants. */
|
|
2191
|
+
trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[] | null;
|
|
2192
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
|
|
2193
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2194
|
+
};
|
|
2195
|
+
/** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
|
|
2196
|
+
TraderWhaleTradeFilters: {
|
|
2197
|
+
/** @description Only fire for trades by these wallet addresses. Empty = all traders. */
|
|
2198
|
+
wallet_addresses?: string[] | null;
|
|
2199
|
+
/** @description Restrict to these markets. */
|
|
2200
|
+
condition_ids?: string[] | null;
|
|
2201
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2202
|
+
event_slugs?: string[] | null;
|
|
2203
|
+
/**
|
|
2204
|
+
* Format: double
|
|
2205
|
+
* @description Minimum trade size in USD. Defaults to 0 (matches all trades).
|
|
2206
|
+
*/
|
|
2207
|
+
min_usd_value?: number | null;
|
|
2208
|
+
/**
|
|
2209
|
+
* Format: double
|
|
2210
|
+
* @description Only fire when outcome probability is ≥ this value.
|
|
2211
|
+
*/
|
|
2212
|
+
min_probability?: number | null;
|
|
2213
|
+
/**
|
|
2214
|
+
* Format: double
|
|
2215
|
+
* @description Only fire when outcome probability is ≤ this value.
|
|
2216
|
+
*/
|
|
2217
|
+
max_probability?: number | null;
|
|
2218
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2219
|
+
exclude_shortterm_markets?: boolean | null;
|
|
2220
|
+
};
|
|
1522
2221
|
/** @description Request body for updating a webhook */
|
|
1523
2222
|
UpdateWebhookRequestBody: {
|
|
1524
2223
|
/** @description Destination URL for webhook deliveries (must be HTTPS) */
|
|
@@ -1556,6 +2255,12 @@ export interface components {
|
|
|
1556
2255
|
*/
|
|
1557
2256
|
txns: number;
|
|
1558
2257
|
};
|
|
2258
|
+
/**
|
|
2259
|
+
* @description Aggregation windows accepted by `*_volume_spike.timeframes`. Includes `1d`
|
|
2260
|
+
* in addition to the metric set.
|
|
2261
|
+
* @enum {string}
|
|
2262
|
+
*/
|
|
2263
|
+
VolumeSpikeFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
1559
2264
|
/**
|
|
1560
2265
|
* @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
|
|
1561
2266
|
* @enum {string}
|
|
@@ -1780,30 +2485,30 @@ export interface components {
|
|
|
1780
2485
|
* @enum {string}
|
|
1781
2486
|
*/
|
|
1782
2487
|
WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
1783
|
-
/** @description
|
|
2488
|
+
/** @description Payload delivered when a trade exceeds the configured size and probability thresholds */
|
|
1784
2489
|
WhaleTradePayload: {
|
|
1785
|
-
/** @description
|
|
2490
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
1786
2491
|
trader: string;
|
|
1787
|
-
/** @description
|
|
2492
|
+
/** @description Order filler wallet address (lowercase) */
|
|
1788
2493
|
taker: string;
|
|
1789
|
-
/** @description
|
|
2494
|
+
/** @description ERC-1155 outcome token ID */
|
|
1790
2495
|
position_id: string;
|
|
1791
|
-
/** @description
|
|
2496
|
+
/** @description Parent market condition ID */
|
|
1792
2497
|
condition_id?: string | null;
|
|
1793
2498
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1794
2499
|
outcome?: string | null;
|
|
1795
2500
|
/**
|
|
1796
2501
|
* Format: int32
|
|
1797
|
-
* @description Outcome index
|
|
2502
|
+
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
1798
2503
|
*/
|
|
1799
2504
|
outcome_index?: number | null;
|
|
1800
|
-
/** @description Market question */
|
|
2505
|
+
/** @description Market question text */
|
|
1801
2506
|
question?: string | null;
|
|
1802
2507
|
/** @description Market slug */
|
|
1803
2508
|
market_slug?: string | null;
|
|
1804
|
-
/** @description
|
|
2509
|
+
/** @description Parent event slug */
|
|
1805
2510
|
event_slug?: string | null;
|
|
1806
|
-
/** @description
|
|
2511
|
+
/** @description Unique trade identifier */
|
|
1807
2512
|
trade_id: string;
|
|
1808
2513
|
/** @description Transaction hash */
|
|
1809
2514
|
hash: string;
|
|
@@ -1814,38 +2519,40 @@ export interface components {
|
|
|
1814
2519
|
block: number;
|
|
1815
2520
|
/**
|
|
1816
2521
|
* Format: int64
|
|
1817
|
-
* @description
|
|
2522
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
1818
2523
|
*/
|
|
1819
2524
|
confirmed_at: number;
|
|
1820
2525
|
/**
|
|
1821
2526
|
* Format: double
|
|
1822
|
-
* @description USD size of the trade
|
|
2527
|
+
* @description USD size of the trade (6 decimal places)
|
|
1823
2528
|
*/
|
|
1824
2529
|
amount_usd: number;
|
|
1825
2530
|
/**
|
|
1826
2531
|
* Format: double
|
|
1827
|
-
* @description Outcome shares traded
|
|
2532
|
+
* @description Outcome shares traded (6 decimal places)
|
|
1828
2533
|
*/
|
|
1829
2534
|
shares_amount: number;
|
|
1830
2535
|
/**
|
|
1831
2536
|
* Format: double
|
|
1832
|
-
* @description Fee paid (
|
|
2537
|
+
* @description Fee paid in USD (6 decimal places)
|
|
1833
2538
|
*/
|
|
1834
2539
|
fee: number;
|
|
1835
|
-
/** @description Trade
|
|
1836
|
-
side:
|
|
2540
|
+
/** @description Trade direction */
|
|
2541
|
+
side: "Buy" | "Sell";
|
|
1837
2542
|
/**
|
|
1838
2543
|
* Format: double
|
|
1839
|
-
* @description
|
|
2544
|
+
* @description Outcome token price (0.0–1.0)
|
|
1840
2545
|
*/
|
|
1841
2546
|
price: number;
|
|
1842
2547
|
/**
|
|
1843
2548
|
* Format: double
|
|
1844
|
-
* @description Implied probability
|
|
2549
|
+
* @description Implied probability (0.0–1.0); null when outcome is unknown
|
|
1845
2550
|
*/
|
|
1846
2551
|
probability?: number | null;
|
|
1847
|
-
|
|
1848
|
-
|
|
2552
|
+
/** @description Exchange contract that processed the trade */
|
|
2553
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
2554
|
+
/** @description Trade type (webhook events only fire on order fills) */
|
|
2555
|
+
trade_type: "OrderFilled" | "OrdersMatched";
|
|
1849
2556
|
};
|
|
1850
2557
|
/** @description Server acknowledgement for an oracle events stream subscription */
|
|
1851
2558
|
OracleEventsStreamSubscribeResponse: {
|
|
@@ -2245,7 +2952,7 @@ export interface components {
|
|
|
2245
2952
|
AssetPricesSubscribeMessage: {
|
|
2246
2953
|
/** @enum {string} */
|
|
2247
2954
|
action: "subscribe" | "unsubscribe_all";
|
|
2248
|
-
/** @description Uppercase asset symbols (
|
|
2955
|
+
/** @description Uppercase asset symbols (BTC, ETH, SOL, XRP, DOGE, BNB, HYPE). Empty = subscribe to all. */
|
|
2249
2956
|
asset_symbols?: string[];
|
|
2250
2957
|
};
|
|
2251
2958
|
/** @description Server acknowledgement for an asset prices subscription */
|
|
@@ -2257,7 +2964,7 @@ export interface components {
|
|
|
2257
2964
|
AssetPriceTickEvent: {
|
|
2258
2965
|
/** @description Always "asset_price_tick" */
|
|
2259
2966
|
event_type: string;
|
|
2260
|
-
/** @description Uppercase asset symbol (
|
|
2967
|
+
/** @description Uppercase asset symbol (BTC, ETH, SOL, XRP, DOGE, BNB, HYPE) */
|
|
2261
2968
|
symbol: string;
|
|
2262
2969
|
/** @description Current price in USD */
|
|
2263
2970
|
price: number;
|
|
@@ -2276,7 +2983,7 @@ export interface components {
|
|
|
2276
2983
|
AssetPriceWindowUpdateEvent: {
|
|
2277
2984
|
/** @description Always "asset_price_window_update" */
|
|
2278
2985
|
event_type: string;
|
|
2279
|
-
/** @description Uppercase asset symbol (
|
|
2986
|
+
/** @description Uppercase asset symbol (BTC, ETH, SOL, XRP, DOGE, BNB, HYPE) */
|
|
2280
2987
|
symbol: string;
|
|
2281
2988
|
/** @description Candle size / timeframe (e.g. "5m", "1h", "1d") */
|
|
2282
2989
|
variant: string;
|
|
@@ -2306,7 +3013,7 @@ export interface components {
|
|
|
2306
3013
|
AssetWindowUpdatesSubscribeMessage: {
|
|
2307
3014
|
/** @enum {string} */
|
|
2308
3015
|
action: "subscribe" | "unsubscribe_all";
|
|
2309
|
-
/** @description Uppercase asset symbols (
|
|
3016
|
+
/** @description Uppercase asset symbols (BTC, ETH, SOL, XRP, DOGE, BNB, HYPE) */
|
|
2310
3017
|
asset_symbols?: string[];
|
|
2311
3018
|
/** @description Candle sizes to filter by. "1d" and "24h" are treated as equivalent. */
|
|
2312
3019
|
timeframes?: ("5m" | "15m" | "1h" | "4h" | "1d" | "24h")[];
|