@structbuild/sdk 0.5.5 → 0.5.6-staging.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.
- package/dist/client.d.ts +2 -1
- package/dist/generated/polymarket.d.ts +6773 -4439
- package/dist/generated/webhooks.d.ts +743 -1086
- package/dist/generated/ws-alerts.d.ts +741 -1090
- package/dist/generated/ws.d.ts +114 -821
- package/dist/index.cjs +34 -1
- package/dist/index.cjs.map +6 -5
- package/dist/index.js +34 -1
- package/dist/index.js.map +6 -5
- package/dist/namespaces/index.d.ts +1 -0
- package/dist/namespaces/smartMoney.d.ts +13 -0
- package/dist/namespaces/trader.d.ts +2 -1
- package/dist/types/index.d.ts +65 -2
- package/package.json +1 -1
|
@@ -86,192 +86,111 @@ export interface components {
|
|
|
86
86
|
slug?: string | null;
|
|
87
87
|
event_slug?: string | null;
|
|
88
88
|
};
|
|
89
|
-
/** @description
|
|
90
|
-
AssetPriceTickFilters: {
|
|
91
|
-
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
92
|
-
asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
|
|
93
|
-
};
|
|
94
|
-
/** @description Webhook payload for an asset price tick. */
|
|
89
|
+
/** @description Payload delivered on every raw Chainlink price tick for a tracked crypto asset */
|
|
95
90
|
AssetPriceTickPayload: {
|
|
96
|
-
/** @description Asset symbol */
|
|
97
|
-
symbol: components["schemas"]["WebhookAssetSymbol"];
|
|
98
91
|
/**
|
|
99
|
-
*
|
|
100
|
-
* @
|
|
92
|
+
* @description Asset symbol
|
|
93
|
+
* @enum {string}
|
|
101
94
|
*/
|
|
95
|
+
symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
96
|
+
/** @description Current asset price in USD from the Chainlink feed */
|
|
102
97
|
price: number;
|
|
103
98
|
/**
|
|
104
99
|
* Format: int64
|
|
105
|
-
* @description Tick timestamp
|
|
100
|
+
* @description Tick timestamp (milliseconds since Unix epoch)
|
|
106
101
|
*/
|
|
107
102
|
timestamp_ms: number;
|
|
108
103
|
};
|
|
109
|
-
/** @description
|
|
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
|
-
};
|
|
116
|
-
/** @description Webhook payload for an asset price window open or close. */
|
|
104
|
+
/** @description Payload delivered twice per candle — once on open and once on close. `close_price` is 0.0 on the "open" update. */
|
|
117
105
|
AssetPriceWindowUpdatePayload: {
|
|
118
|
-
/**
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
106
|
+
/**
|
|
107
|
+
* @description Asset symbol
|
|
108
|
+
* @enum {string}
|
|
109
|
+
*/
|
|
110
|
+
symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
111
|
+
/**
|
|
112
|
+
* @description Candle / window size
|
|
113
|
+
* @enum {string}
|
|
114
|
+
*/
|
|
115
|
+
variant: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
|
|
122
116
|
/**
|
|
123
117
|
* Format: int64
|
|
124
|
-
* @description Window start timestamp (milliseconds since epoch)
|
|
118
|
+
* @description Window start timestamp (milliseconds since Unix epoch)
|
|
125
119
|
*/
|
|
126
120
|
start_time: number;
|
|
127
121
|
/**
|
|
128
122
|
* Format: int64
|
|
129
|
-
* @description Window end timestamp (milliseconds since epoch)
|
|
123
|
+
* @description Window end timestamp (milliseconds since Unix epoch)
|
|
130
124
|
*/
|
|
131
125
|
end_time: number;
|
|
132
|
-
/**
|
|
133
|
-
* Format: double
|
|
134
|
-
* @description Opening price at start_time
|
|
135
|
-
*/
|
|
126
|
+
/** @description Opening price at start_time (USD) */
|
|
136
127
|
open_price: number;
|
|
137
|
-
/**
|
|
138
|
-
* Format: double
|
|
139
|
-
* @description Closing price at end_time (0.0 on an "open" update — not yet available)
|
|
140
|
-
*/
|
|
128
|
+
/** @description Closing price at end_time (USD). 0.0 when update_type is "open" (not yet available). */
|
|
141
129
|
close_price: number;
|
|
142
|
-
/** @description "open" when the window starts, "close" when the window is complete */
|
|
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
130
|
/**
|
|
166
|
-
*
|
|
167
|
-
* @
|
|
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).
|
|
131
|
+
* @description "open" when the candle opens, "close" when it closes with a confirmed price
|
|
132
|
+
* @enum {string}
|
|
173
133
|
*/
|
|
174
|
-
|
|
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;
|
|
134
|
+
update_type: "open" | "close";
|
|
187
135
|
};
|
|
188
|
-
/** @description
|
|
136
|
+
/** @description Payload delivered when a trade occurs at a near-certain-outcome price */
|
|
189
137
|
CloseToBondPayload: {
|
|
190
|
-
/** @description
|
|
138
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
191
139
|
trader: string;
|
|
192
|
-
/** @description
|
|
140
|
+
/** @description Order filler wallet address (lowercase) */
|
|
193
141
|
taker: string;
|
|
194
|
-
/** @description
|
|
142
|
+
/** @description ERC-1155 outcome token ID */
|
|
195
143
|
position_id: string;
|
|
196
|
-
/** @description
|
|
144
|
+
/** @description Parent market condition ID */
|
|
197
145
|
condition_id?: string | null;
|
|
198
146
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
199
147
|
outcome?: string | null;
|
|
200
|
-
/**
|
|
201
|
-
* Format: int32
|
|
202
|
-
* @description Outcome index (0 = Yes/Up, 1 = No). Position 0 usually represents Yes/Up.
|
|
203
|
-
*/
|
|
148
|
+
/** @description 0 = Yes/Up, 1 = No */
|
|
204
149
|
outcome_index?: number | null;
|
|
205
|
-
/** @description Market question */
|
|
206
150
|
question?: string | null;
|
|
207
|
-
/** @description Market slug */
|
|
208
151
|
market_slug?: string | null;
|
|
209
|
-
/** @description Event slug */
|
|
210
152
|
event_slug?: string | null;
|
|
211
|
-
/** @description Trade ID */
|
|
212
153
|
trade_id: string;
|
|
213
154
|
/** @description Transaction hash */
|
|
214
155
|
hash: string;
|
|
215
|
-
/**
|
|
216
|
-
* Format: int64
|
|
217
|
-
* @description Block number
|
|
218
|
-
*/
|
|
156
|
+
/** Format: int64 */
|
|
219
157
|
block: number;
|
|
220
158
|
/**
|
|
221
159
|
* Format: int64
|
|
222
|
-
* @description
|
|
160
|
+
* @description Unix seconds
|
|
223
161
|
*/
|
|
224
162
|
confirmed_at: number;
|
|
225
|
-
/**
|
|
226
|
-
* Format: double
|
|
227
|
-
* @description USD size of the trade
|
|
228
|
-
*/
|
|
163
|
+
/** @description USD size of the trade */
|
|
229
164
|
amount_usd: number;
|
|
230
|
-
/**
|
|
231
|
-
* Format: double
|
|
232
|
-
* @description Outcome shares traded
|
|
233
|
-
*/
|
|
234
165
|
shares_amount: number;
|
|
235
|
-
/**
|
|
236
|
-
* Format: double
|
|
237
|
-
* @description Fee paid (USD)
|
|
238
|
-
*/
|
|
166
|
+
/** @description Fee paid in USD */
|
|
239
167
|
fee: number;
|
|
240
|
-
/** @
|
|
241
|
-
side:
|
|
242
|
-
/**
|
|
243
|
-
* Format: double
|
|
244
|
-
* @description Price per share (0.0–1.0) — the value that triggered the notification
|
|
245
|
-
*/
|
|
168
|
+
/** @enum {string} */
|
|
169
|
+
side: "Buy" | "Sell";
|
|
170
|
+
/** @description Price that triggered the notification (0.0–1.0) */
|
|
246
171
|
price: number;
|
|
247
|
-
/**
|
|
248
|
-
* Format: double
|
|
249
|
-
* @description Implied probability of the outcome (0.0–1.0)
|
|
250
|
-
*/
|
|
172
|
+
/** @description Implied probability (0.0–1.0) */
|
|
251
173
|
probability?: number | null;
|
|
252
|
-
/** @description Which bond zone was entered: `"high"` (YES near-certain) or `"low"` (NO near-certain) */
|
|
253
|
-
bond_side: string;
|
|
254
174
|
/**
|
|
255
|
-
*
|
|
256
|
-
* @
|
|
175
|
+
* @description "high" when near YES (price ≥ threshold), "low" when near NO (price ≤ threshold)
|
|
176
|
+
* @enum {string}
|
|
257
177
|
*/
|
|
178
|
+
bond_side: "high" | "low";
|
|
179
|
+
/** @description The probability threshold from the subscription filter that was breached */
|
|
258
180
|
threshold: number;
|
|
259
181
|
};
|
|
260
182
|
/** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
|
|
261
183
|
ConditionMetricsPayload: {
|
|
262
184
|
/** @description Market condition ID */
|
|
263
185
|
condition_id?: string | null;
|
|
264
|
-
/** @description Aggregation window */
|
|
265
|
-
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
266
186
|
/**
|
|
267
|
-
*
|
|
268
|
-
* @
|
|
187
|
+
* @description Aggregation window
|
|
188
|
+
* @enum {string|null}
|
|
269
189
|
*/
|
|
190
|
+
timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
|
|
191
|
+
/** @description Total trading volume in USD for this timeframe */
|
|
270
192
|
volume_usd?: number | null;
|
|
271
|
-
/**
|
|
272
|
-
* Format: double
|
|
273
|
-
* @description Total fees collected in USD
|
|
274
|
-
*/
|
|
193
|
+
/** @description Total fees collected in USD */
|
|
275
194
|
fees?: number | null;
|
|
276
195
|
/**
|
|
277
196
|
* Format: int64
|
|
@@ -353,43 +272,18 @@ export interface components {
|
|
|
353
272
|
slug?: string | null;
|
|
354
273
|
event_slug?: string | null;
|
|
355
274
|
};
|
|
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
275
|
/** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
|
|
379
276
|
EventMetricsPayload: {
|
|
380
277
|
/** @description Event slug */
|
|
381
278
|
event_slug?: string | null;
|
|
382
|
-
/** @description Aggregation window */
|
|
383
|
-
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
384
279
|
/**
|
|
385
|
-
*
|
|
386
|
-
* @
|
|
280
|
+
* @description Aggregation window
|
|
281
|
+
* @enum {string|null}
|
|
387
282
|
*/
|
|
283
|
+
timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
|
|
284
|
+
/** @description Total aggregated volume across all markets in the event (USD) */
|
|
388
285
|
volume_usd?: number | null;
|
|
389
|
-
/**
|
|
390
|
-
* Format: double
|
|
391
|
-
* @description Total fees collected in USD
|
|
392
|
-
*/
|
|
286
|
+
/** @description Total fees collected in USD */
|
|
393
287
|
fees?: number | null;
|
|
394
288
|
/**
|
|
395
289
|
* Format: int64
|
|
@@ -402,13 +296,21 @@ export interface components {
|
|
|
402
296
|
*/
|
|
403
297
|
unique_traders?: number | null;
|
|
404
298
|
};
|
|
405
|
-
/** @description
|
|
299
|
+
/** @description Payload delivered when a trader's per-event PnL crosses a configured threshold */
|
|
406
300
|
EventPnlPayload: {
|
|
301
|
+
/** @description Trader wallet address (lowercase) */
|
|
407
302
|
trader?: string | null;
|
|
303
|
+
/** @description Event slug */
|
|
408
304
|
event_slug?: string | null;
|
|
409
|
-
/**
|
|
410
|
-
|
|
411
|
-
|
|
305
|
+
/**
|
|
306
|
+
* @description PnL aggregation window
|
|
307
|
+
* @enum {string}
|
|
308
|
+
*/
|
|
309
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
310
|
+
/**
|
|
311
|
+
* Format: int64
|
|
312
|
+
* @description Number of distinct markets traded in this event
|
|
313
|
+
*/
|
|
412
314
|
markets_traded?: number | null;
|
|
413
315
|
/** Format: int64 */
|
|
414
316
|
outcomes_traded?: number | null;
|
|
@@ -420,58 +322,44 @@ export interface components {
|
|
|
420
322
|
total_redemptions?: number | null;
|
|
421
323
|
/** Format: int64 */
|
|
422
324
|
total_merges?: number | null;
|
|
423
|
-
/**
|
|
325
|
+
/** @description Total volume in USD */
|
|
424
326
|
total_volume_usd?: number | null;
|
|
425
|
-
/** Format: double */
|
|
426
327
|
buy_usd?: number | null;
|
|
427
|
-
/** Format: double */
|
|
428
328
|
sell_usd?: number | null;
|
|
429
|
-
/** Format: double */
|
|
430
329
|
redemption_usd?: number | null;
|
|
431
|
-
/** Format: double */
|
|
432
330
|
merge_usd?: number | null;
|
|
433
|
-
/**
|
|
331
|
+
/** @description Realized PnL in USD for this event */
|
|
434
332
|
realized_pnl_usd?: number | null;
|
|
435
333
|
/** Format: int64 */
|
|
436
334
|
winning_markets?: number | null;
|
|
437
335
|
/** Format: int64 */
|
|
438
336
|
losing_markets?: number | null;
|
|
439
|
-
/** Format: double */
|
|
440
337
|
total_fees?: number | null;
|
|
441
|
-
/**
|
|
338
|
+
/**
|
|
339
|
+
* Format: int64
|
|
340
|
+
* @description Unix seconds
|
|
341
|
+
*/
|
|
442
342
|
first_trade_at?: number | null;
|
|
443
|
-
/**
|
|
343
|
+
/**
|
|
344
|
+
* Format: int64
|
|
345
|
+
* @description Unix seconds
|
|
346
|
+
*/
|
|
444
347
|
last_trade_at?: number | null;
|
|
445
348
|
};
|
|
446
|
-
/** @description
|
|
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
|
-
};
|
|
457
|
-
/** @description Event volume milestone webhook payload */
|
|
349
|
+
/** @description Payload delivered when an event's aggregated trading volume crosses a USD milestone */
|
|
458
350
|
EventVolumeMilestonePayload: {
|
|
351
|
+
/** @description Event slug */
|
|
459
352
|
event_slug: string;
|
|
460
|
-
timeframe: string;
|
|
461
353
|
/**
|
|
462
|
-
*
|
|
463
|
-
* @
|
|
354
|
+
* @description Aggregation window
|
|
355
|
+
* @enum {string}
|
|
464
356
|
*/
|
|
357
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
358
|
+
/** @description The USD milestone amount that was crossed */
|
|
465
359
|
milestone_usd: number;
|
|
466
|
-
/**
|
|
467
|
-
* Format: double
|
|
468
|
-
* @description Current volume (USD) that triggered the milestone
|
|
469
|
-
*/
|
|
360
|
+
/** @description Current aggregated event volume at time of trigger (USD) */
|
|
470
361
|
current_volume_usd: number;
|
|
471
|
-
/**
|
|
472
|
-
* Format: double
|
|
473
|
-
* @description Total fees collected in this timeframe
|
|
474
|
-
*/
|
|
362
|
+
/** @description Total fees in USD for this timeframe */
|
|
475
363
|
fees: number;
|
|
476
364
|
/**
|
|
477
365
|
* Format: int64
|
|
@@ -479,60 +367,25 @@ export interface components {
|
|
|
479
367
|
*/
|
|
480
368
|
txns: number;
|
|
481
369
|
};
|
|
482
|
-
/** @description
|
|
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
|
-
};
|
|
501
|
-
/** @description Event volume spike webhook payload */
|
|
370
|
+
/** @description Payload delivered when an event's aggregated volume has spiked since the last snapshot */
|
|
502
371
|
EventVolumeSpikePayload: {
|
|
372
|
+
/** @description Event slug */
|
|
503
373
|
event_slug: string;
|
|
504
|
-
event_title?: string | null;
|
|
505
|
-
image_url?: string | null;
|
|
506
|
-
timeframe: string;
|
|
507
374
|
/**
|
|
508
|
-
*
|
|
509
|
-
* @
|
|
375
|
+
* @description Aggregation window
|
|
376
|
+
* @enum {string}
|
|
510
377
|
*/
|
|
378
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
379
|
+
/** @description Current aggregated event volume at time of the spike (USD) */
|
|
511
380
|
current_volume_usd: number;
|
|
512
|
-
/**
|
|
513
|
-
* Format: double
|
|
514
|
-
* @description Volume at the snapshot baseline (USD)
|
|
515
|
-
*/
|
|
381
|
+
/** @description Volume at the snapshot baseline (USD) */
|
|
516
382
|
snapshot_volume_usd: number;
|
|
517
|
-
/**
|
|
518
|
-
* Format: double
|
|
519
|
-
* @description New volume since the snapshot that triggered this notification (USD)
|
|
520
|
-
*/
|
|
383
|
+
/** @description New volume since the snapshot that triggered this notification (USD) */
|
|
521
384
|
delta_volume_usd: number;
|
|
522
|
-
/**
|
|
523
|
-
* Format: double
|
|
524
|
-
* @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
|
|
525
|
-
*/
|
|
385
|
+
/** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
|
|
526
386
|
spike_pct: number;
|
|
527
|
-
/**
|
|
528
|
-
* Format: int64
|
|
529
|
-
* @description Total transactions in this timeframe
|
|
530
|
-
*/
|
|
387
|
+
/** Format: int64 */
|
|
531
388
|
txns: number;
|
|
532
|
-
/**
|
|
533
|
-
* Format: double
|
|
534
|
-
* @description Total fees in this timeframe
|
|
535
|
-
*/
|
|
536
389
|
fees: number;
|
|
537
390
|
};
|
|
538
391
|
/** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
|
|
@@ -547,10 +400,7 @@ export interface components {
|
|
|
547
400
|
condition_id?: string | null;
|
|
548
401
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
549
402
|
outcome?: string | null;
|
|
550
|
-
/**
|
|
551
|
-
* Format: int32
|
|
552
|
-
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
553
|
-
*/
|
|
403
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
554
404
|
outcome_index?: number | null;
|
|
555
405
|
/** @description Market question text */
|
|
556
406
|
question?: string | null;
|
|
@@ -572,128 +422,148 @@ export interface components {
|
|
|
572
422
|
* @description Block confirmation timestamp (Unix seconds)
|
|
573
423
|
*/
|
|
574
424
|
confirmed_at: number;
|
|
575
|
-
/**
|
|
576
|
-
* Format: double
|
|
577
|
-
* @description USD size of the trade (6 decimal places)
|
|
578
|
-
*/
|
|
425
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
579
426
|
amount_usd: number;
|
|
580
|
-
/**
|
|
581
|
-
* Format: double
|
|
582
|
-
* @description Outcome shares traded (6 decimal places)
|
|
583
|
-
*/
|
|
427
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
584
428
|
shares_amount: number;
|
|
429
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
430
|
+
fee: number;
|
|
585
431
|
/**
|
|
586
|
-
*
|
|
587
|
-
* @
|
|
432
|
+
* @description Trade direction
|
|
433
|
+
* @enum {string}
|
|
588
434
|
*/
|
|
589
|
-
fee: number;
|
|
590
|
-
/** @description Trade direction */
|
|
591
435
|
side: "Buy" | "Sell";
|
|
436
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
437
|
+
price: number;
|
|
592
438
|
/**
|
|
593
|
-
*
|
|
594
|
-
* @
|
|
439
|
+
* @description Exchange contract that processed the trade
|
|
440
|
+
* @enum {string}
|
|
441
|
+
*/
|
|
442
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
443
|
+
/**
|
|
444
|
+
* @description Trade type (webhook events only fire on order fills)
|
|
445
|
+
* @enum {string}
|
|
595
446
|
*/
|
|
596
|
-
price: number;
|
|
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
447
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
601
448
|
};
|
|
602
|
-
/** @description
|
|
449
|
+
/** @description Payload delivered when a trader's global PnL (across all markets) crosses a configured threshold */
|
|
603
450
|
GlobalPnlPayload: {
|
|
451
|
+
/** @description Trader wallet address (lowercase) */
|
|
604
452
|
trader?: string | null;
|
|
605
|
-
/**
|
|
606
|
-
|
|
607
|
-
|
|
453
|
+
/**
|
|
454
|
+
* @description PnL aggregation window
|
|
455
|
+
* @enum {string}
|
|
456
|
+
*/
|
|
457
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
458
|
+
/** @description Realized PnL in USD (positive = profit, negative = loss) */
|
|
608
459
|
realized_pnl_usd?: number | null;
|
|
609
|
-
/**
|
|
460
|
+
/**
|
|
461
|
+
* Format: int64
|
|
462
|
+
* @description Number of distinct events traded
|
|
463
|
+
*/
|
|
610
464
|
events_traded?: number | null;
|
|
611
|
-
/**
|
|
465
|
+
/**
|
|
466
|
+
* Format: int64
|
|
467
|
+
* @description Number of distinct markets traded
|
|
468
|
+
*/
|
|
612
469
|
markets_traded?: number | null;
|
|
613
|
-
/**
|
|
470
|
+
/**
|
|
471
|
+
* Format: int64
|
|
472
|
+
* @description Total buy transactions
|
|
473
|
+
*/
|
|
614
474
|
total_buys?: number | null;
|
|
615
|
-
/**
|
|
475
|
+
/**
|
|
476
|
+
* Format: int64
|
|
477
|
+
* @description Total sell transactions
|
|
478
|
+
*/
|
|
616
479
|
total_sells?: number | null;
|
|
617
|
-
/**
|
|
480
|
+
/**
|
|
481
|
+
* Format: int64
|
|
482
|
+
* @description Total redemption transactions
|
|
483
|
+
*/
|
|
618
484
|
total_redemptions?: number | null;
|
|
619
|
-
/**
|
|
485
|
+
/**
|
|
486
|
+
* Format: int64
|
|
487
|
+
* @description Total merge transactions
|
|
488
|
+
*/
|
|
620
489
|
total_merges?: number | null;
|
|
621
|
-
/**
|
|
490
|
+
/** @description Total USD volume (buys + sells + redemptions + merges) */
|
|
622
491
|
total_volume_usd?: number | null;
|
|
623
|
-
/**
|
|
492
|
+
/** @description Total buy volume in USD */
|
|
624
493
|
buy_volume_usd?: number | null;
|
|
625
|
-
/**
|
|
494
|
+
/** @description Total sell volume in USD */
|
|
626
495
|
sell_volume_usd?: number | null;
|
|
627
|
-
/**
|
|
496
|
+
/** @description Total redemption volume in USD */
|
|
628
497
|
redemption_volume_usd?: number | null;
|
|
629
|
-
/**
|
|
498
|
+
/** @description Total merge volume in USD */
|
|
630
499
|
merge_volume_usd?: number | null;
|
|
631
|
-
/**
|
|
500
|
+
/**
|
|
501
|
+
* Format: int64
|
|
502
|
+
* @description Number of markets where trader realised a profit
|
|
503
|
+
*/
|
|
632
504
|
markets_won?: number | null;
|
|
633
|
-
/**
|
|
505
|
+
/**
|
|
506
|
+
* Format: int64
|
|
507
|
+
* @description Number of markets where trader realised a loss
|
|
508
|
+
*/
|
|
634
509
|
markets_lost?: number | null;
|
|
635
|
-
/**
|
|
510
|
+
/** @description Market win rate as a percentage (0.0–100.0) */
|
|
636
511
|
market_win_rate_pct?: number | null;
|
|
637
|
-
/**
|
|
512
|
+
/** @description Average PnL per market in USD */
|
|
638
513
|
avg_pnl_per_market?: number | null;
|
|
639
|
-
/**
|
|
514
|
+
/** @description Average PnL per trade in USD */
|
|
640
515
|
avg_pnl_per_trade?: number | null;
|
|
641
|
-
/**
|
|
516
|
+
/** @description Average hold time across all positions (seconds) */
|
|
642
517
|
avg_hold_time_seconds?: number | null;
|
|
643
|
-
/**
|
|
518
|
+
/** @description Total fees paid in USD */
|
|
644
519
|
total_fees?: number | null;
|
|
645
|
-
/**
|
|
520
|
+
/** @description Best single-trade PnL in USD */
|
|
646
521
|
best_trade_pnl_usd?: number | null;
|
|
522
|
+
/** @description Condition ID of the best trade */
|
|
647
523
|
best_trade_condition_id?: string | null;
|
|
648
|
-
/**
|
|
524
|
+
/**
|
|
525
|
+
* Format: int64
|
|
526
|
+
* @description Timestamp of the first trade (Unix seconds)
|
|
527
|
+
*/
|
|
649
528
|
first_trade_at?: number | null;
|
|
650
|
-
/**
|
|
529
|
+
/**
|
|
530
|
+
* Format: int64
|
|
531
|
+
* @description Timestamp of the most recent trade (Unix seconds)
|
|
532
|
+
*/
|
|
651
533
|
last_trade_at?: number | null;
|
|
652
534
|
};
|
|
653
535
|
/** @description Response for GET /v1/webhook/events */
|
|
654
536
|
ListEventsResponse: {
|
|
655
537
|
events: components["schemas"]["WebhookEventInfo"][];
|
|
656
538
|
};
|
|
657
|
-
/** @description
|
|
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
|
-
};
|
|
666
|
-
/** @description Outcome entry in the market created payload — mirrors `NewMarketOutcome` */
|
|
539
|
+
/** @description An outcome entry within a newly created market */
|
|
667
540
|
MarketCreatedOutcome: {
|
|
668
|
-
/**
|
|
669
|
-
* Format: int32
|
|
670
|
-
* @description Outcome index (0 = Yes, 1 = No)
|
|
671
|
-
*/
|
|
541
|
+
/** @description Outcome index (0 = Yes, 1 = No) */
|
|
672
542
|
index: number;
|
|
673
543
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
674
544
|
name: string;
|
|
675
|
-
/** @description
|
|
545
|
+
/** @description ERC-1155 position token ID for this outcome */
|
|
676
546
|
position_id: string;
|
|
677
547
|
};
|
|
678
|
-
/** @description
|
|
548
|
+
/** @description Payload delivered when a new prediction market is detected on-chain and enriched with Gamma API metadata */
|
|
679
549
|
MarketCreatedPayload: {
|
|
680
550
|
/** @description Condition ID (0x-prefixed hex, lowercase) */
|
|
681
551
|
condition_id: string;
|
|
682
552
|
/** @description Market slug */
|
|
683
553
|
market_slug: string;
|
|
684
|
-
/** @description
|
|
554
|
+
/** @description Parent event slug */
|
|
685
555
|
event_slug?: string | null;
|
|
686
|
-
/** @description
|
|
556
|
+
/** @description Parent event ID */
|
|
687
557
|
event_id?: string | null;
|
|
688
|
-
/** @description
|
|
558
|
+
/** @description Parent event title */
|
|
689
559
|
event_title?: string | null;
|
|
690
|
-
/** @description Series slug */
|
|
560
|
+
/** @description Series slug (for recurring markets) */
|
|
691
561
|
series_slug?: string | null;
|
|
692
|
-
/** @description
|
|
562
|
+
/** @description List of market outcomes with their position IDs */
|
|
693
563
|
outcomes: components["schemas"]["MarketCreatedOutcome"][];
|
|
694
|
-
/** @description
|
|
564
|
+
/** @description Full market question text */
|
|
695
565
|
question: string;
|
|
696
|
-
/** @description
|
|
566
|
+
/** @description Short display title */
|
|
697
567
|
title?: string | null;
|
|
698
568
|
/** @description Market description */
|
|
699
569
|
description: string;
|
|
@@ -706,46 +576,23 @@ export interface components {
|
|
|
706
576
|
/** @description Whether this is a neg-risk market */
|
|
707
577
|
neg_risk: boolean;
|
|
708
578
|
};
|
|
709
|
-
/** @description
|
|
710
|
-
|
|
711
|
-
/** @description
|
|
712
|
-
|
|
713
|
-
/** @description
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
|
|
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;
|
|
579
|
+
/** @description Payload delivered when a trader's per-market PnL crosses a configured threshold */
|
|
580
|
+
MarketPnlPayload: {
|
|
581
|
+
/** @description Trader wallet address (lowercase) */
|
|
582
|
+
trader?: string | null;
|
|
583
|
+
/** @description Market condition ID */
|
|
584
|
+
condition_id?: string | null;
|
|
585
|
+
/** @description Parent event slug */
|
|
586
|
+
event_slug?: string | null;
|
|
725
587
|
/**
|
|
726
|
-
*
|
|
727
|
-
* @
|
|
588
|
+
* @description PnL aggregation window
|
|
589
|
+
* @enum {string}
|
|
728
590
|
*/
|
|
729
|
-
|
|
591
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
730
592
|
/**
|
|
731
593
|
* Format: int64
|
|
732
|
-
* @description
|
|
733
|
-
*/
|
|
734
|
-
min_unique_traders?: number | null;
|
|
735
|
-
/**
|
|
736
|
-
* Format: double
|
|
737
|
-
* @description Only fire when total fees ≥ this value (USD).
|
|
594
|
+
* @description Number of distinct outcomes traded in this market
|
|
738
595
|
*/
|
|
739
|
-
min_fees?: number | null;
|
|
740
|
-
};
|
|
741
|
-
/** @description Market PnL webhook payload (Arc-optimized) */
|
|
742
|
-
MarketPnlPayload: {
|
|
743
|
-
trader?: string | null;
|
|
744
|
-
condition_id?: string | null;
|
|
745
|
-
event_slug?: string | null;
|
|
746
|
-
/** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
|
|
747
|
-
timeframe: string;
|
|
748
|
-
/** Format: int64 */
|
|
749
596
|
outcomes_traded?: number | null;
|
|
750
597
|
/** Format: int64 */
|
|
751
598
|
total_buys?: number | null;
|
|
@@ -755,95 +602,59 @@ export interface components {
|
|
|
755
602
|
total_redemptions?: number | null;
|
|
756
603
|
/** Format: int64 */
|
|
757
604
|
total_merges?: number | null;
|
|
758
|
-
/**
|
|
605
|
+
/** @description Total buy volume in USD */
|
|
759
606
|
buy_usd?: number | null;
|
|
760
|
-
/**
|
|
607
|
+
/** @description Total sell volume in USD */
|
|
761
608
|
sell_usd?: number | null;
|
|
762
|
-
/**
|
|
609
|
+
/** @description Total redemption volume in USD */
|
|
763
610
|
redemption_usd?: number | null;
|
|
764
|
-
/**
|
|
611
|
+
/** @description Total merge volume in USD */
|
|
765
612
|
merge_usd?: number | null;
|
|
766
|
-
/**
|
|
613
|
+
/** @description Realized PnL in USD for this market */
|
|
767
614
|
realized_pnl_usd?: number | null;
|
|
768
|
-
/**
|
|
615
|
+
/**
|
|
616
|
+
* Format: int64
|
|
617
|
+
* @description Number of outcomes with positive PnL
|
|
618
|
+
*/
|
|
769
619
|
winning_outcomes?: number | null;
|
|
770
|
-
/**
|
|
620
|
+
/** @description Total fees paid in USD for this market */
|
|
771
621
|
total_fees?: number | null;
|
|
772
|
-
/** Format: int64 */
|
|
773
|
-
first_trade_at?: number | null;
|
|
774
|
-
/** Format: int64 */
|
|
775
|
-
last_trade_at?: number | null;
|
|
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
622
|
/**
|
|
789
|
-
* Format:
|
|
790
|
-
* @description
|
|
623
|
+
* Format: int64
|
|
624
|
+
* @description Timestamp of first trade in market (Unix seconds)
|
|
791
625
|
*/
|
|
792
|
-
|
|
626
|
+
first_trade_at?: number | null;
|
|
793
627
|
/**
|
|
794
628
|
* Format: int64
|
|
795
|
-
* @description
|
|
629
|
+
* @description Timestamp of most recent trade in market (Unix seconds)
|
|
796
630
|
*/
|
|
797
|
-
|
|
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;
|
|
631
|
+
last_trade_at?: number | null;
|
|
802
632
|
};
|
|
803
|
-
/** @description
|
|
633
|
+
/** @description Payload delivered when a market's volume has spiked since the last snapshot */
|
|
804
634
|
MarketVolumeSpikePayload: {
|
|
635
|
+
/** @description Market condition ID */
|
|
805
636
|
condition_id: string;
|
|
806
|
-
question?: string | null;
|
|
807
|
-
market_slug?: string | null;
|
|
808
|
-
event_slug?: string | null;
|
|
809
|
-
image_url?: string | null;
|
|
810
|
-
timeframe: string;
|
|
811
637
|
/**
|
|
812
|
-
*
|
|
813
|
-
* @
|
|
638
|
+
* @description Aggregation window
|
|
639
|
+
* @enum {string}
|
|
814
640
|
*/
|
|
641
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
642
|
+
/** @description Current volume at the time of the spike (USD) */
|
|
815
643
|
current_volume_usd: number;
|
|
816
|
-
/**
|
|
817
|
-
* Format: double
|
|
818
|
-
* @description Volume at the snapshot baseline (USD)
|
|
819
|
-
*/
|
|
644
|
+
/** @description Volume at the snapshot baseline (USD) */
|
|
820
645
|
snapshot_volume_usd: number;
|
|
821
|
-
/**
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
*/
|
|
825
|
-
delta_volume_usd: number;
|
|
826
|
-
/**
|
|
827
|
-
* Format: double
|
|
828
|
-
* @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
|
|
829
|
-
*/
|
|
646
|
+
/** @description New volume since the snapshot that triggered this notification (USD) */
|
|
647
|
+
delta_volume_usd: number;
|
|
648
|
+
/** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
|
|
830
649
|
spike_pct: number;
|
|
831
650
|
/**
|
|
832
651
|
* Format: int64
|
|
833
652
|
* @description Total transactions in this timeframe
|
|
834
653
|
*/
|
|
835
654
|
txns: number;
|
|
836
|
-
/**
|
|
837
|
-
* Format: double
|
|
838
|
-
* @description Total fees in this timeframe
|
|
839
|
-
*/
|
|
655
|
+
/** @description Total fees in USD for this timeframe */
|
|
840
656
|
fees: number;
|
|
841
657
|
};
|
|
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";
|
|
847
658
|
/** @description NegRisk Adapter: outcome reported for a neg-risk market question. */
|
|
848
659
|
NegRiskOutcomeReportedEvent: {
|
|
849
660
|
id: string;
|
|
@@ -878,10 +689,7 @@ export interface components {
|
|
|
878
689
|
condition_id?: string | null;
|
|
879
690
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
880
691
|
outcome?: string | null;
|
|
881
|
-
/**
|
|
882
|
-
* Format: int32
|
|
883
|
-
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
884
|
-
*/
|
|
692
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
885
693
|
outcome_index?: number | null;
|
|
886
694
|
/** @description Market question text */
|
|
887
695
|
question?: string | null;
|
|
@@ -903,44 +711,32 @@ export interface components {
|
|
|
903
711
|
* @description Block confirmation timestamp (Unix seconds)
|
|
904
712
|
*/
|
|
905
713
|
confirmed_at: number;
|
|
906
|
-
/**
|
|
907
|
-
* Format: double
|
|
908
|
-
* @description USD size of the trade (6 decimal places)
|
|
909
|
-
*/
|
|
714
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
910
715
|
amount_usd: number;
|
|
911
|
-
/**
|
|
912
|
-
* Format: double
|
|
913
|
-
* @description Outcome shares traded (6 decimal places)
|
|
914
|
-
*/
|
|
716
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
915
717
|
shares_amount: number;
|
|
718
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
719
|
+
fee: number;
|
|
916
720
|
/**
|
|
917
|
-
*
|
|
918
|
-
* @
|
|
721
|
+
* @description Trade direction
|
|
722
|
+
* @enum {string}
|
|
919
723
|
*/
|
|
920
|
-
fee: number;
|
|
921
|
-
/** @description Trade direction */
|
|
922
724
|
side: "Buy" | "Sell";
|
|
725
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
726
|
+
price: number;
|
|
727
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
728
|
+
probability?: number | null;
|
|
923
729
|
/**
|
|
924
|
-
*
|
|
925
|
-
* @
|
|
730
|
+
* @description Exchange contract that processed the trade
|
|
731
|
+
* @enum {string}
|
|
926
732
|
*/
|
|
927
|
-
|
|
733
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
928
734
|
/**
|
|
929
|
-
*
|
|
930
|
-
* @
|
|
735
|
+
* @description Trade type (webhook events only fire on order fills)
|
|
736
|
+
* @enum {string}
|
|
931
737
|
*/
|
|
932
|
-
probability?: number | null;
|
|
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
738
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
937
739
|
};
|
|
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
740
|
/** @description Payload delivered on every order-filled trade */
|
|
945
741
|
NewTradePayload: {
|
|
946
742
|
/** @description Limit-order maker wallet address (lowercase) */
|
|
@@ -953,10 +749,7 @@ export interface components {
|
|
|
953
749
|
condition_id?: string | null;
|
|
954
750
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
955
751
|
outcome?: string | null;
|
|
956
|
-
/**
|
|
957
|
-
* Format: int32
|
|
958
|
-
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
959
|
-
*/
|
|
752
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
960
753
|
outcome_index?: number | null;
|
|
961
754
|
/** @description Market question text */
|
|
962
755
|
question?: string | null;
|
|
@@ -978,43 +771,32 @@ export interface components {
|
|
|
978
771
|
* @description Block confirmation timestamp (Unix seconds)
|
|
979
772
|
*/
|
|
980
773
|
confirmed_at: number;
|
|
981
|
-
/**
|
|
982
|
-
* Format: double
|
|
983
|
-
* @description USD size of the trade (6 decimal places)
|
|
984
|
-
*/
|
|
774
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
985
775
|
amount_usd: number;
|
|
986
|
-
/**
|
|
987
|
-
* Format: double
|
|
988
|
-
* @description Outcome shares traded (6 decimal places)
|
|
989
|
-
*/
|
|
776
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
990
777
|
shares_amount: number;
|
|
778
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
779
|
+
fee: number;
|
|
991
780
|
/**
|
|
992
|
-
*
|
|
993
|
-
* @
|
|
781
|
+
* @description Trade direction
|
|
782
|
+
* @enum {string}
|
|
994
783
|
*/
|
|
995
|
-
fee: number;
|
|
996
|
-
/** @description Trade direction */
|
|
997
784
|
side: "Buy" | "Sell";
|
|
785
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
786
|
+
price: number;
|
|
787
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
788
|
+
probability?: number | null;
|
|
998
789
|
/**
|
|
999
|
-
*
|
|
1000
|
-
* @
|
|
790
|
+
* @description Exchange contract that processed the trade
|
|
791
|
+
* @enum {string}
|
|
1001
792
|
*/
|
|
1002
|
-
|
|
793
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
1003
794
|
/**
|
|
1004
|
-
*
|
|
1005
|
-
* @
|
|
795
|
+
* @description Trade type (webhook events only fire on order fills)
|
|
796
|
+
* @enum {string}
|
|
1006
797
|
*/
|
|
1007
|
-
probability?: number | null;
|
|
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
798
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
1012
799
|
};
|
|
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";
|
|
1018
800
|
/**
|
|
1019
801
|
* @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
|
|
1020
802
|
* and only includes fields relevant to each type.
|
|
@@ -1071,18 +853,6 @@ export interface components {
|
|
|
1071
853
|
/** @enum {string} */
|
|
1072
854
|
event_type: "NegRiskOutcomeReported";
|
|
1073
855
|
});
|
|
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";
|
|
1086
856
|
/**
|
|
1087
857
|
* @description PnL timeframe enum for webhook filtering
|
|
1088
858
|
* @enum {string}
|
|
@@ -1109,7 +879,7 @@ export interface components {
|
|
|
1109
879
|
* - volume_milestone: condition_ids, timeframes, milestone_amounts
|
|
1110
880
|
* - 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
|
|
1111
881
|
* - market_created: event_slugs, tags, exclude_shortterm_markets
|
|
1112
|
-
* - probability_spike: condition_ids, event_slugs, outcomes,
|
|
882
|
+
* - probability_spike: condition_ids, event_slugs, outcomes, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
1113
883
|
* - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
1114
884
|
* - trader_new_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
|
|
1115
885
|
* - trader_trade_event: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
|
|
@@ -1280,44 +1050,6 @@ export interface components {
|
|
|
1280
1050
|
*/
|
|
1281
1051
|
oracle_event_types?: string[];
|
|
1282
1052
|
};
|
|
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
1053
|
/** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
|
|
1322
1054
|
PositionMetricsPayload: {
|
|
1323
1055
|
/** @description ERC-1155 outcome token ID */
|
|
@@ -1325,31 +1057,22 @@ export interface components {
|
|
|
1325
1057
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1326
1058
|
outcome?: string | null;
|
|
1327
1059
|
/**
|
|
1328
|
-
* Format:
|
|
1060
|
+
* Format: int16
|
|
1329
1061
|
* @description Outcome index
|
|
1330
1062
|
*/
|
|
1331
1063
|
outcome_index?: number | null;
|
|
1332
|
-
/** @description Aggregation window */
|
|
1333
|
-
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
1334
1064
|
/**
|
|
1335
|
-
*
|
|
1336
|
-
* @
|
|
1065
|
+
* @description Aggregation window
|
|
1066
|
+
* @enum {string|null}
|
|
1337
1067
|
*/
|
|
1068
|
+
timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
|
|
1069
|
+
/** @description Total trading volume in USD */
|
|
1338
1070
|
volume_usd?: number | null;
|
|
1339
|
-
/**
|
|
1340
|
-
* Format: double
|
|
1341
|
-
* @description Buy volume in USD
|
|
1342
|
-
*/
|
|
1071
|
+
/** @description Buy volume in USD */
|
|
1343
1072
|
buy_volume_usd?: number | null;
|
|
1344
|
-
/**
|
|
1345
|
-
* Format: double
|
|
1346
|
-
* @description Sell volume in USD
|
|
1347
|
-
*/
|
|
1073
|
+
/** @description Sell volume in USD */
|
|
1348
1074
|
sell_volume_usd?: number | null;
|
|
1349
|
-
/**
|
|
1350
|
-
* Format: double
|
|
1351
|
-
* @description Total fees in USD
|
|
1352
|
-
*/
|
|
1075
|
+
/** @description Total fees in USD */
|
|
1353
1076
|
fees?: number | null;
|
|
1354
1077
|
/** Format: int64 */
|
|
1355
1078
|
txns?: number | null;
|
|
@@ -1359,293 +1082,127 @@ export interface components {
|
|
|
1359
1082
|
sells?: number | null;
|
|
1360
1083
|
/** Format: int64 */
|
|
1361
1084
|
unique_traders?: number | null;
|
|
1362
|
-
/** Format: double */
|
|
1363
1085
|
price_open?: number | null;
|
|
1364
|
-
/** Format: double */
|
|
1365
1086
|
price_close?: number | null;
|
|
1366
|
-
/** Format: double */
|
|
1367
1087
|
price_high?: number | null;
|
|
1368
|
-
/** Format: double */
|
|
1369
1088
|
price_low?: number | null;
|
|
1370
|
-
/** Format: double */
|
|
1371
1089
|
probability_open?: number | null;
|
|
1372
|
-
/** Format: double */
|
|
1373
1090
|
probability_close?: number | null;
|
|
1374
|
-
/** Format: double */
|
|
1375
1091
|
probability_high?: number | null;
|
|
1376
|
-
/** Format: double */
|
|
1377
1092
|
probability_low?: number | null;
|
|
1378
1093
|
};
|
|
1379
|
-
/** @description
|
|
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
|
-
};
|
|
1392
|
-
/** @description Position volume milestone webhook payload */
|
|
1094
|
+
/** @description Payload delivered when a position's trading volume crosses a USD milestone */
|
|
1393
1095
|
PositionVolumeMilestonePayload: {
|
|
1096
|
+
/** @description Parent market condition ID */
|
|
1394
1097
|
condition_id?: string | null;
|
|
1098
|
+
/** @description ERC-1155 outcome token ID */
|
|
1395
1099
|
position_id: string;
|
|
1100
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1396
1101
|
outcome?: string | null;
|
|
1397
|
-
/** Format: int32 */
|
|
1398
|
-
outcome_index?: number | null;
|
|
1399
|
-
timeframe: string;
|
|
1400
1102
|
/**
|
|
1401
|
-
* Format:
|
|
1402
|
-
* @description
|
|
1103
|
+
* Format: int16
|
|
1104
|
+
* @description Outcome index
|
|
1403
1105
|
*/
|
|
1404
|
-
|
|
1106
|
+
outcome_index?: number | null;
|
|
1405
1107
|
/**
|
|
1406
|
-
*
|
|
1407
|
-
* @
|
|
1108
|
+
* @description Aggregation window
|
|
1109
|
+
* @enum {string}
|
|
1408
1110
|
*/
|
|
1111
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
1112
|
+
/** @description The USD milestone amount that was crossed */
|
|
1113
|
+
milestone_usd: number;
|
|
1114
|
+
/** @description Current position volume at time of trigger (USD) */
|
|
1409
1115
|
current_volume_usd: number;
|
|
1410
|
-
/**
|
|
1411
|
-
* Format: double
|
|
1412
|
-
* @description Buy volume (USD)
|
|
1413
|
-
*/
|
|
1116
|
+
/** @description Buy volume in USD for this timeframe */
|
|
1414
1117
|
buy_volume_usd: number;
|
|
1415
|
-
/**
|
|
1416
|
-
* Format: double
|
|
1417
|
-
* @description Sell volume (USD)
|
|
1418
|
-
*/
|
|
1118
|
+
/** @description Sell volume in USD for this timeframe */
|
|
1419
1119
|
sell_volume_usd: number;
|
|
1420
|
-
/**
|
|
1421
|
-
* Format: double
|
|
1422
|
-
* @description Total fees collected in this timeframe
|
|
1423
|
-
*/
|
|
1120
|
+
/** @description Total fees in USD */
|
|
1424
1121
|
fees: number;
|
|
1425
|
-
/**
|
|
1426
|
-
* Format: int64
|
|
1427
|
-
* @description Total transactions in this timeframe
|
|
1428
|
-
*/
|
|
1122
|
+
/** Format: int64 */
|
|
1429
1123
|
txns: number;
|
|
1430
|
-
/**
|
|
1431
|
-
* Format: int64
|
|
1432
|
-
* @description Buy transactions
|
|
1433
|
-
*/
|
|
1124
|
+
/** Format: int64 */
|
|
1434
1125
|
buys: number;
|
|
1435
|
-
/**
|
|
1436
|
-
* Format: int64
|
|
1437
|
-
* @description Sell transactions
|
|
1438
|
-
*/
|
|
1126
|
+
/** Format: int64 */
|
|
1439
1127
|
sells: number;
|
|
1440
1128
|
};
|
|
1441
|
-
/** @description
|
|
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
|
-
};
|
|
1462
|
-
/** @description Position volume spike webhook payload */
|
|
1129
|
+
/** @description Payload delivered when a position's volume has spiked since the last snapshot */
|
|
1463
1130
|
PositionVolumeSpikePayload: {
|
|
1131
|
+
/** @description ERC-1155 outcome token ID */
|
|
1464
1132
|
position_id: string;
|
|
1133
|
+
/** @description Parent market condition ID */
|
|
1465
1134
|
condition_id: string;
|
|
1466
|
-
|
|
1467
|
-
market_slug?: string | null;
|
|
1468
|
-
event_slug?: string | null;
|
|
1469
|
-
image_url?: string | null;
|
|
1135
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1470
1136
|
outcome?: string | null;
|
|
1471
|
-
/** Format:
|
|
1137
|
+
/** Format: int16 */
|
|
1472
1138
|
outcome_index?: number | null;
|
|
1473
|
-
timeframe: string;
|
|
1474
1139
|
/**
|
|
1475
|
-
*
|
|
1476
|
-
* @
|
|
1140
|
+
* @description Aggregation window
|
|
1141
|
+
* @enum {string}
|
|
1477
1142
|
*/
|
|
1143
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
1144
|
+
/** @description Current position volume at the time of the spike (USD) */
|
|
1478
1145
|
current_volume_usd: number;
|
|
1479
|
-
/**
|
|
1480
|
-
* Format: double
|
|
1481
|
-
* @description Volume at the snapshot baseline (USD)
|
|
1482
|
-
*/
|
|
1146
|
+
/** @description Volume at the snapshot baseline (USD) */
|
|
1483
1147
|
snapshot_volume_usd: number;
|
|
1484
|
-
/**
|
|
1485
|
-
* Format: double
|
|
1486
|
-
* @description New volume since the snapshot that triggered this notification (USD)
|
|
1487
|
-
*/
|
|
1148
|
+
/** @description New volume since the snapshot that triggered this notification (USD) */
|
|
1488
1149
|
delta_volume_usd: number;
|
|
1489
|
-
/**
|
|
1490
|
-
* Format: double
|
|
1491
|
-
* @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
|
|
1492
|
-
*/
|
|
1150
|
+
/** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
|
|
1493
1151
|
spike_pct: number;
|
|
1494
|
-
/**
|
|
1495
|
-
* Format: int64
|
|
1496
|
-
* @description Total transactions in this timeframe
|
|
1497
|
-
*/
|
|
1152
|
+
/** Format: int64 */
|
|
1498
1153
|
txns: number;
|
|
1499
|
-
/**
|
|
1500
|
-
* Format: double
|
|
1501
|
-
* @description Total fees in this timeframe
|
|
1502
|
-
*/
|
|
1503
1154
|
fees: number;
|
|
1504
1155
|
};
|
|
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
|
-
};
|
|
1549
|
-
/** @description Position price spike webhook payload */
|
|
1550
1156
|
PriceSpikePayload: {
|
|
1157
|
+
/** @description Outcome token ID */
|
|
1551
1158
|
position_id: string;
|
|
1159
|
+
/** @description Market condition ID */
|
|
1552
1160
|
condition_id?: string | null;
|
|
1553
|
-
|
|
1554
|
-
market_slug?: string | null;
|
|
1161
|
+
/** @description Event slug */
|
|
1555
1162
|
event_slug?: string | null;
|
|
1556
|
-
|
|
1163
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1557
1164
|
outcome?: string | null;
|
|
1558
|
-
/** Format: int32 */
|
|
1559
|
-
outcome_index?: number | null;
|
|
1560
|
-
/**
|
|
1561
|
-
* Format: double
|
|
1562
|
-
* @description Price at the start of the observation window (the baseline snapshot)
|
|
1563
|
-
*/
|
|
1564
|
-
previous_price: number;
|
|
1565
|
-
/**
|
|
1566
|
-
* Format: double
|
|
1567
|
-
* @description Current price that triggered the spike
|
|
1568
|
-
*/
|
|
1569
|
-
current_price: number;
|
|
1570
|
-
/** @description Direction of the spike: `"up"` (price rising) or `"down"` (price falling) */
|
|
1571
|
-
spike_direction: string;
|
|
1572
|
-
/**
|
|
1573
|
-
* Format: double
|
|
1574
|
-
* @description Detected spike percentage from the snapshot baseline. Positive = rising, negative = falling.
|
|
1575
|
-
*/
|
|
1576
|
-
spike_pct: number;
|
|
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
1165
|
/**
|
|
1609
|
-
* Format:
|
|
1610
|
-
* @description
|
|
1166
|
+
* Format: int16
|
|
1167
|
+
* @description Outcome index
|
|
1611
1168
|
*/
|
|
1612
|
-
|
|
1613
|
-
|
|
1169
|
+
outcome_index?: number | null;
|
|
1170
|
+
/** @description Price at the start of the observation window (baseline snapshot, 0.0–1.0) */
|
|
1171
|
+
previous_price: number;
|
|
1172
|
+
/** @description Current price that triggered the spike (0.0–1.0) */
|
|
1173
|
+
current_price: number;
|
|
1614
1174
|
/**
|
|
1615
|
-
*
|
|
1616
|
-
* @
|
|
1175
|
+
* @description `"up"` = price rising, `"down"` = price falling
|
|
1176
|
+
* @enum {string}
|
|
1617
1177
|
*/
|
|
1618
|
-
|
|
1619
|
-
/** @description
|
|
1620
|
-
|
|
1178
|
+
spike_direction: "up" | "down";
|
|
1179
|
+
/** @description Percentage move that triggered this notification. Positive = up, negative = down. */
|
|
1180
|
+
spike_pct: number;
|
|
1621
1181
|
};
|
|
1622
|
-
/** @description Position probability spike webhook payload */
|
|
1623
1182
|
ProbabilitySpikePayload: {
|
|
1183
|
+
/** @description Outcome token ID */
|
|
1624
1184
|
position_id: string;
|
|
1185
|
+
/** @description Market condition ID */
|
|
1625
1186
|
condition_id?: string | null;
|
|
1626
|
-
|
|
1627
|
-
market_slug?: string | null;
|
|
1187
|
+
/** @description Event slug */
|
|
1628
1188
|
event_slug?: string | null;
|
|
1629
|
-
|
|
1189
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1630
1190
|
outcome?: string | null;
|
|
1631
|
-
/** Format: int32 */
|
|
1632
|
-
outcome_index?: number | null;
|
|
1633
1191
|
/**
|
|
1634
|
-
* Format:
|
|
1635
|
-
* @description
|
|
1192
|
+
* Format: int16
|
|
1193
|
+
* @description Outcome index
|
|
1636
1194
|
*/
|
|
1195
|
+
outcome_index?: number | null;
|
|
1196
|
+
/** @description Probability at the start of the observation window (baseline snapshot, 0.0–1.0) */
|
|
1637
1197
|
previous_probability: number;
|
|
1638
|
-
/**
|
|
1639
|
-
* Format: double
|
|
1640
|
-
* @description Current probability that triggered the spike
|
|
1641
|
-
*/
|
|
1198
|
+
/** @description Current probability that triggered the spike (0.0–1.0) */
|
|
1642
1199
|
current_probability: number;
|
|
1643
|
-
/** @description Direction of the spike: `"up"` (probability rising) or `"down"` (probability falling) */
|
|
1644
|
-
spike_direction: string;
|
|
1645
1200
|
/**
|
|
1646
|
-
*
|
|
1647
|
-
* @
|
|
1201
|
+
* @description `"up"` = probability rising, `"down"` = probability falling
|
|
1202
|
+
* @enum {string}
|
|
1648
1203
|
*/
|
|
1204
|
+
spike_direction: "up" | "down";
|
|
1205
|
+
/** @description Percentage move that triggered this notification. Positive = up, negative = down. */
|
|
1649
1206
|
spike_pct: number;
|
|
1650
1207
|
};
|
|
1651
1208
|
/** @description V2 UMA OOv2: a price was proposed (resolution proposal). */
|
|
@@ -1937,287 +1494,6 @@ export interface components {
|
|
|
1937
1494
|
* @enum {string}
|
|
1938
1495
|
*/
|
|
1939
1496
|
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
|
-
};
|
|
2221
1497
|
/** @description Request body for updating a webhook */
|
|
2222
1498
|
UpdateWebhookRequestBody: {
|
|
2223
1499
|
/** @description Destination URL for webhook deliveries (must be HTTPS) */
|
|
@@ -2230,24 +1506,20 @@ export interface components {
|
|
|
2230
1506
|
/** @description Description/name */
|
|
2231
1507
|
description?: string | null;
|
|
2232
1508
|
};
|
|
2233
|
-
/** @description
|
|
1509
|
+
/** @description Payload delivered when a market's trading volume crosses a USD milestone in the specified timeframe */
|
|
2234
1510
|
VolumeMilestonePayload: {
|
|
1511
|
+
/** @description Market condition ID */
|
|
2235
1512
|
condition_id: string;
|
|
2236
|
-
timeframe: string;
|
|
2237
1513
|
/**
|
|
2238
|
-
*
|
|
2239
|
-
* @
|
|
1514
|
+
* @description Aggregation window that crossed the milestone
|
|
1515
|
+
* @enum {string}
|
|
2240
1516
|
*/
|
|
1517
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
1518
|
+
/** @description The USD milestone amount that was crossed */
|
|
2241
1519
|
milestone_usd: number;
|
|
2242
|
-
/**
|
|
2243
|
-
* Format: double
|
|
2244
|
-
* @description Current volume (USD) that triggered the milestone
|
|
2245
|
-
*/
|
|
1520
|
+
/** @description Current volume at time of trigger (USD) */
|
|
2246
1521
|
current_volume_usd: number;
|
|
2247
|
-
/**
|
|
2248
|
-
* Format: double
|
|
2249
|
-
* @description Total fees collected in this timeframe
|
|
2250
|
-
*/
|
|
1522
|
+
/** @description Total fees in USD for this timeframe */
|
|
2251
1523
|
fees: number;
|
|
2252
1524
|
/**
|
|
2253
1525
|
* Format: int64
|
|
@@ -2255,12 +1527,6 @@ export interface components {
|
|
|
2255
1527
|
*/
|
|
2256
1528
|
txns: number;
|
|
2257
1529
|
};
|
|
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";
|
|
2264
1530
|
/**
|
|
2265
1531
|
* @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
|
|
2266
1532
|
* @enum {string}
|
|
@@ -2503,10 +1769,7 @@ export interface components {
|
|
|
2503
1769
|
condition_id?: string | null;
|
|
2504
1770
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
2505
1771
|
outcome?: string | null;
|
|
2506
|
-
/**
|
|
2507
|
-
* Format: int32
|
|
2508
|
-
* @description Outcome index: 0 = Yes/Up, 1 = No
|
|
2509
|
-
*/
|
|
1772
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
2510
1773
|
outcome_index?: number | null;
|
|
2511
1774
|
/** @description Market question text */
|
|
2512
1775
|
question?: string | null;
|
|
@@ -2528,36 +1791,30 @@ export interface components {
|
|
|
2528
1791
|
* @description Block confirmation timestamp (Unix seconds)
|
|
2529
1792
|
*/
|
|
2530
1793
|
confirmed_at: number;
|
|
2531
|
-
/**
|
|
2532
|
-
* Format: double
|
|
2533
|
-
* @description USD size of the trade (6 decimal places)
|
|
2534
|
-
*/
|
|
1794
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
2535
1795
|
amount_usd: number;
|
|
2536
|
-
/**
|
|
2537
|
-
* Format: double
|
|
2538
|
-
* @description Outcome shares traded (6 decimal places)
|
|
2539
|
-
*/
|
|
1796
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
2540
1797
|
shares_amount: number;
|
|
1798
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
1799
|
+
fee: number;
|
|
2541
1800
|
/**
|
|
2542
|
-
*
|
|
2543
|
-
* @
|
|
1801
|
+
* @description Trade direction
|
|
1802
|
+
* @enum {string}
|
|
2544
1803
|
*/
|
|
2545
|
-
fee: number;
|
|
2546
|
-
/** @description Trade direction */
|
|
2547
1804
|
side: "Buy" | "Sell";
|
|
1805
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
1806
|
+
price: number;
|
|
1807
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
1808
|
+
probability?: number | null;
|
|
2548
1809
|
/**
|
|
2549
|
-
*
|
|
2550
|
-
* @
|
|
1810
|
+
* @description Exchange contract that processed the trade
|
|
1811
|
+
* @enum {string}
|
|
2551
1812
|
*/
|
|
2552
|
-
|
|
1813
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
2553
1814
|
/**
|
|
2554
|
-
*
|
|
2555
|
-
* @
|
|
1815
|
+
* @description Trade type (webhook events only fire on order fills)
|
|
1816
|
+
* @enum {string}
|
|
2556
1817
|
*/
|
|
2557
|
-
probability?: number | null;
|
|
2558
|
-
/** @description Exchange contract that processed the trade */
|
|
2559
|
-
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
2560
|
-
/** @description Trade type (webhook events only fire on order fills) */
|
|
2561
1818
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
2562
1819
|
};
|
|
2563
1820
|
/** @description Outer envelope for every webhook HTTP POST delivery. The `data` field contains the event-specific payload. Delivery headers sent with every POST: `X-Webhook-ID` (subscription UUID), `X-Delivery-ID` (this attempt's UUID), `X-Event-Type` (event name string, e.g. `trader_first_trade`), `X-Attempt` (attempt number, 1-indexed). When the webhook has a secret configured, `X-Webhook-Signature: sha256=<hmac-hex>` is also included — compute HMAC-SHA256 over the raw request body using your secret to verify. */
|
|
@@ -3060,6 +2317,400 @@ export interface components {
|
|
|
3060
2317
|
/** @enum {string} */
|
|
3061
2318
|
trade_type: "Approval";
|
|
3062
2319
|
};
|
|
2320
|
+
/** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
|
|
2321
|
+
TraderFirstTradeFilters: {
|
|
2322
|
+
/** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
|
|
2323
|
+
wallet_addresses?: string[];
|
|
2324
|
+
/** @description Restrict to trades in these markets. Empty = all markets. */
|
|
2325
|
+
condition_ids?: string[];
|
|
2326
|
+
/** @description Restrict to trades in markets belonging to these events. */
|
|
2327
|
+
event_slugs?: string[];
|
|
2328
|
+
/** @description Minimum trade size in USD. Omit to match all sizes. */
|
|
2329
|
+
min_usd_value?: number;
|
|
2330
|
+
/** @description Only fire when the outcome probability is ≥ this value. */
|
|
2331
|
+
min_probability?: number;
|
|
2332
|
+
/** @description Only fire when the outcome probability is ≤ this value. */
|
|
2333
|
+
max_probability?: number;
|
|
2334
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
|
|
2335
|
+
exclude_shortterm_markets?: boolean;
|
|
2336
|
+
};
|
|
2337
|
+
/** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
|
|
2338
|
+
TraderNewMarketFilters: {
|
|
2339
|
+
/** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
|
|
2340
|
+
wallet_addresses?: string[];
|
|
2341
|
+
/** @description Restrict to these markets. */
|
|
2342
|
+
condition_ids?: string[];
|
|
2343
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2344
|
+
event_slugs?: string[];
|
|
2345
|
+
/** @description Minimum trade size in USD. Omit to match all sizes. */
|
|
2346
|
+
min_usd_value?: number;
|
|
2347
|
+
/** @description Only fire when the outcome probability is ≥ this value. */
|
|
2348
|
+
min_probability?: number;
|
|
2349
|
+
/** @description Only fire when the outcome probability is ≤ this value. */
|
|
2350
|
+
max_probability?: number;
|
|
2351
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2352
|
+
exclude_shortterm_markets?: boolean;
|
|
2353
|
+
};
|
|
2354
|
+
/** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
|
|
2355
|
+
TraderWhaleTradeFilters: {
|
|
2356
|
+
/** @description Only fire for trades by these wallet addresses. Empty = all traders. */
|
|
2357
|
+
wallet_addresses?: string[];
|
|
2358
|
+
/** @description Restrict to these markets. */
|
|
2359
|
+
condition_ids?: string[];
|
|
2360
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2361
|
+
event_slugs?: string[];
|
|
2362
|
+
/** @description Minimum trade size in USD. Defaults to 0 (matches all trades). */
|
|
2363
|
+
min_usd_value?: number;
|
|
2364
|
+
/** @description Only fire when outcome probability is ≥ this value. */
|
|
2365
|
+
min_probability?: number;
|
|
2366
|
+
/** @description Only fire when outcome probability is ≤ this value. */
|
|
2367
|
+
max_probability?: number;
|
|
2368
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2369
|
+
exclude_shortterm_markets?: boolean;
|
|
2370
|
+
};
|
|
2371
|
+
/** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
|
|
2372
|
+
TraderNewTradeFilters: {
|
|
2373
|
+
/** @description Only fire for trades by these wallet addresses. Empty = all traders. */
|
|
2374
|
+
wallet_addresses?: string[];
|
|
2375
|
+
/** @description Restrict to these markets. */
|
|
2376
|
+
condition_ids?: string[];
|
|
2377
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2378
|
+
event_slugs?: string[];
|
|
2379
|
+
/** @description Minimum trade size in USD. Defaults to 0 (matches all trades). */
|
|
2380
|
+
min_usd_value?: number;
|
|
2381
|
+
/** @description Only fire when outcome probability is ≥ this value. */
|
|
2382
|
+
min_probability?: number;
|
|
2383
|
+
/** @description Only fire when outcome probability is ≤ this value. */
|
|
2384
|
+
max_probability?: number;
|
|
2385
|
+
/** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
|
|
2386
|
+
trade_types?: ("OrderFilled" | "OrdersMatched")[];
|
|
2387
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2388
|
+
exclude_shortterm_markets?: boolean;
|
|
2389
|
+
};
|
|
2390
|
+
/** @description Subscription filters for the `trader_trade_event` event. All fields are optional. `event_slugs` and `exclude_shortterm_markets` require explicit `trade_types` that exclude `PositionsConverted`, because conversion events do not currently carry `event_slug` in the typed webhook payload. */
|
|
2391
|
+
TraderTradeEventFilters: {
|
|
2392
|
+
/** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
|
|
2393
|
+
wallet_addresses?: string[];
|
|
2394
|
+
/** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
|
|
2395
|
+
condition_ids?: string[];
|
|
2396
|
+
/** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
|
|
2397
|
+
event_slugs?: string[];
|
|
2398
|
+
/** @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events). */
|
|
2399
|
+
min_usd_value?: number;
|
|
2400
|
+
/** @description Only fire when event probability is ≥ this value. Events without probability data do not match. */
|
|
2401
|
+
min_probability?: number;
|
|
2402
|
+
/** @description Only fire when event probability is ≤ this value. Events without probability data do not match. */
|
|
2403
|
+
max_probability?: number;
|
|
2404
|
+
/** @description Only fire for these trade types. Empty = all supported trade-event variants. */
|
|
2405
|
+
trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[];
|
|
2406
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
|
|
2407
|
+
exclude_shortterm_markets?: boolean;
|
|
2408
|
+
};
|
|
2409
|
+
/** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
|
|
2410
|
+
TraderGlobalPnlFilters: {
|
|
2411
|
+
/** @description Track only these trader wallet addresses. Empty = all traders. */
|
|
2412
|
+
traders?: string[];
|
|
2413
|
+
/** @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds. */
|
|
2414
|
+
min_realized_pnl_usd?: number;
|
|
2415
|
+
/** @description Only fire when realized PnL ≤ this value (USD). */
|
|
2416
|
+
max_realized_pnl_usd?: number;
|
|
2417
|
+
/** @description Only fire when total trading volume ≥ this value (USD). */
|
|
2418
|
+
min_volume_usd?: number;
|
|
2419
|
+
/** @description Only fire when total trading volume ≤ this value (USD). */
|
|
2420
|
+
max_volume_usd?: number;
|
|
2421
|
+
/** @description Only fire when buy volume ≥ this value (USD). */
|
|
2422
|
+
min_buy_usd?: number;
|
|
2423
|
+
/** @description Only fire when sell volume ≥ this value (USD). */
|
|
2424
|
+
min_sell_volume_usd?: number;
|
|
2425
|
+
/** @description Only fire when market win rate ≥ this percentage (0.0–100.0). */
|
|
2426
|
+
min_win_rate?: number;
|
|
2427
|
+
/**
|
|
2428
|
+
* Format: int64
|
|
2429
|
+
* @description Only fire when the trader has traded in ≥ this many markets.
|
|
2430
|
+
*/
|
|
2431
|
+
min_markets_traded?: number;
|
|
2432
|
+
/** @description Restrict to these PnL windows. Empty = all windows. */
|
|
2433
|
+
timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
|
|
2434
|
+
};
|
|
2435
|
+
/** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
|
|
2436
|
+
TraderMarketPnlFilters: {
|
|
2437
|
+
/** @description Track only these trader wallet addresses. */
|
|
2438
|
+
traders?: string[];
|
|
2439
|
+
/** @description Restrict to these markets. */
|
|
2440
|
+
condition_ids?: string[];
|
|
2441
|
+
/** @description Restrict to markets in these events. */
|
|
2442
|
+
event_slugs?: string[];
|
|
2443
|
+
/** @description Only fire when per-market realized PnL ≥ this value (USD). */
|
|
2444
|
+
min_realized_pnl_usd?: number;
|
|
2445
|
+
/** @description Only fire when per-market realized PnL ≤ this value (USD). */
|
|
2446
|
+
max_realized_pnl_usd?: number;
|
|
2447
|
+
/** @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD). */
|
|
2448
|
+
min_volume_usd?: number;
|
|
2449
|
+
/** @description Only fire when total volume ≤ this value (USD). */
|
|
2450
|
+
max_volume_usd?: number;
|
|
2451
|
+
/** @description Only fire when buy volume in the market ≥ this value (USD). */
|
|
2452
|
+
min_buy_usd?: number;
|
|
2453
|
+
/** @description Only fire when sell volume in the market ≥ this value (USD). */
|
|
2454
|
+
min_sell_volume_usd?: number;
|
|
2455
|
+
/** @description Restrict to these PnL windows. */
|
|
2456
|
+
timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
|
|
2457
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2458
|
+
exclude_shortterm_markets?: boolean;
|
|
2459
|
+
};
|
|
2460
|
+
/** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
|
|
2461
|
+
TraderEventPnlFilters: {
|
|
2462
|
+
/** @description Track only these trader wallet addresses. */
|
|
2463
|
+
traders?: string[];
|
|
2464
|
+
/** @description Restrict to these events. */
|
|
2465
|
+
event_slugs?: string[];
|
|
2466
|
+
/** @description Only fire when per-event realized PnL ≥ this value (USD). */
|
|
2467
|
+
min_realized_pnl_usd?: number;
|
|
2468
|
+
/** @description Only fire when per-event realized PnL ≤ this value (USD). */
|
|
2469
|
+
max_realized_pnl_usd?: number;
|
|
2470
|
+
/** @description Only fire when total event volume ≥ this value (USD). */
|
|
2471
|
+
min_volume_usd?: number;
|
|
2472
|
+
/** @description Only fire when total event volume ≤ this value (USD). */
|
|
2473
|
+
max_volume_usd?: number;
|
|
2474
|
+
/** @description Only fire when buy volume within the event ≥ this value (USD). */
|
|
2475
|
+
min_buy_usd?: number;
|
|
2476
|
+
/** @description Only fire when sell volume within the event ≥ this value (USD). */
|
|
2477
|
+
min_sell_volume_usd?: number;
|
|
2478
|
+
/**
|
|
2479
|
+
* Format: int64
|
|
2480
|
+
* @description Only fire when the trader has traded in ≥ this many markets within the event.
|
|
2481
|
+
*/
|
|
2482
|
+
min_markets_traded?: number;
|
|
2483
|
+
/** @description Restrict to these PnL windows. */
|
|
2484
|
+
timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
|
|
2485
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2486
|
+
exclude_shortterm_markets?: boolean;
|
|
2487
|
+
};
|
|
2488
|
+
/** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
|
|
2489
|
+
MarketMetricsFilters: {
|
|
2490
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
2491
|
+
condition_ids?: string[];
|
|
2492
|
+
/** @description Restrict to these aggregation windows. Empty = all windows. */
|
|
2493
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
2494
|
+
/** @description Only fire when volume ≥ this value (USD). */
|
|
2495
|
+
min_volume_usd?: number;
|
|
2496
|
+
/** @description Only fire when volume ≤ this value (USD). */
|
|
2497
|
+
max_volume_usd?: number;
|
|
2498
|
+
/**
|
|
2499
|
+
* Format: int64
|
|
2500
|
+
* @description Only fire when transaction count ≥ this value.
|
|
2501
|
+
*/
|
|
2502
|
+
min_txns?: number;
|
|
2503
|
+
/**
|
|
2504
|
+
* Format: int64
|
|
2505
|
+
* @description Only fire when unique trader count ≥ this value.
|
|
2506
|
+
*/
|
|
2507
|
+
min_unique_traders?: number;
|
|
2508
|
+
/** @description Only fire when total fees ≥ this value (USD). */
|
|
2509
|
+
min_fees?: number;
|
|
2510
|
+
};
|
|
2511
|
+
/** @description Subscription filters for the `event_metrics` event. All fields are optional. */
|
|
2512
|
+
EventMetricsFilters: {
|
|
2513
|
+
/** @description Restrict to these events. Empty = all events. */
|
|
2514
|
+
event_slugs?: string[];
|
|
2515
|
+
/** @description Restrict to these aggregation windows. */
|
|
2516
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
2517
|
+
/** @description Only fire when aggregated event volume ≥ this value (USD). */
|
|
2518
|
+
min_volume_usd?: number;
|
|
2519
|
+
max_volume_usd?: number;
|
|
2520
|
+
/** Format: int64 */
|
|
2521
|
+
min_txns?: number;
|
|
2522
|
+
/** Format: int64 */
|
|
2523
|
+
min_unique_traders?: number;
|
|
2524
|
+
min_fees?: number;
|
|
2525
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2526
|
+
exclude_shortterm_markets?: boolean;
|
|
2527
|
+
};
|
|
2528
|
+
/** @description Subscription filters for the `position_metrics` event. All fields are optional. */
|
|
2529
|
+
PositionMetricsFilters: {
|
|
2530
|
+
/** @description Restrict to these outcome token IDs. */
|
|
2531
|
+
position_ids?: string[];
|
|
2532
|
+
/** @description Restrict to positions within these markets. */
|
|
2533
|
+
condition_ids?: string[];
|
|
2534
|
+
/** @description Restrict to positions with these outcome names (e.g. ["Yes", "No"]). */
|
|
2535
|
+
outcomes?: string[];
|
|
2536
|
+
/** @description Restrict to these aggregation windows. */
|
|
2537
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
2538
|
+
/** @description Only fire when position volume ≥ this value (USD). */
|
|
2539
|
+
min_volume_usd?: number;
|
|
2540
|
+
max_volume_usd?: number;
|
|
2541
|
+
min_buy_usd?: number;
|
|
2542
|
+
min_sell_volume_usd?: number;
|
|
2543
|
+
/** Format: int64 */
|
|
2544
|
+
min_txns?: number;
|
|
2545
|
+
/** Format: int64 */
|
|
2546
|
+
min_unique_traders?: number;
|
|
2547
|
+
/** @description Only fire when price change % ≥ this value. */
|
|
2548
|
+
min_price_change_pct?: number;
|
|
2549
|
+
/** @description Only fire when probability change % ≥ this value. */
|
|
2550
|
+
min_probability_change_pct?: number;
|
|
2551
|
+
min_fees?: number;
|
|
2552
|
+
};
|
|
2553
|
+
/** @description Subscription filters for the `market_volume_milestone` event. */
|
|
2554
|
+
MarketVolumeMilestoneFilters: {
|
|
2555
|
+
/** @description **Required.** Aggregation windows to monitor (e.g. ["1h", "24h"]). */
|
|
2556
|
+
timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
2557
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
2558
|
+
condition_ids?: string[];
|
|
2559
|
+
/** @description Specific USD milestones to trigger on (e.g. [10000, 100000, 1000000]). Empty = all milestones. */
|
|
2560
|
+
milestone_amounts?: number[];
|
|
2561
|
+
};
|
|
2562
|
+
/** @description Subscription filters for the `event_volume_milestone` event. */
|
|
2563
|
+
EventVolumeMilestoneFilters: {
|
|
2564
|
+
/** @description **Required.** Aggregation windows to monitor. */
|
|
2565
|
+
timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
2566
|
+
/** @description Restrict to these events. */
|
|
2567
|
+
event_slugs?: string[];
|
|
2568
|
+
/** @description Specific USD milestones to trigger on. */
|
|
2569
|
+
milestone_amounts?: number[];
|
|
2570
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2571
|
+
exclude_shortterm_markets?: boolean;
|
|
2572
|
+
};
|
|
2573
|
+
/** @description Subscription filters for the `position_volume_milestone` event. */
|
|
2574
|
+
PositionVolumeMilestoneFilters: {
|
|
2575
|
+
/** @description **Required.** Aggregation windows to monitor. */
|
|
2576
|
+
timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
2577
|
+
/** @description Restrict to these outcome token IDs. */
|
|
2578
|
+
position_ids?: string[];
|
|
2579
|
+
/** @description Restrict to positions within these markets. */
|
|
2580
|
+
condition_ids?: string[];
|
|
2581
|
+
/** @description Specific USD milestones to trigger on. */
|
|
2582
|
+
milestone_amounts?: number[];
|
|
2583
|
+
};
|
|
2584
|
+
/** @description Subscription filters for the `probability_spike` event. */
|
|
2585
|
+
ProbabilitySpikeFilters: {
|
|
2586
|
+
/** @description Restrict to specific outcome token IDs. Empty = all positions. */
|
|
2587
|
+
position_ids?: string[];
|
|
2588
|
+
/** @description Restrict to specific market condition IDs. Empty = all markets. */
|
|
2589
|
+
condition_ids?: string[];
|
|
2590
|
+
/** @description Restrict to specific events. Empty = all events. */
|
|
2591
|
+
event_slugs?: string[];
|
|
2592
|
+
/** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
|
|
2593
|
+
outcomes?: string[];
|
|
2594
|
+
/** @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move). */
|
|
2595
|
+
min_probability_change_pct?: number;
|
|
2596
|
+
/**
|
|
2597
|
+
* @description `"up"` = probability rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
|
|
2598
|
+
* @enum {string}
|
|
2599
|
+
*/
|
|
2600
|
+
spike_direction?: "up" | "down" | "both";
|
|
2601
|
+
/** @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. */
|
|
2602
|
+
window_secs?: number;
|
|
2603
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2604
|
+
exclude_shortterm_markets?: boolean;
|
|
2605
|
+
};
|
|
2606
|
+
/** @description Subscription filters for the `price_spike` event. */
|
|
2607
|
+
PriceSpikeFilters: {
|
|
2608
|
+
/** @description Restrict to specific outcome token IDs. Empty = all positions. */
|
|
2609
|
+
position_ids?: string[];
|
|
2610
|
+
/** @description Restrict to specific market condition IDs. Empty = all markets. */
|
|
2611
|
+
condition_ids?: string[];
|
|
2612
|
+
/** @description Restrict to specific events. Empty = all events. */
|
|
2613
|
+
event_slugs?: string[];
|
|
2614
|
+
/** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
|
|
2615
|
+
outcomes?: string[];
|
|
2616
|
+
/** @description Minimum price percentage move to trigger (e.g. `10` for a 10% move). */
|
|
2617
|
+
min_price_change_pct?: number;
|
|
2618
|
+
/**
|
|
2619
|
+
* @description `"up"` = price rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
|
|
2620
|
+
* @enum {string}
|
|
2621
|
+
*/
|
|
2622
|
+
spike_direction?: "up" | "down" | "both";
|
|
2623
|
+
/** @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. */
|
|
2624
|
+
window_secs?: number;
|
|
2625
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2626
|
+
exclude_shortterm_markets?: boolean;
|
|
2627
|
+
};
|
|
2628
|
+
/** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
|
|
2629
|
+
MarketVolumeSpikeFilters: {
|
|
2630
|
+
/** @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. */
|
|
2631
|
+
spike_ratio: number;
|
|
2632
|
+
/** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
|
|
2633
|
+
window_secs?: number;
|
|
2634
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
2635
|
+
condition_ids?: string[];
|
|
2636
|
+
/** @description Restrict to these aggregation windows. Empty = all windows. */
|
|
2637
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
|
|
2638
|
+
};
|
|
2639
|
+
/** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
|
|
2640
|
+
EventVolumeSpikeFilters: {
|
|
2641
|
+
/** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
|
|
2642
|
+
spike_ratio: number;
|
|
2643
|
+
/** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
|
|
2644
|
+
window_secs?: number;
|
|
2645
|
+
/** @description Restrict to these events. */
|
|
2646
|
+
event_slugs?: string[];
|
|
2647
|
+
/** @description Restrict to these aggregation windows. */
|
|
2648
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
|
|
2649
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2650
|
+
exclude_shortterm_markets?: boolean;
|
|
2651
|
+
};
|
|
2652
|
+
/** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
|
|
2653
|
+
PositionVolumeSpikeFilters: {
|
|
2654
|
+
/** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
|
|
2655
|
+
spike_ratio: number;
|
|
2656
|
+
/** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
|
|
2657
|
+
window_secs?: number;
|
|
2658
|
+
/** @description Restrict to these outcome token IDs. */
|
|
2659
|
+
position_ids?: string[];
|
|
2660
|
+
/** @description Restrict to positions within these markets. */
|
|
2661
|
+
condition_ids?: string[];
|
|
2662
|
+
/** @description Restrict to these outcome names. */
|
|
2663
|
+
outcomes?: string[];
|
|
2664
|
+
/** @description Restrict to these aggregation windows. */
|
|
2665
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
|
|
2666
|
+
};
|
|
2667
|
+
/** @description Subscription filters for the `close_to_bond` event. At least one of `min_probability` or `max_probability` is required. */
|
|
2668
|
+
CloseToBondFilters: {
|
|
2669
|
+
/** @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. */
|
|
2670
|
+
min_probability?: number;
|
|
2671
|
+
/** @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO). */
|
|
2672
|
+
max_probability?: number;
|
|
2673
|
+
/** @description Restrict to these markets. */
|
|
2674
|
+
condition_ids?: string[];
|
|
2675
|
+
/** @description Restrict to these outcome token IDs. */
|
|
2676
|
+
position_ids?: string[];
|
|
2677
|
+
/** @description Restrict to markets in these events. */
|
|
2678
|
+
event_slugs?: string[];
|
|
2679
|
+
/** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
|
|
2680
|
+
outcomes?: string[];
|
|
2681
|
+
/** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
|
|
2682
|
+
position_outcome_indices?: number[];
|
|
2683
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2684
|
+
exclude_shortterm_markets?: boolean;
|
|
2685
|
+
} | unknown | unknown;
|
|
2686
|
+
/** @description Subscription filters for the `market_created` event. All fields are optional. */
|
|
2687
|
+
MarketCreatedFilters: {
|
|
2688
|
+
/** @description Restrict to markets with these tags or category names (case-insensitive match). */
|
|
2689
|
+
tags?: string[];
|
|
2690
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2691
|
+
event_slugs?: string[];
|
|
2692
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
|
|
2693
|
+
exclude_shortterm_markets?: boolean;
|
|
2694
|
+
};
|
|
2695
|
+
/** @description Subscription filters for the `oracle_events` event. All fields are optional. */
|
|
2696
|
+
OracleEventsFilters: {
|
|
2697
|
+
/** @description Restrict to these event types (case-insensitive). Empty = all. */
|
|
2698
|
+
oracle_event_types?: ("AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported")[];
|
|
2699
|
+
/** @description Restrict to events for these condition IDs. */
|
|
2700
|
+
condition_ids?: string[];
|
|
2701
|
+
};
|
|
2702
|
+
/** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
|
|
2703
|
+
AssetPriceTickFilters: {
|
|
2704
|
+
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
2705
|
+
asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
|
|
2706
|
+
};
|
|
2707
|
+
/** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
|
|
2708
|
+
AssetPriceWindowUpdateFilters: {
|
|
2709
|
+
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
2710
|
+
asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
|
|
2711
|
+
/** @description Restrict to these candle sizes. Empty = all sizes. */
|
|
2712
|
+
timeframes?: ("5m" | "15m" | "1h" | "4h" | "1d" | "24h")[];
|
|
2713
|
+
};
|
|
3063
2714
|
/**
|
|
3064
2715
|
* @description All alert event types supported by both HTTP webhooks and the alerts WebSocket.
|
|
3065
2716
|
* @enum {string}
|
|
@@ -3131,7 +2782,7 @@ export interface components {
|
|
|
3131
2782
|
* "fee": 0.125,
|
|
3132
2783
|
* "side": "Buy",
|
|
3133
2784
|
* "price": 0.5,
|
|
3134
|
-
* "exchange": "
|
|
2785
|
+
* "exchange": "polymarket",
|
|
3135
2786
|
* "trade_type": "OrderFilled"
|
|
3136
2787
|
* }
|
|
3137
2788
|
* }
|
|
@@ -3198,7 +2849,7 @@ export interface components {
|
|
|
3198
2849
|
* "side": "Buy",
|
|
3199
2850
|
* "price": 0.5,
|
|
3200
2851
|
* "probability": 0.5,
|
|
3201
|
-
* "exchange": "
|
|
2852
|
+
* "exchange": "polymarket",
|
|
3202
2853
|
* "trade_type": "OrderFilled"
|
|
3203
2854
|
* }
|
|
3204
2855
|
* }
|
|
@@ -3265,7 +2916,7 @@ export interface components {
|
|
|
3265
2916
|
* "side": "Buy",
|
|
3266
2917
|
* "price": 0.5,
|
|
3267
2918
|
* "probability": 0.5,
|
|
3268
|
-
* "exchange": "
|
|
2919
|
+
* "exchange": "polymarket",
|
|
3269
2920
|
* "trade_type": "OrderFilled"
|
|
3270
2921
|
* }
|
|
3271
2922
|
* }
|
|
@@ -3332,7 +2983,7 @@ export interface components {
|
|
|
3332
2983
|
* "side": "Buy",
|
|
3333
2984
|
* "price": 0.5,
|
|
3334
2985
|
* "probability": 0.5,
|
|
3335
|
-
* "exchange": "
|
|
2986
|
+
* "exchange": "polymarket",
|
|
3336
2987
|
* "trade_type": "OrderFilled"
|
|
3337
2988
|
* }
|
|
3338
2989
|
* }
|