@structbuild/sdk 0.3.10-staging.6 → 0.3.10-staging.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/polymarket.d.ts +576 -52
- package/dist/generated/webhooks.d.ts +575 -6
- package/dist/generated/ws-alerts.d.ts +2042 -1014
- package/dist/generated/ws.d.ts +148 -77
- package/dist/index.cjs +13 -1
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +13 -1
- package/dist/index.js.map +4 -4
- package/dist/namespaces/events.d.ts +2 -1
- package/dist/namespaces/markets.d.ts +4 -1
- package/dist/types/index.d.ts +14 -1
- package/dist/types/ws.d.ts +8 -2
- package/package.json +1 -1
|
@@ -2,90 +2,139 @@ export type paths = Record<string, never>;
|
|
|
2
2
|
export type webhooks = Record<string, never>;
|
|
3
3
|
export interface components {
|
|
4
4
|
schemas: {
|
|
5
|
-
/** @description
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Format: uuid
|
|
9
|
-
* @description UUID of this specific delivery attempt (matches X-Delivery-ID header)
|
|
10
|
-
*/
|
|
5
|
+
/** @description V3 UMA OOv3: an assertion was disputed. */
|
|
6
|
+
AssertionDisputedEvent: {
|
|
11
7
|
id: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
hash: string;
|
|
9
|
+
/** Format: int64 */
|
|
10
|
+
block?: number | null;
|
|
11
|
+
/** Format: int64 */
|
|
12
|
+
confirmed_at?: number | null;
|
|
13
|
+
/** Format: int64 */
|
|
14
|
+
received_at?: number | null;
|
|
15
|
+
/** Format: int64 */
|
|
16
|
+
log_index?: number | null;
|
|
17
|
+
/** Format: int64 */
|
|
18
|
+
block_index?: number | null;
|
|
19
|
+
oracle_contract: string;
|
|
20
|
+
assertion_id: string;
|
|
21
|
+
caller: string;
|
|
22
|
+
disputer: string;
|
|
23
|
+
condition_id?: string | null;
|
|
24
|
+
question?: string | null;
|
|
25
|
+
image_url?: string | null;
|
|
26
|
+
slug?: string | null;
|
|
27
|
+
event_slug?: string | null;
|
|
28
28
|
};
|
|
29
|
-
/** @description
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
/**
|
|
29
|
+
/** @description V3 UMA OOv3: a new assertion (resolution proposal) was made. */
|
|
30
|
+
AssertionMadeEvent: {
|
|
31
|
+
id: string;
|
|
32
|
+
hash: string;
|
|
33
|
+
/** Format: int64 */
|
|
34
|
+
block?: number | null;
|
|
35
|
+
/** Format: int64 */
|
|
36
|
+
confirmed_at?: number | null;
|
|
37
|
+
/** Format: int64 */
|
|
38
|
+
received_at?: number | null;
|
|
39
|
+
/** Format: int64 */
|
|
40
|
+
log_index?: number | null;
|
|
41
|
+
/** Format: int64 */
|
|
42
|
+
block_index?: number | null;
|
|
43
|
+
oracle_contract: string;
|
|
44
|
+
assertion_id: string;
|
|
45
|
+
domain_id: string;
|
|
46
|
+
claim: string;
|
|
47
|
+
asserter: string;
|
|
48
|
+
callback_recipient: string;
|
|
49
|
+
escalation_manager: string;
|
|
50
|
+
caller: string;
|
|
51
|
+
/** Format: int64 */
|
|
52
|
+
expiration_time: number;
|
|
53
|
+
currency: string;
|
|
54
|
+
bond: string;
|
|
55
|
+
identifier: string;
|
|
38
56
|
condition_id?: string | null;
|
|
39
|
-
|
|
40
|
-
outcome?: string | null;
|
|
41
|
-
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
42
|
-
outcome_index?: number | null;
|
|
43
|
-
/** @description Market question text */
|
|
57
|
+
proposed_outcome?: string | null;
|
|
44
58
|
question?: string | null;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/** @description Parent event slug */
|
|
59
|
+
image_url?: string | null;
|
|
60
|
+
slug?: string | null;
|
|
48
61
|
event_slug?: string | null;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
62
|
+
};
|
|
63
|
+
/** @description V3 UMA OOv3: an assertion liveness period expired and was settled. */
|
|
64
|
+
AssertionSettledEvent: {
|
|
65
|
+
id: string;
|
|
52
66
|
hash: string;
|
|
67
|
+
/** Format: int64 */
|
|
68
|
+
block?: number | null;
|
|
69
|
+
/** Format: int64 */
|
|
70
|
+
confirmed_at?: number | null;
|
|
71
|
+
/** Format: int64 */
|
|
72
|
+
received_at?: number | null;
|
|
73
|
+
/** Format: int64 */
|
|
74
|
+
log_index?: number | null;
|
|
75
|
+
/** Format: int64 */
|
|
76
|
+
block_index?: number | null;
|
|
77
|
+
oracle_contract: string;
|
|
78
|
+
assertion_id: string;
|
|
79
|
+
bond_recipient: string;
|
|
80
|
+
disputed: boolean;
|
|
81
|
+
settlement_resolution: boolean;
|
|
82
|
+
settle_caller: string;
|
|
83
|
+
condition_id?: string | null;
|
|
84
|
+
question?: string | null;
|
|
85
|
+
image_url?: string | null;
|
|
86
|
+
slug?: string | null;
|
|
87
|
+
event_slug?: string | null;
|
|
88
|
+
};
|
|
89
|
+
/** @description Payload delivered on every raw Chainlink price tick for a tracked crypto asset */
|
|
90
|
+
AssetPriceTickPayload: {
|
|
53
91
|
/**
|
|
54
|
-
*
|
|
55
|
-
* @
|
|
92
|
+
* @description Asset symbol
|
|
93
|
+
* @enum {string}
|
|
56
94
|
*/
|
|
57
|
-
|
|
95
|
+
symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
96
|
+
/** @description Current asset price in USD from the Chainlink feed */
|
|
97
|
+
price: number;
|
|
58
98
|
/**
|
|
59
99
|
* Format: int64
|
|
60
|
-
* @description
|
|
100
|
+
* @description Tick timestamp (milliseconds since Unix epoch)
|
|
61
101
|
*/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
shares_amount: number;
|
|
67
|
-
/** @description Fee paid in USD (6 decimal places) */
|
|
68
|
-
fee: number;
|
|
102
|
+
timestamp_ms: number;
|
|
103
|
+
};
|
|
104
|
+
/** @description Payload delivered twice per candle — once on open and once on close. `close_price` is 0.0 on the "open" update. */
|
|
105
|
+
AssetPriceWindowUpdatePayload: {
|
|
69
106
|
/**
|
|
70
|
-
* @description
|
|
107
|
+
* @description Asset symbol
|
|
71
108
|
* @enum {string}
|
|
72
109
|
*/
|
|
73
|
-
|
|
74
|
-
/** @description Outcome token price (0.0–1.0) */
|
|
75
|
-
price: number;
|
|
110
|
+
symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
76
111
|
/**
|
|
77
|
-
* @description
|
|
112
|
+
* @description Candle / window size
|
|
78
113
|
* @enum {string}
|
|
79
114
|
*/
|
|
80
|
-
|
|
115
|
+
variant: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
|
|
81
116
|
/**
|
|
82
|
-
*
|
|
117
|
+
* Format: int64
|
|
118
|
+
* @description Window start timestamp (milliseconds since Unix epoch)
|
|
119
|
+
*/
|
|
120
|
+
start_time: number;
|
|
121
|
+
/**
|
|
122
|
+
* Format: int64
|
|
123
|
+
* @description Window end timestamp (milliseconds since Unix epoch)
|
|
124
|
+
*/
|
|
125
|
+
end_time: number;
|
|
126
|
+
/** @description Opening price at start_time (USD) */
|
|
127
|
+
open_price: number;
|
|
128
|
+
/** @description Closing price at end_time (USD). 0.0 when update_type is "open" (not yet available). */
|
|
129
|
+
close_price: number;
|
|
130
|
+
/**
|
|
131
|
+
* @description "open" when the candle opens, "close" when it closes with a confirmed price
|
|
83
132
|
* @enum {string}
|
|
84
133
|
*/
|
|
85
|
-
|
|
134
|
+
update_type: "open" | "close";
|
|
86
135
|
};
|
|
87
|
-
/** @description Payload delivered when a
|
|
88
|
-
|
|
136
|
+
/** @description Payload delivered when a trade occurs at a near-certain-outcome price */
|
|
137
|
+
CloseToBondPayload: {
|
|
89
138
|
/** @description Limit-order maker wallet address (lowercase) */
|
|
90
139
|
trader: string;
|
|
91
140
|
/** @description Order filler wallet address (lowercase) */
|
|
@@ -96,123 +145,258 @@ export interface components {
|
|
|
96
145
|
condition_id?: string | null;
|
|
97
146
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
98
147
|
outcome?: string | null;
|
|
99
|
-
/** @description
|
|
148
|
+
/** @description 0 = Yes/Up, 1 = No */
|
|
100
149
|
outcome_index?: number | null;
|
|
101
|
-
/** @description Market question text */
|
|
102
150
|
question?: string | null;
|
|
103
|
-
/** @description Market slug */
|
|
104
151
|
market_slug?: string | null;
|
|
105
|
-
/** @description Parent event slug */
|
|
106
152
|
event_slug?: string | null;
|
|
107
|
-
/** @description Unique trade identifier */
|
|
108
153
|
trade_id: string;
|
|
109
154
|
/** @description Transaction hash */
|
|
110
155
|
hash: string;
|
|
111
|
-
/**
|
|
112
|
-
* Format: int64
|
|
113
|
-
* @description Block number
|
|
114
|
-
*/
|
|
156
|
+
/** Format: int64 */
|
|
115
157
|
block: number;
|
|
116
158
|
/**
|
|
117
159
|
* Format: int64
|
|
118
|
-
* @description
|
|
160
|
+
* @description Unix seconds
|
|
119
161
|
*/
|
|
120
162
|
confirmed_at: number;
|
|
121
|
-
/** @description USD size of the trade
|
|
163
|
+
/** @description USD size of the trade */
|
|
122
164
|
amount_usd: number;
|
|
123
|
-
/** @description Outcome shares traded (6 decimal places) */
|
|
124
165
|
shares_amount: number;
|
|
125
|
-
/** @description Fee paid in USD
|
|
166
|
+
/** @description Fee paid in USD */
|
|
126
167
|
fee: number;
|
|
127
|
-
/**
|
|
128
|
-
* @description Trade direction
|
|
129
|
-
* @enum {string}
|
|
130
|
-
*/
|
|
168
|
+
/** @enum {string} */
|
|
131
169
|
side: "Buy" | "Sell";
|
|
132
|
-
/** @description
|
|
170
|
+
/** @description Price that triggered the notification (0.0–1.0) */
|
|
133
171
|
price: number;
|
|
134
|
-
/** @description Implied probability (0.0–1.0)
|
|
172
|
+
/** @description Implied probability (0.0–1.0) */
|
|
135
173
|
probability?: number | null;
|
|
136
174
|
/**
|
|
137
|
-
* @description
|
|
138
|
-
* @enum {string}
|
|
139
|
-
*/
|
|
140
|
-
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
141
|
-
/**
|
|
142
|
-
* @description Trade type (webhook events only fire on order fills)
|
|
175
|
+
* @description "high" when near YES (price ≥ threshold), "low" when near NO (price ≤ threshold)
|
|
143
176
|
* @enum {string}
|
|
144
177
|
*/
|
|
145
|
-
|
|
178
|
+
bond_side: "high" | "low";
|
|
179
|
+
/** @description The probability threshold from the subscription filter that was breached */
|
|
180
|
+
threshold: number;
|
|
146
181
|
};
|
|
147
|
-
/** @description Payload delivered when a
|
|
148
|
-
|
|
149
|
-
/** @description
|
|
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 */
|
|
182
|
+
/** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
|
|
183
|
+
ConditionMetricsPayload: {
|
|
184
|
+
/** @description Market condition ID */
|
|
156
185
|
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
186
|
/**
|
|
172
|
-
*
|
|
173
|
-
* @
|
|
187
|
+
* @description Aggregation window
|
|
188
|
+
* @enum {string|null}
|
|
174
189
|
*/
|
|
175
|
-
|
|
190
|
+
timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
|
|
191
|
+
/** @description Total trading volume in USD for this timeframe */
|
|
192
|
+
volume_usd?: number | null;
|
|
193
|
+
/** @description Total fees collected in USD */
|
|
194
|
+
fees?: number | null;
|
|
176
195
|
/**
|
|
177
196
|
* Format: int64
|
|
178
|
-
* @description
|
|
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}
|
|
197
|
+
* @description Total number of transactions
|
|
199
198
|
*/
|
|
200
|
-
|
|
199
|
+
txns?: number | null;
|
|
201
200
|
/**
|
|
202
|
-
*
|
|
203
|
-
* @
|
|
201
|
+
* Format: int64
|
|
202
|
+
* @description Number of unique traders
|
|
204
203
|
*/
|
|
205
|
-
|
|
204
|
+
unique_traders?: number | null;
|
|
206
205
|
};
|
|
207
|
-
/** @description
|
|
208
|
-
|
|
206
|
+
/** @description CTF ConditionResolution: positions become redeemable on the Conditional Tokens contract. */
|
|
207
|
+
ConditionResolutionEvent: {
|
|
208
|
+
id: string;
|
|
209
|
+
hash: string;
|
|
210
|
+
/** Format: int64 */
|
|
211
|
+
block?: number | null;
|
|
212
|
+
/** Format: int64 */
|
|
213
|
+
confirmed_at?: number | null;
|
|
214
|
+
/** Format: int64 */
|
|
215
|
+
received_at?: number | null;
|
|
216
|
+
/** Format: int64 */
|
|
217
|
+
log_index?: number | null;
|
|
218
|
+
/** Format: int64 */
|
|
219
|
+
block_index?: number | null;
|
|
220
|
+
oracle_contract: string;
|
|
221
|
+
condition_id: string;
|
|
222
|
+
oracle: string;
|
|
223
|
+
proposed_outcome?: string | null;
|
|
224
|
+
question?: string | null;
|
|
225
|
+
image_url?: string | null;
|
|
226
|
+
slug?: string | null;
|
|
227
|
+
event_slug?: string | null;
|
|
228
|
+
};
|
|
229
|
+
/** @description Request body for creating a webhook */
|
|
230
|
+
CreateWebhookRequestBody: {
|
|
231
|
+
/** @description Destination URL for webhook deliveries (must be HTTPS) */
|
|
232
|
+
url: string;
|
|
233
|
+
/** @description Event to subscribe to */
|
|
234
|
+
event: components["schemas"]["PolymarketWebhookEvent"];
|
|
235
|
+
/** @description Optional secret for HMAC signature verification */
|
|
236
|
+
secret?: string | null;
|
|
237
|
+
filters?: null | components["schemas"]["WebhookFiltersBody"];
|
|
238
|
+
/** @description Optional description/name */
|
|
239
|
+
description?: string | null;
|
|
240
|
+
};
|
|
241
|
+
/** @description Delete webhook response */
|
|
242
|
+
DeleteWebhookResponse: {
|
|
243
|
+
deleted: boolean;
|
|
244
|
+
};
|
|
245
|
+
/** @description V2 UMA OOv2: a proposed price was disputed. */
|
|
246
|
+
DisputePriceEvent: {
|
|
247
|
+
id: string;
|
|
248
|
+
hash: string;
|
|
249
|
+
/** Format: int64 */
|
|
250
|
+
block?: number | null;
|
|
251
|
+
/** Format: int64 */
|
|
252
|
+
confirmed_at?: number | null;
|
|
253
|
+
/** Format: int64 */
|
|
254
|
+
received_at?: number | null;
|
|
255
|
+
/** Format: int64 */
|
|
256
|
+
log_index?: number | null;
|
|
257
|
+
/** Format: int64 */
|
|
258
|
+
block_index?: number | null;
|
|
259
|
+
oracle_contract: string;
|
|
260
|
+
requester: string;
|
|
261
|
+
proposer: string;
|
|
262
|
+
disputer: string;
|
|
263
|
+
identifier: string;
|
|
264
|
+
timestamp: string;
|
|
265
|
+
ancillary_data: string;
|
|
266
|
+
/** Format: int64 */
|
|
267
|
+
proposed_price: number;
|
|
268
|
+
condition_id?: string | null;
|
|
269
|
+
proposed_outcome?: string | null;
|
|
270
|
+
question?: string | null;
|
|
271
|
+
image_url?: string | null;
|
|
272
|
+
slug?: string | null;
|
|
273
|
+
event_slug?: string | null;
|
|
274
|
+
};
|
|
275
|
+
/** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
|
|
276
|
+
EventMetricsPayload: {
|
|
277
|
+
/** @description Event slug */
|
|
278
|
+
event_slug?: string | null;
|
|
279
|
+
/**
|
|
280
|
+
* @description Aggregation window
|
|
281
|
+
* @enum {string|null}
|
|
282
|
+
*/
|
|
283
|
+
timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
|
|
284
|
+
/** @description Total aggregated volume across all markets in the event (USD) */
|
|
285
|
+
volume_usd?: number | null;
|
|
286
|
+
/** @description Total fees collected in USD */
|
|
287
|
+
fees?: number | null;
|
|
288
|
+
/**
|
|
289
|
+
* Format: int64
|
|
290
|
+
* @description Total number of transactions
|
|
291
|
+
*/
|
|
292
|
+
txns?: number | null;
|
|
293
|
+
/**
|
|
294
|
+
* Format: int64
|
|
295
|
+
* @description Number of unique traders
|
|
296
|
+
*/
|
|
297
|
+
unique_traders?: number | null;
|
|
298
|
+
};
|
|
299
|
+
/** @description Payload delivered when a trader's per-event PnL crosses a configured threshold */
|
|
300
|
+
EventPnlPayload: {
|
|
301
|
+
/** @description Trader wallet address (lowercase) */
|
|
302
|
+
trader?: string | null;
|
|
303
|
+
/** @description Event slug */
|
|
304
|
+
event_slug?: string | null;
|
|
305
|
+
/**
|
|
306
|
+
* @description PnL aggregation window
|
|
307
|
+
* @enum {string}
|
|
308
|
+
*/
|
|
309
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
310
|
+
/**
|
|
311
|
+
* Format: int64
|
|
312
|
+
* @description Number of distinct markets traded in this event
|
|
313
|
+
*/
|
|
314
|
+
markets_traded?: number | null;
|
|
315
|
+
/** Format: int64 */
|
|
316
|
+
outcomes_traded?: number | null;
|
|
317
|
+
/** Format: int64 */
|
|
318
|
+
total_buys?: number | null;
|
|
319
|
+
/** Format: int64 */
|
|
320
|
+
total_sells?: number | null;
|
|
321
|
+
/** Format: int64 */
|
|
322
|
+
total_redemptions?: number | null;
|
|
323
|
+
/** Format: int64 */
|
|
324
|
+
total_merges?: number | null;
|
|
325
|
+
/** @description Total volume in USD */
|
|
326
|
+
total_volume_usd?: number | null;
|
|
327
|
+
buy_usd?: number | null;
|
|
328
|
+
sell_usd?: number | null;
|
|
329
|
+
redemption_usd?: number | null;
|
|
330
|
+
merge_usd?: number | null;
|
|
331
|
+
/** @description Realized PnL in USD for this event */
|
|
332
|
+
realized_pnl_usd?: number | null;
|
|
333
|
+
/** Format: int64 */
|
|
334
|
+
winning_markets?: number | null;
|
|
335
|
+
/** Format: int64 */
|
|
336
|
+
losing_markets?: number | null;
|
|
337
|
+
total_fees?: number | null;
|
|
338
|
+
/**
|
|
339
|
+
* Format: int64
|
|
340
|
+
* @description Unix seconds
|
|
341
|
+
*/
|
|
342
|
+
first_trade_at?: number | null;
|
|
343
|
+
/**
|
|
344
|
+
* Format: int64
|
|
345
|
+
* @description Unix seconds
|
|
346
|
+
*/
|
|
347
|
+
last_trade_at?: number | null;
|
|
348
|
+
};
|
|
349
|
+
/** @description Payload delivered when an event's aggregated trading volume crosses a USD milestone */
|
|
350
|
+
EventVolumeMilestonePayload: {
|
|
351
|
+
/** @description Event slug */
|
|
352
|
+
event_slug: string;
|
|
353
|
+
/**
|
|
354
|
+
* @description Aggregation window
|
|
355
|
+
* @enum {string}
|
|
356
|
+
*/
|
|
357
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
358
|
+
/** @description The USD milestone amount that was crossed */
|
|
359
|
+
milestone_usd: number;
|
|
360
|
+
/** @description Current aggregated event volume at time of trigger (USD) */
|
|
361
|
+
current_volume_usd: number;
|
|
362
|
+
/** @description Total fees in USD for this timeframe */
|
|
363
|
+
fees: number;
|
|
364
|
+
/**
|
|
365
|
+
* Format: int64
|
|
366
|
+
* @description Total transactions in this timeframe
|
|
367
|
+
*/
|
|
368
|
+
txns: number;
|
|
369
|
+
};
|
|
370
|
+
/** @description Payload delivered when an event's aggregated volume has spiked since the last snapshot */
|
|
371
|
+
EventVolumeSpikePayload: {
|
|
372
|
+
/** @description Event slug */
|
|
373
|
+
event_slug: string;
|
|
374
|
+
/**
|
|
375
|
+
* @description Aggregation window
|
|
376
|
+
* @enum {string}
|
|
377
|
+
*/
|
|
378
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
379
|
+
/** @description Current aggregated event volume at time of the spike (USD) */
|
|
380
|
+
current_volume_usd: number;
|
|
381
|
+
/** @description Volume at the snapshot baseline (USD) */
|
|
382
|
+
snapshot_volume_usd: number;
|
|
383
|
+
/** @description New volume since the snapshot that triggered this notification (USD) */
|
|
384
|
+
delta_volume_usd: number;
|
|
385
|
+
/** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
|
|
386
|
+
spike_pct: number;
|
|
387
|
+
/** Format: int64 */
|
|
388
|
+
txns: number;
|
|
389
|
+
fees: number;
|
|
390
|
+
};
|
|
391
|
+
/** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
|
|
392
|
+
FirstTradePayload: {
|
|
209
393
|
/** @description Limit-order maker wallet address (lowercase) */
|
|
210
394
|
trader: string;
|
|
211
395
|
/** @description Order filler wallet address (lowercase) */
|
|
212
396
|
taker: string;
|
|
213
397
|
/** @description ERC-1155 outcome token ID */
|
|
214
398
|
position_id: string;
|
|
215
|
-
/** @description Parent market condition ID */
|
|
399
|
+
/** @description Parent market condition ID (0x-prefixed hex) */
|
|
216
400
|
condition_id?: string | null;
|
|
217
401
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
218
402
|
outcome?: string | null;
|
|
@@ -251,8 +435,6 @@ export interface components {
|
|
|
251
435
|
side: "Buy" | "Sell";
|
|
252
436
|
/** @description Outcome token price (0.0–1.0) */
|
|
253
437
|
price: number;
|
|
254
|
-
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
255
|
-
probability?: number | null;
|
|
256
438
|
/**
|
|
257
439
|
* @description Exchange contract that processed the trade
|
|
258
440
|
* @enum {string}
|
|
@@ -264,719 +446,609 @@ export interface components {
|
|
|
264
446
|
*/
|
|
265
447
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
266
448
|
};
|
|
267
|
-
/** @description
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
/** Format: int64 */
|
|
272
|
-
block: number;
|
|
273
|
-
/** Format: int64 */
|
|
274
|
-
confirmed_at: number;
|
|
275
|
-
/** Format: int64 */
|
|
276
|
-
log_index: number;
|
|
277
|
-
/** Format: int64 */
|
|
278
|
-
block_index: number;
|
|
279
|
-
order_hash: string;
|
|
280
|
-
trader: {
|
|
281
|
-
address: string;
|
|
282
|
-
name: string | null;
|
|
283
|
-
pseudonym: string | null;
|
|
284
|
-
profile_image: string | null;
|
|
285
|
-
x_username: string | null;
|
|
286
|
-
verified_badge: boolean;
|
|
287
|
-
};
|
|
288
|
-
taker: string;
|
|
289
|
-
/** @enum {string} */
|
|
290
|
-
side: "Buy" | "Sell";
|
|
291
|
-
condition_id: string | null;
|
|
292
|
-
position_id: string;
|
|
293
|
-
outcome?: string;
|
|
294
|
-
outcome_index: number | null;
|
|
295
|
-
question?: string;
|
|
296
|
-
image_url?: string;
|
|
297
|
-
slug?: string;
|
|
298
|
-
event_slug?: string;
|
|
299
|
-
usd_amount: number;
|
|
300
|
-
shares_amount: number;
|
|
301
|
-
price: number;
|
|
302
|
-
probability?: number;
|
|
303
|
-
fee: number;
|
|
304
|
-
fee_shares: number;
|
|
305
|
-
fee_pct: number;
|
|
449
|
+
/** @description Payload delivered when a trader's global PnL (across all markets) crosses a configured threshold */
|
|
450
|
+
GlobalPnlPayload: {
|
|
451
|
+
/** @description Trader wallet address (lowercase) */
|
|
452
|
+
trader?: string | null;
|
|
306
453
|
/**
|
|
307
|
-
* @description
|
|
454
|
+
* @description PnL aggregation window
|
|
308
455
|
* @enum {string}
|
|
309
456
|
*/
|
|
310
|
-
|
|
311
|
-
/** @
|
|
312
|
-
|
|
313
|
-
} | {
|
|
314
|
-
id: string;
|
|
315
|
-
hash: string;
|
|
316
|
-
/** Format: int64 */
|
|
317
|
-
block: number;
|
|
318
|
-
/** Format: int64 */
|
|
319
|
-
confirmed_at: number;
|
|
320
|
-
/** Format: int64 */
|
|
321
|
-
log_index: number;
|
|
322
|
-
/** Format: int64 */
|
|
323
|
-
block_index: number;
|
|
324
|
-
trader: {
|
|
325
|
-
address: string;
|
|
326
|
-
name: string | null;
|
|
327
|
-
pseudonym: string | null;
|
|
328
|
-
profile_image: string | null;
|
|
329
|
-
x_username: string | null;
|
|
330
|
-
verified_badge: boolean;
|
|
331
|
-
};
|
|
332
|
-
condition_id: string | null;
|
|
333
|
-
outcome?: string;
|
|
334
|
-
outcome_index: number | null;
|
|
335
|
-
question?: string;
|
|
336
|
-
image_url?: string;
|
|
337
|
-
slug?: string;
|
|
338
|
-
event_slug?: string;
|
|
339
|
-
usd_amount: number;
|
|
340
|
-
winning_outcome_index?: number;
|
|
341
|
-
position_details?: {
|
|
342
|
-
position_id: string;
|
|
343
|
-
outcome_index: number;
|
|
344
|
-
outcome?: string;
|
|
345
|
-
amount: string;
|
|
346
|
-
}[];
|
|
457
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
458
|
+
/** @description Realized PnL in USD (positive = profit, negative = loss) */
|
|
459
|
+
realized_pnl_usd?: number | null;
|
|
347
460
|
/**
|
|
348
|
-
*
|
|
349
|
-
* @
|
|
461
|
+
* Format: int64
|
|
462
|
+
* @description Number of distinct events traded
|
|
350
463
|
*/
|
|
351
|
-
|
|
352
|
-
/** @enum {string} */
|
|
353
|
-
trade_type: "Redemption";
|
|
354
|
-
} | {
|
|
355
|
-
id: string;
|
|
356
|
-
hash: string;
|
|
357
|
-
/** Format: int64 */
|
|
358
|
-
block: number;
|
|
359
|
-
/** Format: int64 */
|
|
360
|
-
confirmed_at: number;
|
|
361
|
-
/** Format: int64 */
|
|
362
|
-
log_index: number;
|
|
363
|
-
/** Format: int64 */
|
|
364
|
-
block_index: number;
|
|
365
|
-
trader: {
|
|
366
|
-
address: string;
|
|
367
|
-
name: string | null;
|
|
368
|
-
pseudonym: string | null;
|
|
369
|
-
profile_image: string | null;
|
|
370
|
-
x_username: string | null;
|
|
371
|
-
verified_badge: boolean;
|
|
372
|
-
};
|
|
373
|
-
condition_id: string | null;
|
|
374
|
-
question?: string;
|
|
375
|
-
image_url?: string;
|
|
376
|
-
slug?: string;
|
|
377
|
-
event_slug?: string;
|
|
378
|
-
usd_amount: number;
|
|
379
|
-
position_details?: {
|
|
380
|
-
position_id: string;
|
|
381
|
-
outcome_index: number;
|
|
382
|
-
outcome?: string;
|
|
383
|
-
amount: string;
|
|
384
|
-
}[];
|
|
464
|
+
events_traded?: number | null;
|
|
385
465
|
/**
|
|
386
|
-
*
|
|
466
|
+
* Format: int64
|
|
467
|
+
* @description Number of distinct markets traded
|
|
468
|
+
*/
|
|
469
|
+
markets_traded?: number | null;
|
|
470
|
+
/**
|
|
471
|
+
* Format: int64
|
|
472
|
+
* @description Total buy transactions
|
|
473
|
+
*/
|
|
474
|
+
total_buys?: number | null;
|
|
475
|
+
/**
|
|
476
|
+
* Format: int64
|
|
477
|
+
* @description Total sell transactions
|
|
478
|
+
*/
|
|
479
|
+
total_sells?: number | null;
|
|
480
|
+
/**
|
|
481
|
+
* Format: int64
|
|
482
|
+
* @description Total redemption transactions
|
|
483
|
+
*/
|
|
484
|
+
total_redemptions?: number | null;
|
|
485
|
+
/**
|
|
486
|
+
* Format: int64
|
|
487
|
+
* @description Total merge transactions
|
|
488
|
+
*/
|
|
489
|
+
total_merges?: number | null;
|
|
490
|
+
/** @description Total USD volume (buys + sells + redemptions + merges) */
|
|
491
|
+
total_volume_usd?: number | null;
|
|
492
|
+
/** @description Total buy volume in USD */
|
|
493
|
+
buy_volume_usd?: number | null;
|
|
494
|
+
/** @description Total sell volume in USD */
|
|
495
|
+
sell_volume_usd?: number | null;
|
|
496
|
+
/** @description Total redemption volume in USD */
|
|
497
|
+
redemption_volume_usd?: number | null;
|
|
498
|
+
/** @description Total merge volume in USD */
|
|
499
|
+
merge_volume_usd?: number | null;
|
|
500
|
+
/**
|
|
501
|
+
* Format: int64
|
|
502
|
+
* @description Number of markets where trader realised a profit
|
|
503
|
+
*/
|
|
504
|
+
markets_won?: number | null;
|
|
505
|
+
/**
|
|
506
|
+
* Format: int64
|
|
507
|
+
* @description Number of markets where trader realised a loss
|
|
508
|
+
*/
|
|
509
|
+
markets_lost?: number | null;
|
|
510
|
+
/** @description Market win rate as a percentage (0.0–100.0) */
|
|
511
|
+
market_win_rate_pct?: number | null;
|
|
512
|
+
/** @description Average PnL per market in USD */
|
|
513
|
+
avg_pnl_per_market?: number | null;
|
|
514
|
+
/** @description Average PnL per trade in USD */
|
|
515
|
+
avg_pnl_per_trade?: number | null;
|
|
516
|
+
/** @description Average hold time across all positions (seconds) */
|
|
517
|
+
avg_hold_time_seconds?: number | null;
|
|
518
|
+
/** @description Total fees paid in USD */
|
|
519
|
+
total_fees?: number | null;
|
|
520
|
+
/** @description Best single-trade PnL in USD */
|
|
521
|
+
best_trade_pnl_usd?: number | null;
|
|
522
|
+
/** @description Condition ID of the best trade */
|
|
523
|
+
best_trade_condition_id?: string | null;
|
|
524
|
+
/**
|
|
525
|
+
* Format: int64
|
|
526
|
+
* @description Timestamp of the first trade (Unix seconds)
|
|
527
|
+
*/
|
|
528
|
+
first_trade_at?: number | null;
|
|
529
|
+
/**
|
|
530
|
+
* Format: int64
|
|
531
|
+
* @description Timestamp of the most recent trade (Unix seconds)
|
|
532
|
+
*/
|
|
533
|
+
last_trade_at?: number | null;
|
|
534
|
+
};
|
|
535
|
+
/** @description Response for GET /v1/webhook/events */
|
|
536
|
+
ListEventsResponse: {
|
|
537
|
+
events: components["schemas"]["WebhookEventInfo"][];
|
|
538
|
+
};
|
|
539
|
+
/** @description An outcome entry within a newly created market */
|
|
540
|
+
MarketCreatedOutcome: {
|
|
541
|
+
/** @description Outcome index (0 = Yes, 1 = No) */
|
|
542
|
+
index: number;
|
|
543
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
544
|
+
name: string;
|
|
545
|
+
/** @description ERC-1155 position token ID for this outcome */
|
|
546
|
+
position_id: string;
|
|
547
|
+
};
|
|
548
|
+
/** @description Payload delivered when a new prediction market is detected on-chain and enriched with Gamma API metadata */
|
|
549
|
+
MarketCreatedPayload: {
|
|
550
|
+
/** @description Condition ID (0x-prefixed hex, lowercase) */
|
|
551
|
+
condition_id: string;
|
|
552
|
+
/** @description Market slug */
|
|
553
|
+
market_slug: string;
|
|
554
|
+
/** @description Parent event slug */
|
|
555
|
+
event_slug?: string | null;
|
|
556
|
+
/** @description Parent event ID */
|
|
557
|
+
event_id?: string | null;
|
|
558
|
+
/** @description Parent event title */
|
|
559
|
+
event_title?: string | null;
|
|
560
|
+
/** @description Series slug (for recurring markets) */
|
|
561
|
+
series_slug?: string | null;
|
|
562
|
+
/** @description List of market outcomes with their position IDs */
|
|
563
|
+
outcomes: components["schemas"]["MarketCreatedOutcome"][];
|
|
564
|
+
/** @description Full market question text */
|
|
565
|
+
question: string;
|
|
566
|
+
/** @description Short display title */
|
|
567
|
+
title?: string | null;
|
|
568
|
+
/** @description Market description */
|
|
569
|
+
description: string;
|
|
570
|
+
/** @description Market category (e.g. "Sports", "Politics") */
|
|
571
|
+
category?: string | null;
|
|
572
|
+
/** @description Market tags */
|
|
573
|
+
tags: string[];
|
|
574
|
+
/** @description Cover image URL */
|
|
575
|
+
image_url?: string | null;
|
|
576
|
+
/** @description Whether this is a neg-risk market */
|
|
577
|
+
neg_risk: boolean;
|
|
578
|
+
};
|
|
579
|
+
/** @description Payload delivered when a trader's per-market PnL crosses a configured threshold */
|
|
580
|
+
MarketPnlPayload: {
|
|
581
|
+
/** @description Trader wallet address (lowercase) */
|
|
582
|
+
trader?: string | null;
|
|
583
|
+
/** @description Market condition ID */
|
|
584
|
+
condition_id?: string | null;
|
|
585
|
+
/** @description Parent event slug */
|
|
586
|
+
event_slug?: string | null;
|
|
587
|
+
/**
|
|
588
|
+
* @description PnL aggregation window
|
|
387
589
|
* @enum {string}
|
|
388
590
|
*/
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
591
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
592
|
+
/**
|
|
593
|
+
* Format: int64
|
|
594
|
+
* @description Number of distinct outcomes traded in this market
|
|
595
|
+
*/
|
|
596
|
+
outcomes_traded?: number | null;
|
|
395
597
|
/** Format: int64 */
|
|
396
|
-
|
|
598
|
+
total_buys?: number | null;
|
|
397
599
|
/** Format: int64 */
|
|
398
|
-
|
|
600
|
+
total_sells?: number | null;
|
|
399
601
|
/** Format: int64 */
|
|
400
|
-
|
|
602
|
+
total_redemptions?: number | null;
|
|
401
603
|
/** Format: int64 */
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
image_url?: string;
|
|
414
|
-
slug?: string;
|
|
415
|
-
event_slug?: string;
|
|
416
|
-
usd_amount: number;
|
|
417
|
-
position_details?: {
|
|
418
|
-
position_id: string;
|
|
419
|
-
outcome_index: number;
|
|
420
|
-
outcome?: string;
|
|
421
|
-
amount: string;
|
|
422
|
-
}[];
|
|
604
|
+
total_merges?: number | null;
|
|
605
|
+
/** @description Total buy volume in USD */
|
|
606
|
+
buy_usd?: number | null;
|
|
607
|
+
/** @description Total sell volume in USD */
|
|
608
|
+
sell_usd?: number | null;
|
|
609
|
+
/** @description Total redemption volume in USD */
|
|
610
|
+
redemption_usd?: number | null;
|
|
611
|
+
/** @description Total merge volume in USD */
|
|
612
|
+
merge_usd?: number | null;
|
|
613
|
+
/** @description Realized PnL in USD for this market */
|
|
614
|
+
realized_pnl_usd?: number | null;
|
|
423
615
|
/**
|
|
424
|
-
*
|
|
616
|
+
* Format: int64
|
|
617
|
+
* @description Number of outcomes with positive PnL
|
|
618
|
+
*/
|
|
619
|
+
winning_outcomes?: number | null;
|
|
620
|
+
/** @description Total fees paid in USD for this market */
|
|
621
|
+
total_fees?: number | null;
|
|
622
|
+
/**
|
|
623
|
+
* Format: int64
|
|
624
|
+
* @description Timestamp of first trade in market (Unix seconds)
|
|
625
|
+
*/
|
|
626
|
+
first_trade_at?: number | null;
|
|
627
|
+
/**
|
|
628
|
+
* Format: int64
|
|
629
|
+
* @description Timestamp of most recent trade in market (Unix seconds)
|
|
630
|
+
*/
|
|
631
|
+
last_trade_at?: number | null;
|
|
632
|
+
};
|
|
633
|
+
/** @description Payload delivered when a market's volume has spiked since the last snapshot */
|
|
634
|
+
MarketVolumeSpikePayload: {
|
|
635
|
+
/** @description Market condition ID */
|
|
636
|
+
condition_id: string;
|
|
637
|
+
/**
|
|
638
|
+
* @description Aggregation window
|
|
425
639
|
* @enum {string}
|
|
426
640
|
*/
|
|
427
|
-
|
|
428
|
-
/** @
|
|
429
|
-
|
|
430
|
-
|
|
641
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
642
|
+
/** @description Current volume at the time of the spike (USD) */
|
|
643
|
+
current_volume_usd: number;
|
|
644
|
+
/** @description Volume at the snapshot baseline (USD) */
|
|
645
|
+
snapshot_volume_usd: number;
|
|
646
|
+
/** @description New volume since the snapshot that triggered this notification (USD) */
|
|
647
|
+
delta_volume_usd: number;
|
|
648
|
+
/** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
|
|
649
|
+
spike_pct: number;
|
|
650
|
+
/**
|
|
651
|
+
* Format: int64
|
|
652
|
+
* @description Total transactions in this timeframe
|
|
653
|
+
*/
|
|
654
|
+
txns: number;
|
|
655
|
+
/** @description Total fees in USD for this timeframe */
|
|
656
|
+
fees: number;
|
|
657
|
+
};
|
|
658
|
+
/** @description NegRisk Adapter: outcome reported for a neg-risk market question. */
|
|
659
|
+
NegRiskOutcomeReportedEvent: {
|
|
431
660
|
id: string;
|
|
432
661
|
hash: string;
|
|
433
662
|
/** Format: int64 */
|
|
434
|
-
block
|
|
663
|
+
block?: number | null;
|
|
435
664
|
/** Format: int64 */
|
|
436
|
-
confirmed_at
|
|
665
|
+
confirmed_at?: number | null;
|
|
437
666
|
/** Format: int64 */
|
|
438
|
-
|
|
667
|
+
received_at?: number | null;
|
|
439
668
|
/** Format: int64 */
|
|
440
|
-
|
|
441
|
-
trader: {
|
|
442
|
-
address: string;
|
|
443
|
-
name: string | null;
|
|
444
|
-
pseudonym: string | null;
|
|
445
|
-
profile_image: string | null;
|
|
446
|
-
x_username: string | null;
|
|
447
|
-
verified_badge: boolean;
|
|
448
|
-
};
|
|
449
|
-
market_id: string;
|
|
450
|
-
index_set: string;
|
|
451
|
-
shares_amount: number;
|
|
452
|
-
/**
|
|
453
|
-
* @description Exchange contract that processed the event
|
|
454
|
-
* @enum {string}
|
|
455
|
-
*/
|
|
456
|
-
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
457
|
-
/** @enum {string} */
|
|
458
|
-
trade_type: "PositionsConverted";
|
|
459
|
-
} | {
|
|
460
|
-
id: string;
|
|
461
|
-
hash: string;
|
|
669
|
+
log_index?: number | null;
|
|
462
670
|
/** Format: int64 */
|
|
671
|
+
block_index?: number | null;
|
|
672
|
+
oracle_contract: string;
|
|
673
|
+
condition_id: string;
|
|
674
|
+
proposed_outcome?: string | null;
|
|
675
|
+
question?: string | null;
|
|
676
|
+
image_url?: string | null;
|
|
677
|
+
slug?: string | null;
|
|
678
|
+
event_slug?: string | null;
|
|
679
|
+
};
|
|
680
|
+
/** @description Payload delivered when a trader places their first trade in a specific market (fires once per trader+market pair) */
|
|
681
|
+
NewMarketPayload: {
|
|
682
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
683
|
+
trader: string;
|
|
684
|
+
/** @description Order filler wallet address (lowercase) */
|
|
685
|
+
taker: string;
|
|
686
|
+
/** @description ERC-1155 outcome token ID */
|
|
687
|
+
position_id: string;
|
|
688
|
+
/** @description Parent market condition ID */
|
|
689
|
+
condition_id?: string | null;
|
|
690
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
691
|
+
outcome?: string | null;
|
|
692
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
693
|
+
outcome_index?: number | null;
|
|
694
|
+
/** @description Market question text */
|
|
695
|
+
question?: string | null;
|
|
696
|
+
/** @description Market slug */
|
|
697
|
+
market_slug?: string | null;
|
|
698
|
+
/** @description Parent event slug */
|
|
699
|
+
event_slug?: string | null;
|
|
700
|
+
/** @description Unique trade identifier */
|
|
701
|
+
trade_id: string;
|
|
702
|
+
/** @description Transaction hash */
|
|
703
|
+
hash: string;
|
|
704
|
+
/**
|
|
705
|
+
* Format: int64
|
|
706
|
+
* @description Block number
|
|
707
|
+
*/
|
|
463
708
|
block: number;
|
|
464
|
-
/**
|
|
709
|
+
/**
|
|
710
|
+
* Format: int64
|
|
711
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
712
|
+
*/
|
|
465
713
|
confirmed_at: number;
|
|
466
|
-
/**
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
image_url?: string;
|
|
473
|
-
slug?: string;
|
|
474
|
-
event_slug?: string;
|
|
714
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
715
|
+
amount_usd: number;
|
|
716
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
717
|
+
shares_amount: number;
|
|
718
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
719
|
+
fee: number;
|
|
475
720
|
/**
|
|
476
|
-
* @description
|
|
721
|
+
* @description Trade direction
|
|
722
|
+
* @enum {string}
|
|
723
|
+
*/
|
|
724
|
+
side: "Buy" | "Sell";
|
|
725
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
726
|
+
price: number;
|
|
727
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
728
|
+
probability?: number | null;
|
|
729
|
+
/**
|
|
730
|
+
* @description Exchange contract that processed the trade
|
|
477
731
|
* @enum {string}
|
|
478
732
|
*/
|
|
479
733
|
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
480
|
-
/**
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
734
|
+
/**
|
|
735
|
+
* @description Trade type (webhook events only fire on order fills)
|
|
736
|
+
* @enum {string}
|
|
737
|
+
*/
|
|
738
|
+
trade_type: "OrderFilled" | "OrdersMatched";
|
|
739
|
+
};
|
|
740
|
+
/** @description Payload delivered on every order-filled trade */
|
|
741
|
+
NewTradePayload: {
|
|
742
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
743
|
+
trader: string;
|
|
744
|
+
/** @description Order filler wallet address (lowercase) */
|
|
745
|
+
taker: string;
|
|
746
|
+
/** @description ERC-1155 outcome token ID */
|
|
747
|
+
position_id: string;
|
|
748
|
+
/** @description Parent market condition ID */
|
|
749
|
+
condition_id?: string | null;
|
|
750
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
751
|
+
outcome?: string | null;
|
|
752
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
753
|
+
outcome_index?: number | null;
|
|
754
|
+
/** @description Market question text */
|
|
755
|
+
question?: string | null;
|
|
756
|
+
/** @description Market slug */
|
|
757
|
+
market_slug?: string | null;
|
|
758
|
+
/** @description Parent event slug */
|
|
759
|
+
event_slug?: string | null;
|
|
760
|
+
/** @description Unique trade identifier */
|
|
761
|
+
trade_id: string;
|
|
762
|
+
/** @description Transaction hash */
|
|
484
763
|
hash: string;
|
|
485
|
-
/**
|
|
764
|
+
/**
|
|
765
|
+
* Format: int64
|
|
766
|
+
* @description Block number
|
|
767
|
+
*/
|
|
486
768
|
block: number;
|
|
487
|
-
/**
|
|
769
|
+
/**
|
|
770
|
+
* Format: int64
|
|
771
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
772
|
+
*/
|
|
488
773
|
confirmed_at: number;
|
|
489
|
-
/**
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
774
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
775
|
+
amount_usd: number;
|
|
776
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
777
|
+
shares_amount: number;
|
|
778
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
779
|
+
fee: number;
|
|
780
|
+
/**
|
|
781
|
+
* @description Trade direction
|
|
782
|
+
* @enum {string}
|
|
783
|
+
*/
|
|
784
|
+
side: "Buy" | "Sell";
|
|
785
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
786
|
+
price: number;
|
|
787
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
788
|
+
probability?: number | null;
|
|
789
|
+
/**
|
|
790
|
+
* @description Exchange contract that processed the trade
|
|
791
|
+
* @enum {string}
|
|
792
|
+
*/
|
|
793
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
794
|
+
/**
|
|
795
|
+
* @description Trade type (webhook events only fire on order fills)
|
|
796
|
+
* @enum {string}
|
|
797
|
+
*/
|
|
798
|
+
trade_type: "OrderFilled" | "OrdersMatched";
|
|
799
|
+
};
|
|
800
|
+
/**
|
|
801
|
+
* @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
|
|
802
|
+
* and only includes fields relevant to each type.
|
|
803
|
+
*/
|
|
804
|
+
OracleEventTyped: (components["schemas"]["AssertionMadeEvent"] & {
|
|
503
805
|
/** @enum {string} */
|
|
504
|
-
|
|
505
|
-
} | {
|
|
506
|
-
id: string;
|
|
507
|
-
hash: string;
|
|
508
|
-
/** Format: int64 */
|
|
509
|
-
block: number;
|
|
510
|
-
/** Format: int64 */
|
|
511
|
-
confirmed_at: number;
|
|
512
|
-
/** Format: int64 */
|
|
513
|
-
log_index: number;
|
|
514
|
-
/** Format: int64 */
|
|
515
|
-
block_index: number;
|
|
516
|
-
oracle_contract: string;
|
|
517
|
-
condition_id: string;
|
|
518
|
-
assertion_id: string;
|
|
519
|
-
domain_id: string;
|
|
520
|
-
claim: string;
|
|
521
|
-
asserter: string;
|
|
522
|
-
callback_recipient: string;
|
|
523
|
-
escalation_manager: string;
|
|
524
|
-
caller: string;
|
|
525
|
-
/** Format: int64 */
|
|
526
|
-
expiration_time: number;
|
|
527
|
-
currency: string;
|
|
528
|
-
bond: string;
|
|
529
|
-
identifier: string;
|
|
530
|
-
proposed_outcome?: string;
|
|
531
|
-
question?: string;
|
|
532
|
-
image_url?: string;
|
|
533
|
-
slug?: string;
|
|
534
|
-
event_slug?: string;
|
|
806
|
+
event_type: "AssertionMade";
|
|
807
|
+
}) | (components["schemas"]["AssertionDisputedEvent"] & {
|
|
535
808
|
/** @enum {string} */
|
|
536
|
-
|
|
537
|
-
} | {
|
|
538
|
-
id: string;
|
|
539
|
-
hash: string;
|
|
540
|
-
/** Format: int64 */
|
|
541
|
-
block: number;
|
|
542
|
-
/** Format: int64 */
|
|
543
|
-
confirmed_at: number;
|
|
544
|
-
/** Format: int64 */
|
|
545
|
-
log_index: number;
|
|
546
|
-
/** Format: int64 */
|
|
547
|
-
block_index: number;
|
|
548
|
-
oracle_contract: string;
|
|
549
|
-
condition_id: string;
|
|
550
|
-
assertion_id: string;
|
|
551
|
-
caller: string;
|
|
552
|
-
disputer: string;
|
|
553
|
-
question?: string;
|
|
554
|
-
image_url?: string;
|
|
555
|
-
slug?: string;
|
|
556
|
-
event_slug?: string;
|
|
809
|
+
event_type: "AssertionDisputed";
|
|
810
|
+
}) | (components["schemas"]["AssertionSettledEvent"] & {
|
|
557
811
|
/** @enum {string} */
|
|
558
|
-
|
|
559
|
-
} | {
|
|
560
|
-
id: string;
|
|
561
|
-
hash: string;
|
|
562
|
-
/** Format: int64 */
|
|
563
|
-
block: number;
|
|
564
|
-
/** Format: int64 */
|
|
565
|
-
confirmed_at: number;
|
|
566
|
-
/** Format: int64 */
|
|
567
|
-
log_index: number;
|
|
568
|
-
/** Format: int64 */
|
|
569
|
-
block_index: number;
|
|
570
|
-
oracle_contract: string;
|
|
571
|
-
condition_id: string;
|
|
572
|
-
assertion_id: string;
|
|
573
|
-
bond_recipient: string;
|
|
574
|
-
disputed: boolean;
|
|
575
|
-
settlement_resolution: boolean;
|
|
576
|
-
settle_caller: string;
|
|
577
|
-
question?: string;
|
|
578
|
-
image_url?: string;
|
|
579
|
-
slug?: string;
|
|
580
|
-
event_slug?: string;
|
|
812
|
+
event_type: "AssertionSettled";
|
|
813
|
+
}) | (components["schemas"]["RequestPriceEvent"] & {
|
|
581
814
|
/** @enum {string} */
|
|
582
|
-
|
|
583
|
-
} | {
|
|
584
|
-
id: string;
|
|
585
|
-
hash: string;
|
|
586
|
-
/** Format: int64 */
|
|
587
|
-
block: number;
|
|
588
|
-
/** Format: int64 */
|
|
589
|
-
confirmed_at: number;
|
|
590
|
-
/** Format: int64 */
|
|
591
|
-
log_index: number;
|
|
592
|
-
/** Format: int64 */
|
|
593
|
-
block_index: number;
|
|
594
|
-
oracle_contract: string;
|
|
595
|
-
condition_id: string;
|
|
596
|
-
/** Format: int64 */
|
|
597
|
-
settled_price: number;
|
|
598
|
-
proposed_outcome?: string;
|
|
599
|
-
question?: string;
|
|
600
|
-
image_url?: string;
|
|
601
|
-
slug?: string;
|
|
602
|
-
event_slug?: string;
|
|
815
|
+
event_type: "RequestPrice";
|
|
816
|
+
}) | (components["schemas"]["ProposePriceEvent"] & {
|
|
603
817
|
/** @enum {string} */
|
|
604
|
-
|
|
605
|
-
} | {
|
|
606
|
-
id: string;
|
|
607
|
-
hash: string;
|
|
608
|
-
/** Format: int64 */
|
|
609
|
-
block: number;
|
|
610
|
-
/** Format: int64 */
|
|
611
|
-
confirmed_at: number;
|
|
612
|
-
/** Format: int64 */
|
|
613
|
-
log_index: number;
|
|
614
|
-
/** Format: int64 */
|
|
615
|
-
block_index: number;
|
|
616
|
-
oracle_contract: string;
|
|
617
|
-
condition_id: string;
|
|
618
|
-
oracle: string;
|
|
619
|
-
proposed_outcome?: string;
|
|
620
|
-
question?: string;
|
|
621
|
-
image_url?: string;
|
|
622
|
-
slug?: string;
|
|
623
|
-
event_slug?: string;
|
|
818
|
+
event_type: "ProposePrice";
|
|
819
|
+
}) | (components["schemas"]["DisputePriceEvent"] & {
|
|
624
820
|
/** @enum {string} */
|
|
625
|
-
|
|
626
|
-
} | {
|
|
627
|
-
id: string;
|
|
628
|
-
hash: string;
|
|
629
|
-
/** Format: int64 */
|
|
630
|
-
block: number;
|
|
631
|
-
/** Format: int64 */
|
|
632
|
-
confirmed_at: number;
|
|
633
|
-
/** Format: int64 */
|
|
634
|
-
log_index: number;
|
|
635
|
-
/** Format: int64 */
|
|
636
|
-
block_index: number;
|
|
637
|
-
oracle_contract: string;
|
|
638
|
-
condition_id: string;
|
|
639
|
-
question?: string;
|
|
640
|
-
image_url?: string;
|
|
641
|
-
slug?: string;
|
|
642
|
-
event_slug?: string;
|
|
821
|
+
event_type: "DisputePrice";
|
|
822
|
+
}) | (components["schemas"]["SettleEvent"] & {
|
|
643
823
|
/** @enum {string} */
|
|
644
|
-
|
|
645
|
-
} | {
|
|
646
|
-
id: string;
|
|
647
|
-
hash: string;
|
|
648
|
-
/** Format: int64 */
|
|
649
|
-
block: number;
|
|
650
|
-
/** Format: int64 */
|
|
651
|
-
confirmed_at: number;
|
|
652
|
-
/** Format: int64 */
|
|
653
|
-
log_index: number;
|
|
654
|
-
/** Format: int64 */
|
|
655
|
-
block_index: number;
|
|
656
|
-
oracle_contract: string;
|
|
657
|
-
condition_id: string;
|
|
658
|
-
proposed_outcome?: string;
|
|
659
|
-
question?: string;
|
|
660
|
-
image_url?: string;
|
|
661
|
-
slug?: string;
|
|
662
|
-
event_slug?: string;
|
|
824
|
+
event_type: "Settle";
|
|
825
|
+
}) | (components["schemas"]["QuestionResolvedEvent"] & {
|
|
663
826
|
/** @enum {string} */
|
|
664
|
-
|
|
665
|
-
} | {
|
|
666
|
-
id: string;
|
|
667
|
-
hash: string;
|
|
668
|
-
/** Format: int64 */
|
|
669
|
-
block: number;
|
|
670
|
-
/** Format: int64 */
|
|
671
|
-
confirmed_at: number;
|
|
672
|
-
/** Format: int64 */
|
|
673
|
-
log_index: number;
|
|
674
|
-
/** Format: int64 */
|
|
675
|
-
block_index: number;
|
|
676
|
-
oracle_contract: string;
|
|
677
|
-
condition_id: string;
|
|
678
|
-
proposed_outcome?: string;
|
|
679
|
-
question?: string;
|
|
680
|
-
image_url?: string;
|
|
681
|
-
slug?: string;
|
|
682
|
-
event_slug?: string;
|
|
827
|
+
event_type: "QuestionResolved";
|
|
828
|
+
}) | (components["schemas"]["QuestionEmergencyResolvedEvent"] & {
|
|
683
829
|
/** @enum {string} */
|
|
684
|
-
|
|
685
|
-
} | {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
830
|
+
event_type: "QuestionEmergencyResolved";
|
|
831
|
+
}) | (components["schemas"]["QuestionResetEvent"] & {
|
|
832
|
+
/** @enum {string} */
|
|
833
|
+
event_type: "QuestionReset";
|
|
834
|
+
}) | (components["schemas"]["QuestionInitializedEvent"] & {
|
|
835
|
+
/** @enum {string} */
|
|
836
|
+
event_type: "QuestionInitialized";
|
|
837
|
+
}) | (components["schemas"]["QuestionPausedEvent"] & {
|
|
838
|
+
/** @enum {string} */
|
|
839
|
+
event_type: "QuestionPaused";
|
|
840
|
+
}) | (components["schemas"]["QuestionUnpausedEvent"] & {
|
|
841
|
+
/** @enum {string} */
|
|
842
|
+
event_type: "QuestionUnpaused";
|
|
843
|
+
}) | (components["schemas"]["QuestionFlaggedEvent"] & {
|
|
844
|
+
/** @enum {string} */
|
|
845
|
+
event_type: "QuestionFlagged";
|
|
846
|
+
}) | (components["schemas"]["QuestionUnflaggedEvent"] & {
|
|
847
|
+
/** @enum {string} */
|
|
848
|
+
event_type: "QuestionUnflagged";
|
|
849
|
+
}) | (components["schemas"]["ConditionResolutionEvent"] & {
|
|
850
|
+
/** @enum {string} */
|
|
851
|
+
event_type: "ConditionResolution";
|
|
852
|
+
}) | (components["schemas"]["NegRiskOutcomeReportedEvent"] & {
|
|
853
|
+
/** @enum {string} */
|
|
854
|
+
event_type: "NegRiskOutcomeReported";
|
|
855
|
+
});
|
|
856
|
+
/**
|
|
857
|
+
* @description PnL timeframe enum for webhook filtering
|
|
858
|
+
* @enum {string}
|
|
859
|
+
*/
|
|
860
|
+
PnlTimeframeFilter: "1d" | "7d" | "30d" | "lifetime";
|
|
861
|
+
/**
|
|
862
|
+
* @description Polymarket webhook event types
|
|
863
|
+
* @enum {string}
|
|
864
|
+
*/
|
|
865
|
+
PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update" | "price_spike" | "oracle_events";
|
|
866
|
+
/**
|
|
867
|
+
* @description Polymarket-specific webhook filters
|
|
868
|
+
*
|
|
869
|
+
* Different webhook handlers use different subsets of these fields:
|
|
870
|
+
* - first_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, tags
|
|
871
|
+
* - new_market: wallet_addresses, condition_ids, event_slugs, min_usd_value, min_probability, max_probability
|
|
872
|
+
* - whale_trade: min_usd_value (required), min_probability, max_probability, condition_ids, event_slugs
|
|
873
|
+
* - global_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, min_win_rate, min_markets_traded
|
|
874
|
+
* - market_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_buy_usd, condition_ids, event_slugs
|
|
875
|
+
* - event_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, event_slugs, min_markets_traded
|
|
876
|
+
* - condition_metrics: condition_ids, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
|
|
877
|
+
* - event_metrics: event_slugs, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
|
|
878
|
+
* - position_metrics: position_ids, condition_ids, outcomes, min_volume_usd, max_volume_usd, min_buy_usd, min_sell_volume_usd, min_fees, min_txns, min_price_change_pct, min_probability_change_pct, timeframes
|
|
879
|
+
* - volume_milestone: condition_ids, timeframes, milestone_amounts
|
|
880
|
+
* - close_to_bond: min_probability (high zone threshold), max_probability (low zone threshold), condition_ids, position_ids, outcomes, position_outcome_indices, event_slugs, exclude_shortterm_markets
|
|
881
|
+
* - market_created: event_slugs, tags, exclude_shortterm_markets
|
|
882
|
+
* - probability_spike: condition_ids, event_slugs, outcomes, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
883
|
+
* - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
884
|
+
* - trader_new_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
|
|
885
|
+
* - trader_trade_event: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
|
|
886
|
+
* - trader_first_trade: wallet_addresses, min_usd_value, min_probability, max_probability, exclude_shortterm_markets
|
|
887
|
+
* - trader_new_market: wallet_addresses, condition_ids, event_slugs, min_usd_value, min_probability, max_probability, exclude_shortterm_markets
|
|
888
|
+
* - trader_whale_trade: min_usd_value (required), min_probability, max_probability, condition_ids, event_slugs, exclude_shortterm_markets
|
|
889
|
+
* - trader_event_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, event_slugs, min_markets_traded, exclude_shortterm_markets
|
|
890
|
+
* - trader_market_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_buy_usd, condition_ids, event_slugs, exclude_shortterm_markets
|
|
891
|
+
*
|
|
892
|
+
* Implements Hash + Eq manually (f64 fields use bit representation)
|
|
893
|
+
*/
|
|
894
|
+
PolymarketWebhookFilter: {
|
|
895
|
+
/** @description Filter by wallet addresses (for first_trade, normalized to lowercase). Max 500 entries. */
|
|
896
|
+
wallet_addresses?: string[];
|
|
897
|
+
/** @description Filter by trader addresses (for PnL webhooks, normalized to lowercase). Max 500 entries. */
|
|
898
|
+
traders?: string[];
|
|
899
|
+
/** @description Filter by market/condition IDs. Max 500 entries. */
|
|
900
|
+
condition_ids?: string[];
|
|
703
901
|
/**
|
|
704
|
-
*
|
|
705
|
-
* @
|
|
902
|
+
* Format: double
|
|
903
|
+
* @description Filter by minimum USD value (for trades)
|
|
706
904
|
*/
|
|
707
|
-
|
|
708
|
-
/** @
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
hash: string;
|
|
713
|
-
/** Format: int64 */
|
|
714
|
-
block: number;
|
|
715
|
-
/** Format: int64 */
|
|
716
|
-
confirmed_at: number;
|
|
717
|
-
/** Format: int64 */
|
|
718
|
-
log_index: number;
|
|
719
|
-
/** Format: int64 */
|
|
720
|
-
block_index: number;
|
|
721
|
-
trader: {
|
|
722
|
-
address: string;
|
|
723
|
-
name: string | null;
|
|
724
|
-
pseudonym: string | null;
|
|
725
|
-
profile_image: string | null;
|
|
726
|
-
x_username: string | null;
|
|
727
|
-
verified_badge: boolean;
|
|
728
|
-
};
|
|
729
|
-
operator: string;
|
|
730
|
-
approved: boolean;
|
|
731
|
-
question?: string;
|
|
732
|
-
image_url?: string;
|
|
733
|
-
slug?: string;
|
|
734
|
-
event_slug?: string;
|
|
905
|
+
min_usd_value?: number | null;
|
|
906
|
+
/** @description Filter by event slugs. Max 500 entries. */
|
|
907
|
+
event_slugs?: string[];
|
|
908
|
+
/** @description Filter by tags. Max 500 entries. */
|
|
909
|
+
tags?: string[];
|
|
735
910
|
/**
|
|
736
|
-
*
|
|
737
|
-
* @
|
|
911
|
+
* Format: double
|
|
912
|
+
* @description Minimum probability threshold (0.0 - 1.0)
|
|
738
913
|
*/
|
|
739
|
-
|
|
740
|
-
/** @enum {string} */
|
|
741
|
-
trade_type: "Approval";
|
|
742
|
-
};
|
|
743
|
-
/** @description Payload delivered when a trader's global PnL (across all markets) crosses a configured threshold */
|
|
744
|
-
GlobalPnlPayload: {
|
|
745
|
-
/** @description Trader wallet address (lowercase) */
|
|
746
|
-
trader?: string | null;
|
|
914
|
+
min_probability?: number | null;
|
|
747
915
|
/**
|
|
748
|
-
*
|
|
749
|
-
* @
|
|
916
|
+
* Format: double
|
|
917
|
+
* @description Maximum probability threshold (0.0 - 1.0)
|
|
750
918
|
*/
|
|
751
|
-
|
|
752
|
-
/** @description Realized PnL in USD (positive = profit, negative = loss) */
|
|
753
|
-
realized_pnl_usd?: number | null;
|
|
919
|
+
max_probability?: number | null;
|
|
754
920
|
/**
|
|
755
|
-
* Format:
|
|
756
|
-
* @description
|
|
921
|
+
* Format: double
|
|
922
|
+
* @description Minimum realized PnL (USD) - for PnL webhooks
|
|
757
923
|
*/
|
|
758
|
-
|
|
924
|
+
min_realized_pnl_usd?: number | null;
|
|
759
925
|
/**
|
|
760
|
-
* Format:
|
|
761
|
-
* @description
|
|
926
|
+
* Format: double
|
|
927
|
+
* @description Maximum realized PnL (USD) - for PnL webhooks
|
|
762
928
|
*/
|
|
763
|
-
|
|
929
|
+
max_realized_pnl_usd?: number | null;
|
|
764
930
|
/**
|
|
765
|
-
* Format:
|
|
766
|
-
* @description
|
|
931
|
+
* Format: double
|
|
932
|
+
* @description Minimum volume (USD) - for PnL and metrics webhooks
|
|
767
933
|
*/
|
|
768
|
-
|
|
934
|
+
min_volume_usd?: number | null;
|
|
769
935
|
/**
|
|
770
|
-
* Format:
|
|
771
|
-
* @description
|
|
936
|
+
* Format: double
|
|
937
|
+
* @description Maximum volume (USD) - for metrics webhooks
|
|
772
938
|
*/
|
|
773
|
-
|
|
939
|
+
max_volume_usd?: number | null;
|
|
774
940
|
/**
|
|
775
|
-
* Format:
|
|
776
|
-
* @description
|
|
941
|
+
* Format: double
|
|
942
|
+
* @description Minimum buy volume (USD) - for PnL and metrics webhooks
|
|
777
943
|
*/
|
|
778
|
-
|
|
944
|
+
min_buy_usd?: number | null;
|
|
779
945
|
/**
|
|
780
|
-
* Format:
|
|
781
|
-
* @description
|
|
946
|
+
* Format: double
|
|
947
|
+
* @description Minimum win rate (0.0 - 100.0) - for global PnL webhooks
|
|
782
948
|
*/
|
|
783
|
-
|
|
784
|
-
/** @description Total USD volume (buys + sells + redemptions + merges) */
|
|
785
|
-
total_volume_usd?: number | null;
|
|
786
|
-
/** @description Total buy volume in USD */
|
|
787
|
-
buy_volume_usd?: number | null;
|
|
788
|
-
/** @description Total sell volume in USD */
|
|
789
|
-
sell_volume_usd?: number | null;
|
|
790
|
-
/** @description Total redemption volume in USD */
|
|
791
|
-
redemption_volume_usd?: number | null;
|
|
792
|
-
/** @description Total merge volume in USD */
|
|
793
|
-
merge_volume_usd?: number | null;
|
|
949
|
+
min_win_rate?: number | null;
|
|
794
950
|
/**
|
|
795
951
|
* Format: int64
|
|
796
|
-
* @description
|
|
952
|
+
* @description Minimum markets traded - for PnL webhooks
|
|
797
953
|
*/
|
|
798
|
-
|
|
954
|
+
min_markets_traded?: number | null;
|
|
799
955
|
/**
|
|
800
|
-
* Format:
|
|
801
|
-
* @description
|
|
956
|
+
* Format: double
|
|
957
|
+
* @description Minimum net shares - for position PnL webhooks
|
|
802
958
|
*/
|
|
803
|
-
|
|
804
|
-
/** @description Market win rate as a percentage (0.0–100.0) */
|
|
805
|
-
market_win_rate_pct?: number | null;
|
|
806
|
-
/** @description Average PnL per market in USD */
|
|
807
|
-
avg_pnl_per_market?: number | null;
|
|
808
|
-
/** @description Average PnL per trade in USD */
|
|
809
|
-
avg_pnl_per_trade?: number | null;
|
|
810
|
-
/** @description Average hold time across all positions (seconds) */
|
|
811
|
-
avg_hold_time_seconds?: number | null;
|
|
812
|
-
/** @description Total fees paid in USD */
|
|
813
|
-
total_fees?: number | null;
|
|
814
|
-
/** @description Best single-trade PnL in USD */
|
|
815
|
-
best_trade_pnl_usd?: number | null;
|
|
816
|
-
/** @description Condition ID of the best trade */
|
|
817
|
-
best_trade_condition_id?: string | null;
|
|
959
|
+
min_net_shares?: number | null;
|
|
818
960
|
/**
|
|
819
|
-
* Format:
|
|
820
|
-
* @description
|
|
961
|
+
* Format: double
|
|
962
|
+
* @description Maximum net shares - for position PnL webhooks
|
|
821
963
|
*/
|
|
822
|
-
|
|
964
|
+
max_net_shares?: number | null;
|
|
965
|
+
/** @description Filter by position IDs - for position PnL webhooks. Max 500 entries. */
|
|
966
|
+
position_ids?: string[];
|
|
967
|
+
/** @description Filter by outcomes (e.g., "Yes", "No") - for position PnL webhooks. Max 500 entries. */
|
|
968
|
+
outcomes?: string[];
|
|
823
969
|
/**
|
|
824
|
-
*
|
|
825
|
-
*
|
|
970
|
+
* @description Filter by position outcome index — for close_to_bond. Position 0 usually represents Yes/Up, 1 = No.
|
|
971
|
+
* When non-empty, only trades whose outcome_index is in this list will match. Max 500 entries.
|
|
826
972
|
*/
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
MarketPnlPayload: {
|
|
831
|
-
/** @description Trader wallet address (lowercase) */
|
|
832
|
-
trader?: string | null;
|
|
833
|
-
/** @description Market condition ID */
|
|
834
|
-
condition_id?: string | null;
|
|
835
|
-
/** @description Parent event slug */
|
|
836
|
-
event_slug?: string | null;
|
|
973
|
+
position_outcome_indices?: number[];
|
|
974
|
+
/** @description Filter by trade type (e.g. "OrderFilled", "Redemption", "Merge", "Split"). Empty = default behavior per handler. */
|
|
975
|
+
trade_types?: string[];
|
|
837
976
|
/**
|
|
838
|
-
*
|
|
839
|
-
* @
|
|
977
|
+
* Format: double
|
|
978
|
+
* @description Minimum fees - for metrics webhooks
|
|
840
979
|
*/
|
|
841
|
-
|
|
980
|
+
min_fees?: number | null;
|
|
842
981
|
/**
|
|
843
982
|
* Format: int64
|
|
844
|
-
* @description
|
|
983
|
+
* @description Minimum transaction count - for metrics webhooks
|
|
845
984
|
*/
|
|
846
|
-
|
|
847
|
-
/** Format: int64 */
|
|
848
|
-
total_buys?: number | null;
|
|
849
|
-
/** Format: int64 */
|
|
850
|
-
total_sells?: number | null;
|
|
851
|
-
/** Format: int64 */
|
|
852
|
-
total_redemptions?: number | null;
|
|
853
|
-
/** Format: int64 */
|
|
854
|
-
total_merges?: number | null;
|
|
855
|
-
/** @description Total buy volume in USD */
|
|
856
|
-
buy_usd?: number | null;
|
|
857
|
-
/** @description Total sell volume in USD */
|
|
858
|
-
sell_usd?: number | null;
|
|
859
|
-
/** @description Total redemption volume in USD */
|
|
860
|
-
redemption_usd?: number | null;
|
|
861
|
-
/** @description Total merge volume in USD */
|
|
862
|
-
merge_usd?: number | null;
|
|
863
|
-
/** @description Realized PnL in USD for this market */
|
|
864
|
-
realized_pnl_usd?: number | null;
|
|
985
|
+
min_txns?: number | null;
|
|
865
986
|
/**
|
|
866
987
|
* Format: int64
|
|
867
|
-
* @description
|
|
988
|
+
* @description Minimum unique traders - for metrics webhooks
|
|
868
989
|
*/
|
|
869
|
-
|
|
870
|
-
/** @description Total fees paid in USD for this market */
|
|
871
|
-
total_fees?: number | null;
|
|
990
|
+
min_unique_traders?: number | null;
|
|
872
991
|
/**
|
|
873
|
-
* Format:
|
|
874
|
-
* @description
|
|
992
|
+
* Format: double
|
|
993
|
+
* @description Minimum sell volume (USD) - for position metrics webhooks
|
|
875
994
|
*/
|
|
876
|
-
|
|
995
|
+
min_sell_volume_usd?: number | null;
|
|
877
996
|
/**
|
|
878
|
-
* Format:
|
|
879
|
-
* @description
|
|
997
|
+
* Format: double
|
|
998
|
+
* @description Minimum price change percentage - for position metrics webhooks
|
|
880
999
|
*/
|
|
881
|
-
|
|
882
|
-
};
|
|
883
|
-
/** @description Payload delivered when a trader's per-event PnL crosses a configured threshold */
|
|
884
|
-
EventPnlPayload: {
|
|
885
|
-
/** @description Trader wallet address (lowercase) */
|
|
886
|
-
trader?: string | null;
|
|
887
|
-
/** @description Event slug */
|
|
888
|
-
event_slug?: string | null;
|
|
889
|
-
/**
|
|
890
|
-
* @description PnL aggregation window
|
|
891
|
-
* @enum {string}
|
|
892
|
-
*/
|
|
893
|
-
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
894
|
-
/**
|
|
895
|
-
* Format: int64
|
|
896
|
-
* @description Number of distinct markets traded in this event
|
|
897
|
-
*/
|
|
898
|
-
markets_traded?: number | null;
|
|
899
|
-
/** Format: int64 */
|
|
900
|
-
outcomes_traded?: number | null;
|
|
901
|
-
/** Format: int64 */
|
|
902
|
-
total_buys?: number | null;
|
|
903
|
-
/** Format: int64 */
|
|
904
|
-
total_sells?: number | null;
|
|
905
|
-
/** Format: int64 */
|
|
906
|
-
total_redemptions?: number | null;
|
|
907
|
-
/** Format: int64 */
|
|
908
|
-
total_merges?: number | null;
|
|
909
|
-
/** @description Total volume in USD */
|
|
910
|
-
total_volume_usd?: number | null;
|
|
911
|
-
buy_usd?: number | null;
|
|
912
|
-
sell_usd?: number | null;
|
|
913
|
-
redemption_usd?: number | null;
|
|
914
|
-
merge_usd?: number | null;
|
|
915
|
-
/** @description Realized PnL in USD for this event */
|
|
916
|
-
realized_pnl_usd?: number | null;
|
|
917
|
-
/** Format: int64 */
|
|
918
|
-
winning_markets?: number | null;
|
|
919
|
-
/** Format: int64 */
|
|
920
|
-
losing_markets?: number | null;
|
|
921
|
-
total_fees?: number | null;
|
|
922
|
-
/**
|
|
923
|
-
* Format: int64
|
|
924
|
-
* @description Unix seconds
|
|
925
|
-
*/
|
|
926
|
-
first_trade_at?: number | null;
|
|
927
|
-
/**
|
|
928
|
-
* Format: int64
|
|
929
|
-
* @description Unix seconds
|
|
930
|
-
*/
|
|
931
|
-
last_trade_at?: number | null;
|
|
932
|
-
};
|
|
933
|
-
/** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
|
|
934
|
-
ConditionMetricsPayload: {
|
|
935
|
-
/** @description Market condition ID */
|
|
936
|
-
condition_id?: string | null;
|
|
937
|
-
/**
|
|
938
|
-
* @description Aggregation window
|
|
939
|
-
* @enum {string|null}
|
|
940
|
-
*/
|
|
941
|
-
timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
|
|
942
|
-
/** @description Total trading volume in USD for this timeframe */
|
|
943
|
-
volume_usd?: number | null;
|
|
944
|
-
/** @description Total fees collected in USD */
|
|
945
|
-
fees?: number | null;
|
|
1000
|
+
min_price_change_pct?: number | null;
|
|
946
1001
|
/**
|
|
947
|
-
* Format:
|
|
948
|
-
* @description
|
|
1002
|
+
* Format: double
|
|
1003
|
+
* @description Minimum probability change percentage - for position metrics webhooks
|
|
949
1004
|
*/
|
|
950
|
-
|
|
1005
|
+
min_probability_change_pct?: number | null;
|
|
1006
|
+
/** @description Timeframes to track - for metrics webhooks (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d). */
|
|
1007
|
+
timeframes?: components["schemas"]["WebhookTimeframe"][];
|
|
1008
|
+
/** @description Milestone amounts to track - for volume milestone webhooks (e.g., 10000, 100000, 1000000). Max 500 entries. */
|
|
1009
|
+
milestone_amounts?: number[];
|
|
951
1010
|
/**
|
|
952
|
-
* Format:
|
|
953
|
-
* @description
|
|
1011
|
+
* Format: double
|
|
1012
|
+
* @description Spike ratio multiplier (must be > 1.0) - for volume spike webhooks
|
|
1013
|
+
* Example: 2.0 for 2x, 5.0 for 5x, 10.0 for 10x
|
|
954
1014
|
*/
|
|
955
|
-
|
|
956
|
-
};
|
|
957
|
-
/** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
|
|
958
|
-
EventMetricsPayload: {
|
|
959
|
-
/** @description Event slug */
|
|
960
|
-
event_slug?: string | null;
|
|
1015
|
+
spike_ratio?: number | null;
|
|
961
1016
|
/**
|
|
962
|
-
* @description
|
|
963
|
-
*
|
|
1017
|
+
* @description When `true`, exclude all short-term "updown" markets (event slugs containing "updown").
|
|
1018
|
+
* These are short-duration crypto price markets (e.g., "btc-updown-5m-…", "eth-updown-1h-…").
|
|
1019
|
+
* Supported by: close_to_bond, market_created, price_spike, probability_spike,
|
|
1020
|
+
* trader_first_trade, trader_new_market, trader_whale_trade, trader_event_pnl, trader_market_pnl,
|
|
1021
|
+
* event_metrics, event_volume_milestone, event_volume_spike.
|
|
964
1022
|
*/
|
|
965
|
-
|
|
966
|
-
/** @description Total aggregated volume across all markets in the event (USD) */
|
|
967
|
-
volume_usd?: number | null;
|
|
968
|
-
/** @description Total fees collected in USD */
|
|
969
|
-
fees?: number | null;
|
|
1023
|
+
exclude_shortterm_markets?: boolean;
|
|
970
1024
|
/**
|
|
971
|
-
*
|
|
972
|
-
*
|
|
1025
|
+
* @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update` webhooks.
|
|
1026
|
+
* Valid values: "BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", "HYPE". Empty = all assets.
|
|
973
1027
|
*/
|
|
974
|
-
|
|
1028
|
+
asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
|
|
1029
|
+
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
975
1030
|
/**
|
|
976
1031
|
* Format: int64
|
|
977
|
-
* @description
|
|
978
|
-
|
|
979
|
-
|
|
1032
|
+
* @description Observation window in seconds for `probability_spike` and `price_spike`.
|
|
1033
|
+
*
|
|
1034
|
+
* When set, the first trade seen for a position opens a window of this duration.
|
|
1035
|
+
* The opening price becomes the baseline, and every subsequent trade within the
|
|
1036
|
+
* window is compared to it. When the window expires the next trade starts a new
|
|
1037
|
+
* window. If omitted, the baseline accumulates indefinitely until a spike fires.
|
|
1038
|
+
*
|
|
1039
|
+
* Example: `60` to detect spikes that happen within 60 seconds.
|
|
1040
|
+
*/
|
|
1041
|
+
window_secs?: number | null;
|
|
1042
|
+
/**
|
|
1043
|
+
* @description Filter for `oracle_events` by event name (case-insensitive).
|
|
1044
|
+
* Valid values: `AssertionMade`, `AssertionDisputed`, `AssertionSettled`,
|
|
1045
|
+
* `RequestPrice`, `ProposePrice`, `DisputePrice`, `Settle`,
|
|
1046
|
+
* `QuestionResolved`, `QuestionEmergencyResolved`, `QuestionReset`,
|
|
1047
|
+
* `QuestionInitialized`, `QuestionPaused`, `QuestionUnpaused`,
|
|
1048
|
+
* `QuestionFlagged`, `QuestionUnflagged`, `ConditionResolution`,
|
|
1049
|
+
* `NegRiskOutcomeReported`. Empty = all types.
|
|
1050
|
+
*/
|
|
1051
|
+
oracle_event_types?: string[];
|
|
980
1052
|
};
|
|
981
1053
|
/** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
|
|
982
1054
|
PositionMetricsPayload: {
|
|
@@ -1019,48 +1091,6 @@ export interface components {
|
|
|
1019
1091
|
probability_high?: number | null;
|
|
1020
1092
|
probability_low?: number | null;
|
|
1021
1093
|
};
|
|
1022
|
-
/** @description Payload delivered when a market's trading volume crosses a USD milestone in the specified timeframe */
|
|
1023
|
-
VolumeMilestonePayload: {
|
|
1024
|
-
/** @description Market condition ID */
|
|
1025
|
-
condition_id: string;
|
|
1026
|
-
/**
|
|
1027
|
-
* @description Aggregation window that crossed the milestone
|
|
1028
|
-
* @enum {string}
|
|
1029
|
-
*/
|
|
1030
|
-
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
1031
|
-
/** @description The USD milestone amount that was crossed */
|
|
1032
|
-
milestone_usd: number;
|
|
1033
|
-
/** @description Current volume at time of trigger (USD) */
|
|
1034
|
-
current_volume_usd: number;
|
|
1035
|
-
/** @description Total fees in USD for this timeframe */
|
|
1036
|
-
fees: number;
|
|
1037
|
-
/**
|
|
1038
|
-
* Format: int64
|
|
1039
|
-
* @description Total transactions in this timeframe
|
|
1040
|
-
*/
|
|
1041
|
-
txns: number;
|
|
1042
|
-
};
|
|
1043
|
-
/** @description Payload delivered when an event's aggregated trading volume crosses a USD milestone */
|
|
1044
|
-
EventVolumeMilestonePayload: {
|
|
1045
|
-
/** @description Event slug */
|
|
1046
|
-
event_slug: string;
|
|
1047
|
-
/**
|
|
1048
|
-
* @description Aggregation window
|
|
1049
|
-
* @enum {string}
|
|
1050
|
-
*/
|
|
1051
|
-
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
1052
|
-
/** @description The USD milestone amount that was crossed */
|
|
1053
|
-
milestone_usd: number;
|
|
1054
|
-
/** @description Current aggregated event volume at time of trigger (USD) */
|
|
1055
|
-
current_volume_usd: number;
|
|
1056
|
-
/** @description Total fees in USD for this timeframe */
|
|
1057
|
-
fees: number;
|
|
1058
|
-
/**
|
|
1059
|
-
* Format: int64
|
|
1060
|
-
* @description Total transactions in this timeframe
|
|
1061
|
-
*/
|
|
1062
|
-
txns: number;
|
|
1063
|
-
};
|
|
1064
1094
|
/** @description Payload delivered when a position's trading volume crosses a USD milestone */
|
|
1065
1095
|
PositionVolumeMilestonePayload: {
|
|
1066
1096
|
/** @description Parent market condition ID */
|
|
@@ -1096,31 +1126,32 @@ export interface components {
|
|
|
1096
1126
|
/** Format: int64 */
|
|
1097
1127
|
sells: number;
|
|
1098
1128
|
};
|
|
1099
|
-
|
|
1100
|
-
|
|
1129
|
+
/** @description Payload delivered when a position's volume has spiked since the last snapshot */
|
|
1130
|
+
PositionVolumeSpikePayload: {
|
|
1131
|
+
/** @description ERC-1155 outcome token ID */
|
|
1101
1132
|
position_id: string;
|
|
1102
|
-
/** @description
|
|
1103
|
-
condition_id
|
|
1104
|
-
/** @description Event slug */
|
|
1105
|
-
event_slug?: string | null;
|
|
1133
|
+
/** @description Parent market condition ID */
|
|
1134
|
+
condition_id: string;
|
|
1106
1135
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1107
1136
|
outcome?: string | null;
|
|
1108
|
-
/**
|
|
1109
|
-
* Format: int16
|
|
1110
|
-
* @description Outcome index
|
|
1111
|
-
*/
|
|
1137
|
+
/** Format: int16 */
|
|
1112
1138
|
outcome_index?: number | null;
|
|
1113
|
-
/** @description Probability at the start of the observation window (baseline snapshot, 0.0–1.0) */
|
|
1114
|
-
previous_probability: number;
|
|
1115
|
-
/** @description Current probability that triggered the spike (0.0–1.0) */
|
|
1116
|
-
current_probability: number;
|
|
1117
1139
|
/**
|
|
1118
|
-
* @description
|
|
1140
|
+
* @description Aggregation window
|
|
1119
1141
|
* @enum {string}
|
|
1120
1142
|
*/
|
|
1121
|
-
|
|
1122
|
-
/** @description
|
|
1143
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
1144
|
+
/** @description Current position volume at the time of the spike (USD) */
|
|
1145
|
+
current_volume_usd: number;
|
|
1146
|
+
/** @description Volume at the snapshot baseline (USD) */
|
|
1147
|
+
snapshot_volume_usd: number;
|
|
1148
|
+
/** @description New volume since the snapshot that triggered this notification (USD) */
|
|
1149
|
+
delta_volume_usd: number;
|
|
1150
|
+
/** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
|
|
1123
1151
|
spike_pct: number;
|
|
1152
|
+
/** Format: int64 */
|
|
1153
|
+
txns: number;
|
|
1154
|
+
fees: number;
|
|
1124
1155
|
};
|
|
1125
1156
|
PriceSpikePayload: {
|
|
1126
1157
|
/** @description Outcome token ID */
|
|
@@ -1148,211 +1179,1143 @@ export interface components {
|
|
|
1148
1179
|
/** @description Percentage move that triggered this notification. Positive = up, negative = down. */
|
|
1149
1180
|
spike_pct: number;
|
|
1150
1181
|
};
|
|
1151
|
-
|
|
1152
|
-
|
|
1182
|
+
ProbabilitySpikePayload: {
|
|
1183
|
+
/** @description Outcome token ID */
|
|
1184
|
+
position_id: string;
|
|
1153
1185
|
/** @description Market condition ID */
|
|
1154
|
-
condition_id
|
|
1155
|
-
/**
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
1160
|
-
/** @description Current volume at the time of the spike (USD) */
|
|
1161
|
-
current_volume_usd: number;
|
|
1162
|
-
/** @description Volume at the snapshot baseline (USD) */
|
|
1163
|
-
snapshot_volume_usd: number;
|
|
1164
|
-
/** @description New volume since the snapshot that triggered this notification (USD) */
|
|
1165
|
-
delta_volume_usd: number;
|
|
1166
|
-
/** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
|
|
1167
|
-
spike_pct: number;
|
|
1186
|
+
condition_id?: string | null;
|
|
1187
|
+
/** @description Event slug */
|
|
1188
|
+
event_slug?: string | null;
|
|
1189
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1190
|
+
outcome?: string | null;
|
|
1168
1191
|
/**
|
|
1169
|
-
* Format:
|
|
1170
|
-
* @description
|
|
1192
|
+
* Format: int16
|
|
1193
|
+
* @description Outcome index
|
|
1171
1194
|
*/
|
|
1172
|
-
|
|
1173
|
-
/** @description
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
EventVolumeSpikePayload: {
|
|
1178
|
-
/** @description Event slug */
|
|
1179
|
-
event_slug: string;
|
|
1195
|
+
outcome_index?: number | null;
|
|
1196
|
+
/** @description Probability at the start of the observation window (baseline snapshot, 0.0–1.0) */
|
|
1197
|
+
previous_probability: number;
|
|
1198
|
+
/** @description Current probability that triggered the spike (0.0–1.0) */
|
|
1199
|
+
current_probability: number;
|
|
1180
1200
|
/**
|
|
1181
|
-
* @description
|
|
1201
|
+
* @description `"up"` = probability rising, `"down"` = probability falling
|
|
1182
1202
|
* @enum {string}
|
|
1183
1203
|
*/
|
|
1184
|
-
|
|
1185
|
-
/** @description
|
|
1186
|
-
current_volume_usd: number;
|
|
1187
|
-
/** @description Volume at the snapshot baseline (USD) */
|
|
1188
|
-
snapshot_volume_usd: number;
|
|
1189
|
-
/** @description New volume since the snapshot that triggered this notification (USD) */
|
|
1190
|
-
delta_volume_usd: number;
|
|
1191
|
-
/** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
|
|
1204
|
+
spike_direction: "up" | "down";
|
|
1205
|
+
/** @description Percentage move that triggered this notification. Positive = up, negative = down. */
|
|
1192
1206
|
spike_pct: number;
|
|
1207
|
+
};
|
|
1208
|
+
/** @description V2 UMA OOv2: a price was proposed (resolution proposal). */
|
|
1209
|
+
ProposePriceEvent: {
|
|
1210
|
+
id: string;
|
|
1211
|
+
hash: string;
|
|
1193
1212
|
/** Format: int64 */
|
|
1194
|
-
|
|
1195
|
-
|
|
1213
|
+
block?: number | null;
|
|
1214
|
+
/** Format: int64 */
|
|
1215
|
+
confirmed_at?: number | null;
|
|
1216
|
+
/** Format: int64 */
|
|
1217
|
+
received_at?: number | null;
|
|
1218
|
+
/** Format: int64 */
|
|
1219
|
+
log_index?: number | null;
|
|
1220
|
+
/** Format: int64 */
|
|
1221
|
+
block_index?: number | null;
|
|
1222
|
+
oracle_contract: string;
|
|
1223
|
+
requester: string;
|
|
1224
|
+
proposer: string;
|
|
1225
|
+
identifier: string;
|
|
1226
|
+
timestamp: string;
|
|
1227
|
+
ancillary_data: string;
|
|
1228
|
+
/** Format: int64 */
|
|
1229
|
+
proposed_price: number;
|
|
1230
|
+
expiration_timestamp: string;
|
|
1231
|
+
currency: string;
|
|
1232
|
+
condition_id?: string | null;
|
|
1233
|
+
proposed_outcome?: string | null;
|
|
1234
|
+
question?: string | null;
|
|
1235
|
+
image_url?: string | null;
|
|
1236
|
+
slug?: string | null;
|
|
1237
|
+
event_slug?: string | null;
|
|
1196
1238
|
};
|
|
1197
|
-
/** @description
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
/**
|
|
1239
|
+
/** @description UMA CTF Adapter: admin emergency resolution. */
|
|
1240
|
+
QuestionEmergencyResolvedEvent: {
|
|
1241
|
+
id: string;
|
|
1242
|
+
hash: string;
|
|
1243
|
+
/** Format: int64 */
|
|
1244
|
+
block?: number | null;
|
|
1245
|
+
/** Format: int64 */
|
|
1246
|
+
confirmed_at?: number | null;
|
|
1247
|
+
/** Format: int64 */
|
|
1248
|
+
received_at?: number | null;
|
|
1249
|
+
/** Format: int64 */
|
|
1250
|
+
log_index?: number | null;
|
|
1251
|
+
/** Format: int64 */
|
|
1252
|
+
block_index?: number | null;
|
|
1253
|
+
oracle_contract: string;
|
|
1202
1254
|
condition_id: string;
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1255
|
+
proposed_outcome?: string | null;
|
|
1256
|
+
question?: string | null;
|
|
1257
|
+
image_url?: string | null;
|
|
1258
|
+
slug?: string | null;
|
|
1259
|
+
event_slug?: string | null;
|
|
1260
|
+
};
|
|
1261
|
+
/** @description UMA CTF Adapter: market flagged for emergency resolution. */
|
|
1262
|
+
QuestionFlaggedEvent: {
|
|
1263
|
+
id: string;
|
|
1264
|
+
hash: string;
|
|
1265
|
+
/** Format: int64 */
|
|
1266
|
+
block?: number | null;
|
|
1267
|
+
/** Format: int64 */
|
|
1268
|
+
confirmed_at?: number | null;
|
|
1269
|
+
/** Format: int64 */
|
|
1270
|
+
received_at?: number | null;
|
|
1271
|
+
/** Format: int64 */
|
|
1272
|
+
log_index?: number | null;
|
|
1273
|
+
/** Format: int64 */
|
|
1274
|
+
block_index?: number | null;
|
|
1275
|
+
oracle_contract: string;
|
|
1276
|
+
condition_id: string;
|
|
1277
|
+
question?: string | null;
|
|
1278
|
+
image_url?: string | null;
|
|
1279
|
+
slug?: string | null;
|
|
1280
|
+
event_slug?: string | null;
|
|
1281
|
+
};
|
|
1282
|
+
/** @description UMA CTF Adapter: questionID first initialized on-chain. */
|
|
1283
|
+
QuestionInitializedEvent: {
|
|
1284
|
+
id: string;
|
|
1285
|
+
hash: string;
|
|
1286
|
+
/** Format: int64 */
|
|
1287
|
+
block?: number | null;
|
|
1288
|
+
/** Format: int64 */
|
|
1289
|
+
confirmed_at?: number | null;
|
|
1290
|
+
/** Format: int64 */
|
|
1291
|
+
received_at?: number | null;
|
|
1292
|
+
/** Format: int64 */
|
|
1293
|
+
log_index?: number | null;
|
|
1294
|
+
/** Format: int64 */
|
|
1295
|
+
block_index?: number | null;
|
|
1296
|
+
oracle_contract: string;
|
|
1297
|
+
condition_id: string;
|
|
1298
|
+
creator: string;
|
|
1299
|
+
reward_token: string;
|
|
1300
|
+
reward: string;
|
|
1301
|
+
proposal_bond: string;
|
|
1302
|
+
question?: string | null;
|
|
1303
|
+
image_url?: string | null;
|
|
1304
|
+
slug?: string | null;
|
|
1305
|
+
event_slug?: string | null;
|
|
1306
|
+
};
|
|
1307
|
+
/** @description UMA CTF Adapter: market paused by admin. */
|
|
1308
|
+
QuestionPausedEvent: {
|
|
1309
|
+
id: string;
|
|
1310
|
+
hash: string;
|
|
1311
|
+
/** Format: int64 */
|
|
1312
|
+
block?: number | null;
|
|
1313
|
+
/** Format: int64 */
|
|
1314
|
+
confirmed_at?: number | null;
|
|
1315
|
+
/** Format: int64 */
|
|
1316
|
+
received_at?: number | null;
|
|
1317
|
+
/** Format: int64 */
|
|
1318
|
+
log_index?: number | null;
|
|
1319
|
+
/** Format: int64 */
|
|
1320
|
+
block_index?: number | null;
|
|
1321
|
+
oracle_contract: string;
|
|
1322
|
+
condition_id: string;
|
|
1323
|
+
question?: string | null;
|
|
1324
|
+
image_url?: string | null;
|
|
1325
|
+
slug?: string | null;
|
|
1326
|
+
event_slug?: string | null;
|
|
1327
|
+
};
|
|
1328
|
+
/** @description UMA CTF Adapter: dispute succeeded, market returns to active. */
|
|
1329
|
+
QuestionResetEvent: {
|
|
1330
|
+
id: string;
|
|
1331
|
+
hash: string;
|
|
1332
|
+
/** Format: int64 */
|
|
1333
|
+
block?: number | null;
|
|
1334
|
+
/** Format: int64 */
|
|
1335
|
+
confirmed_at?: number | null;
|
|
1336
|
+
/** Format: int64 */
|
|
1337
|
+
received_at?: number | null;
|
|
1338
|
+
/** Format: int64 */
|
|
1339
|
+
log_index?: number | null;
|
|
1340
|
+
/** Format: int64 */
|
|
1341
|
+
block_index?: number | null;
|
|
1342
|
+
oracle_contract: string;
|
|
1343
|
+
condition_id: string;
|
|
1344
|
+
question?: string | null;
|
|
1345
|
+
image_url?: string | null;
|
|
1346
|
+
slug?: string | null;
|
|
1347
|
+
event_slug?: string | null;
|
|
1348
|
+
};
|
|
1349
|
+
/** @description UMA CTF Adapter: market resolved with definitive outcome. */
|
|
1350
|
+
QuestionResolvedEvent: {
|
|
1351
|
+
id: string;
|
|
1352
|
+
hash: string;
|
|
1353
|
+
/** Format: int64 */
|
|
1354
|
+
block?: number | null;
|
|
1355
|
+
/** Format: int64 */
|
|
1356
|
+
confirmed_at?: number | null;
|
|
1357
|
+
/** Format: int64 */
|
|
1358
|
+
received_at?: number | null;
|
|
1359
|
+
/** Format: int64 */
|
|
1360
|
+
log_index?: number | null;
|
|
1361
|
+
/** Format: int64 */
|
|
1362
|
+
block_index?: number | null;
|
|
1363
|
+
oracle_contract: string;
|
|
1364
|
+
condition_id: string;
|
|
1365
|
+
/** Format: int64 */
|
|
1366
|
+
settled_price: number;
|
|
1367
|
+
proposed_outcome?: string | null;
|
|
1368
|
+
question?: string | null;
|
|
1369
|
+
image_url?: string | null;
|
|
1370
|
+
slug?: string | null;
|
|
1371
|
+
event_slug?: string | null;
|
|
1372
|
+
};
|
|
1373
|
+
/** @description UMA CTF Adapter: flag removed. */
|
|
1374
|
+
QuestionUnflaggedEvent: {
|
|
1375
|
+
id: string;
|
|
1376
|
+
hash: string;
|
|
1377
|
+
/** Format: int64 */
|
|
1378
|
+
block?: number | null;
|
|
1379
|
+
/** Format: int64 */
|
|
1380
|
+
confirmed_at?: number | null;
|
|
1381
|
+
/** Format: int64 */
|
|
1382
|
+
received_at?: number | null;
|
|
1383
|
+
/** Format: int64 */
|
|
1384
|
+
log_index?: number | null;
|
|
1385
|
+
/** Format: int64 */
|
|
1386
|
+
block_index?: number | null;
|
|
1387
|
+
oracle_contract: string;
|
|
1388
|
+
condition_id: string;
|
|
1389
|
+
question?: string | null;
|
|
1390
|
+
image_url?: string | null;
|
|
1391
|
+
slug?: string | null;
|
|
1392
|
+
event_slug?: string | null;
|
|
1393
|
+
};
|
|
1394
|
+
/** @description UMA CTF Adapter: market unpaused. */
|
|
1395
|
+
QuestionUnpausedEvent: {
|
|
1396
|
+
id: string;
|
|
1397
|
+
hash: string;
|
|
1398
|
+
/** Format: int64 */
|
|
1399
|
+
block?: number | null;
|
|
1400
|
+
/** Format: int64 */
|
|
1401
|
+
confirmed_at?: number | null;
|
|
1402
|
+
/** Format: int64 */
|
|
1403
|
+
received_at?: number | null;
|
|
1404
|
+
/** Format: int64 */
|
|
1405
|
+
log_index?: number | null;
|
|
1406
|
+
/** Format: int64 */
|
|
1407
|
+
block_index?: number | null;
|
|
1408
|
+
oracle_contract: string;
|
|
1409
|
+
condition_id: string;
|
|
1410
|
+
question?: string | null;
|
|
1411
|
+
image_url?: string | null;
|
|
1412
|
+
slug?: string | null;
|
|
1413
|
+
event_slug?: string | null;
|
|
1414
|
+
};
|
|
1415
|
+
/** @description V2 UMA OOv2: a price request was made (market initialization). */
|
|
1416
|
+
RequestPriceEvent: {
|
|
1417
|
+
id: string;
|
|
1418
|
+
hash: string;
|
|
1419
|
+
/** Format: int64 */
|
|
1420
|
+
block?: number | null;
|
|
1421
|
+
/** Format: int64 */
|
|
1422
|
+
confirmed_at?: number | null;
|
|
1423
|
+
/** Format: int64 */
|
|
1424
|
+
received_at?: number | null;
|
|
1425
|
+
/** Format: int64 */
|
|
1426
|
+
log_index?: number | null;
|
|
1427
|
+
/** Format: int64 */
|
|
1428
|
+
block_index?: number | null;
|
|
1429
|
+
oracle_contract: string;
|
|
1430
|
+
requester: string;
|
|
1431
|
+
identifier: string;
|
|
1432
|
+
/**
|
|
1433
|
+
* @description UMA request timestamp (seconds, decimal string).
|
|
1434
|
+
* The point in time the requester is asking the oracle to resolve the
|
|
1435
|
+
* price for — part of the request identity tuple
|
|
1436
|
+
* `(requester, identifier, timestamp, ancillaryData)`. Not the block
|
|
1437
|
+
* timestamp of this event; see `confirmed_at` for that.
|
|
1210
1438
|
*/
|
|
1211
|
-
|
|
1212
|
-
|
|
1439
|
+
timestamp: string;
|
|
1440
|
+
ancillary_data: string;
|
|
1441
|
+
currency: string;
|
|
1442
|
+
reward: string;
|
|
1443
|
+
final_fee: string;
|
|
1444
|
+
condition_id?: string | null;
|
|
1445
|
+
question?: string | null;
|
|
1446
|
+
image_url?: string | null;
|
|
1447
|
+
slug?: string | null;
|
|
1448
|
+
event_slug?: string | null;
|
|
1449
|
+
};
|
|
1450
|
+
/** @description Response for POST /v1/webhook/{id}/rotate-secret */
|
|
1451
|
+
RotateSecretResponse: {
|
|
1452
|
+
/** @description The new HMAC secret (only returned once — store it securely) */
|
|
1453
|
+
secret: string;
|
|
1454
|
+
/**
|
|
1455
|
+
* Format: int64
|
|
1456
|
+
* @description Timestamp of rotation (ms since epoch)
|
|
1457
|
+
*/
|
|
1458
|
+
rotated_at: number;
|
|
1459
|
+
};
|
|
1460
|
+
/** @description V2 UMA OOv2: a price request was settled (final resolution). */
|
|
1461
|
+
SettleEvent: {
|
|
1462
|
+
id: string;
|
|
1463
|
+
hash: string;
|
|
1464
|
+
/** Format: int64 */
|
|
1465
|
+
block?: number | null;
|
|
1466
|
+
/** Format: int64 */
|
|
1467
|
+
confirmed_at?: number | null;
|
|
1468
|
+
/** Format: int64 */
|
|
1469
|
+
received_at?: number | null;
|
|
1470
|
+
/** Format: int64 */
|
|
1471
|
+
log_index?: number | null;
|
|
1472
|
+
/** Format: int64 */
|
|
1473
|
+
block_index?: number | null;
|
|
1474
|
+
oracle_contract: string;
|
|
1475
|
+
requester: string;
|
|
1476
|
+
proposer: string;
|
|
1477
|
+
disputer: string;
|
|
1478
|
+
identifier: string;
|
|
1479
|
+
timestamp: string;
|
|
1480
|
+
ancillary_data: string;
|
|
1481
|
+
/** Format: int64 */
|
|
1482
|
+
proposed_price: number;
|
|
1483
|
+
payout: string;
|
|
1484
|
+
disputed: boolean;
|
|
1485
|
+
condition_id?: string | null;
|
|
1486
|
+
proposed_outcome?: string | null;
|
|
1487
|
+
question?: string | null;
|
|
1488
|
+
image_url?: string | null;
|
|
1489
|
+
slug?: string | null;
|
|
1490
|
+
event_slug?: string | null;
|
|
1491
|
+
};
|
|
1492
|
+
/**
|
|
1493
|
+
* @description Direction filter for spike webhooks.
|
|
1494
|
+
* @enum {string}
|
|
1495
|
+
*/
|
|
1496
|
+
SpikeDirection: "up" | "down" | "both";
|
|
1497
|
+
/** @description Request body for updating a webhook */
|
|
1498
|
+
UpdateWebhookRequestBody: {
|
|
1499
|
+
/** @description Destination URL for webhook deliveries (must be HTTPS) */
|
|
1500
|
+
url?: string | null;
|
|
1501
|
+
event?: null | components["schemas"]["PolymarketWebhookEvent"];
|
|
1502
|
+
/** @description New secret for HMAC signature verification */
|
|
1503
|
+
secret?: string | null;
|
|
1504
|
+
filters?: null | components["schemas"]["WebhookFiltersBody"];
|
|
1505
|
+
status?: null | components["schemas"]["WebhookStatusBody"];
|
|
1506
|
+
/** @description Description/name */
|
|
1507
|
+
description?: string | null;
|
|
1508
|
+
};
|
|
1509
|
+
/** @description Payload delivered when a market's trading volume crosses a USD milestone in the specified timeframe */
|
|
1510
|
+
VolumeMilestonePayload: {
|
|
1511
|
+
/** @description Market condition ID */
|
|
1512
|
+
condition_id: string;
|
|
1513
|
+
/**
|
|
1514
|
+
* @description Aggregation window that crossed the milestone
|
|
1515
|
+
* @enum {string}
|
|
1516
|
+
*/
|
|
1517
|
+
timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
1518
|
+
/** @description The USD milestone amount that was crossed */
|
|
1519
|
+
milestone_usd: number;
|
|
1520
|
+
/** @description Current volume at time of trigger (USD) */
|
|
1213
1521
|
current_volume_usd: number;
|
|
1214
|
-
/** @description
|
|
1215
|
-
|
|
1216
|
-
/**
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1522
|
+
/** @description Total fees in USD for this timeframe */
|
|
1523
|
+
fees: number;
|
|
1524
|
+
/**
|
|
1525
|
+
* Format: int64
|
|
1526
|
+
* @description Total transactions in this timeframe
|
|
1527
|
+
*/
|
|
1528
|
+
txns: number;
|
|
1529
|
+
};
|
|
1530
|
+
/**
|
|
1531
|
+
* @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
|
|
1532
|
+
* @enum {string}
|
|
1533
|
+
*/
|
|
1534
|
+
WebhookAssetSymbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
1535
|
+
/** @description Single event type entry for the events list */
|
|
1536
|
+
WebhookEventInfo: {
|
|
1537
|
+
/** @description Event type identifier (e.g. "first_trade") */
|
|
1538
|
+
event: string;
|
|
1539
|
+
/** @description Human-readable description */
|
|
1540
|
+
description: string;
|
|
1541
|
+
/**
|
|
1542
|
+
* @description Category grouping for the event type
|
|
1543
|
+
* @enum {string}
|
|
1544
|
+
*/
|
|
1545
|
+
category: "trader" | "trade" | "market" | "event" | "position" | "assets";
|
|
1546
|
+
/**
|
|
1547
|
+
* Format: int64
|
|
1548
|
+
* @description Millicredits consumed per webhook delivery (1 credit = 1000 mc)
|
|
1549
|
+
*/
|
|
1550
|
+
millicredits_cost: number;
|
|
1551
|
+
/** @description Filter field names that apply to this event type */
|
|
1552
|
+
applicable_filters: string[];
|
|
1553
|
+
};
|
|
1554
|
+
/** @description Webhook filters request body */
|
|
1555
|
+
WebhookFiltersBody: {
|
|
1556
|
+
/** @description Filter by wallet addresses (for first_trade / new_market / whale_trade). Max 500 entries. */
|
|
1557
|
+
wallet_addresses?: string[];
|
|
1558
|
+
/** @description Filter by trader addresses (for PnL webhooks). Max 500 entries. */
|
|
1559
|
+
traders?: string[];
|
|
1560
|
+
/** @description Filter by market/condition IDs. Max 500 entries. */
|
|
1561
|
+
condition_ids?: string[];
|
|
1562
|
+
/** @description Filter by position IDs (for position metrics / close_to_bond). Max 500 entries. */
|
|
1563
|
+
position_ids?: string[];
|
|
1564
|
+
/** @description Filter by event slugs. Max 500 entries. */
|
|
1565
|
+
event_slugs?: string[];
|
|
1566
|
+
/** @description Filter by tags or category names (case-insensitive) — for market_created. Max 500 entries. */
|
|
1567
|
+
tags?: string[];
|
|
1568
|
+
/** @description Filter by outcomes (e.g. "Yes", "No") — for position metrics / close_to_bond. Max 500 entries. */
|
|
1569
|
+
outcomes?: string[];
|
|
1570
|
+
/** @description Filter by position outcome index — for close_to_bond. Position 0 = Yes/Up, 1 = No. Max 500 entries. */
|
|
1571
|
+
position_outcome_indices?: number[];
|
|
1572
|
+
/** @description Filter by trade type — for `trader_new_trade` and `trader_trade_event`. Max 500 entries. */
|
|
1573
|
+
trade_types?: string[];
|
|
1574
|
+
/**
|
|
1575
|
+
* Format: double
|
|
1576
|
+
* @description Minimum USD trade size (for whale_trade / first_trade)
|
|
1577
|
+
*/
|
|
1578
|
+
min_usd_value?: number | null;
|
|
1579
|
+
/**
|
|
1580
|
+
* Format: double
|
|
1581
|
+
* @description Minimum probability threshold (0.0 - 1.0)
|
|
1582
|
+
*/
|
|
1583
|
+
min_probability?: number | null;
|
|
1584
|
+
/**
|
|
1585
|
+
* Format: double
|
|
1586
|
+
* @description Maximum probability threshold (0.0 - 1.0)
|
|
1587
|
+
*/
|
|
1588
|
+
max_probability?: number | null;
|
|
1589
|
+
/**
|
|
1590
|
+
* Format: double
|
|
1591
|
+
* @description Minimum realized PnL (USD) — for global_pnl / market_pnl / event_pnl
|
|
1592
|
+
*/
|
|
1593
|
+
min_realized_pnl_usd?: number | null;
|
|
1594
|
+
/**
|
|
1595
|
+
* Format: double
|
|
1596
|
+
* @description Maximum realized PnL (USD) — for global_pnl / market_pnl / event_pnl
|
|
1597
|
+
*/
|
|
1598
|
+
max_realized_pnl_usd?: number | null;
|
|
1599
|
+
/**
|
|
1600
|
+
* Format: double
|
|
1601
|
+
* @description Minimum total volume (USD) — for global_pnl / event_pnl / metrics
|
|
1602
|
+
*/
|
|
1603
|
+
min_volume_usd?: number | null;
|
|
1604
|
+
/**
|
|
1605
|
+
* Format: double
|
|
1606
|
+
* @description Maximum total volume (USD) — for metrics webhooks
|
|
1607
|
+
*/
|
|
1608
|
+
max_volume_usd?: number | null;
|
|
1609
|
+
/**
|
|
1610
|
+
* Format: double
|
|
1611
|
+
* @description Minimum buy volume (USD) — for market_pnl / position metrics
|
|
1612
|
+
*/
|
|
1613
|
+
min_buy_usd?: number | null;
|
|
1614
|
+
/**
|
|
1615
|
+
* Format: double
|
|
1616
|
+
* @description Minimum sell volume (USD) — for position metrics
|
|
1617
|
+
*/
|
|
1618
|
+
min_sell_volume_usd?: number | null;
|
|
1619
|
+
/**
|
|
1620
|
+
* Format: double
|
|
1621
|
+
* @description Minimum win rate (0.0 - 100.0) — for global_pnl
|
|
1622
|
+
*/
|
|
1623
|
+
min_win_rate?: number | null;
|
|
1624
|
+
/**
|
|
1625
|
+
* Format: int64
|
|
1626
|
+
* @description Minimum markets traded — for global_pnl / event_pnl
|
|
1627
|
+
*/
|
|
1628
|
+
min_markets_traded?: number | null;
|
|
1629
|
+
/**
|
|
1630
|
+
* Format: double
|
|
1631
|
+
* @description Minimum net shares held — for position-level filters
|
|
1632
|
+
*/
|
|
1633
|
+
min_net_shares?: number | null;
|
|
1634
|
+
/**
|
|
1635
|
+
* Format: double
|
|
1636
|
+
* @description Maximum net shares held — for position-level filters
|
|
1637
|
+
*/
|
|
1638
|
+
max_net_shares?: number | null;
|
|
1639
|
+
/**
|
|
1640
|
+
* Format: double
|
|
1641
|
+
* @description Minimum fees (USD) — for metrics webhooks
|
|
1642
|
+
*/
|
|
1643
|
+
min_fees?: number | null;
|
|
1644
|
+
/**
|
|
1645
|
+
* Format: int64
|
|
1646
|
+
* @description Minimum transaction count — for metrics webhooks
|
|
1647
|
+
*/
|
|
1648
|
+
min_txns?: number | null;
|
|
1649
|
+
/**
|
|
1650
|
+
* Format: int64
|
|
1651
|
+
* @description Minimum unique traders — for metrics webhooks
|
|
1652
|
+
*/
|
|
1653
|
+
min_unique_traders?: number | null;
|
|
1654
|
+
/**
|
|
1655
|
+
* Format: double
|
|
1656
|
+
* @description Minimum price change percentage — for position metrics
|
|
1657
|
+
*/
|
|
1658
|
+
min_price_change_pct?: number | null;
|
|
1659
|
+
/**
|
|
1660
|
+
* Format: double
|
|
1661
|
+
* @description Minimum probability change percentage — for probability_spike
|
|
1662
|
+
*/
|
|
1663
|
+
min_probability_change_pct?: number | null;
|
|
1664
|
+
/**
|
|
1665
|
+
* @description Timeframes to filter by (e.g. ["1h", "24h", "7d"]) — **required** for volume_milestone
|
|
1666
|
+
* webhooks (market/event/position), optional for metrics webhooks.
|
|
1667
|
+
* Valid values: "1m", "5m", "30m", "1h", "6h", "24h", "7d", "30d".
|
|
1668
|
+
*/
|
|
1669
|
+
timeframes?: components["schemas"]["WebhookTimeframe"][];
|
|
1670
|
+
/** @description Milestone amounts to trigger on (USD) — for volume_milestone webhooks. Max 500 entries. */
|
|
1671
|
+
milestone_amounts?: number[];
|
|
1672
|
+
/**
|
|
1673
|
+
* Format: double
|
|
1674
|
+
* @description Spike ratio multiplier (must be > 1.0) — for volume_spike. E.g. 2.0 for 2x baseline
|
|
1675
|
+
*/
|
|
1676
|
+
spike_ratio?: number | null;
|
|
1677
|
+
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
1678
|
+
/**
|
|
1679
|
+
* Format: int64
|
|
1680
|
+
* @description Observation window in seconds (max 600) — for probability_spike, price_spike, volume_spike
|
|
1681
|
+
*/
|
|
1682
|
+
window_secs?: number | null;
|
|
1683
|
+
/** @description When true, suppress webhooks for short-term "updown" markets */
|
|
1684
|
+
exclude_shortterm_markets?: boolean;
|
|
1685
|
+
/**
|
|
1686
|
+
* @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update`.
|
|
1687
|
+
* Valid values: "BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", "HYPE". Empty = all assets (send everything).
|
|
1688
|
+
*/
|
|
1689
|
+
asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
|
|
1690
|
+
};
|
|
1691
|
+
/** @description List webhooks response */
|
|
1692
|
+
WebhookListResponseBody: {
|
|
1693
|
+
/** @description List of webhooks */
|
|
1694
|
+
webhooks: components["schemas"]["WebhookResponse"][];
|
|
1695
|
+
/** @description Total count */
|
|
1696
|
+
total: number;
|
|
1697
|
+
};
|
|
1698
|
+
/** @description Webhook response (returned from API) */
|
|
1699
|
+
WebhookResponse: {
|
|
1700
|
+
/** @description Unique webhook ID */
|
|
1701
|
+
id: string;
|
|
1702
|
+
/** @description Destination URL */
|
|
1703
|
+
url: string;
|
|
1704
|
+
/** @description Subscribed event */
|
|
1705
|
+
event: components["schemas"]["PolymarketWebhookEvent"];
|
|
1706
|
+
/** @description Active filters (omitted when no filters are set) */
|
|
1707
|
+
filters?: components["schemas"]["PolymarketWebhookFilter"];
|
|
1708
|
+
/**
|
|
1709
|
+
* @description Current webhook status
|
|
1710
|
+
* @enum {string}
|
|
1711
|
+
*/
|
|
1712
|
+
status: "active" | "paused" | "disabled" | "suspended";
|
|
1713
|
+
/**
|
|
1714
|
+
* Format: int64
|
|
1715
|
+
* @description Created timestamp (ms)
|
|
1716
|
+
*/
|
|
1717
|
+
created_at: number;
|
|
1718
|
+
/**
|
|
1719
|
+
* Format: int64
|
|
1720
|
+
* @description Updated timestamp (ms)
|
|
1721
|
+
*/
|
|
1722
|
+
updated_at: number;
|
|
1723
|
+
/** @description Description/name */
|
|
1724
|
+
description?: string | null;
|
|
1725
|
+
/** @description Whether an HMAC secret is configured */
|
|
1726
|
+
has_secret: boolean;
|
|
1727
|
+
/**
|
|
1728
|
+
* Format: int64
|
|
1729
|
+
* @description Credits consumed by this webhook in the last 24 hours
|
|
1730
|
+
*/
|
|
1731
|
+
credits_used_24h?: number;
|
|
1732
|
+
};
|
|
1733
|
+
/**
|
|
1734
|
+
* @description Webhook status
|
|
1735
|
+
* @enum {string}
|
|
1736
|
+
*/
|
|
1737
|
+
WebhookStatusBody: "active" | "paused";
|
|
1738
|
+
/** @description Test webhook response */
|
|
1739
|
+
WebhookTestResponseBody: {
|
|
1740
|
+
/** @description Whether the test delivery succeeded */
|
|
1741
|
+
success: boolean;
|
|
1742
|
+
/**
|
|
1743
|
+
* Format: int32
|
|
1744
|
+
* @description HTTP status code from the endpoint
|
|
1745
|
+
*/
|
|
1746
|
+
status_code?: number | null;
|
|
1747
|
+
/** @description Error message if failed */
|
|
1748
|
+
error?: string | null;
|
|
1749
|
+
/**
|
|
1750
|
+
* Format: int64
|
|
1751
|
+
* @description Delivery duration in milliseconds
|
|
1752
|
+
*/
|
|
1753
|
+
duration_ms: number;
|
|
1754
|
+
};
|
|
1755
|
+
/**
|
|
1756
|
+
* @description Timeframe values accepted by webhook metric, milestone, spike, and asset-price filters.
|
|
1757
|
+
* @enum {string}
|
|
1758
|
+
*/
|
|
1759
|
+
WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
1760
|
+
/** @description Payload delivered when a trade exceeds the configured size and probability thresholds */
|
|
1761
|
+
WhaleTradePayload: {
|
|
1762
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
1763
|
+
trader: string;
|
|
1764
|
+
/** @description Order filler wallet address (lowercase) */
|
|
1765
|
+
taker: string;
|
|
1766
|
+
/** @description ERC-1155 outcome token ID */
|
|
1767
|
+
position_id: string;
|
|
1768
|
+
/** @description Parent market condition ID */
|
|
1769
|
+
condition_id?: string | null;
|
|
1770
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1771
|
+
outcome?: string | null;
|
|
1772
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
1773
|
+
outcome_index?: number | null;
|
|
1774
|
+
/** @description Market question text */
|
|
1775
|
+
question?: string | null;
|
|
1776
|
+
/** @description Market slug */
|
|
1777
|
+
market_slug?: string | null;
|
|
1778
|
+
/** @description Parent event slug */
|
|
1779
|
+
event_slug?: string | null;
|
|
1780
|
+
/** @description Unique trade identifier */
|
|
1781
|
+
trade_id: string;
|
|
1782
|
+
/** @description Transaction hash */
|
|
1783
|
+
hash: string;
|
|
1784
|
+
/**
|
|
1785
|
+
* Format: int64
|
|
1786
|
+
* @description Block number
|
|
1787
|
+
*/
|
|
1788
|
+
block: number;
|
|
1789
|
+
/**
|
|
1790
|
+
* Format: int64
|
|
1791
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
1792
|
+
*/
|
|
1793
|
+
confirmed_at: number;
|
|
1794
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
1795
|
+
amount_usd: number;
|
|
1796
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
1797
|
+
shares_amount: number;
|
|
1798
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
1799
|
+
fee: number;
|
|
1800
|
+
/**
|
|
1801
|
+
* @description Trade direction
|
|
1802
|
+
* @enum {string}
|
|
1803
|
+
*/
|
|
1804
|
+
side: "Buy" | "Sell";
|
|
1805
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
1806
|
+
price: number;
|
|
1807
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
1808
|
+
probability?: number | null;
|
|
1809
|
+
/**
|
|
1810
|
+
* @description Exchange contract that processed the trade
|
|
1811
|
+
* @enum {string}
|
|
1812
|
+
*/
|
|
1813
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
1814
|
+
/**
|
|
1815
|
+
* @description Trade type (webhook events only fire on order fills)
|
|
1816
|
+
* @enum {string}
|
|
1817
|
+
*/
|
|
1818
|
+
trade_type: "OrderFilled" | "OrdersMatched";
|
|
1819
|
+
};
|
|
1820
|
+
/** @description Outer envelope for every webhook HTTP POST delivery. The `data` field contains the event-specific payload. Delivery headers sent with every POST: `X-Webhook-ID` (subscription UUID), `X-Delivery-ID` (this attempt's UUID), `X-Event-Type` (event name string, e.g. `trader_first_trade`), `X-Attempt` (attempt number, 1-indexed). When the webhook has a secret configured, `X-Webhook-Signature: sha256=<hmac-hex>` is also included — compute HMAC-SHA256 over the raw request body using your secret to verify. */
|
|
1821
|
+
WebhookDeliveryEnvelope: {
|
|
1822
|
+
/**
|
|
1823
|
+
* Format: uuid
|
|
1824
|
+
* @description UUID of this specific delivery attempt (matches X-Delivery-ID header)
|
|
1825
|
+
*/
|
|
1826
|
+
id: string;
|
|
1827
|
+
/** @description Event name (e.g. `trader_first_trade`). On test deliveries the suffix `_test` is appended. */
|
|
1828
|
+
event: string;
|
|
1829
|
+
/** @description Event-specific payload — schema varies by event type; see the individual callback definitions */
|
|
1830
|
+
data: Record<string, never>;
|
|
1831
|
+
/**
|
|
1832
|
+
* Format: int64
|
|
1833
|
+
* @description Unix timestamp in milliseconds when this delivery was created
|
|
1834
|
+
*/
|
|
1835
|
+
timestamp: number;
|
|
1836
|
+
/**
|
|
1837
|
+
* Format: uuid
|
|
1838
|
+
* @description UUID of the webhook subscription that fired (matches X-Webhook-ID header)
|
|
1839
|
+
*/
|
|
1840
|
+
webhook_id: string;
|
|
1841
|
+
/** @description Delivery attempt number. 1 = first attempt; increments on each retry. */
|
|
1842
|
+
attempt: number;
|
|
1843
|
+
};
|
|
1844
|
+
/** @description Tagged union of trade-type variants delivered to `trader_trade_event` callbacks. Pending-only fields such as `received_at` are absent — callbacks fire only for confirmed trades. */
|
|
1845
|
+
WebhookTraderTradeEventPayload: {
|
|
1846
|
+
id: string;
|
|
1847
|
+
hash: string;
|
|
1848
|
+
/** Format: int64 */
|
|
1849
|
+
block: number;
|
|
1850
|
+
/** Format: int64 */
|
|
1851
|
+
confirmed_at: number;
|
|
1852
|
+
/** Format: int64 */
|
|
1853
|
+
log_index: number;
|
|
1854
|
+
/** Format: int64 */
|
|
1855
|
+
block_index: number;
|
|
1856
|
+
order_hash: string;
|
|
1857
|
+
trader: {
|
|
1858
|
+
address: string;
|
|
1859
|
+
name: string | null;
|
|
1860
|
+
pseudonym: string | null;
|
|
1861
|
+
profile_image: string | null;
|
|
1862
|
+
x_username: string | null;
|
|
1863
|
+
verified_badge: boolean;
|
|
1864
|
+
};
|
|
1865
|
+
taker: string;
|
|
1866
|
+
/** @enum {string} */
|
|
1867
|
+
side: "Buy" | "Sell";
|
|
1868
|
+
condition_id: string | null;
|
|
1869
|
+
position_id: string;
|
|
1870
|
+
outcome?: string;
|
|
1871
|
+
outcome_index: number | null;
|
|
1872
|
+
question?: string;
|
|
1873
|
+
image_url?: string;
|
|
1874
|
+
slug?: string;
|
|
1875
|
+
event_slug?: string;
|
|
1876
|
+
usd_amount: number;
|
|
1877
|
+
shares_amount: number;
|
|
1878
|
+
price: number;
|
|
1879
|
+
probability?: number;
|
|
1880
|
+
fee: number;
|
|
1881
|
+
fee_shares: number;
|
|
1882
|
+
fee_pct: number;
|
|
1883
|
+
/**
|
|
1884
|
+
* @description Exchange contract that processed the event
|
|
1885
|
+
* @enum {string}
|
|
1886
|
+
*/
|
|
1887
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
1888
|
+
/** @enum {string} */
|
|
1889
|
+
trade_type: "OrderFilled" | "OrdersMatched";
|
|
1890
|
+
} | {
|
|
1891
|
+
id: string;
|
|
1892
|
+
hash: string;
|
|
1893
|
+
/** Format: int64 */
|
|
1894
|
+
block: number;
|
|
1895
|
+
/** Format: int64 */
|
|
1896
|
+
confirmed_at: number;
|
|
1897
|
+
/** Format: int64 */
|
|
1898
|
+
log_index: number;
|
|
1899
|
+
/** Format: int64 */
|
|
1900
|
+
block_index: number;
|
|
1901
|
+
trader: {
|
|
1902
|
+
address: string;
|
|
1903
|
+
name: string | null;
|
|
1904
|
+
pseudonym: string | null;
|
|
1905
|
+
profile_image: string | null;
|
|
1906
|
+
x_username: string | null;
|
|
1907
|
+
verified_badge: boolean;
|
|
1908
|
+
};
|
|
1909
|
+
condition_id: string | null;
|
|
1910
|
+
outcome?: string;
|
|
1911
|
+
outcome_index: number | null;
|
|
1912
|
+
question?: string;
|
|
1913
|
+
image_url?: string;
|
|
1914
|
+
slug?: string;
|
|
1915
|
+
event_slug?: string;
|
|
1916
|
+
usd_amount: number;
|
|
1917
|
+
winning_outcome_index?: number;
|
|
1918
|
+
position_details?: {
|
|
1919
|
+
position_id: string;
|
|
1920
|
+
outcome_index: number;
|
|
1921
|
+
outcome?: string;
|
|
1922
|
+
amount: string;
|
|
1923
|
+
}[];
|
|
1924
|
+
/**
|
|
1925
|
+
* @description Exchange contract that processed the event
|
|
1926
|
+
* @enum {string}
|
|
1927
|
+
*/
|
|
1928
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
1929
|
+
/** @enum {string} */
|
|
1930
|
+
trade_type: "Redemption";
|
|
1931
|
+
} | {
|
|
1932
|
+
id: string;
|
|
1933
|
+
hash: string;
|
|
1934
|
+
/** Format: int64 */
|
|
1935
|
+
block: number;
|
|
1936
|
+
/** Format: int64 */
|
|
1937
|
+
confirmed_at: number;
|
|
1938
|
+
/** Format: int64 */
|
|
1939
|
+
log_index: number;
|
|
1940
|
+
/** Format: int64 */
|
|
1941
|
+
block_index: number;
|
|
1942
|
+
trader: {
|
|
1943
|
+
address: string;
|
|
1944
|
+
name: string | null;
|
|
1945
|
+
pseudonym: string | null;
|
|
1946
|
+
profile_image: string | null;
|
|
1947
|
+
x_username: string | null;
|
|
1948
|
+
verified_badge: boolean;
|
|
1949
|
+
};
|
|
1950
|
+
condition_id: string | null;
|
|
1951
|
+
question?: string;
|
|
1952
|
+
image_url?: string;
|
|
1953
|
+
slug?: string;
|
|
1954
|
+
event_slug?: string;
|
|
1955
|
+
usd_amount: number;
|
|
1956
|
+
position_details?: {
|
|
1957
|
+
position_id: string;
|
|
1958
|
+
outcome_index: number;
|
|
1959
|
+
outcome?: string;
|
|
1960
|
+
amount: string;
|
|
1961
|
+
}[];
|
|
1962
|
+
/**
|
|
1963
|
+
* @description Exchange contract that processed the event
|
|
1964
|
+
* @enum {string}
|
|
1965
|
+
*/
|
|
1966
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
1967
|
+
/** @enum {string} */
|
|
1968
|
+
trade_type: "Merge";
|
|
1969
|
+
} | {
|
|
1970
|
+
id: string;
|
|
1971
|
+
hash: string;
|
|
1972
|
+
/** Format: int64 */
|
|
1973
|
+
block: number;
|
|
1974
|
+
/** Format: int64 */
|
|
1975
|
+
confirmed_at: number;
|
|
1976
|
+
/** Format: int64 */
|
|
1977
|
+
log_index: number;
|
|
1978
|
+
/** Format: int64 */
|
|
1979
|
+
block_index: number;
|
|
1980
|
+
trader: {
|
|
1981
|
+
address: string;
|
|
1982
|
+
name: string | null;
|
|
1983
|
+
pseudonym: string | null;
|
|
1984
|
+
profile_image: string | null;
|
|
1985
|
+
x_username: string | null;
|
|
1986
|
+
verified_badge: boolean;
|
|
1987
|
+
};
|
|
1988
|
+
condition_id: string | null;
|
|
1989
|
+
question?: string;
|
|
1990
|
+
image_url?: string;
|
|
1991
|
+
slug?: string;
|
|
1992
|
+
event_slug?: string;
|
|
1993
|
+
usd_amount: number;
|
|
1994
|
+
position_details?: {
|
|
1995
|
+
position_id: string;
|
|
1996
|
+
outcome_index: number;
|
|
1997
|
+
outcome?: string;
|
|
1998
|
+
amount: string;
|
|
1999
|
+
}[];
|
|
2000
|
+
/**
|
|
2001
|
+
* @description Exchange contract that processed the event
|
|
2002
|
+
* @enum {string}
|
|
2003
|
+
*/
|
|
2004
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
2005
|
+
/** @enum {string} */
|
|
2006
|
+
trade_type: "Split";
|
|
2007
|
+
} | {
|
|
2008
|
+
id: string;
|
|
2009
|
+
hash: string;
|
|
2010
|
+
/** Format: int64 */
|
|
2011
|
+
block: number;
|
|
2012
|
+
/** Format: int64 */
|
|
2013
|
+
confirmed_at: number;
|
|
2014
|
+
/** Format: int64 */
|
|
2015
|
+
log_index: number;
|
|
2016
|
+
/** Format: int64 */
|
|
2017
|
+
block_index: number;
|
|
2018
|
+
trader: {
|
|
2019
|
+
address: string;
|
|
2020
|
+
name: string | null;
|
|
2021
|
+
pseudonym: string | null;
|
|
2022
|
+
profile_image: string | null;
|
|
2023
|
+
x_username: string | null;
|
|
2024
|
+
verified_badge: boolean;
|
|
2025
|
+
};
|
|
2026
|
+
market_id: string;
|
|
2027
|
+
index_set: string;
|
|
2028
|
+
shares_amount: number;
|
|
2029
|
+
/**
|
|
2030
|
+
* @description Exchange contract that processed the event
|
|
2031
|
+
* @enum {string}
|
|
2032
|
+
*/
|
|
2033
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
2034
|
+
/** @enum {string} */
|
|
2035
|
+
trade_type: "PositionsConverted";
|
|
2036
|
+
} | {
|
|
2037
|
+
id: string;
|
|
2038
|
+
hash: string;
|
|
2039
|
+
/** Format: int64 */
|
|
2040
|
+
block: number;
|
|
2041
|
+
/** Format: int64 */
|
|
2042
|
+
confirmed_at: number;
|
|
2043
|
+
/** Format: int64 */
|
|
2044
|
+
log_index: number;
|
|
2045
|
+
/** Format: int64 */
|
|
2046
|
+
block_index: number;
|
|
2047
|
+
order_hash: string;
|
|
2048
|
+
question?: string;
|
|
2049
|
+
image_url?: string;
|
|
2050
|
+
slug?: string;
|
|
2051
|
+
event_slug?: string;
|
|
2052
|
+
/**
|
|
2053
|
+
* @description Exchange contract that processed the event
|
|
2054
|
+
* @enum {string}
|
|
2055
|
+
*/
|
|
2056
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
2057
|
+
/** @enum {string} */
|
|
2058
|
+
trade_type: "Cancelled";
|
|
2059
|
+
} | {
|
|
2060
|
+
id: string;
|
|
2061
|
+
hash: string;
|
|
2062
|
+
/** Format: int64 */
|
|
2063
|
+
block: number;
|
|
2064
|
+
/** Format: int64 */
|
|
2065
|
+
confirmed_at: number;
|
|
2066
|
+
/** Format: int64 */
|
|
2067
|
+
log_index: number;
|
|
2068
|
+
/** Format: int64 */
|
|
2069
|
+
block_index: number;
|
|
2070
|
+
oracle_contract: string;
|
|
2071
|
+
condition_id: string;
|
|
2072
|
+
creator: string;
|
|
2073
|
+
reward_token: string;
|
|
2074
|
+
reward: string;
|
|
2075
|
+
proposal_bond: string;
|
|
2076
|
+
question?: string;
|
|
2077
|
+
image_url?: string;
|
|
2078
|
+
slug?: string;
|
|
2079
|
+
event_slug?: string;
|
|
2080
|
+
/** @enum {string} */
|
|
2081
|
+
trade_type: "Initialization";
|
|
2082
|
+
} | {
|
|
2083
|
+
id: string;
|
|
2084
|
+
hash: string;
|
|
2085
|
+
/** Format: int64 */
|
|
2086
|
+
block: number;
|
|
2087
|
+
/** Format: int64 */
|
|
2088
|
+
confirmed_at: number;
|
|
2089
|
+
/** Format: int64 */
|
|
2090
|
+
log_index: number;
|
|
2091
|
+
/** Format: int64 */
|
|
2092
|
+
block_index: number;
|
|
2093
|
+
oracle_contract: string;
|
|
2094
|
+
condition_id: string;
|
|
2095
|
+
assertion_id: string;
|
|
2096
|
+
domain_id: string;
|
|
2097
|
+
claim: string;
|
|
2098
|
+
asserter: string;
|
|
2099
|
+
callback_recipient: string;
|
|
2100
|
+
escalation_manager: string;
|
|
2101
|
+
caller: string;
|
|
2102
|
+
/** Format: int64 */
|
|
2103
|
+
expiration_time: number;
|
|
2104
|
+
currency: string;
|
|
2105
|
+
bond: string;
|
|
2106
|
+
identifier: string;
|
|
2107
|
+
proposed_outcome?: string;
|
|
2108
|
+
question?: string;
|
|
2109
|
+
image_url?: string;
|
|
2110
|
+
slug?: string;
|
|
2111
|
+
event_slug?: string;
|
|
2112
|
+
/** @enum {string} */
|
|
2113
|
+
trade_type: "Proposal";
|
|
2114
|
+
} | {
|
|
2115
|
+
id: string;
|
|
2116
|
+
hash: string;
|
|
2117
|
+
/** Format: int64 */
|
|
2118
|
+
block: number;
|
|
2119
|
+
/** Format: int64 */
|
|
2120
|
+
confirmed_at: number;
|
|
2121
|
+
/** Format: int64 */
|
|
2122
|
+
log_index: number;
|
|
2123
|
+
/** Format: int64 */
|
|
2124
|
+
block_index: number;
|
|
2125
|
+
oracle_contract: string;
|
|
2126
|
+
condition_id: string;
|
|
2127
|
+
assertion_id: string;
|
|
2128
|
+
caller: string;
|
|
2129
|
+
disputer: string;
|
|
2130
|
+
question?: string;
|
|
2131
|
+
image_url?: string;
|
|
2132
|
+
slug?: string;
|
|
2133
|
+
event_slug?: string;
|
|
2134
|
+
/** @enum {string} */
|
|
2135
|
+
trade_type: "Dispute";
|
|
2136
|
+
} | {
|
|
2137
|
+
id: string;
|
|
2138
|
+
hash: string;
|
|
2139
|
+
/** Format: int64 */
|
|
2140
|
+
block: number;
|
|
2141
|
+
/** Format: int64 */
|
|
2142
|
+
confirmed_at: number;
|
|
2143
|
+
/** Format: int64 */
|
|
2144
|
+
log_index: number;
|
|
2145
|
+
/** Format: int64 */
|
|
2146
|
+
block_index: number;
|
|
2147
|
+
oracle_contract: string;
|
|
2148
|
+
condition_id: string;
|
|
2149
|
+
assertion_id: string;
|
|
2150
|
+
bond_recipient: string;
|
|
2151
|
+
disputed: boolean;
|
|
2152
|
+
settlement_resolution: boolean;
|
|
2153
|
+
settle_caller: string;
|
|
2154
|
+
question?: string;
|
|
2155
|
+
image_url?: string;
|
|
2156
|
+
slug?: string;
|
|
2157
|
+
event_slug?: string;
|
|
2158
|
+
/** @enum {string} */
|
|
2159
|
+
trade_type: "Settled";
|
|
2160
|
+
} | {
|
|
2161
|
+
id: string;
|
|
2162
|
+
hash: string;
|
|
2163
|
+
/** Format: int64 */
|
|
2164
|
+
block: number;
|
|
2165
|
+
/** Format: int64 */
|
|
2166
|
+
confirmed_at: number;
|
|
2167
|
+
/** Format: int64 */
|
|
2168
|
+
log_index: number;
|
|
2169
|
+
/** Format: int64 */
|
|
2170
|
+
block_index: number;
|
|
2171
|
+
oracle_contract: string;
|
|
2172
|
+
condition_id: string;
|
|
2173
|
+
/** Format: int64 */
|
|
2174
|
+
settled_price: number;
|
|
2175
|
+
proposed_outcome?: string;
|
|
2176
|
+
question?: string;
|
|
2177
|
+
image_url?: string;
|
|
2178
|
+
slug?: string;
|
|
2179
|
+
event_slug?: string;
|
|
2180
|
+
/** @enum {string} */
|
|
2181
|
+
trade_type: "Resolution";
|
|
2182
|
+
} | {
|
|
2183
|
+
id: string;
|
|
2184
|
+
hash: string;
|
|
2185
|
+
/** Format: int64 */
|
|
2186
|
+
block: number;
|
|
2187
|
+
/** Format: int64 */
|
|
2188
|
+
confirmed_at: number;
|
|
2189
|
+
/** Format: int64 */
|
|
2190
|
+
log_index: number;
|
|
2191
|
+
/** Format: int64 */
|
|
2192
|
+
block_index: number;
|
|
2193
|
+
oracle_contract: string;
|
|
2194
|
+
condition_id: string;
|
|
2195
|
+
oracle: string;
|
|
2196
|
+
proposed_outcome?: string;
|
|
2197
|
+
question?: string;
|
|
2198
|
+
image_url?: string;
|
|
2199
|
+
slug?: string;
|
|
2200
|
+
event_slug?: string;
|
|
2201
|
+
/** @enum {string} */
|
|
2202
|
+
trade_type: "ConditionResolution";
|
|
2203
|
+
} | {
|
|
2204
|
+
id: string;
|
|
2205
|
+
hash: string;
|
|
2206
|
+
/** Format: int64 */
|
|
2207
|
+
block: number;
|
|
2208
|
+
/** Format: int64 */
|
|
2209
|
+
confirmed_at: number;
|
|
2210
|
+
/** Format: int64 */
|
|
2211
|
+
log_index: number;
|
|
1220
2212
|
/** Format: int64 */
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
/** @
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
/** @description Parent market condition ID */
|
|
1233
|
-
condition_id?: string | null;
|
|
1234
|
-
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1235
|
-
outcome?: string | null;
|
|
1236
|
-
/** @description 0 = Yes/Up, 1 = No */
|
|
1237
|
-
outcome_index?: number | null;
|
|
1238
|
-
question?: string | null;
|
|
1239
|
-
market_slug?: string | null;
|
|
1240
|
-
event_slug?: string | null;
|
|
1241
|
-
trade_id: string;
|
|
1242
|
-
/** @description Transaction hash */
|
|
2213
|
+
block_index: number;
|
|
2214
|
+
oracle_contract: string;
|
|
2215
|
+
condition_id: string;
|
|
2216
|
+
question?: string;
|
|
2217
|
+
image_url?: string;
|
|
2218
|
+
slug?: string;
|
|
2219
|
+
event_slug?: string;
|
|
2220
|
+
/** @enum {string} */
|
|
2221
|
+
trade_type: "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause";
|
|
2222
|
+
} | {
|
|
2223
|
+
id: string;
|
|
1243
2224
|
hash: string;
|
|
1244
2225
|
/** Format: int64 */
|
|
1245
2226
|
block: number;
|
|
1246
|
-
/**
|
|
1247
|
-
* Format: int64
|
|
1248
|
-
* @description Unix seconds
|
|
1249
|
-
*/
|
|
2227
|
+
/** Format: int64 */
|
|
1250
2228
|
confirmed_at: number;
|
|
1251
|
-
/**
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
2229
|
+
/** Format: int64 */
|
|
2230
|
+
log_index: number;
|
|
2231
|
+
/** Format: int64 */
|
|
2232
|
+
block_index: number;
|
|
2233
|
+
oracle_contract: string;
|
|
2234
|
+
condition_id: string;
|
|
2235
|
+
proposed_outcome?: string;
|
|
2236
|
+
question?: string;
|
|
2237
|
+
image_url?: string;
|
|
2238
|
+
slug?: string;
|
|
2239
|
+
event_slug?: string;
|
|
1256
2240
|
/** @enum {string} */
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
/**
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
/** @description An outcome entry within a newly created market */
|
|
1271
|
-
MarketCreatedOutcome: {
|
|
1272
|
-
/** @description Outcome index (0 = Yes, 1 = No) */
|
|
1273
|
-
index: number;
|
|
1274
|
-
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1275
|
-
name: string;
|
|
1276
|
-
/** @description ERC-1155 position token ID for this outcome */
|
|
1277
|
-
position_id: string;
|
|
1278
|
-
};
|
|
1279
|
-
/** @description Payload delivered when a new prediction market is detected on-chain and enriched with Gamma API metadata */
|
|
1280
|
-
MarketCreatedPayload: {
|
|
1281
|
-
/** @description Condition ID (0x-prefixed hex, lowercase) */
|
|
2241
|
+
trade_type: "ManualResolution";
|
|
2242
|
+
} | {
|
|
2243
|
+
id: string;
|
|
2244
|
+
hash: string;
|
|
2245
|
+
/** Format: int64 */
|
|
2246
|
+
block: number;
|
|
2247
|
+
/** Format: int64 */
|
|
2248
|
+
confirmed_at: number;
|
|
2249
|
+
/** Format: int64 */
|
|
2250
|
+
log_index: number;
|
|
2251
|
+
/** Format: int64 */
|
|
2252
|
+
block_index: number;
|
|
2253
|
+
oracle_contract: string;
|
|
1282
2254
|
condition_id: string;
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
/**
|
|
1294
|
-
|
|
1295
|
-
/**
|
|
1296
|
-
|
|
1297
|
-
/**
|
|
1298
|
-
|
|
1299
|
-
/**
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
neg_risk: boolean;
|
|
1309
|
-
};
|
|
1310
|
-
/** @description Payload delivered on every raw Chainlink price tick for a tracked crypto asset */
|
|
1311
|
-
AssetPriceTickPayload: {
|
|
1312
|
-
/**
|
|
1313
|
-
* @description Asset symbol
|
|
1314
|
-
* @enum {string}
|
|
1315
|
-
*/
|
|
1316
|
-
symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
1317
|
-
/** @description Current asset price in USD from the Chainlink feed */
|
|
1318
|
-
price: number;
|
|
1319
|
-
/**
|
|
1320
|
-
* Format: int64
|
|
1321
|
-
* @description Tick timestamp (milliseconds since Unix epoch)
|
|
1322
|
-
*/
|
|
1323
|
-
timestamp_ms: number;
|
|
1324
|
-
};
|
|
1325
|
-
/** @description Payload delivered twice per candle — once on open and once on close. `close_price` is 0.0 on the "open" update. */
|
|
1326
|
-
AssetPriceWindowUpdatePayload: {
|
|
1327
|
-
/**
|
|
1328
|
-
* @description Asset symbol
|
|
1329
|
-
* @enum {string}
|
|
1330
|
-
*/
|
|
1331
|
-
symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
|
|
2255
|
+
proposed_outcome?: string;
|
|
2256
|
+
question?: string;
|
|
2257
|
+
image_url?: string;
|
|
2258
|
+
slug?: string;
|
|
2259
|
+
event_slug?: string;
|
|
2260
|
+
/** @enum {string} */
|
|
2261
|
+
trade_type: "NegRiskOutcomeReported";
|
|
2262
|
+
} | {
|
|
2263
|
+
id: string;
|
|
2264
|
+
hash: string;
|
|
2265
|
+
/** Format: int64 */
|
|
2266
|
+
block: number;
|
|
2267
|
+
/** Format: int64 */
|
|
2268
|
+
confirmed_at: number;
|
|
2269
|
+
/** Format: int64 */
|
|
2270
|
+
log_index: number;
|
|
2271
|
+
/** Format: int64 */
|
|
2272
|
+
block_index: number;
|
|
2273
|
+
condition_id: string;
|
|
2274
|
+
token0: string;
|
|
2275
|
+
token1: string;
|
|
2276
|
+
question?: string;
|
|
2277
|
+
image_url?: string;
|
|
2278
|
+
slug?: string;
|
|
2279
|
+
event_slug?: string;
|
|
1332
2280
|
/**
|
|
1333
|
-
* @description
|
|
2281
|
+
* @description Exchange contract that processed the event
|
|
1334
2282
|
* @enum {string}
|
|
1335
2283
|
*/
|
|
1336
|
-
|
|
1337
|
-
/**
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
/**
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
2284
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
2285
|
+
/** @enum {string} */
|
|
2286
|
+
trade_type: "RegisterToken";
|
|
2287
|
+
} | {
|
|
2288
|
+
id: string;
|
|
2289
|
+
hash: string;
|
|
2290
|
+
/** Format: int64 */
|
|
2291
|
+
block: number;
|
|
2292
|
+
/** Format: int64 */
|
|
2293
|
+
confirmed_at: number;
|
|
2294
|
+
/** Format: int64 */
|
|
2295
|
+
log_index: number;
|
|
2296
|
+
/** Format: int64 */
|
|
2297
|
+
block_index: number;
|
|
2298
|
+
trader: {
|
|
2299
|
+
address: string;
|
|
2300
|
+
name: string | null;
|
|
2301
|
+
pseudonym: string | null;
|
|
2302
|
+
profile_image: string | null;
|
|
2303
|
+
x_username: string | null;
|
|
2304
|
+
verified_badge: boolean;
|
|
2305
|
+
};
|
|
2306
|
+
operator: string;
|
|
2307
|
+
approved: boolean;
|
|
2308
|
+
question?: string;
|
|
2309
|
+
image_url?: string;
|
|
2310
|
+
slug?: string;
|
|
2311
|
+
event_slug?: string;
|
|
1351
2312
|
/**
|
|
1352
|
-
* @description
|
|
2313
|
+
* @description Exchange contract that processed the event
|
|
1353
2314
|
* @enum {string}
|
|
1354
2315
|
*/
|
|
1355
|
-
|
|
2316
|
+
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
2317
|
+
/** @enum {string} */
|
|
2318
|
+
trade_type: "Approval";
|
|
1356
2319
|
};
|
|
1357
2320
|
/** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
|
|
1358
2321
|
TraderFirstTradeFilters: {
|
|
@@ -1438,7 +2401,7 @@ export interface components {
|
|
|
1438
2401
|
min_probability?: number;
|
|
1439
2402
|
/** @description Only fire when event probability is ≤ this value. Events without probability data do not match. */
|
|
1440
2403
|
max_probability?: number;
|
|
1441
|
-
/** @description Only fire for these trade types
|
|
2404
|
+
/** @description Only fire for these trade types. Empty = all supported trade-event variants. */
|
|
1442
2405
|
trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[];
|
|
1443
2406
|
/** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
|
|
1444
2407
|
exclude_shortterm_markets?: boolean;
|
|
@@ -1729,6 +2692,13 @@ export interface components {
|
|
|
1729
2692
|
/** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
|
|
1730
2693
|
exclude_shortterm_markets?: boolean;
|
|
1731
2694
|
};
|
|
2695
|
+
/** @description Subscription filters for the `oracle_events` event. All fields are optional. */
|
|
2696
|
+
OracleEventsFilters: {
|
|
2697
|
+
/** @description Restrict to these event types (case-insensitive). Empty = all. */
|
|
2698
|
+
oracle_event_types?: ("AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported")[];
|
|
2699
|
+
/** @description Restrict to events for these condition IDs. */
|
|
2700
|
+
condition_ids?: string[];
|
|
2701
|
+
};
|
|
1732
2702
|
/** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
|
|
1733
2703
|
AssetPriceTickFilters: {
|
|
1734
2704
|
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
@@ -1745,7 +2715,7 @@ export interface components {
|
|
|
1745
2715
|
* @description All alert event types supported by both HTTP webhooks and the alerts WebSocket.
|
|
1746
2716
|
* @enum {string}
|
|
1747
2717
|
*/
|
|
1748
|
-
WsAlertEventType: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "price_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update";
|
|
2718
|
+
WsAlertEventType: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "price_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "oracle_events" | "asset_price_tick" | "asset_price_window_update";
|
|
1749
2719
|
/** @description Server acknowledgement for a successful alert subscription. */
|
|
1750
2720
|
WsAlertSubscribedResponse: {
|
|
1751
2721
|
/** @enum {string} */
|
|
@@ -3055,6 +4025,62 @@ export interface components {
|
|
|
3055
4025
|
timestamp: number;
|
|
3056
4026
|
data: components["schemas"]["MarketCreatedPayload"];
|
|
3057
4027
|
};
|
|
4028
|
+
WsAlertOracleEventsSubscribeMessage: {
|
|
4029
|
+
/** @enum {string} */
|
|
4030
|
+
op: "subscribe";
|
|
4031
|
+
/** @enum {string} */
|
|
4032
|
+
event: "oracle_events";
|
|
4033
|
+
} & components["schemas"]["OracleEventsFilters"] & {
|
|
4034
|
+
/**
|
|
4035
|
+
* @description discriminator enum property added by openapi-typescript
|
|
4036
|
+
* @enum {string}
|
|
4037
|
+
*/
|
|
4038
|
+
event: "oracle_events";
|
|
4039
|
+
};
|
|
4040
|
+
WsAlertOracleEventsUnsubscribeMessage: {
|
|
4041
|
+
/** @enum {string} */
|
|
4042
|
+
op: "unsubscribe";
|
|
4043
|
+
/** @enum {string} */
|
|
4044
|
+
event: "oracle_events";
|
|
4045
|
+
} & components["schemas"]["OracleEventsFilters"] & {
|
|
4046
|
+
/**
|
|
4047
|
+
* @description discriminator enum property added by openapi-typescript
|
|
4048
|
+
* @enum {string}
|
|
4049
|
+
*/
|
|
4050
|
+
event: "oracle_events";
|
|
4051
|
+
};
|
|
4052
|
+
/**
|
|
4053
|
+
* @description Pushed `oracle_events` alert. The `data` payload matches the corresponding HTTP webhook payload schema.
|
|
4054
|
+
* @example {
|
|
4055
|
+
* "event": "oracle_events",
|
|
4056
|
+
* "timestamp": 1743500000000,
|
|
4057
|
+
* "data": {
|
|
4058
|
+
* "event_type": "QuestionResolved",
|
|
4059
|
+
* "id": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
4060
|
+
* "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
4061
|
+
* "block": 0,
|
|
4062
|
+
* "confirmed_at": 0,
|
|
4063
|
+
* "log_index": 0,
|
|
4064
|
+
* "block_index": 0,
|
|
4065
|
+
* "oracle_contract": "0x0000000000000000000000000000000000000000",
|
|
4066
|
+
* "condition_id": "",
|
|
4067
|
+
* "settled_price": 1000000000000000000
|
|
4068
|
+
* }
|
|
4069
|
+
* }
|
|
4070
|
+
*/
|
|
4071
|
+
WsAlertOracleEventsEvent: {
|
|
4072
|
+
/**
|
|
4073
|
+
* @description discriminator enum property added by openapi-typescript
|
|
4074
|
+
* @enum {string}
|
|
4075
|
+
*/
|
|
4076
|
+
event: "oracle_events";
|
|
4077
|
+
/**
|
|
4078
|
+
* Format: int64
|
|
4079
|
+
* @description Unix timestamp in milliseconds
|
|
4080
|
+
*/
|
|
4081
|
+
timestamp: number;
|
|
4082
|
+
data: components["schemas"]["OracleEventTyped"];
|
|
4083
|
+
};
|
|
3058
4084
|
WsAlertAssetPriceTickSubscribeMessage: {
|
|
3059
4085
|
/** @enum {string} */
|
|
3060
4086
|
op: "subscribe";
|
|
@@ -3157,12 +4183,12 @@ export interface components {
|
|
|
3157
4183
|
timestamp: number;
|
|
3158
4184
|
data: components["schemas"]["AssetPriceWindowUpdatePayload"];
|
|
3159
4185
|
};
|
|
3160
|
-
/** @description Typed subscribe request for the alerts WebSocket. The request shape depends on `event
|
|
3161
|
-
WsAlertSubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketSubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderTradeEventSubscribeMessage"] | 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"];
|
|
4186
|
+
/** @description Typed subscribe request for the alerts WebSocket. The request shape depends on `event`; filters follow the schema associated with that event type. */
|
|
4187
|
+
WsAlertSubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketSubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeSubscribeMessage"] | components["schemas"]["WsAlertTraderTradeEventSubscribeMessage"] | 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"]["WsAlertOracleEventsSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickSubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateSubscribeMessage"];
|
|
3162
4188
|
/** @description Typed unsubscribe request for the alerts WebSocket. The request shape depends on `event` and must match the original subscription filters. */
|
|
3163
|
-
WsAlertUnsubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketUnsubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderTradeEventUnsubscribeMessage"] | 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"];
|
|
4189
|
+
WsAlertUnsubscribeMessage: components["schemas"]["WsAlertTraderFirstTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewMarketUnsubscribeMessage"] | components["schemas"]["WsAlertTraderWhaleTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderNewTradeUnsubscribeMessage"] | components["schemas"]["WsAlertTraderTradeEventUnsubscribeMessage"] | 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"]["WsAlertOracleEventsUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceTickUnsubscribeMessage"] | components["schemas"]["WsAlertAssetPriceWindowUpdateUnsubscribeMessage"];
|
|
3164
4190
|
/** @description Typed pushed-event envelope for the alerts WebSocket. The `data` payload depends on `event` and matches the corresponding HTTP webhook payload schema. */
|
|
3165
|
-
WsAlertEventPayload: components["schemas"]["WsAlertTraderFirstTradeEvent"] | components["schemas"]["WsAlertTraderNewMarketEvent"] | components["schemas"]["WsAlertTraderWhaleTradeEvent"] | components["schemas"]["WsAlertTraderNewTradeEvent"] | components["schemas"]["WsAlertTraderTradeEventEvent"] | 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"];
|
|
4191
|
+
WsAlertEventPayload: components["schemas"]["WsAlertTraderFirstTradeEvent"] | components["schemas"]["WsAlertTraderNewMarketEvent"] | components["schemas"]["WsAlertTraderWhaleTradeEvent"] | components["schemas"]["WsAlertTraderNewTradeEvent"] | components["schemas"]["WsAlertTraderTradeEventEvent"] | 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"]["WsAlertOracleEventsEvent"] | components["schemas"]["WsAlertAssetPriceTickEvent"] | components["schemas"]["WsAlertAssetPriceWindowUpdateEvent"];
|
|
3166
4192
|
};
|
|
3167
4193
|
responses: never;
|
|
3168
4194
|
parameters: never;
|
|
@@ -3194,6 +4220,7 @@ export interface WsAlertSubscribeMap {
|
|
|
3194
4220
|
position_volume_spike: components["schemas"]["WsAlertPositionVolumeSpikeSubscribeMessage"];
|
|
3195
4221
|
close_to_bond: components["schemas"]["WsAlertCloseToBondSubscribeMessage"];
|
|
3196
4222
|
market_created: components["schemas"]["WsAlertMarketCreatedSubscribeMessage"];
|
|
4223
|
+
oracle_events: components["schemas"]["WsAlertOracleEventsSubscribeMessage"];
|
|
3197
4224
|
asset_price_tick: components["schemas"]["WsAlertAssetPriceTickSubscribeMessage"];
|
|
3198
4225
|
asset_price_window_update: components["schemas"]["WsAlertAssetPriceWindowUpdateSubscribeMessage"];
|
|
3199
4226
|
}
|
|
@@ -3219,6 +4246,7 @@ export interface WsAlertEventDataMap {
|
|
|
3219
4246
|
position_volume_spike: components["schemas"]["PositionVolumeSpikePayload"];
|
|
3220
4247
|
close_to_bond: components["schemas"]["CloseToBondPayload"];
|
|
3221
4248
|
market_created: components["schemas"]["MarketCreatedPayload"];
|
|
4249
|
+
oracle_events: components["schemas"]["OracleEventTyped"];
|
|
3222
4250
|
asset_price_tick: components["schemas"]["AssetPriceTickPayload"];
|
|
3223
4251
|
asset_price_window_update: components["schemas"]["AssetPriceWindowUpdatePayload"];
|
|
3224
4252
|
}
|