@structbuild/sdk 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +155 -0
- package/dist/client.d.ts +25 -0
- package/dist/errors.d.ts +24 -0
- package/dist/generated/polymarket.d.ts +2924 -0
- package/dist/http.d.ts +18 -0
- package/dist/index.cjs +898 -0
- package/dist/index.cjs.map +25 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +866 -0
- package/dist/index.js.map +25 -0
- package/dist/namespaces/base.d.ts +9 -0
- package/dist/namespaces/bonds.d.ts +7 -0
- package/dist/namespaces/events.d.ts +10 -0
- package/dist/namespaces/holders.d.ts +12 -0
- package/dist/namespaces/index.d.ts +10 -0
- package/dist/namespaces/markets.d.ts +16 -0
- package/dist/namespaces/scoring.d.ts +10 -0
- package/dist/namespaces/search.d.ts +7 -0
- package/dist/namespaces/series.d.ts +9 -0
- package/dist/namespaces/tags.d.ts +8 -0
- package/dist/namespaces/trader.d.ts +18 -0
- package/dist/paginate.d.ts +3 -0
- package/dist/types/common.d.ts +10 -0
- package/dist/types/helpers.d.ts +21 -0
- package/dist/types/http.d.ts +42 -0
- package/dist/types/index.d.ts +492 -0
- package/dist/types/ws.d.ts +110 -0
- package/dist/ws-transport.d.ts +35 -0
- package/dist/ws.d.ts +46 -0
- package/package.json +35 -0
|
@@ -0,0 +1,2924 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/polymarket/bonds": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Get bonds
|
|
15
|
+
* @description Retrieve a list of bond markets sorted by yield, filtered by probability and time to expiry
|
|
16
|
+
*/
|
|
17
|
+
get: operations["get_bonds"];
|
|
18
|
+
put?: never;
|
|
19
|
+
post?: never;
|
|
20
|
+
delete?: never;
|
|
21
|
+
options?: never;
|
|
22
|
+
head?: never;
|
|
23
|
+
patch?: never;
|
|
24
|
+
trace?: never;
|
|
25
|
+
};
|
|
26
|
+
"/polymarket/events": {
|
|
27
|
+
parameters: {
|
|
28
|
+
query?: never;
|
|
29
|
+
header?: never;
|
|
30
|
+
path?: never;
|
|
31
|
+
cookie?: never;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Get events
|
|
35
|
+
* @description Retrieve a paginated list of events with filtering, sorting, and optional nested tags/markets
|
|
36
|
+
*/
|
|
37
|
+
get: operations["get_events"];
|
|
38
|
+
put?: never;
|
|
39
|
+
post?: never;
|
|
40
|
+
delete?: never;
|
|
41
|
+
options?: never;
|
|
42
|
+
head?: never;
|
|
43
|
+
patch?: never;
|
|
44
|
+
trace?: never;
|
|
45
|
+
};
|
|
46
|
+
"/polymarket/events/metrics": {
|
|
47
|
+
parameters: {
|
|
48
|
+
query?: never;
|
|
49
|
+
header?: never;
|
|
50
|
+
path?: never;
|
|
51
|
+
cookie?: never;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Get event metrics
|
|
55
|
+
* @description Retrieve volume, transaction, and trader metrics for an event. Supports single timeframe (e.g., '1m'), multiple timeframes (e.g., '1m,5m,1h'), or 'all' to get all available timeframes.
|
|
56
|
+
*/
|
|
57
|
+
get: operations["get_event_metrics"];
|
|
58
|
+
put?: never;
|
|
59
|
+
post?: never;
|
|
60
|
+
delete?: never;
|
|
61
|
+
options?: never;
|
|
62
|
+
head?: never;
|
|
63
|
+
patch?: never;
|
|
64
|
+
trace?: never;
|
|
65
|
+
};
|
|
66
|
+
"/polymarket/holders/events/{event_slug}": {
|
|
67
|
+
parameters: {
|
|
68
|
+
query?: never;
|
|
69
|
+
header?: never;
|
|
70
|
+
path?: never;
|
|
71
|
+
cookie?: never;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Get event holders
|
|
75
|
+
* @description Retrieve holders aggregated across all markets in an event, sorted by total shares. Uses cursor-based pagination for efficient traversal.
|
|
76
|
+
*/
|
|
77
|
+
get: operations["get_event_holders"];
|
|
78
|
+
put?: never;
|
|
79
|
+
post?: never;
|
|
80
|
+
delete?: never;
|
|
81
|
+
options?: never;
|
|
82
|
+
head?: never;
|
|
83
|
+
patch?: never;
|
|
84
|
+
trace?: never;
|
|
85
|
+
};
|
|
86
|
+
"/polymarket/holders/events/{event_slug}/history": {
|
|
87
|
+
parameters: {
|
|
88
|
+
query?: never;
|
|
89
|
+
header?: never;
|
|
90
|
+
path?: never;
|
|
91
|
+
cookie?: never;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Get event holders history
|
|
95
|
+
* @description Retrieve historical holder count snapshots for an event over a time range
|
|
96
|
+
*/
|
|
97
|
+
get: operations["get_event_holders_history"];
|
|
98
|
+
put?: never;
|
|
99
|
+
post?: never;
|
|
100
|
+
delete?: never;
|
|
101
|
+
options?: never;
|
|
102
|
+
head?: never;
|
|
103
|
+
patch?: never;
|
|
104
|
+
trace?: never;
|
|
105
|
+
};
|
|
106
|
+
"/polymarket/holders/markets/{condition_id}": {
|
|
107
|
+
parameters: {
|
|
108
|
+
query?: never;
|
|
109
|
+
header?: never;
|
|
110
|
+
path?: never;
|
|
111
|
+
cookie?: never;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Get market holders
|
|
115
|
+
* @description Retrieve holders of a market grouped by outcome, sorted by shares held
|
|
116
|
+
*/
|
|
117
|
+
get: operations["get_market_holders"];
|
|
118
|
+
put?: never;
|
|
119
|
+
post?: never;
|
|
120
|
+
delete?: never;
|
|
121
|
+
options?: never;
|
|
122
|
+
head?: never;
|
|
123
|
+
patch?: never;
|
|
124
|
+
trace?: never;
|
|
125
|
+
};
|
|
126
|
+
"/polymarket/holders/markets/{condition_id}/history": {
|
|
127
|
+
parameters: {
|
|
128
|
+
query?: never;
|
|
129
|
+
header?: never;
|
|
130
|
+
path?: never;
|
|
131
|
+
cookie?: never;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Get market holders history
|
|
135
|
+
* @description Retrieve historical holder count snapshots for a market over a time range
|
|
136
|
+
*/
|
|
137
|
+
get: operations["get_market_holders_history"];
|
|
138
|
+
put?: never;
|
|
139
|
+
post?: never;
|
|
140
|
+
delete?: never;
|
|
141
|
+
options?: never;
|
|
142
|
+
head?: never;
|
|
143
|
+
patch?: never;
|
|
144
|
+
trace?: never;
|
|
145
|
+
};
|
|
146
|
+
"/polymarket/holders/positions/{position_id}": {
|
|
147
|
+
parameters: {
|
|
148
|
+
query?: never;
|
|
149
|
+
header?: never;
|
|
150
|
+
path?: never;
|
|
151
|
+
cookie?: never;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Get position holders
|
|
155
|
+
* @description Retrieve holders of a specific position (ERC1155 token), sorted by shares held. Uses cursor-based pagination for efficient traversal.
|
|
156
|
+
*/
|
|
157
|
+
get: operations["get_position_holders"];
|
|
158
|
+
put?: never;
|
|
159
|
+
post?: never;
|
|
160
|
+
delete?: never;
|
|
161
|
+
options?: never;
|
|
162
|
+
head?: never;
|
|
163
|
+
patch?: never;
|
|
164
|
+
trace?: never;
|
|
165
|
+
};
|
|
166
|
+
"/polymarket/holders/positions/{position_id}/history": {
|
|
167
|
+
parameters: {
|
|
168
|
+
query?: never;
|
|
169
|
+
header?: never;
|
|
170
|
+
path?: never;
|
|
171
|
+
cookie?: never;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* Get position holders history
|
|
175
|
+
* @description Retrieve historical holder count snapshots for a position over a time range
|
|
176
|
+
*/
|
|
177
|
+
get: operations["get_position_holders_history"];
|
|
178
|
+
put?: never;
|
|
179
|
+
post?: never;
|
|
180
|
+
delete?: never;
|
|
181
|
+
options?: never;
|
|
182
|
+
head?: never;
|
|
183
|
+
patch?: never;
|
|
184
|
+
trace?: never;
|
|
185
|
+
};
|
|
186
|
+
"/polymarket/market": {
|
|
187
|
+
parameters: {
|
|
188
|
+
query?: never;
|
|
189
|
+
header?: never;
|
|
190
|
+
path?: never;
|
|
191
|
+
cookie?: never;
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Get markets
|
|
195
|
+
* @description Retrieve a list of markets with metadata and outcomes
|
|
196
|
+
*/
|
|
197
|
+
get: operations["list_markets"];
|
|
198
|
+
put?: never;
|
|
199
|
+
post?: never;
|
|
200
|
+
delete?: never;
|
|
201
|
+
options?: never;
|
|
202
|
+
head?: never;
|
|
203
|
+
patch?: never;
|
|
204
|
+
trace?: never;
|
|
205
|
+
};
|
|
206
|
+
"/polymarket/market/candlestick": {
|
|
207
|
+
parameters: {
|
|
208
|
+
query?: never;
|
|
209
|
+
header?: never;
|
|
210
|
+
path?: never;
|
|
211
|
+
cookie?: never;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Get market candlesticks by condition_id
|
|
215
|
+
* @description Retrieve OHLCV candlestick data for a market by its condition_id
|
|
216
|
+
*/
|
|
217
|
+
get: operations["get_market_candlestick"];
|
|
218
|
+
put?: never;
|
|
219
|
+
post?: never;
|
|
220
|
+
delete?: never;
|
|
221
|
+
options?: never;
|
|
222
|
+
head?: never;
|
|
223
|
+
patch?: never;
|
|
224
|
+
trace?: never;
|
|
225
|
+
};
|
|
226
|
+
"/polymarket/market/metrics": {
|
|
227
|
+
parameters: {
|
|
228
|
+
query?: never;
|
|
229
|
+
header?: never;
|
|
230
|
+
path?: never;
|
|
231
|
+
cookie?: never;
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Get market metrics
|
|
235
|
+
* @description Retrieve volume, transaction, and trader metrics for a market. Supports single timeframe (e.g., '1m'), multiple timeframes (e.g., '1m,5m,1h'), or 'all' to get all available timeframes.
|
|
236
|
+
*/
|
|
237
|
+
get: operations["get_market_metrics"];
|
|
238
|
+
put?: never;
|
|
239
|
+
post?: never;
|
|
240
|
+
delete?: never;
|
|
241
|
+
options?: never;
|
|
242
|
+
head?: never;
|
|
243
|
+
patch?: never;
|
|
244
|
+
trace?: never;
|
|
245
|
+
};
|
|
246
|
+
"/polymarket/market/position/candlestick": {
|
|
247
|
+
parameters: {
|
|
248
|
+
query?: never;
|
|
249
|
+
header?: never;
|
|
250
|
+
path?: never;
|
|
251
|
+
cookie?: never;
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Get position candlesticks by position_id
|
|
255
|
+
* @description Retrieve OHLCV candlestick data for a specific position by its position_id
|
|
256
|
+
*/
|
|
257
|
+
get: operations["get_position_candlestick"];
|
|
258
|
+
put?: never;
|
|
259
|
+
post?: never;
|
|
260
|
+
delete?: never;
|
|
261
|
+
options?: never;
|
|
262
|
+
head?: never;
|
|
263
|
+
patch?: never;
|
|
264
|
+
trace?: never;
|
|
265
|
+
};
|
|
266
|
+
"/polymarket/market/position/metrics": {
|
|
267
|
+
parameters: {
|
|
268
|
+
query?: never;
|
|
269
|
+
header?: never;
|
|
270
|
+
path?: never;
|
|
271
|
+
cookie?: never;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Get position metrics
|
|
275
|
+
* @description Retrieve volume, transaction, and trader metrics for a specific position. Supports single timeframe (e.g., '1m'), multiple timeframes (e.g., '1m,5m,1h'), or 'all' to get all available timeframes.
|
|
276
|
+
*/
|
|
277
|
+
get: operations["get_position_metrics"];
|
|
278
|
+
put?: never;
|
|
279
|
+
post?: never;
|
|
280
|
+
delete?: never;
|
|
281
|
+
options?: never;
|
|
282
|
+
head?: never;
|
|
283
|
+
patch?: never;
|
|
284
|
+
trace?: never;
|
|
285
|
+
};
|
|
286
|
+
"/polymarket/market/position/volume-chart": {
|
|
287
|
+
parameters: {
|
|
288
|
+
query?: never;
|
|
289
|
+
header?: never;
|
|
290
|
+
path?: never;
|
|
291
|
+
cookie?: never;
|
|
292
|
+
};
|
|
293
|
+
/**
|
|
294
|
+
* Get position volume chart
|
|
295
|
+
* @description Retrieve volume over time for a specific position with buy/sell breakdown
|
|
296
|
+
*/
|
|
297
|
+
get: operations["get_position_volume_chart"];
|
|
298
|
+
put?: never;
|
|
299
|
+
post?: never;
|
|
300
|
+
delete?: never;
|
|
301
|
+
options?: never;
|
|
302
|
+
head?: never;
|
|
303
|
+
patch?: never;
|
|
304
|
+
trace?: never;
|
|
305
|
+
};
|
|
306
|
+
"/polymarket/market/slug/{slug}": {
|
|
307
|
+
parameters: {
|
|
308
|
+
query?: never;
|
|
309
|
+
header?: never;
|
|
310
|
+
path?: never;
|
|
311
|
+
cookie?: never;
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Get market by slug
|
|
315
|
+
* @description Retrieve detailed market information by its slug
|
|
316
|
+
*/
|
|
317
|
+
get: operations["get_market_by_slug"];
|
|
318
|
+
put?: never;
|
|
319
|
+
post?: never;
|
|
320
|
+
delete?: never;
|
|
321
|
+
options?: never;
|
|
322
|
+
head?: never;
|
|
323
|
+
patch?: never;
|
|
324
|
+
trace?: never;
|
|
325
|
+
};
|
|
326
|
+
"/polymarket/market/trades": {
|
|
327
|
+
parameters: {
|
|
328
|
+
query?: never;
|
|
329
|
+
header?: never;
|
|
330
|
+
path?: never;
|
|
331
|
+
cookie?: never;
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* Get market trades
|
|
335
|
+
* @description Retrieve trades for one or more markets, with filtering by trader, side, price, amount, and time range
|
|
336
|
+
*/
|
|
337
|
+
get: operations["get_market_trades"];
|
|
338
|
+
put?: never;
|
|
339
|
+
post?: never;
|
|
340
|
+
delete?: never;
|
|
341
|
+
options?: never;
|
|
342
|
+
head?: never;
|
|
343
|
+
patch?: never;
|
|
344
|
+
trace?: never;
|
|
345
|
+
};
|
|
346
|
+
"/polymarket/market/volume-chart": {
|
|
347
|
+
parameters: {
|
|
348
|
+
query?: never;
|
|
349
|
+
header?: never;
|
|
350
|
+
path?: never;
|
|
351
|
+
cookie?: never;
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* Get market volume chart
|
|
355
|
+
* @description Retrieve volume breakdown by YES/NO outcome over time for a prediction market
|
|
356
|
+
*/
|
|
357
|
+
get: operations["get_market_volume_chart"];
|
|
358
|
+
put?: never;
|
|
359
|
+
post?: never;
|
|
360
|
+
delete?: never;
|
|
361
|
+
options?: never;
|
|
362
|
+
head?: never;
|
|
363
|
+
patch?: never;
|
|
364
|
+
trace?: never;
|
|
365
|
+
};
|
|
366
|
+
"/polymarket/market/{condition_id}": {
|
|
367
|
+
parameters: {
|
|
368
|
+
query?: never;
|
|
369
|
+
header?: never;
|
|
370
|
+
path?: never;
|
|
371
|
+
cookie?: never;
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* Get market by condition ID
|
|
375
|
+
* @description Retrieve detailed market information by its condition ID
|
|
376
|
+
*/
|
|
377
|
+
get: operations["get_market"];
|
|
378
|
+
put?: never;
|
|
379
|
+
post?: never;
|
|
380
|
+
delete?: never;
|
|
381
|
+
options?: never;
|
|
382
|
+
head?: never;
|
|
383
|
+
patch?: never;
|
|
384
|
+
trace?: never;
|
|
385
|
+
};
|
|
386
|
+
"/polymarket/search": {
|
|
387
|
+
parameters: {
|
|
388
|
+
query?: never;
|
|
389
|
+
header?: never;
|
|
390
|
+
path?: never;
|
|
391
|
+
cookie?: never;
|
|
392
|
+
};
|
|
393
|
+
/**
|
|
394
|
+
* Search events or traders
|
|
395
|
+
* @description Search across events and traders by keyword
|
|
396
|
+
*/
|
|
397
|
+
get: operations["search"];
|
|
398
|
+
put?: never;
|
|
399
|
+
post?: never;
|
|
400
|
+
delete?: never;
|
|
401
|
+
options?: never;
|
|
402
|
+
head?: never;
|
|
403
|
+
patch?: never;
|
|
404
|
+
trace?: never;
|
|
405
|
+
};
|
|
406
|
+
"/polymarket/series": {
|
|
407
|
+
parameters: {
|
|
408
|
+
query?: never;
|
|
409
|
+
header?: never;
|
|
410
|
+
path?: never;
|
|
411
|
+
cookie?: never;
|
|
412
|
+
};
|
|
413
|
+
/**
|
|
414
|
+
* Get series
|
|
415
|
+
* @description Retrieve a paginated list of event series
|
|
416
|
+
*/
|
|
417
|
+
get: operations["get_series_list"];
|
|
418
|
+
put?: never;
|
|
419
|
+
post?: never;
|
|
420
|
+
delete?: never;
|
|
421
|
+
options?: never;
|
|
422
|
+
head?: never;
|
|
423
|
+
patch?: never;
|
|
424
|
+
trace?: never;
|
|
425
|
+
};
|
|
426
|
+
"/polymarket/series/{identifier}": {
|
|
427
|
+
parameters: {
|
|
428
|
+
query?: never;
|
|
429
|
+
header?: never;
|
|
430
|
+
path?: never;
|
|
431
|
+
cookie?: never;
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* Get series by ID
|
|
435
|
+
* @description Retrieve a single series by its ID or slug
|
|
436
|
+
*/
|
|
437
|
+
get: operations["get_series_by_id"];
|
|
438
|
+
put?: never;
|
|
439
|
+
post?: never;
|
|
440
|
+
delete?: never;
|
|
441
|
+
options?: never;
|
|
442
|
+
head?: never;
|
|
443
|
+
patch?: never;
|
|
444
|
+
trace?: never;
|
|
445
|
+
};
|
|
446
|
+
"/polymarket/series/{identifier}/events": {
|
|
447
|
+
parameters: {
|
|
448
|
+
query?: never;
|
|
449
|
+
header?: never;
|
|
450
|
+
path?: never;
|
|
451
|
+
cookie?: never;
|
|
452
|
+
};
|
|
453
|
+
/**
|
|
454
|
+
* Get events from series
|
|
455
|
+
* @description Retrieve all events belonging to a specific series
|
|
456
|
+
*/
|
|
457
|
+
get: operations["get_series_events"];
|
|
458
|
+
put?: never;
|
|
459
|
+
post?: never;
|
|
460
|
+
delete?: never;
|
|
461
|
+
options?: never;
|
|
462
|
+
head?: never;
|
|
463
|
+
patch?: never;
|
|
464
|
+
trace?: never;
|
|
465
|
+
};
|
|
466
|
+
"/polymarket/tags": {
|
|
467
|
+
parameters: {
|
|
468
|
+
query?: never;
|
|
469
|
+
header?: never;
|
|
470
|
+
path?: never;
|
|
471
|
+
cookie?: never;
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* Get tags
|
|
475
|
+
* @description Retrieve all available event tags/categories. Uses cursor-based pagination for efficient traversal.
|
|
476
|
+
*/
|
|
477
|
+
get: operations["get_tags"];
|
|
478
|
+
put?: never;
|
|
479
|
+
post?: never;
|
|
480
|
+
delete?: never;
|
|
481
|
+
options?: never;
|
|
482
|
+
head?: never;
|
|
483
|
+
patch?: never;
|
|
484
|
+
trace?: never;
|
|
485
|
+
};
|
|
486
|
+
"/polymarket/tags/{identifier}": {
|
|
487
|
+
parameters: {
|
|
488
|
+
query?: never;
|
|
489
|
+
header?: never;
|
|
490
|
+
path?: never;
|
|
491
|
+
cookie?: never;
|
|
492
|
+
};
|
|
493
|
+
/**
|
|
494
|
+
* Get tag by slug
|
|
495
|
+
* @description Retrieve a single tag by its ID or slug
|
|
496
|
+
*/
|
|
497
|
+
get: operations["get_tag_by_id"];
|
|
498
|
+
put?: never;
|
|
499
|
+
post?: never;
|
|
500
|
+
delete?: never;
|
|
501
|
+
options?: never;
|
|
502
|
+
head?: never;
|
|
503
|
+
patch?: never;
|
|
504
|
+
trace?: never;
|
|
505
|
+
};
|
|
506
|
+
"/polymarket/trader/global_pnl": {
|
|
507
|
+
parameters: {
|
|
508
|
+
query?: never;
|
|
509
|
+
header?: never;
|
|
510
|
+
path?: never;
|
|
511
|
+
cookie?: never;
|
|
512
|
+
};
|
|
513
|
+
/**
|
|
514
|
+
* Get global leaderboard
|
|
515
|
+
* @description Retrieve the global PnL leaderboard ranked by profit and loss. Uses cursor-based pagination for efficient traversal of large datasets.
|
|
516
|
+
*/
|
|
517
|
+
get: operations["get_global_pnl"];
|
|
518
|
+
put?: never;
|
|
519
|
+
post?: never;
|
|
520
|
+
delete?: never;
|
|
521
|
+
options?: never;
|
|
522
|
+
head?: never;
|
|
523
|
+
patch?: never;
|
|
524
|
+
trace?: never;
|
|
525
|
+
};
|
|
526
|
+
"/polymarket/trader/pnl/{address}": {
|
|
527
|
+
parameters: {
|
|
528
|
+
query?: never;
|
|
529
|
+
header?: never;
|
|
530
|
+
path?: never;
|
|
531
|
+
cookie?: never;
|
|
532
|
+
};
|
|
533
|
+
/**
|
|
534
|
+
* Get trader PnL summary
|
|
535
|
+
* @description Retrieve a trader's overall profit and loss summary
|
|
536
|
+
*/
|
|
537
|
+
get: operations["get_trader_pnl"];
|
|
538
|
+
put?: never;
|
|
539
|
+
post?: never;
|
|
540
|
+
delete?: never;
|
|
541
|
+
options?: never;
|
|
542
|
+
head?: never;
|
|
543
|
+
patch?: never;
|
|
544
|
+
trace?: never;
|
|
545
|
+
};
|
|
546
|
+
"/polymarket/trader/pnl/{address}/candles": {
|
|
547
|
+
parameters: {
|
|
548
|
+
query?: never;
|
|
549
|
+
header?: never;
|
|
550
|
+
path?: never;
|
|
551
|
+
cookie?: never;
|
|
552
|
+
};
|
|
553
|
+
/**
|
|
554
|
+
* Get trader PnL candles
|
|
555
|
+
* @description Retrieve PnL candle data for charting a trader's equity curve over time
|
|
556
|
+
*/
|
|
557
|
+
get: operations["get_trader_pnl_candles"];
|
|
558
|
+
put?: never;
|
|
559
|
+
post?: never;
|
|
560
|
+
delete?: never;
|
|
561
|
+
options?: never;
|
|
562
|
+
head?: never;
|
|
563
|
+
patch?: never;
|
|
564
|
+
trace?: never;
|
|
565
|
+
};
|
|
566
|
+
"/polymarket/trader/pnl/{address}/events": {
|
|
567
|
+
parameters: {
|
|
568
|
+
query?: never;
|
|
569
|
+
header?: never;
|
|
570
|
+
path?: never;
|
|
571
|
+
cookie?: never;
|
|
572
|
+
};
|
|
573
|
+
/**
|
|
574
|
+
* Get trader event PnL
|
|
575
|
+
* @description Retrieve event-level PnL breakdown for a trader
|
|
576
|
+
*/
|
|
577
|
+
get: operations["get_trader_event_pnl"];
|
|
578
|
+
put?: never;
|
|
579
|
+
post?: never;
|
|
580
|
+
delete?: never;
|
|
581
|
+
options?: never;
|
|
582
|
+
head?: never;
|
|
583
|
+
patch?: never;
|
|
584
|
+
trace?: never;
|
|
585
|
+
};
|
|
586
|
+
"/polymarket/trader/pnl/{address}/markets": {
|
|
587
|
+
parameters: {
|
|
588
|
+
query?: never;
|
|
589
|
+
header?: never;
|
|
590
|
+
path?: never;
|
|
591
|
+
cookie?: never;
|
|
592
|
+
};
|
|
593
|
+
/**
|
|
594
|
+
* Get trader market PnL
|
|
595
|
+
* @description Retrieve market-level PnL breakdown for a trader
|
|
596
|
+
*/
|
|
597
|
+
get: operations["get_trader_market_pnl"];
|
|
598
|
+
put?: never;
|
|
599
|
+
post?: never;
|
|
600
|
+
delete?: never;
|
|
601
|
+
options?: never;
|
|
602
|
+
head?: never;
|
|
603
|
+
patch?: never;
|
|
604
|
+
trace?: never;
|
|
605
|
+
};
|
|
606
|
+
"/polymarket/trader/pnl/{address}/positions": {
|
|
607
|
+
parameters: {
|
|
608
|
+
query?: never;
|
|
609
|
+
header?: never;
|
|
610
|
+
path?: never;
|
|
611
|
+
cookie?: never;
|
|
612
|
+
};
|
|
613
|
+
/**
|
|
614
|
+
* Get trader position PnL
|
|
615
|
+
* @description Retrieve position-level PnL breakdown for a trader
|
|
616
|
+
*/
|
|
617
|
+
get: operations["get_trader_position_pnl"];
|
|
618
|
+
put?: never;
|
|
619
|
+
post?: never;
|
|
620
|
+
delete?: never;
|
|
621
|
+
options?: never;
|
|
622
|
+
head?: never;
|
|
623
|
+
patch?: never;
|
|
624
|
+
trace?: never;
|
|
625
|
+
};
|
|
626
|
+
"/polymarket/trader/portfolio/{address}": {
|
|
627
|
+
parameters: {
|
|
628
|
+
query?: never;
|
|
629
|
+
header?: never;
|
|
630
|
+
path?: never;
|
|
631
|
+
cookie?: never;
|
|
632
|
+
};
|
|
633
|
+
/**
|
|
634
|
+
* Get trader portfolio
|
|
635
|
+
* @description Retrieve a trader's portfolio overview including balances and active positions
|
|
636
|
+
*/
|
|
637
|
+
get: operations["get_portfolio"];
|
|
638
|
+
put?: never;
|
|
639
|
+
post?: never;
|
|
640
|
+
delete?: never;
|
|
641
|
+
options?: never;
|
|
642
|
+
head?: never;
|
|
643
|
+
patch?: never;
|
|
644
|
+
trace?: never;
|
|
645
|
+
};
|
|
646
|
+
"/polymarket/trader/positions/{address}": {
|
|
647
|
+
parameters: {
|
|
648
|
+
query?: never;
|
|
649
|
+
header?: never;
|
|
650
|
+
path?: never;
|
|
651
|
+
cookie?: never;
|
|
652
|
+
};
|
|
653
|
+
/**
|
|
654
|
+
* Get trader positions
|
|
655
|
+
* @description Retrieve a trader's active or closed positions with optional PnL data
|
|
656
|
+
*/
|
|
657
|
+
get: operations["get_portfolio_positions"];
|
|
658
|
+
put?: never;
|
|
659
|
+
post?: never;
|
|
660
|
+
delete?: never;
|
|
661
|
+
options?: never;
|
|
662
|
+
head?: never;
|
|
663
|
+
patch?: never;
|
|
664
|
+
trace?: never;
|
|
665
|
+
};
|
|
666
|
+
"/polymarket/trader/profile/{address}": {
|
|
667
|
+
parameters: {
|
|
668
|
+
query?: never;
|
|
669
|
+
header?: never;
|
|
670
|
+
path?: never;
|
|
671
|
+
cookie?: never;
|
|
672
|
+
};
|
|
673
|
+
/**
|
|
674
|
+
* Get trader overview
|
|
675
|
+
* @description Retrieve a trader's profile including stats and trading history summary
|
|
676
|
+
*/
|
|
677
|
+
get: operations["get_trader_profile"];
|
|
678
|
+
put?: never;
|
|
679
|
+
post?: never;
|
|
680
|
+
delete?: never;
|
|
681
|
+
options?: never;
|
|
682
|
+
head?: never;
|
|
683
|
+
patch?: never;
|
|
684
|
+
trace?: never;
|
|
685
|
+
};
|
|
686
|
+
"/polymarket/trader/profiles/batch": {
|
|
687
|
+
parameters: {
|
|
688
|
+
query?: never;
|
|
689
|
+
header?: never;
|
|
690
|
+
path?: never;
|
|
691
|
+
cookie?: never;
|
|
692
|
+
};
|
|
693
|
+
/**
|
|
694
|
+
* Get multiple trader profiles
|
|
695
|
+
* @description Retrieve profiles for multiple traders in a single request. Returns a map of address -> profile.
|
|
696
|
+
*/
|
|
697
|
+
get: operations["get_trader_profiles_batch"];
|
|
698
|
+
put?: never;
|
|
699
|
+
post?: never;
|
|
700
|
+
delete?: never;
|
|
701
|
+
options?: never;
|
|
702
|
+
head?: never;
|
|
703
|
+
patch?: never;
|
|
704
|
+
trace?: never;
|
|
705
|
+
};
|
|
706
|
+
"/polymarket/trader/trades/{address}": {
|
|
707
|
+
parameters: {
|
|
708
|
+
query?: never;
|
|
709
|
+
header?: never;
|
|
710
|
+
path?: never;
|
|
711
|
+
cookie?: never;
|
|
712
|
+
};
|
|
713
|
+
/**
|
|
714
|
+
* Get trader trades
|
|
715
|
+
* @description Retrieve trade history for a specific trader across all markets
|
|
716
|
+
*/
|
|
717
|
+
get: operations["get_trader_trades"];
|
|
718
|
+
put?: never;
|
|
719
|
+
post?: never;
|
|
720
|
+
delete?: never;
|
|
721
|
+
options?: never;
|
|
722
|
+
head?: never;
|
|
723
|
+
patch?: never;
|
|
724
|
+
trace?: never;
|
|
725
|
+
};
|
|
726
|
+
"/polymarket/trader/volume-chart/{address}": {
|
|
727
|
+
parameters: {
|
|
728
|
+
query?: never;
|
|
729
|
+
header?: never;
|
|
730
|
+
path?: never;
|
|
731
|
+
cookie?: never;
|
|
732
|
+
};
|
|
733
|
+
/**
|
|
734
|
+
* Get trader volume chart
|
|
735
|
+
* @description Retrieve volume breakdown by buy/sell over time for a specific trader
|
|
736
|
+
*/
|
|
737
|
+
get: operations["get_trader_volume_chart"];
|
|
738
|
+
put?: never;
|
|
739
|
+
post?: never;
|
|
740
|
+
delete?: never;
|
|
741
|
+
options?: never;
|
|
742
|
+
head?: never;
|
|
743
|
+
patch?: never;
|
|
744
|
+
trace?: never;
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
export type webhooks = Record<string, never>;
|
|
748
|
+
export interface components {
|
|
749
|
+
schemas: {
|
|
750
|
+
BondMarket: {
|
|
751
|
+
condition_id: string;
|
|
752
|
+
title?: string | null;
|
|
753
|
+
question: string;
|
|
754
|
+
slug: string;
|
|
755
|
+
event_slug?: string | null;
|
|
756
|
+
image_url?: string | null;
|
|
757
|
+
/** Format: int64 */
|
|
758
|
+
end_date: number;
|
|
759
|
+
/** Format: int32 */
|
|
760
|
+
best_outcome_index: number;
|
|
761
|
+
/** Format: double */
|
|
762
|
+
return_pct: number;
|
|
763
|
+
/** Format: double */
|
|
764
|
+
apy: number;
|
|
765
|
+
/** Format: double */
|
|
766
|
+
usd_volume_24h?: number | null;
|
|
767
|
+
outcomes: components["schemas"]["BondOutcome"][];
|
|
768
|
+
};
|
|
769
|
+
BondOutcome: {
|
|
770
|
+
name: string;
|
|
771
|
+
/** Format: int32 */
|
|
772
|
+
index: number;
|
|
773
|
+
/** Format: double */
|
|
774
|
+
probability: number;
|
|
775
|
+
position_id: string;
|
|
776
|
+
};
|
|
777
|
+
/** @enum {string} */
|
|
778
|
+
CandlestickResolution: "1" | "5" | "15" | "30" | "60" | "240" | "D" | "1D";
|
|
779
|
+
/** @description CLOB reward (public API format) */
|
|
780
|
+
ClobReward: {
|
|
781
|
+
id: string;
|
|
782
|
+
condition_id: string;
|
|
783
|
+
asset_address?: string | null;
|
|
784
|
+
/** Format: double */
|
|
785
|
+
rewards_amount?: number | null;
|
|
786
|
+
/** Format: double */
|
|
787
|
+
rewards_daily_rate?: number | null;
|
|
788
|
+
start_date?: string | null;
|
|
789
|
+
end_date?: string | null;
|
|
790
|
+
};
|
|
791
|
+
/** @description Response type for condition metrics query */
|
|
792
|
+
ConditionMetricsResponse: {
|
|
793
|
+
condition_id: string;
|
|
794
|
+
timeframe: string;
|
|
795
|
+
volume_usd: string;
|
|
796
|
+
/** Format: double */
|
|
797
|
+
fees: number;
|
|
798
|
+
/** Format: int32 */
|
|
799
|
+
txns: number;
|
|
800
|
+
/** Format: int32 */
|
|
801
|
+
unique_traders: number;
|
|
802
|
+
};
|
|
803
|
+
/** @description Holder data for event-level queries (aggregated across markets) */
|
|
804
|
+
EventHolder: {
|
|
805
|
+
/** @description Trader profile information */
|
|
806
|
+
trader: components["schemas"]["Trader"];
|
|
807
|
+
/** @description Total shares across all positions in this event */
|
|
808
|
+
total_shares: string;
|
|
809
|
+
/**
|
|
810
|
+
* Format: int32
|
|
811
|
+
* @description Number of distinct positions held
|
|
812
|
+
*/
|
|
813
|
+
position_count: number;
|
|
814
|
+
/** @description USD balance (USDe on Polygon) */
|
|
815
|
+
usd_balance?: string | null;
|
|
816
|
+
pnl?: null | components["schemas"]["EventHolderPnl"];
|
|
817
|
+
};
|
|
818
|
+
/** @description Event-level PnL data for a holder */
|
|
819
|
+
EventHolderPnl: {
|
|
820
|
+
/** Format: double */
|
|
821
|
+
realized_pnl_usd?: number | null;
|
|
822
|
+
/** Format: double */
|
|
823
|
+
total_volume_usd?: number | null;
|
|
824
|
+
/** Format: double */
|
|
825
|
+
buy_usd?: number | null;
|
|
826
|
+
/** Format: double */
|
|
827
|
+
sell_usd?: number | null;
|
|
828
|
+
/** Format: double */
|
|
829
|
+
total_fees?: number | null;
|
|
830
|
+
/** Format: int64 */
|
|
831
|
+
markets_traded?: number | null;
|
|
832
|
+
/** Format: int64 */
|
|
833
|
+
winning_markets?: number | null;
|
|
834
|
+
/** Format: int64 */
|
|
835
|
+
losing_markets?: number | null;
|
|
836
|
+
/** Format: int64 */
|
|
837
|
+
first_trade_at?: number | null;
|
|
838
|
+
/** Format: int64 */
|
|
839
|
+
last_trade_at?: number | null;
|
|
840
|
+
};
|
|
841
|
+
/** @description Response for event holders endpoint */
|
|
842
|
+
EventHoldersResponse: {
|
|
843
|
+
/** @description Event slug */
|
|
844
|
+
event_slug: string;
|
|
845
|
+
/** @description Event title */
|
|
846
|
+
title?: string | null;
|
|
847
|
+
/**
|
|
848
|
+
* Format: int64
|
|
849
|
+
* @description Total unique holders across all markets (from holder_stats)
|
|
850
|
+
*/
|
|
851
|
+
total_holders: number;
|
|
852
|
+
/** @description Top holders across all markets */
|
|
853
|
+
holders: components["schemas"]["EventHolder"][];
|
|
854
|
+
/** @description Pagination info */
|
|
855
|
+
has_more: boolean;
|
|
856
|
+
};
|
|
857
|
+
/** @description Enriched market data for event API responses */
|
|
858
|
+
EventMarket: {
|
|
859
|
+
/** @default */
|
|
860
|
+
condition_id: string;
|
|
861
|
+
/** @default null */
|
|
862
|
+
id: string | null;
|
|
863
|
+
/** @default null */
|
|
864
|
+
title: string | null;
|
|
865
|
+
/** @default */
|
|
866
|
+
question: string;
|
|
867
|
+
/** @default */
|
|
868
|
+
slug: string;
|
|
869
|
+
/** @default */
|
|
870
|
+
status: string;
|
|
871
|
+
/**
|
|
872
|
+
* Format: int64
|
|
873
|
+
* @default null
|
|
874
|
+
*/
|
|
875
|
+
end_date: number | null;
|
|
876
|
+
/**
|
|
877
|
+
* Format: double
|
|
878
|
+
* @default null
|
|
879
|
+
*/
|
|
880
|
+
volume: number | null;
|
|
881
|
+
/**
|
|
882
|
+
* Format: double
|
|
883
|
+
* @default null
|
|
884
|
+
*/
|
|
885
|
+
liquidity_usd: number | null;
|
|
886
|
+
/**
|
|
887
|
+
* Format: double
|
|
888
|
+
* @default null
|
|
889
|
+
*/
|
|
890
|
+
volume_24hr: number | null;
|
|
891
|
+
/** @default null */
|
|
892
|
+
image_url: string | null;
|
|
893
|
+
/** @default null */
|
|
894
|
+
market_maker_address: string | null;
|
|
895
|
+
/** @default null */
|
|
896
|
+
creator: string | null;
|
|
897
|
+
/** @default null */
|
|
898
|
+
category: string | null;
|
|
899
|
+
/** @default [] */
|
|
900
|
+
clob_rewards: components["schemas"]["ClobReward"][];
|
|
901
|
+
/** @default {} */
|
|
902
|
+
metrics: {
|
|
903
|
+
[key: string]: components["schemas"]["SimpleTimeframeMetrics"];
|
|
904
|
+
};
|
|
905
|
+
/** @default [] */
|
|
906
|
+
outcomes: components["schemas"]["EventMarketOutcome"][];
|
|
907
|
+
};
|
|
908
|
+
/** @description Market outcome with probability for event API responses */
|
|
909
|
+
EventMarketOutcome: {
|
|
910
|
+
name: string;
|
|
911
|
+
/** Format: double */
|
|
912
|
+
probability?: number | null;
|
|
913
|
+
position_id?: string | null;
|
|
914
|
+
};
|
|
915
|
+
/** @description Response type for event metrics query */
|
|
916
|
+
EventMetricsResponse: {
|
|
917
|
+
event_slug: string;
|
|
918
|
+
timeframe: string;
|
|
919
|
+
volume_usd: string;
|
|
920
|
+
/** Format: double */
|
|
921
|
+
fees: number;
|
|
922
|
+
/** Format: int32 */
|
|
923
|
+
txns: number;
|
|
924
|
+
/** Format: int32 */
|
|
925
|
+
unique_traders: number;
|
|
926
|
+
};
|
|
927
|
+
/** @enum {string} */
|
|
928
|
+
EventPnlSortBy: "realized_pnl_usd" | "total_volume_usd" | "markets_traded" | "total_fees";
|
|
929
|
+
/** @enum {string} */
|
|
930
|
+
EventSortBy: "volume" | "txns" | "unique_traders" | "market_count" | "creation_date" | "end_date";
|
|
931
|
+
/** @enum {string} */
|
|
932
|
+
GlobalPnlSortBy: "pnl_usd" | "win_rate" | "wins" | "losses" | "buys" | "sells" | "redemptions" | "merges" | "avg_hold_time" | "positions_traded" | "markets_traded" | "events_traded" | "markets_won" | "volume_usd" | "fees";
|
|
933
|
+
/** @description Individual trader entry in the global PnL leaderboard */
|
|
934
|
+
GlobalPnlTrader: {
|
|
935
|
+
trader: components["schemas"]["TraderInfo"];
|
|
936
|
+
/** Format: double */
|
|
937
|
+
pnl_usd?: number | null;
|
|
938
|
+
/** Format: int64 */
|
|
939
|
+
events_traded?: number | null;
|
|
940
|
+
/** Format: int64 */
|
|
941
|
+
positions_traded?: number | null;
|
|
942
|
+
/** Format: int64 */
|
|
943
|
+
markets_traded?: number | null;
|
|
944
|
+
/** Format: int64 */
|
|
945
|
+
winning_positions?: number | null;
|
|
946
|
+
/** Format: int64 */
|
|
947
|
+
losing_positions?: number | null;
|
|
948
|
+
/** Format: double */
|
|
949
|
+
win_rate_pct?: number | null;
|
|
950
|
+
/** Format: int64 */
|
|
951
|
+
markets_won?: number | null;
|
|
952
|
+
/** Format: int64 */
|
|
953
|
+
markets_lost?: number | null;
|
|
954
|
+
/** Format: double */
|
|
955
|
+
market_win_rate_pct?: number | null;
|
|
956
|
+
/** Format: double */
|
|
957
|
+
total_volume_usd?: number | null;
|
|
958
|
+
/** Format: double */
|
|
959
|
+
buy_volume_usd?: number | null;
|
|
960
|
+
/** Format: double */
|
|
961
|
+
sell_volume_usd?: number | null;
|
|
962
|
+
/** Format: double */
|
|
963
|
+
redemption_volume_usd?: number | null;
|
|
964
|
+
/** Format: double */
|
|
965
|
+
merge_volume_usd?: number | null;
|
|
966
|
+
/** Format: int64 */
|
|
967
|
+
total_buys?: number | null;
|
|
968
|
+
/** Format: int64 */
|
|
969
|
+
total_sells?: number | null;
|
|
970
|
+
/** Format: int64 */
|
|
971
|
+
total_redemptions?: number | null;
|
|
972
|
+
/** Format: int64 */
|
|
973
|
+
total_merges?: number | null;
|
|
974
|
+
/** Format: int64 */
|
|
975
|
+
total_trades?: number | null;
|
|
976
|
+
/** Format: int64 */
|
|
977
|
+
open_positions?: number | null;
|
|
978
|
+
/** Format: double */
|
|
979
|
+
total_fees?: number | null;
|
|
980
|
+
/** Format: double */
|
|
981
|
+
avg_pnl_per_position?: number | null;
|
|
982
|
+
/** Format: double */
|
|
983
|
+
avg_pnl_per_trade?: number | null;
|
|
984
|
+
/** Format: double */
|
|
985
|
+
avg_hold_time_seconds?: number | null;
|
|
986
|
+
/** Format: int64 */
|
|
987
|
+
first_trade_at?: number | null;
|
|
988
|
+
/** Format: int64 */
|
|
989
|
+
last_trade_at?: number | null;
|
|
990
|
+
};
|
|
991
|
+
/** @description Individual holder data */
|
|
992
|
+
Holder: {
|
|
993
|
+
/** @description Trader profile information */
|
|
994
|
+
trader: components["schemas"]["Trader"];
|
|
995
|
+
/** @description Position shares held (raw balance as string for precision) */
|
|
996
|
+
shares: string;
|
|
997
|
+
/** @description USD value of shares (shares * latest price) */
|
|
998
|
+
shares_usd?: string | null;
|
|
999
|
+
/** @description USD balance of wallet (USDe on Polygon) */
|
|
1000
|
+
usd_balance?: string | null;
|
|
1001
|
+
pnl?: null | components["schemas"]["PositionHolderPnl"];
|
|
1002
|
+
};
|
|
1003
|
+
/** @description Holder statistics data point (single time bucket) */
|
|
1004
|
+
HolderHistoryCandle: {
|
|
1005
|
+
/** Format: date-time */
|
|
1006
|
+
bucket: string;
|
|
1007
|
+
/** Format: int64 */
|
|
1008
|
+
total_holders?: number | null;
|
|
1009
|
+
/** Format: int64 */
|
|
1010
|
+
bot_holders?: number | null;
|
|
1011
|
+
/** Format: int64 */
|
|
1012
|
+
insider_holders?: number | null;
|
|
1013
|
+
/** Format: int64 */
|
|
1014
|
+
smart_money_holders?: number | null;
|
|
1015
|
+
};
|
|
1016
|
+
/** @description Market-level PnL data for a holder */
|
|
1017
|
+
MarketHolderPnl: {
|
|
1018
|
+
/** Format: double */
|
|
1019
|
+
realized_pnl_usd?: number | null;
|
|
1020
|
+
/** Format: double */
|
|
1021
|
+
buy_usd?: number | null;
|
|
1022
|
+
/** Format: double */
|
|
1023
|
+
sell_usd?: number | null;
|
|
1024
|
+
/** Format: double */
|
|
1025
|
+
total_fees?: number | null;
|
|
1026
|
+
/** Format: int64 */
|
|
1027
|
+
outcomes_traded?: number | null;
|
|
1028
|
+
/** Format: int64 */
|
|
1029
|
+
total_buys?: number | null;
|
|
1030
|
+
/** Format: int64 */
|
|
1031
|
+
total_sells?: number | null;
|
|
1032
|
+
/** Format: int64 */
|
|
1033
|
+
winning_outcomes?: number | null;
|
|
1034
|
+
/** Format: int64 */
|
|
1035
|
+
losing_outcomes?: number | null;
|
|
1036
|
+
/** Format: int64 */
|
|
1037
|
+
first_trade_at?: number | null;
|
|
1038
|
+
/** Format: int64 */
|
|
1039
|
+
last_trade_at?: number | null;
|
|
1040
|
+
};
|
|
1041
|
+
/** @description Response for market (condition_id) holders endpoint */
|
|
1042
|
+
MarketHoldersResponse: {
|
|
1043
|
+
/** @description Market condition ID */
|
|
1044
|
+
condition_id: string;
|
|
1045
|
+
/** @description Market question/title */
|
|
1046
|
+
question?: string | null;
|
|
1047
|
+
/** @description Market slug */
|
|
1048
|
+
slug?: string | null;
|
|
1049
|
+
/**
|
|
1050
|
+
* Format: int64
|
|
1051
|
+
* @description Total unique holders across all outcomes (from holder_stats)
|
|
1052
|
+
*/
|
|
1053
|
+
total_holders: number;
|
|
1054
|
+
/** @description Holders grouped by outcome */
|
|
1055
|
+
outcomes: components["schemas"]["OutcomeHolders"][];
|
|
1056
|
+
};
|
|
1057
|
+
/** @description Market metadata (enriched, cached version) */
|
|
1058
|
+
MarketMetadata: {
|
|
1059
|
+
condition_id: string;
|
|
1060
|
+
question: string;
|
|
1061
|
+
description: string;
|
|
1062
|
+
slug: string;
|
|
1063
|
+
event_slug?: string | null;
|
|
1064
|
+
neg_risk: boolean;
|
|
1065
|
+
tokens: components["schemas"]["TokenOutcome"][];
|
|
1066
|
+
image_url?: string | null;
|
|
1067
|
+
tags: string[];
|
|
1068
|
+
/** Format: int64 */
|
|
1069
|
+
end_date?: number | null;
|
|
1070
|
+
title?: string | null;
|
|
1071
|
+
id?: string | null;
|
|
1072
|
+
/** Format: double */
|
|
1073
|
+
volume_usd?: number | null;
|
|
1074
|
+
/** Format: double */
|
|
1075
|
+
liquidity_usd?: number | null;
|
|
1076
|
+
outcomes: components["schemas"]["MarketOutcome"][];
|
|
1077
|
+
metrics: {
|
|
1078
|
+
[key: string]: number;
|
|
1079
|
+
};
|
|
1080
|
+
market_maker_address?: string | null;
|
|
1081
|
+
creator?: string | null;
|
|
1082
|
+
category?: string | null;
|
|
1083
|
+
clob_rewards: components["schemas"]["ClobReward"][];
|
|
1084
|
+
};
|
|
1085
|
+
/** @description Market outcome with timeframe metrics (websocket API format) */
|
|
1086
|
+
MarketMetadataOutcome: {
|
|
1087
|
+
token_id: string;
|
|
1088
|
+
outcome: string;
|
|
1089
|
+
/** Format: double */
|
|
1090
|
+
last_price?: number | null;
|
|
1091
|
+
/** Format: double */
|
|
1092
|
+
last_probability?: number | null;
|
|
1093
|
+
metrics?: {
|
|
1094
|
+
[key: string]: components["schemas"]["OutcomeTimeframeMetrics"];
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1097
|
+
/** @description Market outcome with price/volume data */
|
|
1098
|
+
MarketOutcome: {
|
|
1099
|
+
/** Format: int32 */
|
|
1100
|
+
index: number;
|
|
1101
|
+
name: string;
|
|
1102
|
+
position_id: string;
|
|
1103
|
+
/** Format: double */
|
|
1104
|
+
price?: number | null;
|
|
1105
|
+
/** Format: double */
|
|
1106
|
+
volume?: number | null;
|
|
1107
|
+
};
|
|
1108
|
+
/** @enum {string} */
|
|
1109
|
+
MarketPnlSortBy: "realized_pnl_usd" | "buy_usd" | "total_buys" | "total_fees" | "outcomes_traded";
|
|
1110
|
+
MarketVolumeChartResponse: {
|
|
1111
|
+
volumes: components["schemas"]["MarketVolumeDataPoint"][];
|
|
1112
|
+
has_more: boolean;
|
|
1113
|
+
};
|
|
1114
|
+
MarketVolumeDataPoint: {
|
|
1115
|
+
/** Format: int64 */
|
|
1116
|
+
timestamp: number;
|
|
1117
|
+
/** Format: double */
|
|
1118
|
+
total_volume: number;
|
|
1119
|
+
/** Format: double */
|
|
1120
|
+
yes_volume: number;
|
|
1121
|
+
/** Format: double */
|
|
1122
|
+
no_volume: number;
|
|
1123
|
+
/** Format: int32 */
|
|
1124
|
+
trades_count: number;
|
|
1125
|
+
/** Format: int32 */
|
|
1126
|
+
yes_trades_count: number;
|
|
1127
|
+
/** Format: int32 */
|
|
1128
|
+
no_trades_count: number;
|
|
1129
|
+
};
|
|
1130
|
+
/** @enum {string} */
|
|
1131
|
+
MetricsTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
|
|
1132
|
+
/** @description Holder data grouped by outcome for market-level queries */
|
|
1133
|
+
OutcomeHolders: {
|
|
1134
|
+
/**
|
|
1135
|
+
* Format: int32
|
|
1136
|
+
* @description Outcome index (0, 1, etc.)
|
|
1137
|
+
*/
|
|
1138
|
+
outcome_index: number;
|
|
1139
|
+
/** @description Outcome name (Yes, No, etc.) */
|
|
1140
|
+
outcome_name: string;
|
|
1141
|
+
/** @description Position ID for this outcome */
|
|
1142
|
+
position_id: string;
|
|
1143
|
+
/**
|
|
1144
|
+
* Format: double
|
|
1145
|
+
* @description Current price/probability
|
|
1146
|
+
*/
|
|
1147
|
+
last_price?: number | null;
|
|
1148
|
+
/**
|
|
1149
|
+
* Format: int64
|
|
1150
|
+
* @description Total holders count from holder_stats
|
|
1151
|
+
*/
|
|
1152
|
+
total_holders: number;
|
|
1153
|
+
/** @description Top holders for this outcome */
|
|
1154
|
+
holders: components["schemas"]["Holder"][];
|
|
1155
|
+
};
|
|
1156
|
+
OutcomeTimeframeMetrics: {
|
|
1157
|
+
/**
|
|
1158
|
+
* Format: double
|
|
1159
|
+
* @default 0
|
|
1160
|
+
*/
|
|
1161
|
+
volume: number;
|
|
1162
|
+
/**
|
|
1163
|
+
* Format: double
|
|
1164
|
+
* @default 0
|
|
1165
|
+
*/
|
|
1166
|
+
buy_volume: number;
|
|
1167
|
+
/**
|
|
1168
|
+
* Format: double
|
|
1169
|
+
* @default 0
|
|
1170
|
+
*/
|
|
1171
|
+
sell_volume: number;
|
|
1172
|
+
/**
|
|
1173
|
+
* Format: int32
|
|
1174
|
+
* @default 0
|
|
1175
|
+
*/
|
|
1176
|
+
txns: number;
|
|
1177
|
+
/**
|
|
1178
|
+
* Format: int32
|
|
1179
|
+
* @default 0
|
|
1180
|
+
*/
|
|
1181
|
+
buys: number;
|
|
1182
|
+
/**
|
|
1183
|
+
* Format: int32
|
|
1184
|
+
* @default 0
|
|
1185
|
+
*/
|
|
1186
|
+
sells: number;
|
|
1187
|
+
/**
|
|
1188
|
+
* Format: double
|
|
1189
|
+
* @default 0
|
|
1190
|
+
*/
|
|
1191
|
+
open_interest_change: number;
|
|
1192
|
+
/**
|
|
1193
|
+
* Format: double
|
|
1194
|
+
* @default null
|
|
1195
|
+
*/
|
|
1196
|
+
price_open: number | null;
|
|
1197
|
+
/**
|
|
1198
|
+
* Format: double
|
|
1199
|
+
* @default null
|
|
1200
|
+
*/
|
|
1201
|
+
price_close: number | null;
|
|
1202
|
+
/**
|
|
1203
|
+
* Format: double
|
|
1204
|
+
* @default null
|
|
1205
|
+
*/
|
|
1206
|
+
price_high: number | null;
|
|
1207
|
+
/**
|
|
1208
|
+
* Format: double
|
|
1209
|
+
* @default null
|
|
1210
|
+
*/
|
|
1211
|
+
price_low: number | null;
|
|
1212
|
+
/**
|
|
1213
|
+
* Format: double
|
|
1214
|
+
* @default null
|
|
1215
|
+
*/
|
|
1216
|
+
probability_open: number | null;
|
|
1217
|
+
/**
|
|
1218
|
+
* Format: double
|
|
1219
|
+
* @default null
|
|
1220
|
+
*/
|
|
1221
|
+
probability_close: number | null;
|
|
1222
|
+
/**
|
|
1223
|
+
* Format: double
|
|
1224
|
+
* @default null
|
|
1225
|
+
*/
|
|
1226
|
+
probability_high: number | null;
|
|
1227
|
+
/**
|
|
1228
|
+
* Format: double
|
|
1229
|
+
* @default null
|
|
1230
|
+
*/
|
|
1231
|
+
probability_low: number | null;
|
|
1232
|
+
/**
|
|
1233
|
+
* Format: double
|
|
1234
|
+
* @default null
|
|
1235
|
+
*/
|
|
1236
|
+
price_change_percent: number | null;
|
|
1237
|
+
};
|
|
1238
|
+
/** @enum {string} */
|
|
1239
|
+
PnlCandleResolution: "1m" | "1h" | "1d";
|
|
1240
|
+
/** @enum {string} */
|
|
1241
|
+
PnlTimeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
1242
|
+
/** @description A Polymarket event from the Gamma API */
|
|
1243
|
+
PolymarketEvent: {
|
|
1244
|
+
/** @default */
|
|
1245
|
+
id: string;
|
|
1246
|
+
/** @default null */
|
|
1247
|
+
slug: string | null;
|
|
1248
|
+
/** @default null */
|
|
1249
|
+
title: string | null;
|
|
1250
|
+
/** @default null */
|
|
1251
|
+
ticker: string | null;
|
|
1252
|
+
/** @default null */
|
|
1253
|
+
description: string | null;
|
|
1254
|
+
/** @default null */
|
|
1255
|
+
resolution_source: string | null;
|
|
1256
|
+
/** @default null */
|
|
1257
|
+
category: string | null;
|
|
1258
|
+
/** @default null */
|
|
1259
|
+
image_url: string | null;
|
|
1260
|
+
/**
|
|
1261
|
+
* Format: int32
|
|
1262
|
+
* @default 0
|
|
1263
|
+
*/
|
|
1264
|
+
market_count: number;
|
|
1265
|
+
/**
|
|
1266
|
+
* Format: int64
|
|
1267
|
+
* @default null
|
|
1268
|
+
*/
|
|
1269
|
+
start_date: number | null;
|
|
1270
|
+
/**
|
|
1271
|
+
* Format: int64
|
|
1272
|
+
* @default null
|
|
1273
|
+
*/
|
|
1274
|
+
end_date: number | null;
|
|
1275
|
+
/** @default false */
|
|
1276
|
+
neg_risk: boolean;
|
|
1277
|
+
/** @default null */
|
|
1278
|
+
neg_risk_market_id: string | null;
|
|
1279
|
+
/** @default null */
|
|
1280
|
+
game_status: string | null;
|
|
1281
|
+
/** @default {} */
|
|
1282
|
+
metrics: {
|
|
1283
|
+
[key: string]: components["schemas"]["SimpleTimeframeMetrics"];
|
|
1284
|
+
};
|
|
1285
|
+
/** @default [] */
|
|
1286
|
+
tags: components["schemas"]["PolymarketTag"][];
|
|
1287
|
+
/** @default [] */
|
|
1288
|
+
markets: components["schemas"]["EventMarket"][];
|
|
1289
|
+
/** @default null */
|
|
1290
|
+
series: null | components["schemas"]["PolymarketSeries"];
|
|
1291
|
+
/**
|
|
1292
|
+
* Format: int64
|
|
1293
|
+
* @default null
|
|
1294
|
+
*/
|
|
1295
|
+
creation_date: number | null;
|
|
1296
|
+
/**
|
|
1297
|
+
* Format: int64
|
|
1298
|
+
* @default null
|
|
1299
|
+
*/
|
|
1300
|
+
closed_time: number | null;
|
|
1301
|
+
};
|
|
1302
|
+
/**
|
|
1303
|
+
* @description A Polymarket series from the Gamma API
|
|
1304
|
+
* Series are parent groupings above events (e.g., "NBA Season 2024-25")
|
|
1305
|
+
*/
|
|
1306
|
+
PolymarketSeries: {
|
|
1307
|
+
/** @default */
|
|
1308
|
+
id: string;
|
|
1309
|
+
/** @default null */
|
|
1310
|
+
slug: string | null;
|
|
1311
|
+
/** @default null */
|
|
1312
|
+
ticker: string | null;
|
|
1313
|
+
/** @default null */
|
|
1314
|
+
title: string | null;
|
|
1315
|
+
/** @default null */
|
|
1316
|
+
description: string | null;
|
|
1317
|
+
/** @default null */
|
|
1318
|
+
series_type: string | null;
|
|
1319
|
+
/** @default null */
|
|
1320
|
+
recurrence: string | null;
|
|
1321
|
+
/** @default null */
|
|
1322
|
+
layout: string | null;
|
|
1323
|
+
/** @default null */
|
|
1324
|
+
image_url: string | null;
|
|
1325
|
+
/** @default null */
|
|
1326
|
+
icon_url: string | null;
|
|
1327
|
+
/** @default false */
|
|
1328
|
+
active: boolean;
|
|
1329
|
+
/** @default false */
|
|
1330
|
+
closed: boolean;
|
|
1331
|
+
/** @default false */
|
|
1332
|
+
archived: boolean;
|
|
1333
|
+
/** @default false */
|
|
1334
|
+
featured: boolean;
|
|
1335
|
+
/** @default false */
|
|
1336
|
+
restricted: boolean;
|
|
1337
|
+
/** @default null */
|
|
1338
|
+
pyth_token_id: string | null;
|
|
1339
|
+
/** @default null */
|
|
1340
|
+
cg_asset_name: string | null;
|
|
1341
|
+
/**
|
|
1342
|
+
* Format: int64
|
|
1343
|
+
* @default null
|
|
1344
|
+
*/
|
|
1345
|
+
start_date: number | null;
|
|
1346
|
+
/**
|
|
1347
|
+
* Format: int32
|
|
1348
|
+
* @default 0
|
|
1349
|
+
*/
|
|
1350
|
+
event_count: number;
|
|
1351
|
+
};
|
|
1352
|
+
/** @description A Polymarket tag from the Gamma API */
|
|
1353
|
+
PolymarketTag: {
|
|
1354
|
+
/** @default */
|
|
1355
|
+
id: string;
|
|
1356
|
+
/** @default */
|
|
1357
|
+
label: string;
|
|
1358
|
+
/** @default null */
|
|
1359
|
+
slug: string | null;
|
|
1360
|
+
};
|
|
1361
|
+
/** @description Polymarket user profile (public API format) */
|
|
1362
|
+
PolymarketUserProfile: {
|
|
1363
|
+
proxy_wallet: string;
|
|
1364
|
+
name?: string | null;
|
|
1365
|
+
pseudonym?: string | null;
|
|
1366
|
+
bio?: string | null;
|
|
1367
|
+
profile_image?: string | null;
|
|
1368
|
+
x_username?: string | null;
|
|
1369
|
+
display_username_public: boolean;
|
|
1370
|
+
verified_badge: boolean;
|
|
1371
|
+
user_id?: string | null;
|
|
1372
|
+
is_creator: boolean;
|
|
1373
|
+
is_mod: boolean;
|
|
1374
|
+
created_at?: string | null;
|
|
1375
|
+
};
|
|
1376
|
+
/** @description PnL data for a holder (position-level) */
|
|
1377
|
+
PositionHolderPnl: {
|
|
1378
|
+
/** Format: double */
|
|
1379
|
+
realized_pnl_usd?: number | null;
|
|
1380
|
+
/** Format: double */
|
|
1381
|
+
buy_usd?: number | null;
|
|
1382
|
+
/** Format: double */
|
|
1383
|
+
sell_usd?: number | null;
|
|
1384
|
+
/** Format: double */
|
|
1385
|
+
total_fees?: number | null;
|
|
1386
|
+
/** Format: double */
|
|
1387
|
+
net_shares?: number | null;
|
|
1388
|
+
/** Format: int64 */
|
|
1389
|
+
buy_count?: number | null;
|
|
1390
|
+
/** Format: int64 */
|
|
1391
|
+
sell_count?: number | null;
|
|
1392
|
+
/** Format: int64 */
|
|
1393
|
+
first_trade_at?: number | null;
|
|
1394
|
+
/** Format: int64 */
|
|
1395
|
+
last_trade_at?: number | null;
|
|
1396
|
+
};
|
|
1397
|
+
/** @description Response for position (position_id) holders endpoint */
|
|
1398
|
+
PositionHoldersResponse: {
|
|
1399
|
+
/** @description Position ID (ERC1155 token ID) */
|
|
1400
|
+
position_id: string;
|
|
1401
|
+
/** @description Condition ID this position belongs to */
|
|
1402
|
+
condition_id?: string | null;
|
|
1403
|
+
/** @description Outcome name */
|
|
1404
|
+
outcome_name?: string | null;
|
|
1405
|
+
/**
|
|
1406
|
+
* Format: int32
|
|
1407
|
+
* @description Outcome index
|
|
1408
|
+
*/
|
|
1409
|
+
outcome_index?: number | null;
|
|
1410
|
+
/**
|
|
1411
|
+
* Format: double
|
|
1412
|
+
* @description Current price
|
|
1413
|
+
*/
|
|
1414
|
+
last_price?: number | null;
|
|
1415
|
+
/**
|
|
1416
|
+
* Format: int64
|
|
1417
|
+
* @description Total holders count from holder_stats
|
|
1418
|
+
*/
|
|
1419
|
+
total_holders: number;
|
|
1420
|
+
/** @description Top holders */
|
|
1421
|
+
holders: components["schemas"]["Holder"][];
|
|
1422
|
+
/** @description Pagination info */
|
|
1423
|
+
has_more: boolean;
|
|
1424
|
+
};
|
|
1425
|
+
/** @description Response type for position metrics query */
|
|
1426
|
+
PositionMetricsResponse: {
|
|
1427
|
+
position_id: string;
|
|
1428
|
+
condition_id: string;
|
|
1429
|
+
timeframe: string;
|
|
1430
|
+
volume_usd: string;
|
|
1431
|
+
buy_volume_usd: string;
|
|
1432
|
+
sell_volume_usd: string;
|
|
1433
|
+
/** Format: double */
|
|
1434
|
+
fees: number;
|
|
1435
|
+
/** Format: int32 */
|
|
1436
|
+
txns: number;
|
|
1437
|
+
/** Format: int32 */
|
|
1438
|
+
buys: number;
|
|
1439
|
+
/** Format: int32 */
|
|
1440
|
+
sells: number;
|
|
1441
|
+
/** Format: int32 */
|
|
1442
|
+
unique_traders: number;
|
|
1443
|
+
/** Format: double */
|
|
1444
|
+
price_open: number;
|
|
1445
|
+
/** Format: double */
|
|
1446
|
+
price_high: number;
|
|
1447
|
+
/** Format: double */
|
|
1448
|
+
price_low: number;
|
|
1449
|
+
/** Format: double */
|
|
1450
|
+
price_close: number;
|
|
1451
|
+
};
|
|
1452
|
+
/** @enum {string} */
|
|
1453
|
+
PositionPnlSortBy: "realized_pnl_usd" | "buy_usd" | "net_shares" | "cost_basis" | "total_fees";
|
|
1454
|
+
/** @enum {string} */
|
|
1455
|
+
PositionStatus: "active" | "resolved" | "all";
|
|
1456
|
+
PositionVolumeChartResponse: {
|
|
1457
|
+
volumes: components["schemas"]["PositionVolumeDataPoint"][];
|
|
1458
|
+
has_more: boolean;
|
|
1459
|
+
};
|
|
1460
|
+
PositionVolumeDataPoint: {
|
|
1461
|
+
/** Format: int64 */
|
|
1462
|
+
timestamp: number;
|
|
1463
|
+
/** Format: double */
|
|
1464
|
+
volume: number;
|
|
1465
|
+
/** Format: double */
|
|
1466
|
+
buy_volume: number;
|
|
1467
|
+
/** Format: double */
|
|
1468
|
+
sell_volume: number;
|
|
1469
|
+
/** Format: int32 */
|
|
1470
|
+
trades_count: number;
|
|
1471
|
+
/** Format: int32 */
|
|
1472
|
+
buy_trades_count: number;
|
|
1473
|
+
/** Format: int32 */
|
|
1474
|
+
sell_trades_count: number;
|
|
1475
|
+
};
|
|
1476
|
+
PredictionCandlestickBar: {
|
|
1477
|
+
/** Format: double */
|
|
1478
|
+
l?: number | null;
|
|
1479
|
+
/** Format: double */
|
|
1480
|
+
h?: number | null;
|
|
1481
|
+
/** Format: double */
|
|
1482
|
+
o?: number | null;
|
|
1483
|
+
/** Format: double */
|
|
1484
|
+
c?: number | null;
|
|
1485
|
+
/** Format: double */
|
|
1486
|
+
v?: number | null;
|
|
1487
|
+
/** Format: int64 */
|
|
1488
|
+
t: number;
|
|
1489
|
+
/** Format: int32 */
|
|
1490
|
+
tc?: number | null;
|
|
1491
|
+
/** Format: double */
|
|
1492
|
+
m?: number | null;
|
|
1493
|
+
};
|
|
1494
|
+
PredictionCandlestickResponseData: {
|
|
1495
|
+
candles: components["schemas"]["PredictionCandlestickBar"][];
|
|
1496
|
+
has_more: boolean;
|
|
1497
|
+
};
|
|
1498
|
+
/** @description Response format for prediction trades */
|
|
1499
|
+
PredictionTradeResponse: {
|
|
1500
|
+
id: string;
|
|
1501
|
+
hash: string;
|
|
1502
|
+
/** Format: int64 */
|
|
1503
|
+
block: number;
|
|
1504
|
+
/** Format: int64 */
|
|
1505
|
+
confirmed_at: number;
|
|
1506
|
+
trader: components["schemas"]["TraderInfo"];
|
|
1507
|
+
taker: string;
|
|
1508
|
+
side: string;
|
|
1509
|
+
condition_id?: string | null;
|
|
1510
|
+
outcome?: string | null;
|
|
1511
|
+
/** Format: int32 */
|
|
1512
|
+
outcome_index?: number | null;
|
|
1513
|
+
question?: string | null;
|
|
1514
|
+
slug?: string | null;
|
|
1515
|
+
/** Format: double */
|
|
1516
|
+
usd_amount: number;
|
|
1517
|
+
/** Format: double */
|
|
1518
|
+
shares_amount: number;
|
|
1519
|
+
/** Format: double */
|
|
1520
|
+
price: number;
|
|
1521
|
+
/** Format: double */
|
|
1522
|
+
probability?: number | null;
|
|
1523
|
+
/** Format: double */
|
|
1524
|
+
fee: number;
|
|
1525
|
+
exchange: string;
|
|
1526
|
+
trade_type: string;
|
|
1527
|
+
/** Format: int64 */
|
|
1528
|
+
log_index: number;
|
|
1529
|
+
order_hash: string;
|
|
1530
|
+
position_id: string;
|
|
1531
|
+
};
|
|
1532
|
+
SearchResponse: {
|
|
1533
|
+
events: unknown;
|
|
1534
|
+
traders: components["schemas"]["Trader"][];
|
|
1535
|
+
};
|
|
1536
|
+
SeriesFullResponse: {
|
|
1537
|
+
id: string;
|
|
1538
|
+
slug?: string | null;
|
|
1539
|
+
ticker?: string | null;
|
|
1540
|
+
title?: string | null;
|
|
1541
|
+
description?: string | null;
|
|
1542
|
+
series_type?: string | null;
|
|
1543
|
+
recurrence?: string | null;
|
|
1544
|
+
image_url?: string | null;
|
|
1545
|
+
active: boolean;
|
|
1546
|
+
closed: boolean;
|
|
1547
|
+
archived: boolean;
|
|
1548
|
+
featured: boolean;
|
|
1549
|
+
restricted: boolean;
|
|
1550
|
+
pyth_token_id?: string | null;
|
|
1551
|
+
cg_asset_name?: string | null;
|
|
1552
|
+
tags: components["schemas"]["PolymarketTag"][];
|
|
1553
|
+
events: components["schemas"]["PolymarketEvent"][];
|
|
1554
|
+
};
|
|
1555
|
+
SimpleTimeframeMetrics: {
|
|
1556
|
+
/**
|
|
1557
|
+
* Format: double
|
|
1558
|
+
* @default 0
|
|
1559
|
+
*/
|
|
1560
|
+
volume: number;
|
|
1561
|
+
/**
|
|
1562
|
+
* Format: double
|
|
1563
|
+
* @default 0
|
|
1564
|
+
*/
|
|
1565
|
+
fees: number;
|
|
1566
|
+
/**
|
|
1567
|
+
* Format: int32
|
|
1568
|
+
* @default 0
|
|
1569
|
+
*/
|
|
1570
|
+
txns: number;
|
|
1571
|
+
/**
|
|
1572
|
+
* Format: int32
|
|
1573
|
+
* @default 0
|
|
1574
|
+
*/
|
|
1575
|
+
unique_traders: number;
|
|
1576
|
+
/**
|
|
1577
|
+
* Format: double
|
|
1578
|
+
* @default 0
|
|
1579
|
+
*/
|
|
1580
|
+
open_interest_change: number;
|
|
1581
|
+
};
|
|
1582
|
+
/** @enum {string} */
|
|
1583
|
+
SortDirection: "asc" | "desc";
|
|
1584
|
+
/** @description Token outcome (position) */
|
|
1585
|
+
TokenOutcome: {
|
|
1586
|
+
token_id: string;
|
|
1587
|
+
outcome: string;
|
|
1588
|
+
};
|
|
1589
|
+
/**
|
|
1590
|
+
* @description Trader profile info embedded in API responses
|
|
1591
|
+
*
|
|
1592
|
+
* Corresponds to SQL function: `pm_build_trader(address, name, pseudonym, profile_image, x_username, verified_badge)`
|
|
1593
|
+
*
|
|
1594
|
+
* Used in:
|
|
1595
|
+
* - holders endpoints (market/event holders)
|
|
1596
|
+
* - trades endpoints
|
|
1597
|
+
* - leaderboard endpoints
|
|
1598
|
+
*/
|
|
1599
|
+
Trader: {
|
|
1600
|
+
address: string;
|
|
1601
|
+
name?: string | null;
|
|
1602
|
+
pseudonym?: string | null;
|
|
1603
|
+
profile_image?: string | null;
|
|
1604
|
+
x_username?: string | null;
|
|
1605
|
+
verified_badge?: boolean;
|
|
1606
|
+
};
|
|
1607
|
+
/** @description Trader profile info - backwards compatibility */
|
|
1608
|
+
TraderInfo: {
|
|
1609
|
+
address: string;
|
|
1610
|
+
name?: string | null;
|
|
1611
|
+
pseudonym?: string | null;
|
|
1612
|
+
profile_image?: string | null;
|
|
1613
|
+
x_username?: string | null;
|
|
1614
|
+
verified_badge?: boolean;
|
|
1615
|
+
};
|
|
1616
|
+
TraderVolumeChartResponse: {
|
|
1617
|
+
volumes: components["schemas"]["TraderVolumeDataPoint"][];
|
|
1618
|
+
has_more: boolean;
|
|
1619
|
+
};
|
|
1620
|
+
TraderVolumeDataPoint: {
|
|
1621
|
+
/** Format: int64 */
|
|
1622
|
+
timestamp: number;
|
|
1623
|
+
/** Format: double */
|
|
1624
|
+
total_volume: number;
|
|
1625
|
+
/** Format: double */
|
|
1626
|
+
buy_volume: number;
|
|
1627
|
+
/** Format: double */
|
|
1628
|
+
sell_volume: number;
|
|
1629
|
+
/** Format: int32 */
|
|
1630
|
+
trades_count: number;
|
|
1631
|
+
/** Format: int32 */
|
|
1632
|
+
buy_trades_count: number;
|
|
1633
|
+
/** Format: int32 */
|
|
1634
|
+
sell_trades_count: number;
|
|
1635
|
+
};
|
|
1636
|
+
};
|
|
1637
|
+
responses: never;
|
|
1638
|
+
parameters: never;
|
|
1639
|
+
requestBodies: never;
|
|
1640
|
+
headers: never;
|
|
1641
|
+
pathItems: never;
|
|
1642
|
+
}
|
|
1643
|
+
export type $defs = Record<string, never>;
|
|
1644
|
+
export interface operations {
|
|
1645
|
+
get_bonds: {
|
|
1646
|
+
parameters: {
|
|
1647
|
+
query?: {
|
|
1648
|
+
/** @description Minimum probability threshold (default: 0.85) */
|
|
1649
|
+
min_probability?: number;
|
|
1650
|
+
/** @description Maximum hours until market end */
|
|
1651
|
+
max_hours?: number;
|
|
1652
|
+
/** @description Number of results (default: 10, max: 200) */
|
|
1653
|
+
limit?: number;
|
|
1654
|
+
/** @description Cursor for pagination: end_date (unix epoch) of the last item from the previous page */
|
|
1655
|
+
pagination_key?: number;
|
|
1656
|
+
};
|
|
1657
|
+
header?: never;
|
|
1658
|
+
path?: never;
|
|
1659
|
+
cookie?: never;
|
|
1660
|
+
};
|
|
1661
|
+
requestBody?: never;
|
|
1662
|
+
responses: {
|
|
1663
|
+
/** @description List of bond markets sorted by yield */
|
|
1664
|
+
200: {
|
|
1665
|
+
headers: {
|
|
1666
|
+
[name: string]: unknown;
|
|
1667
|
+
};
|
|
1668
|
+
content: {
|
|
1669
|
+
"application/json": components["schemas"]["BondMarket"][];
|
|
1670
|
+
};
|
|
1671
|
+
};
|
|
1672
|
+
};
|
|
1673
|
+
};
|
|
1674
|
+
get_events: {
|
|
1675
|
+
parameters: {
|
|
1676
|
+
query?: {
|
|
1677
|
+
/** @description Get single event by ID */
|
|
1678
|
+
id?: string;
|
|
1679
|
+
/** @description Get single event by slug */
|
|
1680
|
+
event_slug?: string;
|
|
1681
|
+
/** @description Search query (min 3 chars) */
|
|
1682
|
+
search?: string;
|
|
1683
|
+
/** @description Sort: volume, txns, unique_traders, market_count, end_date */
|
|
1684
|
+
sort_by?: components["schemas"]["EventSortBy"];
|
|
1685
|
+
/** @description Sort direction: asc, desc */
|
|
1686
|
+
sort_dir?: components["schemas"]["SortDirection"];
|
|
1687
|
+
/** @description Metrics timeframe: 1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d */
|
|
1688
|
+
timeframe?: components["schemas"]["MetricsTimeframe"];
|
|
1689
|
+
/** @description Filter by status: 'open' or 'closed' */
|
|
1690
|
+
status?: string;
|
|
1691
|
+
/** @description Comma-separated category filters */
|
|
1692
|
+
categories?: string;
|
|
1693
|
+
/** @description Comma-separated categories to exclude */
|
|
1694
|
+
exclude_categories?: string;
|
|
1695
|
+
/** @description Filter by tag slug(s). Array parameter - provide comma-separated values (e.g. tags=sports,football,crypto) */
|
|
1696
|
+
tags?: string;
|
|
1697
|
+
/** @description Comma-separated tag slugs to exclude */
|
|
1698
|
+
exclude_tags?: string;
|
|
1699
|
+
/** @description Minimum volume in selected timeframe */
|
|
1700
|
+
min_volume?: number;
|
|
1701
|
+
/** @description Maximum volume in selected timeframe */
|
|
1702
|
+
max_volume?: number;
|
|
1703
|
+
/** @description Minimum transactions in selected timeframe */
|
|
1704
|
+
min_txns?: number;
|
|
1705
|
+
/** @description Maximum transactions in selected timeframe */
|
|
1706
|
+
max_txns?: number;
|
|
1707
|
+
/** @description Minimum unique traders in selected timeframe */
|
|
1708
|
+
min_unique_traders?: number;
|
|
1709
|
+
/** @description Maximum unique traders in selected timeframe */
|
|
1710
|
+
max_unique_traders?: number;
|
|
1711
|
+
/** @description Include tags array (default: true) */
|
|
1712
|
+
include_tags?: boolean;
|
|
1713
|
+
/** @description Include markets array with outcomes (default: true) */
|
|
1714
|
+
include_markets?: boolean;
|
|
1715
|
+
/** @description Include metrics object with all timeframes (default: true) */
|
|
1716
|
+
include_metrics?: boolean;
|
|
1717
|
+
/** @description Results limit (default: 10, max: 100) */
|
|
1718
|
+
limit?: number;
|
|
1719
|
+
/** @description Offset-based pagination key (integer offset into result set) */
|
|
1720
|
+
pagination_key?: string;
|
|
1721
|
+
};
|
|
1722
|
+
header?: never;
|
|
1723
|
+
path?: never;
|
|
1724
|
+
cookie?: never;
|
|
1725
|
+
};
|
|
1726
|
+
requestBody?: never;
|
|
1727
|
+
responses: {
|
|
1728
|
+
/** @description List of Polymarket events with nested tags, markets, and series */
|
|
1729
|
+
200: {
|
|
1730
|
+
headers: {
|
|
1731
|
+
[name: string]: unknown;
|
|
1732
|
+
};
|
|
1733
|
+
content: {
|
|
1734
|
+
"application/json": components["schemas"]["PolymarketEvent"][];
|
|
1735
|
+
};
|
|
1736
|
+
};
|
|
1737
|
+
};
|
|
1738
|
+
};
|
|
1739
|
+
get_event_metrics: {
|
|
1740
|
+
parameters: {
|
|
1741
|
+
query: {
|
|
1742
|
+
/** @description Event slug */
|
|
1743
|
+
event_slug: string;
|
|
1744
|
+
/** @description Timeframe: single (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d), comma-separated (1m,5m,1h), or 'all' */
|
|
1745
|
+
timeframe: string;
|
|
1746
|
+
};
|
|
1747
|
+
header?: never;
|
|
1748
|
+
path?: never;
|
|
1749
|
+
cookie?: never;
|
|
1750
|
+
};
|
|
1751
|
+
requestBody?: never;
|
|
1752
|
+
responses: {
|
|
1753
|
+
/** @description Event metrics for the specified timeframe(s). Returns single object for one timeframe, array for multiple. */
|
|
1754
|
+
200: {
|
|
1755
|
+
headers: {
|
|
1756
|
+
[name: string]: unknown;
|
|
1757
|
+
};
|
|
1758
|
+
content: {
|
|
1759
|
+
"application/json": components["schemas"]["EventMetricsResponse"];
|
|
1760
|
+
};
|
|
1761
|
+
};
|
|
1762
|
+
/** @description Invalid timeframe */
|
|
1763
|
+
400: {
|
|
1764
|
+
headers: {
|
|
1765
|
+
[name: string]: unknown;
|
|
1766
|
+
};
|
|
1767
|
+
content?: never;
|
|
1768
|
+
};
|
|
1769
|
+
/** @description Event metrics not found */
|
|
1770
|
+
404: {
|
|
1771
|
+
headers: {
|
|
1772
|
+
[name: string]: unknown;
|
|
1773
|
+
};
|
|
1774
|
+
content?: never;
|
|
1775
|
+
};
|
|
1776
|
+
};
|
|
1777
|
+
};
|
|
1778
|
+
get_event_holders: {
|
|
1779
|
+
parameters: {
|
|
1780
|
+
query?: {
|
|
1781
|
+
/** @description Results limit (default: 10, max: 100) */
|
|
1782
|
+
limit?: number;
|
|
1783
|
+
/** @description Cursor-based pagination key (base64-encoded, obtained from previous response's pagination.pagination_key) */
|
|
1784
|
+
pagination_key?: string;
|
|
1785
|
+
/** @description Minimum total shares held (decimal string) */
|
|
1786
|
+
min_shares?: string;
|
|
1787
|
+
/** @description Maximum total shares held (decimal string) */
|
|
1788
|
+
max_shares?: string;
|
|
1789
|
+
/** @description Include event-level PnL data (costs extra credits, default: false) */
|
|
1790
|
+
include_pnl?: boolean;
|
|
1791
|
+
/** @description PnL timeframe: 1d, 7d, 30d, lifetime (default: 7d) */
|
|
1792
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
1793
|
+
};
|
|
1794
|
+
header?: never;
|
|
1795
|
+
path: {
|
|
1796
|
+
/** @description Event slug */
|
|
1797
|
+
event_slug: string;
|
|
1798
|
+
};
|
|
1799
|
+
cookie?: never;
|
|
1800
|
+
};
|
|
1801
|
+
requestBody?: never;
|
|
1802
|
+
responses: {
|
|
1803
|
+
/** @description Event holders aggregated across markets (sorted by total_shares DESC) */
|
|
1804
|
+
200: {
|
|
1805
|
+
headers: {
|
|
1806
|
+
[name: string]: unknown;
|
|
1807
|
+
};
|
|
1808
|
+
content: {
|
|
1809
|
+
"application/json": components["schemas"]["EventHoldersResponse"];
|
|
1810
|
+
};
|
|
1811
|
+
};
|
|
1812
|
+
/** @description Event not found */
|
|
1813
|
+
404: {
|
|
1814
|
+
headers: {
|
|
1815
|
+
[name: string]: unknown;
|
|
1816
|
+
};
|
|
1817
|
+
content?: never;
|
|
1818
|
+
};
|
|
1819
|
+
};
|
|
1820
|
+
};
|
|
1821
|
+
get_event_holders_history: {
|
|
1822
|
+
parameters: {
|
|
1823
|
+
query?: {
|
|
1824
|
+
/** @description Time range in hours (default: 24, max: 336 = 14 days) */
|
|
1825
|
+
hours?: number;
|
|
1826
|
+
};
|
|
1827
|
+
header?: never;
|
|
1828
|
+
path: {
|
|
1829
|
+
/** @description Event slug */
|
|
1830
|
+
event_slug: string;
|
|
1831
|
+
};
|
|
1832
|
+
cookie?: never;
|
|
1833
|
+
};
|
|
1834
|
+
requestBody?: never;
|
|
1835
|
+
responses: {
|
|
1836
|
+
/** @description Event holder count history with automatic view selection (1m/5m/15m/1h/6h buckets) */
|
|
1837
|
+
200: {
|
|
1838
|
+
headers: {
|
|
1839
|
+
[name: string]: unknown;
|
|
1840
|
+
};
|
|
1841
|
+
content: {
|
|
1842
|
+
"application/json": components["schemas"]["HolderHistoryCandle"][];
|
|
1843
|
+
};
|
|
1844
|
+
};
|
|
1845
|
+
/** @description Event not found */
|
|
1846
|
+
404: {
|
|
1847
|
+
headers: {
|
|
1848
|
+
[name: string]: unknown;
|
|
1849
|
+
};
|
|
1850
|
+
content?: never;
|
|
1851
|
+
};
|
|
1852
|
+
};
|
|
1853
|
+
};
|
|
1854
|
+
get_market_holders: {
|
|
1855
|
+
parameters: {
|
|
1856
|
+
query?: {
|
|
1857
|
+
/** @description Results limit (default: 10, max: 100) */
|
|
1858
|
+
limit?: number;
|
|
1859
|
+
/** @description Minimum shares held (decimal string) */
|
|
1860
|
+
min_shares?: string;
|
|
1861
|
+
/** @description Maximum shares held (decimal string) */
|
|
1862
|
+
max_shares?: string;
|
|
1863
|
+
/** @description Include position-level PnL data (costs extra credits, default: false) */
|
|
1864
|
+
include_pnl?: boolean;
|
|
1865
|
+
/** @description PnL timeframe: 1d, 7d, 30d, lifetime (default: 7d) */
|
|
1866
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
1867
|
+
};
|
|
1868
|
+
header?: never;
|
|
1869
|
+
path: {
|
|
1870
|
+
/** @description Market condition ID */
|
|
1871
|
+
condition_id: string;
|
|
1872
|
+
};
|
|
1873
|
+
cookie?: never;
|
|
1874
|
+
};
|
|
1875
|
+
requestBody?: never;
|
|
1876
|
+
responses: {
|
|
1877
|
+
/** @description Market holders grouped by outcome (sorted by shares DESC) */
|
|
1878
|
+
200: {
|
|
1879
|
+
headers: {
|
|
1880
|
+
[name: string]: unknown;
|
|
1881
|
+
};
|
|
1882
|
+
content: {
|
|
1883
|
+
"application/json": components["schemas"]["MarketHoldersResponse"];
|
|
1884
|
+
};
|
|
1885
|
+
};
|
|
1886
|
+
/** @description Market not found */
|
|
1887
|
+
404: {
|
|
1888
|
+
headers: {
|
|
1889
|
+
[name: string]: unknown;
|
|
1890
|
+
};
|
|
1891
|
+
content?: never;
|
|
1892
|
+
};
|
|
1893
|
+
};
|
|
1894
|
+
};
|
|
1895
|
+
get_market_holders_history: {
|
|
1896
|
+
parameters: {
|
|
1897
|
+
query?: {
|
|
1898
|
+
/** @description Time range in hours (default: 24, max: 336 = 14 days) */
|
|
1899
|
+
hours?: number;
|
|
1900
|
+
};
|
|
1901
|
+
header?: never;
|
|
1902
|
+
path: {
|
|
1903
|
+
/** @description Market condition ID */
|
|
1904
|
+
condition_id: string;
|
|
1905
|
+
};
|
|
1906
|
+
cookie?: never;
|
|
1907
|
+
};
|
|
1908
|
+
requestBody?: never;
|
|
1909
|
+
responses: {
|
|
1910
|
+
/** @description Market holder count history with automatic view selection (1m/5m/15m/1h/6h buckets) */
|
|
1911
|
+
200: {
|
|
1912
|
+
headers: {
|
|
1913
|
+
[name: string]: unknown;
|
|
1914
|
+
};
|
|
1915
|
+
content: {
|
|
1916
|
+
"application/json": components["schemas"]["HolderHistoryCandle"][];
|
|
1917
|
+
};
|
|
1918
|
+
};
|
|
1919
|
+
/** @description Market not found */
|
|
1920
|
+
404: {
|
|
1921
|
+
headers: {
|
|
1922
|
+
[name: string]: unknown;
|
|
1923
|
+
};
|
|
1924
|
+
content?: never;
|
|
1925
|
+
};
|
|
1926
|
+
};
|
|
1927
|
+
};
|
|
1928
|
+
get_position_holders: {
|
|
1929
|
+
parameters: {
|
|
1930
|
+
query?: {
|
|
1931
|
+
/** @description Results limit (default: 10, max: 100) */
|
|
1932
|
+
limit?: number;
|
|
1933
|
+
/** @description Cursor-based pagination key (base64-encoded, obtained from previous response's pagination.pagination_key) */
|
|
1934
|
+
pagination_key?: string;
|
|
1935
|
+
/** @description Minimum shares held (decimal string) */
|
|
1936
|
+
min_shares?: string;
|
|
1937
|
+
/** @description Maximum shares held (decimal string) */
|
|
1938
|
+
max_shares?: string;
|
|
1939
|
+
/** @description Include position-level PnL data (costs extra credits, default: false) */
|
|
1940
|
+
include_pnl?: boolean;
|
|
1941
|
+
/** @description PnL timeframe: 1d, 7d, 30d, lifetime (default: 7d) */
|
|
1942
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
1943
|
+
};
|
|
1944
|
+
header?: never;
|
|
1945
|
+
path: {
|
|
1946
|
+
/** @description Position ID (ERC1155 token ID) */
|
|
1947
|
+
position_id: string;
|
|
1948
|
+
};
|
|
1949
|
+
cookie?: never;
|
|
1950
|
+
};
|
|
1951
|
+
requestBody?: never;
|
|
1952
|
+
responses: {
|
|
1953
|
+
/** @description Position holders (sorted by shares DESC) */
|
|
1954
|
+
200: {
|
|
1955
|
+
headers: {
|
|
1956
|
+
[name: string]: unknown;
|
|
1957
|
+
};
|
|
1958
|
+
content: {
|
|
1959
|
+
"application/json": components["schemas"]["PositionHoldersResponse"];
|
|
1960
|
+
};
|
|
1961
|
+
};
|
|
1962
|
+
/** @description Position not found */
|
|
1963
|
+
404: {
|
|
1964
|
+
headers: {
|
|
1965
|
+
[name: string]: unknown;
|
|
1966
|
+
};
|
|
1967
|
+
content?: never;
|
|
1968
|
+
};
|
|
1969
|
+
};
|
|
1970
|
+
};
|
|
1971
|
+
get_position_holders_history: {
|
|
1972
|
+
parameters: {
|
|
1973
|
+
query?: {
|
|
1974
|
+
/** @description Time range in hours (default: 24, max: 336 = 14 days) */
|
|
1975
|
+
hours?: number;
|
|
1976
|
+
};
|
|
1977
|
+
header?: never;
|
|
1978
|
+
path: {
|
|
1979
|
+
/** @description Position ID (ERC1155 token ID) */
|
|
1980
|
+
position_id: string;
|
|
1981
|
+
};
|
|
1982
|
+
cookie?: never;
|
|
1983
|
+
};
|
|
1984
|
+
requestBody?: never;
|
|
1985
|
+
responses: {
|
|
1986
|
+
/** @description Position holder count history with automatic view selection (1m/5m/15m/1h/6h buckets) */
|
|
1987
|
+
200: {
|
|
1988
|
+
headers: {
|
|
1989
|
+
[name: string]: unknown;
|
|
1990
|
+
};
|
|
1991
|
+
content: {
|
|
1992
|
+
"application/json": components["schemas"]["HolderHistoryCandle"][];
|
|
1993
|
+
};
|
|
1994
|
+
};
|
|
1995
|
+
/** @description Position not found */
|
|
1996
|
+
404: {
|
|
1997
|
+
headers: {
|
|
1998
|
+
[name: string]: unknown;
|
|
1999
|
+
};
|
|
2000
|
+
content?: never;
|
|
2001
|
+
};
|
|
2002
|
+
};
|
|
2003
|
+
};
|
|
2004
|
+
list_markets: {
|
|
2005
|
+
parameters: {
|
|
2006
|
+
query?: {
|
|
2007
|
+
/** @description Comma-separated condition IDs */
|
|
2008
|
+
condition_ids?: string;
|
|
2009
|
+
/** @description Comma-separated market slugs */
|
|
2010
|
+
slugs?: string;
|
|
2011
|
+
/** @description Results limit (default: 10, max: 100) */
|
|
2012
|
+
limit?: number;
|
|
2013
|
+
/** @description Cursor for pagination: condition_id of the last item from the previous page */
|
|
2014
|
+
pagination_key?: string;
|
|
2015
|
+
};
|
|
2016
|
+
header?: never;
|
|
2017
|
+
path?: never;
|
|
2018
|
+
cookie?: never;
|
|
2019
|
+
};
|
|
2020
|
+
requestBody?: never;
|
|
2021
|
+
responses: {
|
|
2022
|
+
/** @description List of markets with metadata */
|
|
2023
|
+
200: {
|
|
2024
|
+
headers: {
|
|
2025
|
+
[name: string]: unknown;
|
|
2026
|
+
};
|
|
2027
|
+
content?: never;
|
|
2028
|
+
};
|
|
2029
|
+
};
|
|
2030
|
+
};
|
|
2031
|
+
get_market_candlestick: {
|
|
2032
|
+
parameters: {
|
|
2033
|
+
query: {
|
|
2034
|
+
/** @description Market condition ID (required) */
|
|
2035
|
+
condition_id: string;
|
|
2036
|
+
/** @description Candle interval: 1, 5, 15, 30, 60, 240, D, 1D */
|
|
2037
|
+
resolution: components["schemas"]["CandlestickResolution"];
|
|
2038
|
+
/** @description Number of candles (max: 2500) */
|
|
2039
|
+
count_back?: number;
|
|
2040
|
+
/** @description Start timestamp (Unix seconds) */
|
|
2041
|
+
from?: number;
|
|
2042
|
+
/** @description End timestamp (Unix seconds) */
|
|
2043
|
+
to?: number;
|
|
2044
|
+
};
|
|
2045
|
+
header?: never;
|
|
2046
|
+
path?: never;
|
|
2047
|
+
cookie?: never;
|
|
2048
|
+
};
|
|
2049
|
+
requestBody?: never;
|
|
2050
|
+
responses: {
|
|
2051
|
+
/** @description OHLCV candlestick data */
|
|
2052
|
+
200: {
|
|
2053
|
+
headers: {
|
|
2054
|
+
[name: string]: unknown;
|
|
2055
|
+
};
|
|
2056
|
+
content: {
|
|
2057
|
+
"application/json": components["schemas"]["PredictionCandlestickResponseData"];
|
|
2058
|
+
};
|
|
2059
|
+
};
|
|
2060
|
+
};
|
|
2061
|
+
};
|
|
2062
|
+
get_market_metrics: {
|
|
2063
|
+
parameters: {
|
|
2064
|
+
query: {
|
|
2065
|
+
/** @description Market condition ID */
|
|
2066
|
+
condition_id: string;
|
|
2067
|
+
/** @description Timeframe: single (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d), comma-separated (1m,5m,1h), or 'all' */
|
|
2068
|
+
timeframe: string;
|
|
2069
|
+
};
|
|
2070
|
+
header?: never;
|
|
2071
|
+
path?: never;
|
|
2072
|
+
cookie?: never;
|
|
2073
|
+
};
|
|
2074
|
+
requestBody?: never;
|
|
2075
|
+
responses: {
|
|
2076
|
+
/** @description Market metrics for the specified timeframe(s). Returns single object for one timeframe, array for multiple. */
|
|
2077
|
+
200: {
|
|
2078
|
+
headers: {
|
|
2079
|
+
[name: string]: unknown;
|
|
2080
|
+
};
|
|
2081
|
+
content: {
|
|
2082
|
+
"application/json": components["schemas"]["ConditionMetricsResponse"];
|
|
2083
|
+
};
|
|
2084
|
+
};
|
|
2085
|
+
/** @description Invalid timeframe */
|
|
2086
|
+
400: {
|
|
2087
|
+
headers: {
|
|
2088
|
+
[name: string]: unknown;
|
|
2089
|
+
};
|
|
2090
|
+
content?: never;
|
|
2091
|
+
};
|
|
2092
|
+
/** @description Market metrics not found */
|
|
2093
|
+
404: {
|
|
2094
|
+
headers: {
|
|
2095
|
+
[name: string]: unknown;
|
|
2096
|
+
};
|
|
2097
|
+
content?: never;
|
|
2098
|
+
};
|
|
2099
|
+
};
|
|
2100
|
+
};
|
|
2101
|
+
get_position_candlestick: {
|
|
2102
|
+
parameters: {
|
|
2103
|
+
query: {
|
|
2104
|
+
/** @description Position/token ID (required) */
|
|
2105
|
+
position_id: string;
|
|
2106
|
+
/** @description Candle interval: 1, 5, 15, 30, 60, 240, D, 1D */
|
|
2107
|
+
resolution: components["schemas"]["CandlestickResolution"];
|
|
2108
|
+
/** @description Number of candles (max: 2500) */
|
|
2109
|
+
count_back?: number;
|
|
2110
|
+
/** @description Start timestamp (Unix seconds) */
|
|
2111
|
+
from?: number;
|
|
2112
|
+
/** @description End timestamp (Unix seconds) */
|
|
2113
|
+
to?: number;
|
|
2114
|
+
};
|
|
2115
|
+
header?: never;
|
|
2116
|
+
path?: never;
|
|
2117
|
+
cookie?: never;
|
|
2118
|
+
};
|
|
2119
|
+
requestBody?: never;
|
|
2120
|
+
responses: {
|
|
2121
|
+
/** @description OHLCV candlestick data */
|
|
2122
|
+
200: {
|
|
2123
|
+
headers: {
|
|
2124
|
+
[name: string]: unknown;
|
|
2125
|
+
};
|
|
2126
|
+
content: {
|
|
2127
|
+
"application/json": components["schemas"]["PredictionCandlestickResponseData"];
|
|
2128
|
+
};
|
|
2129
|
+
};
|
|
2130
|
+
};
|
|
2131
|
+
};
|
|
2132
|
+
get_position_metrics: {
|
|
2133
|
+
parameters: {
|
|
2134
|
+
query: {
|
|
2135
|
+
/** @description Position/token ID */
|
|
2136
|
+
position_id: string;
|
|
2137
|
+
/** @description Timeframe: single (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d), comma-separated (1m,5m,1h), or 'all' */
|
|
2138
|
+
timeframe: string;
|
|
2139
|
+
};
|
|
2140
|
+
header?: never;
|
|
2141
|
+
path?: never;
|
|
2142
|
+
cookie?: never;
|
|
2143
|
+
};
|
|
2144
|
+
requestBody?: never;
|
|
2145
|
+
responses: {
|
|
2146
|
+
/** @description Position metrics for the specified timeframe(s). Returns single object for one timeframe, array for multiple. */
|
|
2147
|
+
200: {
|
|
2148
|
+
headers: {
|
|
2149
|
+
[name: string]: unknown;
|
|
2150
|
+
};
|
|
2151
|
+
content: {
|
|
2152
|
+
"application/json": components["schemas"]["PositionMetricsResponse"];
|
|
2153
|
+
};
|
|
2154
|
+
};
|
|
2155
|
+
/** @description Invalid timeframe */
|
|
2156
|
+
400: {
|
|
2157
|
+
headers: {
|
|
2158
|
+
[name: string]: unknown;
|
|
2159
|
+
};
|
|
2160
|
+
content?: never;
|
|
2161
|
+
};
|
|
2162
|
+
/** @description Position metrics not found */
|
|
2163
|
+
404: {
|
|
2164
|
+
headers: {
|
|
2165
|
+
[name: string]: unknown;
|
|
2166
|
+
};
|
|
2167
|
+
content?: never;
|
|
2168
|
+
};
|
|
2169
|
+
};
|
|
2170
|
+
};
|
|
2171
|
+
get_position_volume_chart: {
|
|
2172
|
+
parameters: {
|
|
2173
|
+
query: {
|
|
2174
|
+
/** @description Position/token ID (required) */
|
|
2175
|
+
position_id: string;
|
|
2176
|
+
/** @description Time interval: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
2177
|
+
resolution?: components["schemas"]["CandlestickResolution"];
|
|
2178
|
+
/** @description Number of data points (max: 2500) */
|
|
2179
|
+
count_back?: number;
|
|
2180
|
+
/** @description Start timestamp (Unix seconds) */
|
|
2181
|
+
from?: number;
|
|
2182
|
+
/** @description End timestamp (Unix seconds) */
|
|
2183
|
+
to?: number;
|
|
2184
|
+
};
|
|
2185
|
+
header?: never;
|
|
2186
|
+
path?: never;
|
|
2187
|
+
cookie?: never;
|
|
2188
|
+
};
|
|
2189
|
+
requestBody?: never;
|
|
2190
|
+
responses: {
|
|
2191
|
+
/** @description Volume with buy/sell breakdown over time */
|
|
2192
|
+
200: {
|
|
2193
|
+
headers: {
|
|
2194
|
+
[name: string]: unknown;
|
|
2195
|
+
};
|
|
2196
|
+
content: {
|
|
2197
|
+
"application/json": components["schemas"]["PositionVolumeChartResponse"];
|
|
2198
|
+
};
|
|
2199
|
+
};
|
|
2200
|
+
};
|
|
2201
|
+
};
|
|
2202
|
+
get_market_by_slug: {
|
|
2203
|
+
parameters: {
|
|
2204
|
+
query?: never;
|
|
2205
|
+
header?: never;
|
|
2206
|
+
path: {
|
|
2207
|
+
/** @description Market slug */
|
|
2208
|
+
slug: string;
|
|
2209
|
+
};
|
|
2210
|
+
cookie?: never;
|
|
2211
|
+
};
|
|
2212
|
+
requestBody?: never;
|
|
2213
|
+
responses: {
|
|
2214
|
+
/** @description Market details by slug */
|
|
2215
|
+
200: {
|
|
2216
|
+
headers: {
|
|
2217
|
+
[name: string]: unknown;
|
|
2218
|
+
};
|
|
2219
|
+
content?: never;
|
|
2220
|
+
};
|
|
2221
|
+
};
|
|
2222
|
+
};
|
|
2223
|
+
get_market_trades: {
|
|
2224
|
+
parameters: {
|
|
2225
|
+
query?: {
|
|
2226
|
+
/** @description Comma-separated condition IDs (max 20) */
|
|
2227
|
+
condition_ids?: string;
|
|
2228
|
+
/** @description Comma-separated market slugs */
|
|
2229
|
+
slugs?: string;
|
|
2230
|
+
/** @description Comma-separated position IDs */
|
|
2231
|
+
position_ids?: string;
|
|
2232
|
+
/** @description Comma-separated trader addresses (max 25) */
|
|
2233
|
+
traders?: string;
|
|
2234
|
+
/** @description 0 = Buy, 1 = Sell */
|
|
2235
|
+
side?: number;
|
|
2236
|
+
/** @description Outcome name filter (e.g. Yes, No) */
|
|
2237
|
+
outcome?: string;
|
|
2238
|
+
/** @description Outcome index (0 or 1) */
|
|
2239
|
+
outcome_index?: number;
|
|
2240
|
+
/** @description 0 = OrderFilled, 1 = Redemption, 2 = Merge */
|
|
2241
|
+
trade_type?: number;
|
|
2242
|
+
/** @description Min USD amount */
|
|
2243
|
+
min_usd_amount?: number;
|
|
2244
|
+
/** @description Max USD amount */
|
|
2245
|
+
max_usd_amount?: number;
|
|
2246
|
+
/** @description Min shares amount */
|
|
2247
|
+
min_shares_amount?: number;
|
|
2248
|
+
/** @description Max shares amount */
|
|
2249
|
+
max_shares_amount?: number;
|
|
2250
|
+
/** @description Min price (0.0-1.0) */
|
|
2251
|
+
min_price?: number;
|
|
2252
|
+
/** @description Max price (0.0-1.0) */
|
|
2253
|
+
max_price?: number;
|
|
2254
|
+
/** @description Start timestamp (ms) */
|
|
2255
|
+
from?: number;
|
|
2256
|
+
/** @description End timestamp (ms) */
|
|
2257
|
+
to?: number;
|
|
2258
|
+
/** @description Return all-time trades, not just last 30 days (default: false) */
|
|
2259
|
+
all?: boolean;
|
|
2260
|
+
/** @description Results per page (default: 10, max: 250) */
|
|
2261
|
+
limit?: number;
|
|
2262
|
+
/** @description Offset-based pagination key (integer offset into result set) */
|
|
2263
|
+
pagination_key?: number;
|
|
2264
|
+
/** @description Sort newest first (default: true) */
|
|
2265
|
+
sort_desc?: boolean;
|
|
2266
|
+
};
|
|
2267
|
+
header?: never;
|
|
2268
|
+
path?: never;
|
|
2269
|
+
cookie?: never;
|
|
2270
|
+
};
|
|
2271
|
+
requestBody?: never;
|
|
2272
|
+
responses: {
|
|
2273
|
+
/** @description Prediction trades matching filters */
|
|
2274
|
+
200: {
|
|
2275
|
+
headers: {
|
|
2276
|
+
[name: string]: unknown;
|
|
2277
|
+
};
|
|
2278
|
+
content: {
|
|
2279
|
+
"application/json": components["schemas"]["PredictionTradeResponse"][];
|
|
2280
|
+
};
|
|
2281
|
+
};
|
|
2282
|
+
};
|
|
2283
|
+
};
|
|
2284
|
+
get_market_volume_chart: {
|
|
2285
|
+
parameters: {
|
|
2286
|
+
query: {
|
|
2287
|
+
/** @description Market condition ID (required) */
|
|
2288
|
+
condition_id: string;
|
|
2289
|
+
/** @description Time interval: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
2290
|
+
resolution?: components["schemas"]["CandlestickResolution"];
|
|
2291
|
+
/** @description Number of data points (max: 2500) */
|
|
2292
|
+
count_back?: number;
|
|
2293
|
+
/** @description Start timestamp (Unix seconds) */
|
|
2294
|
+
from?: number;
|
|
2295
|
+
/** @description End timestamp (Unix seconds) */
|
|
2296
|
+
to?: number;
|
|
2297
|
+
};
|
|
2298
|
+
header?: never;
|
|
2299
|
+
path?: never;
|
|
2300
|
+
cookie?: never;
|
|
2301
|
+
};
|
|
2302
|
+
requestBody?: never;
|
|
2303
|
+
responses: {
|
|
2304
|
+
/** @description Volume breakdown by YES/NO over time */
|
|
2305
|
+
200: {
|
|
2306
|
+
headers: {
|
|
2307
|
+
[name: string]: unknown;
|
|
2308
|
+
};
|
|
2309
|
+
content: {
|
|
2310
|
+
"application/json": components["schemas"]["MarketVolumeChartResponse"];
|
|
2311
|
+
};
|
|
2312
|
+
};
|
|
2313
|
+
};
|
|
2314
|
+
};
|
|
2315
|
+
get_market: {
|
|
2316
|
+
parameters: {
|
|
2317
|
+
query?: never;
|
|
2318
|
+
header?: never;
|
|
2319
|
+
path: {
|
|
2320
|
+
/** @description Market condition ID */
|
|
2321
|
+
condition_id: string;
|
|
2322
|
+
};
|
|
2323
|
+
cookie?: never;
|
|
2324
|
+
};
|
|
2325
|
+
requestBody?: never;
|
|
2326
|
+
responses: {
|
|
2327
|
+
/** @description Market details by condition ID */
|
|
2328
|
+
200: {
|
|
2329
|
+
headers: {
|
|
2330
|
+
[name: string]: unknown;
|
|
2331
|
+
};
|
|
2332
|
+
content?: never;
|
|
2333
|
+
};
|
|
2334
|
+
};
|
|
2335
|
+
};
|
|
2336
|
+
search: {
|
|
2337
|
+
parameters: {
|
|
2338
|
+
query: {
|
|
2339
|
+
/** @description Search query (min 2 characters) */
|
|
2340
|
+
q: string;
|
|
2341
|
+
/** @description Results limit (default: 20) */
|
|
2342
|
+
limit?: number;
|
|
2343
|
+
/** @description Offset-based pagination key (integer offset into result set) */
|
|
2344
|
+
pagination_key?: string;
|
|
2345
|
+
};
|
|
2346
|
+
header?: never;
|
|
2347
|
+
path?: never;
|
|
2348
|
+
cookie?: never;
|
|
2349
|
+
};
|
|
2350
|
+
requestBody?: never;
|
|
2351
|
+
responses: {
|
|
2352
|
+
/** @description Search results with events and traders */
|
|
2353
|
+
200: {
|
|
2354
|
+
headers: {
|
|
2355
|
+
[name: string]: unknown;
|
|
2356
|
+
};
|
|
2357
|
+
content: {
|
|
2358
|
+
"application/json": components["schemas"]["SearchResponse"];
|
|
2359
|
+
};
|
|
2360
|
+
};
|
|
2361
|
+
};
|
|
2362
|
+
};
|
|
2363
|
+
get_series_list: {
|
|
2364
|
+
parameters: {
|
|
2365
|
+
query?: {
|
|
2366
|
+
/** @description Only active series (default: true) */
|
|
2367
|
+
active_only?: boolean;
|
|
2368
|
+
/** @description Results limit (default: 10) */
|
|
2369
|
+
limit?: number;
|
|
2370
|
+
/** @description Cursor for pagination: id of the last series from the previous page */
|
|
2371
|
+
pagination_key?: string;
|
|
2372
|
+
};
|
|
2373
|
+
header?: never;
|
|
2374
|
+
path?: never;
|
|
2375
|
+
cookie?: never;
|
|
2376
|
+
};
|
|
2377
|
+
requestBody?: never;
|
|
2378
|
+
responses: {
|
|
2379
|
+
/** @description List of prediction market series */
|
|
2380
|
+
200: {
|
|
2381
|
+
headers: {
|
|
2382
|
+
[name: string]: unknown;
|
|
2383
|
+
};
|
|
2384
|
+
content: {
|
|
2385
|
+
"application/json": components["schemas"]["PolymarketSeries"][];
|
|
2386
|
+
};
|
|
2387
|
+
};
|
|
2388
|
+
};
|
|
2389
|
+
};
|
|
2390
|
+
get_series_by_id: {
|
|
2391
|
+
parameters: {
|
|
2392
|
+
query?: {
|
|
2393
|
+
/** @description Return minimal data without events (default: false) */
|
|
2394
|
+
slim?: boolean;
|
|
2395
|
+
/** @description Events to include (default: 20, max: 100) */
|
|
2396
|
+
event_limit?: number;
|
|
2397
|
+
/** @description Event pagination offset */
|
|
2398
|
+
event_offset?: number;
|
|
2399
|
+
};
|
|
2400
|
+
header?: never;
|
|
2401
|
+
path: {
|
|
2402
|
+
/** @description Series slug or ID */
|
|
2403
|
+
identifier: string;
|
|
2404
|
+
};
|
|
2405
|
+
cookie?: never;
|
|
2406
|
+
};
|
|
2407
|
+
requestBody?: never;
|
|
2408
|
+
responses: {
|
|
2409
|
+
/** @description Series details with events and tags */
|
|
2410
|
+
200: {
|
|
2411
|
+
headers: {
|
|
2412
|
+
[name: string]: unknown;
|
|
2413
|
+
};
|
|
2414
|
+
content: {
|
|
2415
|
+
"application/json": components["schemas"]["SeriesFullResponse"];
|
|
2416
|
+
};
|
|
2417
|
+
};
|
|
2418
|
+
/** @description Series not found */
|
|
2419
|
+
404: {
|
|
2420
|
+
headers: {
|
|
2421
|
+
[name: string]: unknown;
|
|
2422
|
+
};
|
|
2423
|
+
content?: never;
|
|
2424
|
+
};
|
|
2425
|
+
};
|
|
2426
|
+
};
|
|
2427
|
+
get_series_events: {
|
|
2428
|
+
parameters: {
|
|
2429
|
+
query?: {
|
|
2430
|
+
/** @description Only active events (default: false) */
|
|
2431
|
+
active_only?: boolean;
|
|
2432
|
+
/** @description Include tags array (default: true) */
|
|
2433
|
+
include_tags?: boolean;
|
|
2434
|
+
/** @description Include markets array with outcomes (default: true) */
|
|
2435
|
+
include_markets?: boolean;
|
|
2436
|
+
/** @description Include metrics object with all timeframes (default: true) */
|
|
2437
|
+
include_metrics?: boolean;
|
|
2438
|
+
/** @description Results limit (default: 10) */
|
|
2439
|
+
limit?: number;
|
|
2440
|
+
/** @description Offset-based pagination key (integer offset into result set) */
|
|
2441
|
+
pagination_key?: string;
|
|
2442
|
+
};
|
|
2443
|
+
header?: never;
|
|
2444
|
+
path: {
|
|
2445
|
+
/** @description Series slug or ID */
|
|
2446
|
+
identifier: string;
|
|
2447
|
+
};
|
|
2448
|
+
cookie?: never;
|
|
2449
|
+
};
|
|
2450
|
+
requestBody?: never;
|
|
2451
|
+
responses: {
|
|
2452
|
+
/** @description Events belonging to this series with nested tags and markets */
|
|
2453
|
+
200: {
|
|
2454
|
+
headers: {
|
|
2455
|
+
[name: string]: unknown;
|
|
2456
|
+
};
|
|
2457
|
+
content: {
|
|
2458
|
+
"application/json": components["schemas"]["PolymarketEvent"][];
|
|
2459
|
+
};
|
|
2460
|
+
};
|
|
2461
|
+
};
|
|
2462
|
+
};
|
|
2463
|
+
get_tags: {
|
|
2464
|
+
parameters: {
|
|
2465
|
+
query?: {
|
|
2466
|
+
/** @description Results limit (default: 10, max: 250) */
|
|
2467
|
+
limit?: number;
|
|
2468
|
+
/** @description Cursor-based pagination key (base64-encoded, obtained from previous response's pagination.pagination_key) */
|
|
2469
|
+
pagination_key?: string;
|
|
2470
|
+
};
|
|
2471
|
+
header?: never;
|
|
2472
|
+
path?: never;
|
|
2473
|
+
cookie?: never;
|
|
2474
|
+
};
|
|
2475
|
+
requestBody?: never;
|
|
2476
|
+
responses: {
|
|
2477
|
+
/** @description List of all tags */
|
|
2478
|
+
200: {
|
|
2479
|
+
headers: {
|
|
2480
|
+
[name: string]: unknown;
|
|
2481
|
+
};
|
|
2482
|
+
content: {
|
|
2483
|
+
"application/json": components["schemas"]["PolymarketTag"][];
|
|
2484
|
+
};
|
|
2485
|
+
};
|
|
2486
|
+
};
|
|
2487
|
+
};
|
|
2488
|
+
get_tag_by_id: {
|
|
2489
|
+
parameters: {
|
|
2490
|
+
query?: never;
|
|
2491
|
+
header?: never;
|
|
2492
|
+
path: {
|
|
2493
|
+
/** @description Tag ID or slug */
|
|
2494
|
+
identifier: string;
|
|
2495
|
+
};
|
|
2496
|
+
cookie?: never;
|
|
2497
|
+
};
|
|
2498
|
+
requestBody?: never;
|
|
2499
|
+
responses: {
|
|
2500
|
+
/** @description Tag details */
|
|
2501
|
+
200: {
|
|
2502
|
+
headers: {
|
|
2503
|
+
[name: string]: unknown;
|
|
2504
|
+
};
|
|
2505
|
+
content: {
|
|
2506
|
+
"application/json": components["schemas"]["PolymarketTag"];
|
|
2507
|
+
};
|
|
2508
|
+
};
|
|
2509
|
+
/** @description Tag not found */
|
|
2510
|
+
404: {
|
|
2511
|
+
headers: {
|
|
2512
|
+
[name: string]: unknown;
|
|
2513
|
+
};
|
|
2514
|
+
content?: never;
|
|
2515
|
+
};
|
|
2516
|
+
};
|
|
2517
|
+
};
|
|
2518
|
+
get_global_pnl: {
|
|
2519
|
+
parameters: {
|
|
2520
|
+
query?: {
|
|
2521
|
+
/** @description Timeframe: 1d, 7d, 30d (default: 7d) */
|
|
2522
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
2523
|
+
/** @description Sort: pnl_usd, win_rate, wins, losses, buys, sells, redemptions, merges, avg_hold_time, positions_traded, markets_traded, events_traded, markets_won, volume_usd, fees (default: pnl_usd) */
|
|
2524
|
+
sort_by?: components["schemas"]["GlobalPnlSortBy"];
|
|
2525
|
+
/** @description Sort direction: asc, desc (default: desc) */
|
|
2526
|
+
sort_direction?: components["schemas"]["SortDirection"];
|
|
2527
|
+
/** @description Results limit (default: 10, max: 200) */
|
|
2528
|
+
limit?: number;
|
|
2529
|
+
/** @description Cursor-based pagination key (base64-encoded, obtained from previous response's pagination.pagination_key) */
|
|
2530
|
+
pagination_key?: string;
|
|
2531
|
+
};
|
|
2532
|
+
header?: never;
|
|
2533
|
+
path?: never;
|
|
2534
|
+
cookie?: never;
|
|
2535
|
+
};
|
|
2536
|
+
requestBody?: never;
|
|
2537
|
+
responses: {
|
|
2538
|
+
/** @description Global PnL leaderboard with trader stats */
|
|
2539
|
+
200: {
|
|
2540
|
+
headers: {
|
|
2541
|
+
[name: string]: unknown;
|
|
2542
|
+
};
|
|
2543
|
+
content: {
|
|
2544
|
+
"application/json": components["schemas"]["GlobalPnlTrader"][];
|
|
2545
|
+
};
|
|
2546
|
+
};
|
|
2547
|
+
};
|
|
2548
|
+
};
|
|
2549
|
+
get_trader_pnl: {
|
|
2550
|
+
parameters: {
|
|
2551
|
+
query?: {
|
|
2552
|
+
/** @description Timeframe: 1d, 7d, 30d, lifetime (default: 7d) */
|
|
2553
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
2554
|
+
};
|
|
2555
|
+
header?: never;
|
|
2556
|
+
path: {
|
|
2557
|
+
/** @description Trader wallet address */
|
|
2558
|
+
address: string;
|
|
2559
|
+
};
|
|
2560
|
+
cookie?: never;
|
|
2561
|
+
};
|
|
2562
|
+
requestBody?: never;
|
|
2563
|
+
responses: {
|
|
2564
|
+
/** @description Trader's global PnL summary */
|
|
2565
|
+
200: {
|
|
2566
|
+
headers: {
|
|
2567
|
+
[name: string]: unknown;
|
|
2568
|
+
};
|
|
2569
|
+
content?: never;
|
|
2570
|
+
};
|
|
2571
|
+
/** @description Trader not found */
|
|
2572
|
+
404: {
|
|
2573
|
+
headers: {
|
|
2574
|
+
[name: string]: unknown;
|
|
2575
|
+
};
|
|
2576
|
+
content?: never;
|
|
2577
|
+
};
|
|
2578
|
+
};
|
|
2579
|
+
};
|
|
2580
|
+
get_trader_pnl_candles: {
|
|
2581
|
+
parameters: {
|
|
2582
|
+
query?: {
|
|
2583
|
+
/** @description Candle resolution: 1m, 1h, 1d (default: 1h) */
|
|
2584
|
+
resolution?: components["schemas"]["PnlCandleResolution"];
|
|
2585
|
+
/** @description Start timestamp (Unix seconds) */
|
|
2586
|
+
start_ts?: number;
|
|
2587
|
+
/** @description End timestamp (Unix seconds) */
|
|
2588
|
+
end_ts?: number;
|
|
2589
|
+
/** @description Results limit (default: 1440, max: 10000) */
|
|
2590
|
+
limit?: number;
|
|
2591
|
+
};
|
|
2592
|
+
header?: never;
|
|
2593
|
+
path: {
|
|
2594
|
+
/** @description Trader wallet address */
|
|
2595
|
+
address: string;
|
|
2596
|
+
};
|
|
2597
|
+
cookie?: never;
|
|
2598
|
+
};
|
|
2599
|
+
requestBody?: never;
|
|
2600
|
+
responses: {
|
|
2601
|
+
/** @description PnL candles for equity curve charting */
|
|
2602
|
+
200: {
|
|
2603
|
+
headers: {
|
|
2604
|
+
[name: string]: unknown;
|
|
2605
|
+
};
|
|
2606
|
+
content?: never;
|
|
2607
|
+
};
|
|
2608
|
+
};
|
|
2609
|
+
};
|
|
2610
|
+
get_trader_event_pnl: {
|
|
2611
|
+
parameters: {
|
|
2612
|
+
query?: {
|
|
2613
|
+
/** @description Timeframe: 1d, 7d, 30d, lifetime (default: 7d) */
|
|
2614
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
2615
|
+
/** @description Sort: realized_pnl_usd, total_volume_usd, markets_traded, total_fees (default: realized_pnl_usd) */
|
|
2616
|
+
sort_by?: components["schemas"]["EventPnlSortBy"];
|
|
2617
|
+
/** @description Sort direction: asc, desc (default: desc) */
|
|
2618
|
+
sort_direction?: components["schemas"]["SortDirection"];
|
|
2619
|
+
/** @description Results limit (default: 10, max: 200) */
|
|
2620
|
+
limit?: number;
|
|
2621
|
+
/** @description Offset-based pagination key */
|
|
2622
|
+
pagination_key?: number;
|
|
2623
|
+
/** @description Filter by event slug */
|
|
2624
|
+
event_slug?: string;
|
|
2625
|
+
};
|
|
2626
|
+
header?: never;
|
|
2627
|
+
path: {
|
|
2628
|
+
/** @description Trader wallet address */
|
|
2629
|
+
address: string;
|
|
2630
|
+
};
|
|
2631
|
+
cookie?: never;
|
|
2632
|
+
};
|
|
2633
|
+
requestBody?: never;
|
|
2634
|
+
responses: {
|
|
2635
|
+
/** @description Event-level PnL entries for this trader */
|
|
2636
|
+
200: {
|
|
2637
|
+
headers: {
|
|
2638
|
+
[name: string]: unknown;
|
|
2639
|
+
};
|
|
2640
|
+
content?: never;
|
|
2641
|
+
};
|
|
2642
|
+
};
|
|
2643
|
+
};
|
|
2644
|
+
get_trader_market_pnl: {
|
|
2645
|
+
parameters: {
|
|
2646
|
+
query?: {
|
|
2647
|
+
/** @description Timeframe: 1d, 7d, 30d, lifetime (default: 7d) */
|
|
2648
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
2649
|
+
/** @description Sort: realized_pnl_usd, buy_usd, total_buys, total_fees, outcomes_traded (default: realized_pnl_usd) */
|
|
2650
|
+
sort_by?: components["schemas"]["MarketPnlSortBy"];
|
|
2651
|
+
/** @description Sort direction: asc, desc (default: desc) */
|
|
2652
|
+
sort_direction?: components["schemas"]["SortDirection"];
|
|
2653
|
+
/** @description Results limit (default: 10, max: 200) */
|
|
2654
|
+
limit?: number;
|
|
2655
|
+
/** @description Offset-based pagination key */
|
|
2656
|
+
pagination_key?: number;
|
|
2657
|
+
/** @description Filter by condition ID */
|
|
2658
|
+
condition_id?: string;
|
|
2659
|
+
/** @description Filter by event slug */
|
|
2660
|
+
event_slug?: string;
|
|
2661
|
+
};
|
|
2662
|
+
header?: never;
|
|
2663
|
+
path: {
|
|
2664
|
+
/** @description Trader wallet address */
|
|
2665
|
+
address: string;
|
|
2666
|
+
};
|
|
2667
|
+
cookie?: never;
|
|
2668
|
+
};
|
|
2669
|
+
requestBody?: never;
|
|
2670
|
+
responses: {
|
|
2671
|
+
/** @description Market-level PnL entries for this trader */
|
|
2672
|
+
200: {
|
|
2673
|
+
headers: {
|
|
2674
|
+
[name: string]: unknown;
|
|
2675
|
+
};
|
|
2676
|
+
content?: never;
|
|
2677
|
+
};
|
|
2678
|
+
};
|
|
2679
|
+
};
|
|
2680
|
+
get_trader_position_pnl: {
|
|
2681
|
+
parameters: {
|
|
2682
|
+
query?: {
|
|
2683
|
+
/** @description Timeframe: 1d, 7d, 30d, lifetime (default: 7d) */
|
|
2684
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
2685
|
+
/** @description Sort: realized_pnl_usd, buy_usd, net_shares, cost_basis, total_fees (default: realized_pnl_usd) */
|
|
2686
|
+
sort_by?: components["schemas"]["PositionPnlSortBy"];
|
|
2687
|
+
/** @description Sort direction: asc, desc (default: desc) */
|
|
2688
|
+
sort_direction?: components["schemas"]["SortDirection"];
|
|
2689
|
+
/** @description Results limit (default: 10, max: 200) */
|
|
2690
|
+
limit?: number;
|
|
2691
|
+
/** @description Offset-based pagination key */
|
|
2692
|
+
pagination_key?: number;
|
|
2693
|
+
/** @description Filter by condition ID */
|
|
2694
|
+
condition_id?: string;
|
|
2695
|
+
/** @description Filter by event slug */
|
|
2696
|
+
event_slug?: string;
|
|
2697
|
+
};
|
|
2698
|
+
header?: never;
|
|
2699
|
+
path: {
|
|
2700
|
+
/** @description Trader wallet address */
|
|
2701
|
+
address: string;
|
|
2702
|
+
};
|
|
2703
|
+
cookie?: never;
|
|
2704
|
+
};
|
|
2705
|
+
requestBody?: never;
|
|
2706
|
+
responses: {
|
|
2707
|
+
/** @description Position-level PnL entries for this trader */
|
|
2708
|
+
200: {
|
|
2709
|
+
headers: {
|
|
2710
|
+
[name: string]: unknown;
|
|
2711
|
+
};
|
|
2712
|
+
content?: never;
|
|
2713
|
+
};
|
|
2714
|
+
};
|
|
2715
|
+
};
|
|
2716
|
+
get_portfolio: {
|
|
2717
|
+
parameters: {
|
|
2718
|
+
query?: {
|
|
2719
|
+
/** @description Stats timeframe: 7d, 30d, lifetime */
|
|
2720
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
2721
|
+
};
|
|
2722
|
+
header?: never;
|
|
2723
|
+
path: {
|
|
2724
|
+
/** @description Trader wallet address */
|
|
2725
|
+
address: string;
|
|
2726
|
+
};
|
|
2727
|
+
cookie?: never;
|
|
2728
|
+
};
|
|
2729
|
+
requestBody?: never;
|
|
2730
|
+
responses: {
|
|
2731
|
+
/** @description Full portfolio with stats, positions, and PnL chart */
|
|
2732
|
+
200: {
|
|
2733
|
+
headers: {
|
|
2734
|
+
[name: string]: unknown;
|
|
2735
|
+
};
|
|
2736
|
+
content?: never;
|
|
2737
|
+
};
|
|
2738
|
+
};
|
|
2739
|
+
};
|
|
2740
|
+
get_portfolio_positions: {
|
|
2741
|
+
parameters: {
|
|
2742
|
+
query?: {
|
|
2743
|
+
/** @description Position status: active, resolved, all (default: all) */
|
|
2744
|
+
status?: components["schemas"]["PositionStatus"];
|
|
2745
|
+
/** @description Filter by condition ID */
|
|
2746
|
+
condition_id?: string;
|
|
2747
|
+
/** @description Filter by market slug */
|
|
2748
|
+
market_slug?: string;
|
|
2749
|
+
/** @description Search by question text */
|
|
2750
|
+
question?: string;
|
|
2751
|
+
/** @description Results limit (default: 10, max: 100) */
|
|
2752
|
+
limit?: number;
|
|
2753
|
+
/** @description Offset-based pagination key (integer offset into result set) */
|
|
2754
|
+
pagination_key?: number;
|
|
2755
|
+
};
|
|
2756
|
+
header?: never;
|
|
2757
|
+
path: {
|
|
2758
|
+
/** @description Trader wallet address */
|
|
2759
|
+
address: string;
|
|
2760
|
+
};
|
|
2761
|
+
cookie?: never;
|
|
2762
|
+
};
|
|
2763
|
+
requestBody?: never;
|
|
2764
|
+
responses: {
|
|
2765
|
+
/** @description Trader positions with market metadata */
|
|
2766
|
+
200: {
|
|
2767
|
+
headers: {
|
|
2768
|
+
[name: string]: unknown;
|
|
2769
|
+
};
|
|
2770
|
+
content?: never;
|
|
2771
|
+
};
|
|
2772
|
+
};
|
|
2773
|
+
};
|
|
2774
|
+
get_trader_profile: {
|
|
2775
|
+
parameters: {
|
|
2776
|
+
query?: never;
|
|
2777
|
+
header?: never;
|
|
2778
|
+
path: {
|
|
2779
|
+
/** @description Trader wallet address */
|
|
2780
|
+
address: string;
|
|
2781
|
+
};
|
|
2782
|
+
cookie?: never;
|
|
2783
|
+
};
|
|
2784
|
+
requestBody?: never;
|
|
2785
|
+
responses: {
|
|
2786
|
+
/** @description Trader profile information with username, bio, and badges */
|
|
2787
|
+
200: {
|
|
2788
|
+
headers: {
|
|
2789
|
+
[name: string]: unknown;
|
|
2790
|
+
};
|
|
2791
|
+
content?: never;
|
|
2792
|
+
};
|
|
2793
|
+
/** @description Profile not found */
|
|
2794
|
+
404: {
|
|
2795
|
+
headers: {
|
|
2796
|
+
[name: string]: unknown;
|
|
2797
|
+
};
|
|
2798
|
+
content?: never;
|
|
2799
|
+
};
|
|
2800
|
+
};
|
|
2801
|
+
};
|
|
2802
|
+
get_trader_profiles_batch: {
|
|
2803
|
+
parameters: {
|
|
2804
|
+
query: {
|
|
2805
|
+
/** @description Comma-separated list of trader addresses (max: 20) */
|
|
2806
|
+
addresses: string;
|
|
2807
|
+
};
|
|
2808
|
+
header?: never;
|
|
2809
|
+
path?: never;
|
|
2810
|
+
cookie?: never;
|
|
2811
|
+
};
|
|
2812
|
+
requestBody?: never;
|
|
2813
|
+
responses: {
|
|
2814
|
+
/** @description Map of trader addresses to their profile information */
|
|
2815
|
+
200: {
|
|
2816
|
+
headers: {
|
|
2817
|
+
[name: string]: unknown;
|
|
2818
|
+
};
|
|
2819
|
+
content?: never;
|
|
2820
|
+
};
|
|
2821
|
+
/** @description Invalid request (empty addresses or more than 20) */
|
|
2822
|
+
400: {
|
|
2823
|
+
headers: {
|
|
2824
|
+
[name: string]: unknown;
|
|
2825
|
+
};
|
|
2826
|
+
content?: never;
|
|
2827
|
+
};
|
|
2828
|
+
};
|
|
2829
|
+
};
|
|
2830
|
+
get_trader_trades: {
|
|
2831
|
+
parameters: {
|
|
2832
|
+
query?: {
|
|
2833
|
+
/** @description Comma-separated condition IDs (max 20) */
|
|
2834
|
+
condition_ids?: string;
|
|
2835
|
+
/** @description Comma-separated market slugs */
|
|
2836
|
+
slugs?: string;
|
|
2837
|
+
/** @description Comma-separated position IDs */
|
|
2838
|
+
position_ids?: string;
|
|
2839
|
+
/** @description 0 = Buy, 1 = Sell */
|
|
2840
|
+
side?: number;
|
|
2841
|
+
/** @description Outcome name filter (e.g. Yes, No) */
|
|
2842
|
+
outcome?: string;
|
|
2843
|
+
/** @description Outcome index (0 or 1) */
|
|
2844
|
+
outcome_index?: number;
|
|
2845
|
+
/** @description 0 = OrderFilled, 1 = Redemption, 2 = Merge */
|
|
2846
|
+
trade_type?: number;
|
|
2847
|
+
/** @description Min USD amount */
|
|
2848
|
+
min_usd_amount?: number;
|
|
2849
|
+
/** @description Max USD amount */
|
|
2850
|
+
max_usd_amount?: number;
|
|
2851
|
+
/** @description Min shares amount */
|
|
2852
|
+
min_shares_amount?: number;
|
|
2853
|
+
/** @description Max shares amount */
|
|
2854
|
+
max_shares_amount?: number;
|
|
2855
|
+
/** @description Min price (0.0-1.0) */
|
|
2856
|
+
min_price?: number;
|
|
2857
|
+
/** @description Max price (0.0-1.0) */
|
|
2858
|
+
max_price?: number;
|
|
2859
|
+
/** @description Start timestamp (ms) */
|
|
2860
|
+
from?: number;
|
|
2861
|
+
/** @description End timestamp (ms) */
|
|
2862
|
+
to?: number;
|
|
2863
|
+
/** @description Return all-time trades, not just last 30 days (default: false) */
|
|
2864
|
+
all?: boolean;
|
|
2865
|
+
/** @description Results per page (default: 10, max: 250) */
|
|
2866
|
+
limit?: number;
|
|
2867
|
+
/** @description Offset-based pagination key (integer offset into result set) */
|
|
2868
|
+
pagination_key?: number;
|
|
2869
|
+
/** @description Sort newest first (default: true) */
|
|
2870
|
+
sort_desc?: boolean;
|
|
2871
|
+
};
|
|
2872
|
+
header?: never;
|
|
2873
|
+
path: {
|
|
2874
|
+
/** @description Trader wallet address */
|
|
2875
|
+
address: string;
|
|
2876
|
+
};
|
|
2877
|
+
cookie?: never;
|
|
2878
|
+
};
|
|
2879
|
+
requestBody?: never;
|
|
2880
|
+
responses: {
|
|
2881
|
+
/** @description Trader's trade history with advanced filtering (same as /market/trades but filtered by trader) */
|
|
2882
|
+
200: {
|
|
2883
|
+
headers: {
|
|
2884
|
+
[name: string]: unknown;
|
|
2885
|
+
};
|
|
2886
|
+
content: {
|
|
2887
|
+
"application/json": components["schemas"]["PredictionTradeResponse"][];
|
|
2888
|
+
};
|
|
2889
|
+
};
|
|
2890
|
+
};
|
|
2891
|
+
};
|
|
2892
|
+
get_trader_volume_chart: {
|
|
2893
|
+
parameters: {
|
|
2894
|
+
query?: {
|
|
2895
|
+
/** @description Time interval: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
2896
|
+
resolution?: components["schemas"]["CandlestickResolution"];
|
|
2897
|
+
/** @description Number of data points (max: 2500) */
|
|
2898
|
+
count_back?: number;
|
|
2899
|
+
/** @description Start timestamp (Unix seconds) */
|
|
2900
|
+
from?: number;
|
|
2901
|
+
/** @description End timestamp (Unix seconds) */
|
|
2902
|
+
to?: number;
|
|
2903
|
+
};
|
|
2904
|
+
header?: never;
|
|
2905
|
+
path: {
|
|
2906
|
+
/** @description Trader wallet address */
|
|
2907
|
+
address: string;
|
|
2908
|
+
};
|
|
2909
|
+
cookie?: never;
|
|
2910
|
+
};
|
|
2911
|
+
requestBody?: never;
|
|
2912
|
+
responses: {
|
|
2913
|
+
/** @description Trader volume with buy/sell breakdown over time */
|
|
2914
|
+
200: {
|
|
2915
|
+
headers: {
|
|
2916
|
+
[name: string]: unknown;
|
|
2917
|
+
};
|
|
2918
|
+
content: {
|
|
2919
|
+
"application/json": components["schemas"]["TraderVolumeChartResponse"];
|
|
2920
|
+
};
|
|
2921
|
+
};
|
|
2922
|
+
};
|
|
2923
|
+
};
|
|
2924
|
+
}
|