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