@structbuild/sdk 0.3.10-staging.7 → 0.3.10-staging.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/polymarket.d.ts +407 -59
- package/dist/generated/webhooks.d.ts +575 -6
- package/dist/generated/ws-alerts.d.ts +2042 -1014
- package/dist/generated/ws.d.ts +148 -77
- package/dist/index.cjs +13 -1
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +13 -1
- package/dist/index.js.map +4 -4
- package/dist/namespaces/events.d.ts +2 -1
- package/dist/namespaces/markets.d.ts +4 -1
- package/dist/types/index.d.ts +12 -1
- package/dist/types/ws.d.ts +8 -2
- package/package.json +1 -1
|
@@ -203,6 +203,26 @@ export interface paths {
|
|
|
203
203
|
patch?: never;
|
|
204
204
|
trace?: never;
|
|
205
205
|
};
|
|
206
|
+
"/polymarket/events/top-traders": {
|
|
207
|
+
parameters: {
|
|
208
|
+
query?: never;
|
|
209
|
+
header?: never;
|
|
210
|
+
path?: never;
|
|
211
|
+
cookie?: never;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Get top traders for an event
|
|
215
|
+
* @description Top traders ranked by realized PnL for a given event.
|
|
216
|
+
*/
|
|
217
|
+
get: operations["get_event_top_traders"];
|
|
218
|
+
put?: never;
|
|
219
|
+
post?: never;
|
|
220
|
+
delete?: never;
|
|
221
|
+
options?: never;
|
|
222
|
+
head?: never;
|
|
223
|
+
patch?: never;
|
|
224
|
+
trace?: never;
|
|
225
|
+
};
|
|
206
226
|
"/polymarket/events/{event_slug}/analytics/changes": {
|
|
207
227
|
parameters: {
|
|
208
228
|
query?: never;
|
|
@@ -292,7 +312,7 @@ export interface paths {
|
|
|
292
312
|
};
|
|
293
313
|
/**
|
|
294
314
|
* Get market holders
|
|
295
|
-
* @description Retrieve holders of a market grouped by outcome, sorted by shares held. Identify the market with either `condition_id` or `market_slug` — exactly one must be provided. Set `include_pnl=true` to include a nested holder `pnl` object.
|
|
315
|
+
* @description Retrieve holders of a market grouped by outcome, sorted by shares held. Identify the market with either `condition_id` or `market_slug` — exactly one must be provided. Set `include_pnl=true` to include a nested holder `pnl` object. Uses cursor-based pagination.
|
|
296
316
|
*/
|
|
297
317
|
get: operations["get_market_holders"];
|
|
298
318
|
put?: never;
|
|
@@ -463,6 +483,26 @@ export interface paths {
|
|
|
463
483
|
patch?: never;
|
|
464
484
|
trace?: never;
|
|
465
485
|
};
|
|
486
|
+
"/polymarket/market/oracle-events": {
|
|
487
|
+
parameters: {
|
|
488
|
+
query?: never;
|
|
489
|
+
header?: never;
|
|
490
|
+
path?: never;
|
|
491
|
+
cookie?: never;
|
|
492
|
+
};
|
|
493
|
+
/**
|
|
494
|
+
* List oracle events
|
|
495
|
+
* @description Retrieve on-chain oracle lifecycle events (resolutions, disputes, assertions, emergency resolutions). Filter by `condition_ids` or `event_types` and paginate with `limit`/`pagination_key`.
|
|
496
|
+
*/
|
|
497
|
+
get: operations["get_oracle_events"];
|
|
498
|
+
put?: never;
|
|
499
|
+
post?: never;
|
|
500
|
+
delete?: never;
|
|
501
|
+
options?: never;
|
|
502
|
+
head?: never;
|
|
503
|
+
patch?: never;
|
|
504
|
+
trace?: never;
|
|
505
|
+
};
|
|
466
506
|
"/polymarket/market/position/candlestick": {
|
|
467
507
|
parameters: {
|
|
468
508
|
query?: never;
|
|
@@ -503,6 +543,26 @@ export interface paths {
|
|
|
503
543
|
patch?: never;
|
|
504
544
|
trace?: never;
|
|
505
545
|
};
|
|
546
|
+
"/polymarket/market/position/top-traders": {
|
|
547
|
+
parameters: {
|
|
548
|
+
query?: never;
|
|
549
|
+
header?: never;
|
|
550
|
+
path?: never;
|
|
551
|
+
cookie?: never;
|
|
552
|
+
};
|
|
553
|
+
/**
|
|
554
|
+
* Get top traders for a position id / outcome
|
|
555
|
+
* @description Top traders ranked by realized PnL on a specific position (ERC1155 outcome token).
|
|
556
|
+
*/
|
|
557
|
+
get: operations["get_position_top_traders"];
|
|
558
|
+
put?: never;
|
|
559
|
+
post?: never;
|
|
560
|
+
delete?: never;
|
|
561
|
+
options?: never;
|
|
562
|
+
head?: never;
|
|
563
|
+
patch?: never;
|
|
564
|
+
trace?: never;
|
|
565
|
+
};
|
|
506
566
|
"/polymarket/market/position/volume-chart": {
|
|
507
567
|
parameters: {
|
|
508
568
|
query?: never;
|
|
@@ -563,6 +623,26 @@ export interface paths {
|
|
|
563
623
|
patch?: never;
|
|
564
624
|
trace?: never;
|
|
565
625
|
};
|
|
626
|
+
"/polymarket/market/top-traders": {
|
|
627
|
+
parameters: {
|
|
628
|
+
query?: never;
|
|
629
|
+
header?: never;
|
|
630
|
+
path?: never;
|
|
631
|
+
cookie?: never;
|
|
632
|
+
};
|
|
633
|
+
/**
|
|
634
|
+
* Get top traders for a market
|
|
635
|
+
* @description Top traders ranked by realized PnL for a given market (condition_id or market_slug).
|
|
636
|
+
*/
|
|
637
|
+
get: operations["get_market_top_traders"];
|
|
638
|
+
put?: never;
|
|
639
|
+
post?: never;
|
|
640
|
+
delete?: never;
|
|
641
|
+
options?: never;
|
|
642
|
+
head?: never;
|
|
643
|
+
patch?: never;
|
|
644
|
+
trace?: never;
|
|
645
|
+
};
|
|
566
646
|
"/polymarket/market/trades": {
|
|
567
647
|
parameters: {
|
|
568
648
|
query?: never;
|
|
@@ -1092,7 +1172,7 @@ export interface paths {
|
|
|
1092
1172
|
};
|
|
1093
1173
|
/**
|
|
1094
1174
|
* Get trader position PnL
|
|
1095
|
-
* @description Retrieve per-outcome-token lifetime PnL for a trader
|
|
1175
|
+
* @description Retrieve per-outcome-token lifetime PnL for a trader. Includes open/closed state, win/loss outcome, redemption payouts, and share quantities. Filter by status and won/lost to segment portfolio views.
|
|
1096
1176
|
*/
|
|
1097
1177
|
get: operations["get_trader_position_pnl"];
|
|
1098
1178
|
put?: never;
|
|
@@ -1542,6 +1622,36 @@ export interface components {
|
|
|
1542
1622
|
slug?: string | null;
|
|
1543
1623
|
event_slug?: string | null;
|
|
1544
1624
|
};
|
|
1625
|
+
/** @description V2 UMA OOv2: a proposed price was disputed. */
|
|
1626
|
+
DisputePriceEvent: {
|
|
1627
|
+
id: string;
|
|
1628
|
+
hash: string;
|
|
1629
|
+
/** Format: int64 */
|
|
1630
|
+
block?: number | null;
|
|
1631
|
+
/** Format: int64 */
|
|
1632
|
+
confirmed_at?: number | null;
|
|
1633
|
+
/** Format: int64 */
|
|
1634
|
+
received_at?: number | null;
|
|
1635
|
+
/** Format: int64 */
|
|
1636
|
+
log_index?: number | null;
|
|
1637
|
+
/** Format: int64 */
|
|
1638
|
+
block_index?: number | null;
|
|
1639
|
+
oracle_contract: string;
|
|
1640
|
+
requester: string;
|
|
1641
|
+
proposer: string;
|
|
1642
|
+
disputer: string;
|
|
1643
|
+
identifier: string;
|
|
1644
|
+
timestamp: string;
|
|
1645
|
+
ancillary_data: string;
|
|
1646
|
+
/** Format: int64 */
|
|
1647
|
+
proposed_price: number;
|
|
1648
|
+
condition_id?: string | null;
|
|
1649
|
+
proposed_outcome?: string | null;
|
|
1650
|
+
question?: string | null;
|
|
1651
|
+
image_url?: string | null;
|
|
1652
|
+
slug?: string | null;
|
|
1653
|
+
event_slug?: string | null;
|
|
1654
|
+
};
|
|
1545
1655
|
/** @description Enriched market data for event API responses */
|
|
1546
1656
|
EventMarket: {
|
|
1547
1657
|
/** @default */
|
|
@@ -1841,11 +1951,10 @@ export interface components {
|
|
|
1841
1951
|
*/
|
|
1842
1952
|
LeaderboardCategory: "overall" | "politics" | "sports" | "crypto" | "finance" | "culture" | "mentions" | "weather" | "economics" | "tech";
|
|
1843
1953
|
/**
|
|
1844
|
-
* @description Flat response row. `trader` is the canonical `TraderInfo` used across
|
|
1845
|
-
*
|
|
1846
|
-
*
|
|
1847
|
-
*
|
|
1848
|
-
* a row for that address in the selected timeframe.
|
|
1954
|
+
* @description Flat response row. `trader` is the canonical `TraderInfo` used across
|
|
1955
|
+
* endpoints; enrichment fields sit at the top level. Fields other than
|
|
1956
|
+
* `trader`, `rank`, `pnl`, and `timeframe` may be `null` when PnL data for
|
|
1957
|
+
* the trader in the selected timeframe isn't yet available.
|
|
1849
1958
|
*/
|
|
1850
1959
|
LeaderboardEntry: {
|
|
1851
1960
|
/** Format: int64 */
|
|
@@ -2078,12 +2187,6 @@ export interface components {
|
|
|
2078
2187
|
/** Format: double */
|
|
2079
2188
|
split_volume_usd?: number | null;
|
|
2080
2189
|
/** Format: double */
|
|
2081
|
-
new_traders?: number | null;
|
|
2082
|
-
/** Format: double */
|
|
2083
|
-
new_makers?: number | null;
|
|
2084
|
-
/** Format: double */
|
|
2085
|
-
new_takers?: number | null;
|
|
2086
|
-
/** Format: double */
|
|
2087
2190
|
unique_traders?: number | null;
|
|
2088
2191
|
/** Format: double */
|
|
2089
2192
|
unique_makers?: number | null;
|
|
@@ -2124,6 +2227,62 @@ export interface components {
|
|
|
2124
2227
|
slug?: string | null;
|
|
2125
2228
|
event_slug?: string | null;
|
|
2126
2229
|
};
|
|
2230
|
+
/**
|
|
2231
|
+
* @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
|
|
2232
|
+
* and only includes fields relevant to each type.
|
|
2233
|
+
*/
|
|
2234
|
+
OracleEventTyped: (components["schemas"]["AssertionMadeEvent"] & {
|
|
2235
|
+
/** @enum {string} */
|
|
2236
|
+
event_type: "AssertionMade";
|
|
2237
|
+
}) | (components["schemas"]["AssertionDisputedEvent"] & {
|
|
2238
|
+
/** @enum {string} */
|
|
2239
|
+
event_type: "AssertionDisputed";
|
|
2240
|
+
}) | (components["schemas"]["AssertionSettledEvent"] & {
|
|
2241
|
+
/** @enum {string} */
|
|
2242
|
+
event_type: "AssertionSettled";
|
|
2243
|
+
}) | (components["schemas"]["RequestPriceEvent"] & {
|
|
2244
|
+
/** @enum {string} */
|
|
2245
|
+
event_type: "RequestPrice";
|
|
2246
|
+
}) | (components["schemas"]["ProposePriceEvent"] & {
|
|
2247
|
+
/** @enum {string} */
|
|
2248
|
+
event_type: "ProposePrice";
|
|
2249
|
+
}) | (components["schemas"]["DisputePriceEvent"] & {
|
|
2250
|
+
/** @enum {string} */
|
|
2251
|
+
event_type: "DisputePrice";
|
|
2252
|
+
}) | (components["schemas"]["SettleEvent"] & {
|
|
2253
|
+
/** @enum {string} */
|
|
2254
|
+
event_type: "Settle";
|
|
2255
|
+
}) | (components["schemas"]["QuestionResolvedEvent"] & {
|
|
2256
|
+
/** @enum {string} */
|
|
2257
|
+
event_type: "QuestionResolved";
|
|
2258
|
+
}) | (components["schemas"]["QuestionEmergencyResolvedEvent"] & {
|
|
2259
|
+
/** @enum {string} */
|
|
2260
|
+
event_type: "QuestionEmergencyResolved";
|
|
2261
|
+
}) | (components["schemas"]["QuestionResetEvent"] & {
|
|
2262
|
+
/** @enum {string} */
|
|
2263
|
+
event_type: "QuestionReset";
|
|
2264
|
+
}) | (components["schemas"]["QuestionInitializedEvent"] & {
|
|
2265
|
+
/** @enum {string} */
|
|
2266
|
+
event_type: "QuestionInitialized";
|
|
2267
|
+
}) | (components["schemas"]["QuestionPausedEvent"] & {
|
|
2268
|
+
/** @enum {string} */
|
|
2269
|
+
event_type: "QuestionPaused";
|
|
2270
|
+
}) | (components["schemas"]["QuestionUnpausedEvent"] & {
|
|
2271
|
+
/** @enum {string} */
|
|
2272
|
+
event_type: "QuestionUnpaused";
|
|
2273
|
+
}) | (components["schemas"]["QuestionFlaggedEvent"] & {
|
|
2274
|
+
/** @enum {string} */
|
|
2275
|
+
event_type: "QuestionFlagged";
|
|
2276
|
+
}) | (components["schemas"]["QuestionUnflaggedEvent"] & {
|
|
2277
|
+
/** @enum {string} */
|
|
2278
|
+
event_type: "QuestionUnflagged";
|
|
2279
|
+
}) | (components["schemas"]["ConditionResolutionEvent"] & {
|
|
2280
|
+
/** @enum {string} */
|
|
2281
|
+
event_type: "ConditionResolution";
|
|
2282
|
+
}) | (components["schemas"]["NegRiskOutcomeReportedEvent"] & {
|
|
2283
|
+
/** @enum {string} */
|
|
2284
|
+
event_type: "NegRiskOutcomeReported";
|
|
2285
|
+
});
|
|
2127
2286
|
/** @description Output payload for OrderFilled and OrdersMatched trades (actual buy/sell). */
|
|
2128
2287
|
OrderFilledTrade: {
|
|
2129
2288
|
id: string;
|
|
@@ -2500,24 +2659,6 @@ export interface components {
|
|
|
2500
2659
|
* @default null
|
|
2501
2660
|
*/
|
|
2502
2661
|
txn_count: number;
|
|
2503
|
-
/**
|
|
2504
|
-
* Format: int64
|
|
2505
|
-
* @description First-time-ever traders in the window (delta of the lifetime counter).
|
|
2506
|
-
* @default null
|
|
2507
|
-
*/
|
|
2508
|
-
new_traders: number;
|
|
2509
|
-
/**
|
|
2510
|
-
* Format: int64
|
|
2511
|
-
* @description First-time-ever makers in the window.
|
|
2512
|
-
* @default null
|
|
2513
|
-
*/
|
|
2514
|
-
new_makers: number;
|
|
2515
|
-
/**
|
|
2516
|
-
* Format: int64
|
|
2517
|
-
* @description First-time-ever takers in the window.
|
|
2518
|
-
* @default null
|
|
2519
|
-
*/
|
|
2520
|
-
new_takers: number;
|
|
2521
2662
|
/**
|
|
2522
2663
|
* Format: int64
|
|
2523
2664
|
* @description Distinct active traders in the window.
|
|
@@ -2579,7 +2720,7 @@ export interface components {
|
|
|
2579
2720
|
* @description Outcome index (0 = Yes, 1 = No for binary)
|
|
2580
2721
|
*/
|
|
2581
2722
|
outcome_index: number;
|
|
2582
|
-
/** @description Outcome name (e.g. "Yes", "No") —
|
|
2723
|
+
/** @description Outcome name (e.g. "Yes", "No"). Optional — may be omitted when the market metadata isn't yet available. */
|
|
2583
2724
|
outcome?: string | null;
|
|
2584
2725
|
/** @description Amount of shares created/burned/redeemed for this position */
|
|
2585
2726
|
amount: string;
|
|
@@ -2731,6 +2872,37 @@ export interface components {
|
|
|
2731
2872
|
};
|
|
2732
2873
|
/** @enum {string} */
|
|
2733
2874
|
PriceJumpResolution: "1" | "5" | "15" | "30" | "60" | "240";
|
|
2875
|
+
/** @description V2 UMA OOv2: a price was proposed (resolution proposal). */
|
|
2876
|
+
ProposePriceEvent: {
|
|
2877
|
+
id: string;
|
|
2878
|
+
hash: string;
|
|
2879
|
+
/** Format: int64 */
|
|
2880
|
+
block?: number | null;
|
|
2881
|
+
/** Format: int64 */
|
|
2882
|
+
confirmed_at?: number | null;
|
|
2883
|
+
/** Format: int64 */
|
|
2884
|
+
received_at?: number | null;
|
|
2885
|
+
/** Format: int64 */
|
|
2886
|
+
log_index?: number | null;
|
|
2887
|
+
/** Format: int64 */
|
|
2888
|
+
block_index?: number | null;
|
|
2889
|
+
oracle_contract: string;
|
|
2890
|
+
requester: string;
|
|
2891
|
+
proposer: string;
|
|
2892
|
+
identifier: string;
|
|
2893
|
+
timestamp: string;
|
|
2894
|
+
ancillary_data: string;
|
|
2895
|
+
/** Format: int64 */
|
|
2896
|
+
proposed_price: number;
|
|
2897
|
+
expiration_timestamp: string;
|
|
2898
|
+
currency: string;
|
|
2899
|
+
condition_id?: string | null;
|
|
2900
|
+
proposed_outcome?: string | null;
|
|
2901
|
+
question?: string | null;
|
|
2902
|
+
image_url?: string | null;
|
|
2903
|
+
slug?: string | null;
|
|
2904
|
+
event_slug?: string | null;
|
|
2905
|
+
};
|
|
2734
2906
|
/** @description UMA CTF Adapter: admin emergency resolution. */
|
|
2735
2907
|
QuestionEmergencyResolvedEvent: {
|
|
2736
2908
|
id: string;
|
|
@@ -2961,6 +3133,41 @@ export interface components {
|
|
|
2961
3133
|
event_slug?: string | null;
|
|
2962
3134
|
exchange: components["schemas"]["PolymarketExchange"];
|
|
2963
3135
|
};
|
|
3136
|
+
/** @description V2 UMA OOv2: a price request was made (market initialization). */
|
|
3137
|
+
RequestPriceEvent: {
|
|
3138
|
+
id: string;
|
|
3139
|
+
hash: string;
|
|
3140
|
+
/** Format: int64 */
|
|
3141
|
+
block?: number | null;
|
|
3142
|
+
/** Format: int64 */
|
|
3143
|
+
confirmed_at?: number | null;
|
|
3144
|
+
/** Format: int64 */
|
|
3145
|
+
received_at?: number | null;
|
|
3146
|
+
/** Format: int64 */
|
|
3147
|
+
log_index?: number | null;
|
|
3148
|
+
/** Format: int64 */
|
|
3149
|
+
block_index?: number | null;
|
|
3150
|
+
oracle_contract: string;
|
|
3151
|
+
requester: string;
|
|
3152
|
+
identifier: string;
|
|
3153
|
+
/**
|
|
3154
|
+
* @description UMA request timestamp (seconds, decimal string).
|
|
3155
|
+
* The point in time the requester is asking the oracle to resolve the
|
|
3156
|
+
* price for — part of the request identity tuple
|
|
3157
|
+
* `(requester, identifier, timestamp, ancillaryData)`. Not the block
|
|
3158
|
+
* timestamp of this event; see `confirmed_at` for that.
|
|
3159
|
+
*/
|
|
3160
|
+
timestamp: string;
|
|
3161
|
+
ancillary_data: string;
|
|
3162
|
+
currency: string;
|
|
3163
|
+
reward: string;
|
|
3164
|
+
final_fee: string;
|
|
3165
|
+
condition_id?: string | null;
|
|
3166
|
+
question?: string | null;
|
|
3167
|
+
image_url?: string | null;
|
|
3168
|
+
slug?: string | null;
|
|
3169
|
+
event_slug?: string | null;
|
|
3170
|
+
};
|
|
2964
3171
|
SearchResponse: {
|
|
2965
3172
|
events?: components["schemas"]["PolymarketEvent"][] | null;
|
|
2966
3173
|
events_pagination?: null | components["schemas"]["PaginationMeta"];
|
|
@@ -2974,6 +3181,38 @@ export interface components {
|
|
|
2974
3181
|
* @enum {string}
|
|
2975
3182
|
*/
|
|
2976
3183
|
SearchSortBy: "volume" | "txns" | "unique_traders" | "relevance" | "title" | "creation_date" | "start_date" | "end_date" | "liquidity" | "holders" | "end_time" | "start_time" | "created_time";
|
|
3184
|
+
/** @description V2 UMA OOv2: a price request was settled (final resolution). */
|
|
3185
|
+
SettleEvent: {
|
|
3186
|
+
id: string;
|
|
3187
|
+
hash: string;
|
|
3188
|
+
/** Format: int64 */
|
|
3189
|
+
block?: number | null;
|
|
3190
|
+
/** Format: int64 */
|
|
3191
|
+
confirmed_at?: number | null;
|
|
3192
|
+
/** Format: int64 */
|
|
3193
|
+
received_at?: number | null;
|
|
3194
|
+
/** Format: int64 */
|
|
3195
|
+
log_index?: number | null;
|
|
3196
|
+
/** Format: int64 */
|
|
3197
|
+
block_index?: number | null;
|
|
3198
|
+
oracle_contract: string;
|
|
3199
|
+
requester: string;
|
|
3200
|
+
proposer: string;
|
|
3201
|
+
disputer: string;
|
|
3202
|
+
identifier: string;
|
|
3203
|
+
timestamp: string;
|
|
3204
|
+
ancillary_data: string;
|
|
3205
|
+
/** Format: int64 */
|
|
3206
|
+
proposed_price: number;
|
|
3207
|
+
payout: string;
|
|
3208
|
+
disputed: boolean;
|
|
3209
|
+
condition_id?: string | null;
|
|
3210
|
+
proposed_outcome?: string | null;
|
|
3211
|
+
question?: string | null;
|
|
3212
|
+
image_url?: string | null;
|
|
3213
|
+
slug?: string | null;
|
|
3214
|
+
event_slug?: string | null;
|
|
3215
|
+
};
|
|
2977
3216
|
SimpleTimeframeMetrics: {
|
|
2978
3217
|
/**
|
|
2979
3218
|
* Format: double
|
|
@@ -3055,15 +3294,11 @@ export interface components {
|
|
|
3055
3294
|
/**
|
|
3056
3295
|
* @description Metric to order by when `sort=<value>` is provided.
|
|
3057
3296
|
*
|
|
3058
|
-
* `new_*` ranks by first-time-ever arrivals — counted once in the bucket
|
|
3059
|
-
* where the address first appears, regardless of subsequent activity. Read
|
|
3060
|
-
* from the cumulative / delta MVs.
|
|
3061
|
-
*
|
|
3062
3297
|
* `unique_*` ranks by window-distinct addresses — exact `uniqExact` count
|
|
3063
|
-
* of addresses active in the timeframe.
|
|
3298
|
+
* of addresses active in the timeframe.
|
|
3064
3299
|
* @enum {string}
|
|
3065
3300
|
*/
|
|
3066
|
-
TagSortBy: "volume" | "txns" | "
|
|
3301
|
+
TagSortBy: "volume" | "txns" | "unique_traders" | "unique_makers" | "unique_takers" | "fees";
|
|
3067
3302
|
/**
|
|
3068
3303
|
* @description Timeframe for `?sort=...` — defines the window the metric is summed over
|
|
3069
3304
|
* (or `lifetime` for all-time cumulative).
|
|
@@ -3077,10 +3312,12 @@ export interface components {
|
|
|
3077
3312
|
*
|
|
3078
3313
|
* Short field names for compact JSON responses:
|
|
3079
3314
|
* t=bucket (unix seconds), v=volume_usd, bv=buy_volume_usd, sv=sell_volume_usd,
|
|
3080
|
-
* ut=
|
|
3081
|
-
*
|
|
3082
|
-
*
|
|
3083
|
-
*
|
|
3315
|
+
* ut=unique_traders, um=unique_makers, uk=unique_takers,
|
|
3316
|
+
* tc=txn_count, bc=buy_count, sc=sell_count,
|
|
3317
|
+
* rc=redemption_count, rv=redemption_volume_usd, mc=merge_count, mv=merge_volume_usd,
|
|
3318
|
+
* sp=split_count, spv=split_volume_usd, f=fees_usd, sh=shares_volume,
|
|
3319
|
+
* yv=yes_volume_usd, nv=no_volume_usd, yc=yes_count, nc=no_count,
|
|
3320
|
+
* bd_*=buy distribution by USD bucket
|
|
3084
3321
|
*/
|
|
3085
3322
|
TimeBucketRow: {
|
|
3086
3323
|
/** Format: int32 */
|
|
@@ -3091,21 +3328,6 @@ export interface components {
|
|
|
3091
3328
|
bv: number;
|
|
3092
3329
|
/** Format: double */
|
|
3093
3330
|
sv: number;
|
|
3094
|
-
/**
|
|
3095
|
-
* Format: int64
|
|
3096
|
-
* @description Traders appearing for the first-time-ever in this bucket.
|
|
3097
|
-
*/
|
|
3098
|
-
nt: number;
|
|
3099
|
-
/**
|
|
3100
|
-
* Format: int64
|
|
3101
|
-
* @description Unique makers (order-resting side). Only tracked for match events.
|
|
3102
|
-
*/
|
|
3103
|
-
nm: number;
|
|
3104
|
-
/**
|
|
3105
|
-
* Format: int64
|
|
3106
|
-
* @description Unique takers (order-initiator side). Only tracked for match events.
|
|
3107
|
-
*/
|
|
3108
|
-
nk: number;
|
|
3109
3331
|
/** Format: int64 */
|
|
3110
3332
|
tc: number;
|
|
3111
3333
|
/** Format: int64 */
|
|
@@ -3973,6 +4195,33 @@ export interface operations {
|
|
|
3973
4195
|
};
|
|
3974
4196
|
};
|
|
3975
4197
|
};
|
|
4198
|
+
get_event_top_traders: {
|
|
4199
|
+
parameters: {
|
|
4200
|
+
query: {
|
|
4201
|
+
/** @description Event slug */
|
|
4202
|
+
event_slug: string;
|
|
4203
|
+
/** @description Timeframe: 1d, 7d, 30d, lifetime (default: lifetime) */
|
|
4204
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
4205
|
+
/** @description Results limit (default: 10, max: 200) */
|
|
4206
|
+
limit?: number;
|
|
4207
|
+
/** @description Pagination key from the previous response */
|
|
4208
|
+
pagination_key?: string;
|
|
4209
|
+
};
|
|
4210
|
+
header?: never;
|
|
4211
|
+
path?: never;
|
|
4212
|
+
cookie?: never;
|
|
4213
|
+
};
|
|
4214
|
+
requestBody?: never;
|
|
4215
|
+
responses: {
|
|
4216
|
+
/** @description Top traders sorted by realized PnL desc. */
|
|
4217
|
+
200: {
|
|
4218
|
+
headers: {
|
|
4219
|
+
[name: string]: unknown;
|
|
4220
|
+
};
|
|
4221
|
+
content?: never;
|
|
4222
|
+
};
|
|
4223
|
+
};
|
|
4224
|
+
};
|
|
3976
4225
|
get_event_analytics_changes: {
|
|
3977
4226
|
parameters: {
|
|
3978
4227
|
query?: {
|
|
@@ -4113,8 +4362,10 @@ export interface operations {
|
|
|
4113
4362
|
condition_id?: string;
|
|
4114
4363
|
/** @description Market slug (e.g. `will-trump-win`) */
|
|
4115
4364
|
market_slug?: string;
|
|
4116
|
-
/** @description Results limit (default: 10, max: 100) */
|
|
4365
|
+
/** @description Results limit per outcome (default: 10, max: 100) */
|
|
4117
4366
|
limit?: number;
|
|
4367
|
+
/** @description Cursor-based pagination key */
|
|
4368
|
+
pagination_key?: string;
|
|
4118
4369
|
/** @description Minimum shares held (decimal string) */
|
|
4119
4370
|
min_shares?: string;
|
|
4120
4371
|
/** @description Maximum shares held (decimal string) */
|
|
@@ -4130,7 +4381,7 @@ export interface operations {
|
|
|
4130
4381
|
};
|
|
4131
4382
|
requestBody?: never;
|
|
4132
4383
|
responses: {
|
|
4133
|
-
/** @description Market holders grouped by outcome (sorted by shares DESC). Holder `pnl` is included only when `include_pnl=true`. */
|
|
4384
|
+
/** @description Market holders grouped by outcome (sorted by shares DESC). Holder `pnl` is included only when `include_pnl=true`. Response includes `pagination: { has_more, pagination_key }` for cursor-based pagination. */
|
|
4134
4385
|
200: {
|
|
4135
4386
|
headers: {
|
|
4136
4387
|
[name: string]: unknown;
|
|
@@ -4499,6 +4750,43 @@ export interface operations {
|
|
|
4499
4750
|
};
|
|
4500
4751
|
};
|
|
4501
4752
|
};
|
|
4753
|
+
get_oracle_events: {
|
|
4754
|
+
parameters: {
|
|
4755
|
+
query?: {
|
|
4756
|
+
/** @description Comma-separated condition IDs (max 20) */
|
|
4757
|
+
condition_ids?: string;
|
|
4758
|
+
/** @description Comma-separated event names: Initialization, Proposal, Dispute, Settled, Resolution, ConditionResolution, Reset, Flag, Unflag, Pause, Unpause, ManualResolution, NegRiskOutcomeReported. Empty = all oracle event types. */
|
|
4759
|
+
event_types?: string;
|
|
4760
|
+
/** @description Start timestamp (Unix seconds) */
|
|
4761
|
+
from?: number;
|
|
4762
|
+
/** @description End timestamp (Unix seconds) */
|
|
4763
|
+
to?: number;
|
|
4764
|
+
/** @description Results per page (default 10, max 250) */
|
|
4765
|
+
limit?: number;
|
|
4766
|
+
/** @description Pagination offset. Takes precedence over pagination_key. */
|
|
4767
|
+
offset?: number;
|
|
4768
|
+
/** @description Cursor-based pagination key */
|
|
4769
|
+
pagination_key?: string;
|
|
4770
|
+
/** @description Sort direction (default true = newest first) */
|
|
4771
|
+
sort_desc?: boolean;
|
|
4772
|
+
};
|
|
4773
|
+
header?: never;
|
|
4774
|
+
path?: never;
|
|
4775
|
+
cookie?: never;
|
|
4776
|
+
};
|
|
4777
|
+
requestBody?: never;
|
|
4778
|
+
responses: {
|
|
4779
|
+
/** @description Oracle events matching the filter */
|
|
4780
|
+
200: {
|
|
4781
|
+
headers: {
|
|
4782
|
+
[name: string]: unknown;
|
|
4783
|
+
};
|
|
4784
|
+
content: {
|
|
4785
|
+
"application/json": components["schemas"]["TradeEvent"][];
|
|
4786
|
+
};
|
|
4787
|
+
};
|
|
4788
|
+
};
|
|
4789
|
+
};
|
|
4502
4790
|
get_position_candlestick: {
|
|
4503
4791
|
parameters: {
|
|
4504
4792
|
query: {
|
|
@@ -4564,6 +4852,33 @@ export interface operations {
|
|
|
4564
4852
|
};
|
|
4565
4853
|
};
|
|
4566
4854
|
};
|
|
4855
|
+
get_position_top_traders: {
|
|
4856
|
+
parameters: {
|
|
4857
|
+
query: {
|
|
4858
|
+
/** @description Position ID (ERC1155 token ID) */
|
|
4859
|
+
position_id: string;
|
|
4860
|
+
/** @description Filter by position status (omit for all) */
|
|
4861
|
+
status?: "open" | "closed";
|
|
4862
|
+
/** @description Results limit (default: 10, max: 200) */
|
|
4863
|
+
limit?: number;
|
|
4864
|
+
/** @description Pagination key from the previous response */
|
|
4865
|
+
pagination_key?: string;
|
|
4866
|
+
};
|
|
4867
|
+
header?: never;
|
|
4868
|
+
path?: never;
|
|
4869
|
+
cookie?: never;
|
|
4870
|
+
};
|
|
4871
|
+
requestBody?: never;
|
|
4872
|
+
responses: {
|
|
4873
|
+
/** @description Top traders sorted by realized PnL desc. */
|
|
4874
|
+
200: {
|
|
4875
|
+
headers: {
|
|
4876
|
+
[name: string]: unknown;
|
|
4877
|
+
};
|
|
4878
|
+
content?: never;
|
|
4879
|
+
};
|
|
4880
|
+
};
|
|
4881
|
+
};
|
|
4567
4882
|
get_position_volume_chart: {
|
|
4568
4883
|
parameters: {
|
|
4569
4884
|
query: {
|
|
@@ -4734,6 +5049,35 @@ export interface operations {
|
|
|
4734
5049
|
};
|
|
4735
5050
|
};
|
|
4736
5051
|
};
|
|
5052
|
+
get_market_top_traders: {
|
|
5053
|
+
parameters: {
|
|
5054
|
+
query?: {
|
|
5055
|
+
/** @description Market condition ID */
|
|
5056
|
+
condition_id?: string;
|
|
5057
|
+
/** @description Market slug (alternative to condition_id) */
|
|
5058
|
+
market_slug?: string;
|
|
5059
|
+
/** @description Timeframe: 1d, 7d, 30d, lifetime (default: lifetime) */
|
|
5060
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
5061
|
+
/** @description Results limit (default: 10, max: 200) */
|
|
5062
|
+
limit?: number;
|
|
5063
|
+
/** @description Pagination key from the previous response */
|
|
5064
|
+
pagination_key?: string;
|
|
5065
|
+
};
|
|
5066
|
+
header?: never;
|
|
5067
|
+
path?: never;
|
|
5068
|
+
cookie?: never;
|
|
5069
|
+
};
|
|
5070
|
+
requestBody?: never;
|
|
5071
|
+
responses: {
|
|
5072
|
+
/** @description Top traders sorted by realized PnL desc. */
|
|
5073
|
+
200: {
|
|
5074
|
+
headers: {
|
|
5075
|
+
[name: string]: unknown;
|
|
5076
|
+
};
|
|
5077
|
+
content?: never;
|
|
5078
|
+
};
|
|
5079
|
+
};
|
|
5080
|
+
};
|
|
4737
5081
|
get_market_trades: {
|
|
4738
5082
|
parameters: {
|
|
4739
5083
|
query?: {
|
|
@@ -4745,6 +5089,8 @@ export interface operations {
|
|
|
4745
5089
|
position_ids?: string;
|
|
4746
5090
|
/** @description Comma-separated trader addresses (max 25) */
|
|
4747
5091
|
traders?: string;
|
|
5092
|
+
/** @description Comma-separated builder codes (max 25) */
|
|
5093
|
+
builder_codes?: string;
|
|
4748
5094
|
/** @description Trade side: 0 (Buy), 1 (Sell) */
|
|
4749
5095
|
side?: components["schemas"]["TradeSide"];
|
|
4750
5096
|
/** @description Outcome name filter (e.g. Yes, No) */
|
|
@@ -5958,6 +6304,8 @@ export interface operations {
|
|
|
5958
6304
|
slugs?: string;
|
|
5959
6305
|
/** @description Comma-separated position IDs */
|
|
5960
6306
|
position_ids?: string;
|
|
6307
|
+
/** @description Comma-separated builder codes (max 25) */
|
|
6308
|
+
builder_codes?: string;
|
|
5961
6309
|
/** @description Trade side: 0 (Buy), 1 (Sell) */
|
|
5962
6310
|
side?: components["schemas"]["TradeSide"];
|
|
5963
6311
|
/** @description Outcome name filter (e.g. Yes, No) */
|