@structbuild/sdk 0.3.10-staging.7 → 0.3.10-staging.9
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 +412 -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;
|
|
@@ -2171,6 +2330,11 @@ export interface components {
|
|
|
2171
2330
|
* trades and may be `0x0000…` for V2 trades placed without a builder code.
|
|
2172
2331
|
*/
|
|
2173
2332
|
builder_code?: string | null;
|
|
2333
|
+
/**
|
|
2334
|
+
* Format: double
|
|
2335
|
+
* @description Builder fee in USDC. Absent when no builder code is attached.
|
|
2336
|
+
*/
|
|
2337
|
+
builder_fee?: number | null;
|
|
2174
2338
|
};
|
|
2175
2339
|
OrderbookHistoryRow: {
|
|
2176
2340
|
/** Format: int64 */
|
|
@@ -2500,24 +2664,6 @@ export interface components {
|
|
|
2500
2664
|
* @default null
|
|
2501
2665
|
*/
|
|
2502
2666
|
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
2667
|
/**
|
|
2522
2668
|
* Format: int64
|
|
2523
2669
|
* @description Distinct active traders in the window.
|
|
@@ -2579,7 +2725,7 @@ export interface components {
|
|
|
2579
2725
|
* @description Outcome index (0 = Yes, 1 = No for binary)
|
|
2580
2726
|
*/
|
|
2581
2727
|
outcome_index: number;
|
|
2582
|
-
/** @description Outcome name (e.g. "Yes", "No") —
|
|
2728
|
+
/** @description Outcome name (e.g. "Yes", "No"). Optional — may be omitted when the market metadata isn't yet available. */
|
|
2583
2729
|
outcome?: string | null;
|
|
2584
2730
|
/** @description Amount of shares created/burned/redeemed for this position */
|
|
2585
2731
|
amount: string;
|
|
@@ -2731,6 +2877,37 @@ export interface components {
|
|
|
2731
2877
|
};
|
|
2732
2878
|
/** @enum {string} */
|
|
2733
2879
|
PriceJumpResolution: "1" | "5" | "15" | "30" | "60" | "240";
|
|
2880
|
+
/** @description V2 UMA OOv2: a price was proposed (resolution proposal). */
|
|
2881
|
+
ProposePriceEvent: {
|
|
2882
|
+
id: string;
|
|
2883
|
+
hash: string;
|
|
2884
|
+
/** Format: int64 */
|
|
2885
|
+
block?: number | null;
|
|
2886
|
+
/** Format: int64 */
|
|
2887
|
+
confirmed_at?: number | null;
|
|
2888
|
+
/** Format: int64 */
|
|
2889
|
+
received_at?: number | null;
|
|
2890
|
+
/** Format: int64 */
|
|
2891
|
+
log_index?: number | null;
|
|
2892
|
+
/** Format: int64 */
|
|
2893
|
+
block_index?: number | null;
|
|
2894
|
+
oracle_contract: string;
|
|
2895
|
+
requester: string;
|
|
2896
|
+
proposer: string;
|
|
2897
|
+
identifier: string;
|
|
2898
|
+
timestamp: string;
|
|
2899
|
+
ancillary_data: string;
|
|
2900
|
+
/** Format: int64 */
|
|
2901
|
+
proposed_price: number;
|
|
2902
|
+
expiration_timestamp: string;
|
|
2903
|
+
currency: string;
|
|
2904
|
+
condition_id?: string | null;
|
|
2905
|
+
proposed_outcome?: string | null;
|
|
2906
|
+
question?: string | null;
|
|
2907
|
+
image_url?: string | null;
|
|
2908
|
+
slug?: string | null;
|
|
2909
|
+
event_slug?: string | null;
|
|
2910
|
+
};
|
|
2734
2911
|
/** @description UMA CTF Adapter: admin emergency resolution. */
|
|
2735
2912
|
QuestionEmergencyResolvedEvent: {
|
|
2736
2913
|
id: string;
|
|
@@ -2961,6 +3138,41 @@ export interface components {
|
|
|
2961
3138
|
event_slug?: string | null;
|
|
2962
3139
|
exchange: components["schemas"]["PolymarketExchange"];
|
|
2963
3140
|
};
|
|
3141
|
+
/** @description V2 UMA OOv2: a price request was made (market initialization). */
|
|
3142
|
+
RequestPriceEvent: {
|
|
3143
|
+
id: string;
|
|
3144
|
+
hash: string;
|
|
3145
|
+
/** Format: int64 */
|
|
3146
|
+
block?: number | null;
|
|
3147
|
+
/** Format: int64 */
|
|
3148
|
+
confirmed_at?: number | null;
|
|
3149
|
+
/** Format: int64 */
|
|
3150
|
+
received_at?: number | null;
|
|
3151
|
+
/** Format: int64 */
|
|
3152
|
+
log_index?: number | null;
|
|
3153
|
+
/** Format: int64 */
|
|
3154
|
+
block_index?: number | null;
|
|
3155
|
+
oracle_contract: string;
|
|
3156
|
+
requester: string;
|
|
3157
|
+
identifier: string;
|
|
3158
|
+
/**
|
|
3159
|
+
* @description UMA request timestamp (seconds, decimal string).
|
|
3160
|
+
* The point in time the requester is asking the oracle to resolve the
|
|
3161
|
+
* price for — part of the request identity tuple
|
|
3162
|
+
* `(requester, identifier, timestamp, ancillaryData)`. Not the block
|
|
3163
|
+
* timestamp of this event; see `confirmed_at` for that.
|
|
3164
|
+
*/
|
|
3165
|
+
timestamp: string;
|
|
3166
|
+
ancillary_data: string;
|
|
3167
|
+
currency: string;
|
|
3168
|
+
reward: string;
|
|
3169
|
+
final_fee: string;
|
|
3170
|
+
condition_id?: string | null;
|
|
3171
|
+
question?: string | null;
|
|
3172
|
+
image_url?: string | null;
|
|
3173
|
+
slug?: string | null;
|
|
3174
|
+
event_slug?: string | null;
|
|
3175
|
+
};
|
|
2964
3176
|
SearchResponse: {
|
|
2965
3177
|
events?: components["schemas"]["PolymarketEvent"][] | null;
|
|
2966
3178
|
events_pagination?: null | components["schemas"]["PaginationMeta"];
|
|
@@ -2974,6 +3186,38 @@ export interface components {
|
|
|
2974
3186
|
* @enum {string}
|
|
2975
3187
|
*/
|
|
2976
3188
|
SearchSortBy: "volume" | "txns" | "unique_traders" | "relevance" | "title" | "creation_date" | "start_date" | "end_date" | "liquidity" | "holders" | "end_time" | "start_time" | "created_time";
|
|
3189
|
+
/** @description V2 UMA OOv2: a price request was settled (final resolution). */
|
|
3190
|
+
SettleEvent: {
|
|
3191
|
+
id: string;
|
|
3192
|
+
hash: string;
|
|
3193
|
+
/** Format: int64 */
|
|
3194
|
+
block?: number | null;
|
|
3195
|
+
/** Format: int64 */
|
|
3196
|
+
confirmed_at?: number | null;
|
|
3197
|
+
/** Format: int64 */
|
|
3198
|
+
received_at?: number | null;
|
|
3199
|
+
/** Format: int64 */
|
|
3200
|
+
log_index?: number | null;
|
|
3201
|
+
/** Format: int64 */
|
|
3202
|
+
block_index?: number | null;
|
|
3203
|
+
oracle_contract: string;
|
|
3204
|
+
requester: string;
|
|
3205
|
+
proposer: string;
|
|
3206
|
+
disputer: string;
|
|
3207
|
+
identifier: string;
|
|
3208
|
+
timestamp: string;
|
|
3209
|
+
ancillary_data: string;
|
|
3210
|
+
/** Format: int64 */
|
|
3211
|
+
proposed_price: number;
|
|
3212
|
+
payout: string;
|
|
3213
|
+
disputed: boolean;
|
|
3214
|
+
condition_id?: string | null;
|
|
3215
|
+
proposed_outcome?: string | null;
|
|
3216
|
+
question?: string | null;
|
|
3217
|
+
image_url?: string | null;
|
|
3218
|
+
slug?: string | null;
|
|
3219
|
+
event_slug?: string | null;
|
|
3220
|
+
};
|
|
2977
3221
|
SimpleTimeframeMetrics: {
|
|
2978
3222
|
/**
|
|
2979
3223
|
* Format: double
|
|
@@ -3055,15 +3299,11 @@ export interface components {
|
|
|
3055
3299
|
/**
|
|
3056
3300
|
* @description Metric to order by when `sort=<value>` is provided.
|
|
3057
3301
|
*
|
|
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
3302
|
* `unique_*` ranks by window-distinct addresses — exact `uniqExact` count
|
|
3063
|
-
* of addresses active in the timeframe.
|
|
3303
|
+
* of addresses active in the timeframe.
|
|
3064
3304
|
* @enum {string}
|
|
3065
3305
|
*/
|
|
3066
|
-
TagSortBy: "volume" | "txns" | "
|
|
3306
|
+
TagSortBy: "volume" | "txns" | "unique_traders" | "unique_makers" | "unique_takers" | "fees";
|
|
3067
3307
|
/**
|
|
3068
3308
|
* @description Timeframe for `?sort=...` — defines the window the metric is summed over
|
|
3069
3309
|
* (or `lifetime` for all-time cumulative).
|
|
@@ -3077,10 +3317,12 @@ export interface components {
|
|
|
3077
3317
|
*
|
|
3078
3318
|
* Short field names for compact JSON responses:
|
|
3079
3319
|
* t=bucket (unix seconds), v=volume_usd, bv=buy_volume_usd, sv=sell_volume_usd,
|
|
3080
|
-
* ut=
|
|
3081
|
-
*
|
|
3082
|
-
*
|
|
3083
|
-
*
|
|
3320
|
+
* ut=unique_traders, um=unique_makers, uk=unique_takers,
|
|
3321
|
+
* tc=txn_count, bc=buy_count, sc=sell_count,
|
|
3322
|
+
* rc=redemption_count, rv=redemption_volume_usd, mc=merge_count, mv=merge_volume_usd,
|
|
3323
|
+
* sp=split_count, spv=split_volume_usd, f=fees_usd, sh=shares_volume,
|
|
3324
|
+
* yv=yes_volume_usd, nv=no_volume_usd, yc=yes_count, nc=no_count,
|
|
3325
|
+
* bd_*=buy distribution by USD bucket
|
|
3084
3326
|
*/
|
|
3085
3327
|
TimeBucketRow: {
|
|
3086
3328
|
/** Format: int32 */
|
|
@@ -3091,21 +3333,6 @@ export interface components {
|
|
|
3091
3333
|
bv: number;
|
|
3092
3334
|
/** Format: double */
|
|
3093
3335
|
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
3336
|
/** Format: int64 */
|
|
3110
3337
|
tc: number;
|
|
3111
3338
|
/** Format: int64 */
|
|
@@ -3973,6 +4200,33 @@ export interface operations {
|
|
|
3973
4200
|
};
|
|
3974
4201
|
};
|
|
3975
4202
|
};
|
|
4203
|
+
get_event_top_traders: {
|
|
4204
|
+
parameters: {
|
|
4205
|
+
query: {
|
|
4206
|
+
/** @description Event slug */
|
|
4207
|
+
event_slug: string;
|
|
4208
|
+
/** @description Timeframe: 1d, 7d, 30d, lifetime (default: lifetime) */
|
|
4209
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
4210
|
+
/** @description Results limit (default: 10, max: 200) */
|
|
4211
|
+
limit?: number;
|
|
4212
|
+
/** @description Pagination key from the previous response */
|
|
4213
|
+
pagination_key?: string;
|
|
4214
|
+
};
|
|
4215
|
+
header?: never;
|
|
4216
|
+
path?: never;
|
|
4217
|
+
cookie?: never;
|
|
4218
|
+
};
|
|
4219
|
+
requestBody?: never;
|
|
4220
|
+
responses: {
|
|
4221
|
+
/** @description Top traders sorted by realized PnL desc. */
|
|
4222
|
+
200: {
|
|
4223
|
+
headers: {
|
|
4224
|
+
[name: string]: unknown;
|
|
4225
|
+
};
|
|
4226
|
+
content?: never;
|
|
4227
|
+
};
|
|
4228
|
+
};
|
|
4229
|
+
};
|
|
3976
4230
|
get_event_analytics_changes: {
|
|
3977
4231
|
parameters: {
|
|
3978
4232
|
query?: {
|
|
@@ -4113,8 +4367,10 @@ export interface operations {
|
|
|
4113
4367
|
condition_id?: string;
|
|
4114
4368
|
/** @description Market slug (e.g. `will-trump-win`) */
|
|
4115
4369
|
market_slug?: string;
|
|
4116
|
-
/** @description Results limit (default: 10, max: 100) */
|
|
4370
|
+
/** @description Results limit per outcome (default: 10, max: 100) */
|
|
4117
4371
|
limit?: number;
|
|
4372
|
+
/** @description Cursor-based pagination key */
|
|
4373
|
+
pagination_key?: string;
|
|
4118
4374
|
/** @description Minimum shares held (decimal string) */
|
|
4119
4375
|
min_shares?: string;
|
|
4120
4376
|
/** @description Maximum shares held (decimal string) */
|
|
@@ -4130,7 +4386,7 @@ export interface operations {
|
|
|
4130
4386
|
};
|
|
4131
4387
|
requestBody?: never;
|
|
4132
4388
|
responses: {
|
|
4133
|
-
/** @description Market holders grouped by outcome (sorted by shares DESC). Holder `pnl` is included only when `include_pnl=true`. */
|
|
4389
|
+
/** @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
4390
|
200: {
|
|
4135
4391
|
headers: {
|
|
4136
4392
|
[name: string]: unknown;
|
|
@@ -4499,6 +4755,43 @@ export interface operations {
|
|
|
4499
4755
|
};
|
|
4500
4756
|
};
|
|
4501
4757
|
};
|
|
4758
|
+
get_oracle_events: {
|
|
4759
|
+
parameters: {
|
|
4760
|
+
query?: {
|
|
4761
|
+
/** @description Comma-separated condition IDs (max 20) */
|
|
4762
|
+
condition_ids?: string;
|
|
4763
|
+
/** @description Comma-separated event names: Initialization, Proposal, Dispute, Settled, Resolution, ConditionResolution, Reset, Flag, Unflag, Pause, Unpause, ManualResolution, NegRiskOutcomeReported. Empty = all oracle event types. */
|
|
4764
|
+
event_types?: string;
|
|
4765
|
+
/** @description Start timestamp (Unix seconds) */
|
|
4766
|
+
from?: number;
|
|
4767
|
+
/** @description End timestamp (Unix seconds) */
|
|
4768
|
+
to?: number;
|
|
4769
|
+
/** @description Results per page (default 10, max 250) */
|
|
4770
|
+
limit?: number;
|
|
4771
|
+
/** @description Pagination offset. Takes precedence over pagination_key. */
|
|
4772
|
+
offset?: number;
|
|
4773
|
+
/** @description Cursor-based pagination key */
|
|
4774
|
+
pagination_key?: string;
|
|
4775
|
+
/** @description Sort direction (default true = newest first) */
|
|
4776
|
+
sort_desc?: boolean;
|
|
4777
|
+
};
|
|
4778
|
+
header?: never;
|
|
4779
|
+
path?: never;
|
|
4780
|
+
cookie?: never;
|
|
4781
|
+
};
|
|
4782
|
+
requestBody?: never;
|
|
4783
|
+
responses: {
|
|
4784
|
+
/** @description Oracle events matching the filter */
|
|
4785
|
+
200: {
|
|
4786
|
+
headers: {
|
|
4787
|
+
[name: string]: unknown;
|
|
4788
|
+
};
|
|
4789
|
+
content: {
|
|
4790
|
+
"application/json": components["schemas"]["TradeEvent"][];
|
|
4791
|
+
};
|
|
4792
|
+
};
|
|
4793
|
+
};
|
|
4794
|
+
};
|
|
4502
4795
|
get_position_candlestick: {
|
|
4503
4796
|
parameters: {
|
|
4504
4797
|
query: {
|
|
@@ -4564,6 +4857,33 @@ export interface operations {
|
|
|
4564
4857
|
};
|
|
4565
4858
|
};
|
|
4566
4859
|
};
|
|
4860
|
+
get_position_top_traders: {
|
|
4861
|
+
parameters: {
|
|
4862
|
+
query: {
|
|
4863
|
+
/** @description Position ID (ERC1155 token ID) */
|
|
4864
|
+
position_id: string;
|
|
4865
|
+
/** @description Filter by position status (omit for all) */
|
|
4866
|
+
status?: "open" | "closed";
|
|
4867
|
+
/** @description Results limit (default: 10, max: 200) */
|
|
4868
|
+
limit?: number;
|
|
4869
|
+
/** @description Pagination key from the previous response */
|
|
4870
|
+
pagination_key?: string;
|
|
4871
|
+
};
|
|
4872
|
+
header?: never;
|
|
4873
|
+
path?: never;
|
|
4874
|
+
cookie?: never;
|
|
4875
|
+
};
|
|
4876
|
+
requestBody?: never;
|
|
4877
|
+
responses: {
|
|
4878
|
+
/** @description Top traders sorted by realized PnL desc. */
|
|
4879
|
+
200: {
|
|
4880
|
+
headers: {
|
|
4881
|
+
[name: string]: unknown;
|
|
4882
|
+
};
|
|
4883
|
+
content?: never;
|
|
4884
|
+
};
|
|
4885
|
+
};
|
|
4886
|
+
};
|
|
4567
4887
|
get_position_volume_chart: {
|
|
4568
4888
|
parameters: {
|
|
4569
4889
|
query: {
|
|
@@ -4734,6 +5054,35 @@ export interface operations {
|
|
|
4734
5054
|
};
|
|
4735
5055
|
};
|
|
4736
5056
|
};
|
|
5057
|
+
get_market_top_traders: {
|
|
5058
|
+
parameters: {
|
|
5059
|
+
query?: {
|
|
5060
|
+
/** @description Market condition ID */
|
|
5061
|
+
condition_id?: string;
|
|
5062
|
+
/** @description Market slug (alternative to condition_id) */
|
|
5063
|
+
market_slug?: string;
|
|
5064
|
+
/** @description Timeframe: 1d, 7d, 30d, lifetime (default: lifetime) */
|
|
5065
|
+
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
5066
|
+
/** @description Results limit (default: 10, max: 200) */
|
|
5067
|
+
limit?: number;
|
|
5068
|
+
/** @description Pagination key from the previous response */
|
|
5069
|
+
pagination_key?: string;
|
|
5070
|
+
};
|
|
5071
|
+
header?: never;
|
|
5072
|
+
path?: never;
|
|
5073
|
+
cookie?: never;
|
|
5074
|
+
};
|
|
5075
|
+
requestBody?: never;
|
|
5076
|
+
responses: {
|
|
5077
|
+
/** @description Top traders sorted by realized PnL desc. */
|
|
5078
|
+
200: {
|
|
5079
|
+
headers: {
|
|
5080
|
+
[name: string]: unknown;
|
|
5081
|
+
};
|
|
5082
|
+
content?: never;
|
|
5083
|
+
};
|
|
5084
|
+
};
|
|
5085
|
+
};
|
|
4737
5086
|
get_market_trades: {
|
|
4738
5087
|
parameters: {
|
|
4739
5088
|
query?: {
|
|
@@ -4745,6 +5094,8 @@ export interface operations {
|
|
|
4745
5094
|
position_ids?: string;
|
|
4746
5095
|
/** @description Comma-separated trader addresses (max 25) */
|
|
4747
5096
|
traders?: string;
|
|
5097
|
+
/** @description Comma-separated builder codes (max 25) */
|
|
5098
|
+
builder_codes?: string;
|
|
4748
5099
|
/** @description Trade side: 0 (Buy), 1 (Sell) */
|
|
4749
5100
|
side?: components["schemas"]["TradeSide"];
|
|
4750
5101
|
/** @description Outcome name filter (e.g. Yes, No) */
|
|
@@ -5958,6 +6309,8 @@ export interface operations {
|
|
|
5958
6309
|
slugs?: string;
|
|
5959
6310
|
/** @description Comma-separated position IDs */
|
|
5960
6311
|
position_ids?: string;
|
|
6312
|
+
/** @description Comma-separated builder codes (max 25) */
|
|
6313
|
+
builder_codes?: string;
|
|
5961
6314
|
/** @description Trade side: 0 (Buy), 1 (Sell) */
|
|
5962
6315
|
side?: components["schemas"]["TradeSide"];
|
|
5963
6316
|
/** @description Outcome name filter (e.g. Yes, No) */
|