@structbuild/sdk 0.5.7 → 0.5.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 +821 -685
- package/dist/generated/webhooks.d.ts +34 -0
- package/dist/generated/ws-alerts.d.ts +43 -1
- package/dist/generated/ws.d.ts +51 -1
- package/dist/index.cjs +22 -9
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +4 -1
- package/dist/index.js.map +3 -3
- package/dist/namespaces/assets.d.ts +2 -1
- package/dist/types/index.d.ts +10 -0
- package/package.json +9 -1
|
@@ -103,6 +103,26 @@ export interface paths {
|
|
|
103
103
|
patch?: never;
|
|
104
104
|
trace?: never;
|
|
105
105
|
};
|
|
106
|
+
"/polymarket/asset-history/candlestick": {
|
|
107
|
+
parameters: {
|
|
108
|
+
query?: never;
|
|
109
|
+
header?: never;
|
|
110
|
+
path?: never;
|
|
111
|
+
cookie?: never;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Get OHLC candles for a crypto asset
|
|
115
|
+
* @description Retrieve OHLC candlestick data for a single crypto asset at the requested resolution.
|
|
116
|
+
*/
|
|
117
|
+
get: operations["get_asset_candlestick"];
|
|
118
|
+
put?: never;
|
|
119
|
+
post?: never;
|
|
120
|
+
delete?: never;
|
|
121
|
+
options?: never;
|
|
122
|
+
head?: never;
|
|
123
|
+
patch?: never;
|
|
124
|
+
trace?: never;
|
|
125
|
+
};
|
|
106
126
|
"/polymarket/builders": {
|
|
107
127
|
parameters: {
|
|
108
128
|
query?: never;
|
|
@@ -1363,7 +1383,7 @@ export interface paths {
|
|
|
1363
1383
|
};
|
|
1364
1384
|
/**
|
|
1365
1385
|
* Get tag by slug
|
|
1366
|
-
* @description Retrieve a single tag by its ID or slug. Pass `include_metrics=true` to attach analytics metrics (volume_usd, txn_count, unique_traders, fees_usd) — adds +1 credit. Use `timeframe` to select the window; defaults to `1d`.
|
|
1386
|
+
* @description Retrieve a single tag by its ID or slug. Pass `include_metrics=true` to attach analytics metrics (volume_usd, shares_volume, txn_count, unique_traders, unique_makers, unique_takers, fees_usd, and builder metrics) — adds +1 credit. Use `timeframe` to select the window; defaults to `1d`.
|
|
1367
1387
|
*/
|
|
1368
1388
|
get: operations["get_tag_by_id"];
|
|
1369
1389
|
put?: never;
|
|
@@ -1746,44 +1766,100 @@ export interface components {
|
|
|
1746
1766
|
* @enum {string}
|
|
1747
1767
|
*/
|
|
1748
1768
|
AnalyticsResolution: "60" | "240" | "D" | "1D" | "W" | "1W" | "M" | "1M";
|
|
1749
|
-
/** @
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
* @description Sort metric for the trader → builders list.
|
|
1753
|
-
* @enum {string}
|
|
1754
|
-
*/
|
|
1755
|
-
TraderBuilderSortBy: "volume" | "txns" | "fees";
|
|
1756
|
-
/** @description Output payload for Split trades (deposit collateral → receive outcome tokens). */
|
|
1757
|
-
SplitTrade: {
|
|
1758
|
-
id: string;
|
|
1759
|
-
hash: string;
|
|
1769
|
+
/** @description One builder's stats under a single tag. */
|
|
1770
|
+
TagBuilderRow: {
|
|
1771
|
+
builder_code: string;
|
|
1760
1772
|
/** Format: int64 */
|
|
1761
|
-
block
|
|
1773
|
+
block: number;
|
|
1774
|
+
/** Format: int32 */
|
|
1775
|
+
ts: number;
|
|
1776
|
+
/** Format: double */
|
|
1777
|
+
volume_usd: number;
|
|
1778
|
+
/** Format: double */
|
|
1779
|
+
buy_volume_usd: number;
|
|
1780
|
+
/** Format: double */
|
|
1781
|
+
sell_volume_usd: number;
|
|
1762
1782
|
/** Format: int64 */
|
|
1763
|
-
|
|
1783
|
+
unique_traders: number;
|
|
1764
1784
|
/** Format: int64 */
|
|
1765
|
-
|
|
1785
|
+
unique_makers: number;
|
|
1766
1786
|
/** Format: int64 */
|
|
1767
|
-
|
|
1787
|
+
unique_takers: number;
|
|
1768
1788
|
/** Format: int64 */
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
slug?: string | null;
|
|
1775
|
-
event_slug?: string | null;
|
|
1789
|
+
txn_count: number;
|
|
1790
|
+
/** Format: int64 */
|
|
1791
|
+
buy_count: number;
|
|
1792
|
+
/** Format: int64 */
|
|
1793
|
+
sell_count: number;
|
|
1776
1794
|
/** Format: double */
|
|
1777
|
-
|
|
1778
|
-
/**
|
|
1779
|
-
|
|
1780
|
-
|
|
1795
|
+
fees_usd: number;
|
|
1796
|
+
/** Format: double */
|
|
1797
|
+
builder_fees: number;
|
|
1798
|
+
/** Format: double */
|
|
1799
|
+
shares_volume: number;
|
|
1800
|
+
/** Format: double */
|
|
1801
|
+
yes_volume_usd: number;
|
|
1802
|
+
/** Format: double */
|
|
1803
|
+
no_volume_usd: number;
|
|
1804
|
+
/** Format: int64 */
|
|
1805
|
+
yes_count: number;
|
|
1806
|
+
/** Format: int64 */
|
|
1807
|
+
no_count: number;
|
|
1808
|
+
/** Format: int64 */
|
|
1809
|
+
buy_dist_under_10: number;
|
|
1810
|
+
/** Format: int64 */
|
|
1811
|
+
buy_dist_10_100: number;
|
|
1812
|
+
/** Format: int64 */
|
|
1813
|
+
buy_dist_100_1k: number;
|
|
1814
|
+
/** Format: int64 */
|
|
1815
|
+
buy_dist_1k_10k: number;
|
|
1816
|
+
/** Format: int64 */
|
|
1817
|
+
buy_dist_10k_50k: number;
|
|
1818
|
+
/** Format: int64 */
|
|
1819
|
+
buy_dist_50k_plus: number;
|
|
1820
|
+
/** Format: int64 */
|
|
1821
|
+
new_users: number;
|
|
1822
|
+
/** Format: double */
|
|
1823
|
+
avg_rev_per_user: number;
|
|
1824
|
+
/** Format: double */
|
|
1825
|
+
avg_vol_per_user: number;
|
|
1781
1826
|
};
|
|
1782
1827
|
/**
|
|
1783
|
-
* @description
|
|
1784
|
-
*
|
|
1828
|
+
* @description One bucket of derived order-book metrics for a position at a point in time.
|
|
1829
|
+
* Only summary metrics are returned — the underlying bid/ask ladders are
|
|
1830
|
+
* available from the snapshot endpoint.
|
|
1785
1831
|
*/
|
|
1786
|
-
|
|
1832
|
+
SpreadRow: {
|
|
1833
|
+
/** Format: int64 */
|
|
1834
|
+
ts: number;
|
|
1835
|
+
position_id: string;
|
|
1836
|
+
condition_id: string;
|
|
1837
|
+
/** Format: double */
|
|
1838
|
+
best_bid?: number | null;
|
|
1839
|
+
/** Format: double */
|
|
1840
|
+
best_ask?: number | null;
|
|
1841
|
+
/** Format: double */
|
|
1842
|
+
mid_price?: number | null;
|
|
1843
|
+
/** Format: double */
|
|
1844
|
+
spread?: number | null;
|
|
1845
|
+
/** Format: double */
|
|
1846
|
+
bid_liquidity_usd?: number | null;
|
|
1847
|
+
/** Format: double */
|
|
1848
|
+
ask_liquidity_usd?: number | null;
|
|
1849
|
+
/** Format: int32 */
|
|
1850
|
+
bid_levels?: number | null;
|
|
1851
|
+
/** Format: int32 */
|
|
1852
|
+
ask_levels?: number | null;
|
|
1853
|
+
};
|
|
1854
|
+
/** @enum {string} */
|
|
1855
|
+
TagChangeTimeframe: "1h" | "24h" | "7d" | "30d" | "1mo";
|
|
1856
|
+
/**
|
|
1857
|
+
* @description `TagBuilderRow` with builder display metadata (name, icon, links) merged
|
|
1858
|
+
* onto each row. Returned by `/polymarket/builders/tags/{tag}`.
|
|
1859
|
+
*/
|
|
1860
|
+
TagBuilderRowWithMetadata: components["schemas"]["TagBuilderRow"] & {
|
|
1861
|
+
metadata?: null | components["schemas"]["BuilderMetadataInline"];
|
|
1862
|
+
};
|
|
1787
1863
|
/** @description V3 UMA OOv3: an assertion was disputed. */
|
|
1788
1864
|
AssertionDisputedEvent: {
|
|
1789
1865
|
id: string;
|
|
@@ -1868,6 +1944,18 @@ export interface components {
|
|
|
1868
1944
|
slug?: string | null;
|
|
1869
1945
|
event_slug?: string | null;
|
|
1870
1946
|
};
|
|
1947
|
+
AssetCandlestickBar: {
|
|
1948
|
+
/** Format: double */
|
|
1949
|
+
l?: number | null;
|
|
1950
|
+
/** Format: double */
|
|
1951
|
+
h?: number | null;
|
|
1952
|
+
/** Format: double */
|
|
1953
|
+
o?: number | null;
|
|
1954
|
+
/** Format: double */
|
|
1955
|
+
c?: number | null;
|
|
1956
|
+
/** Format: int64 */
|
|
1957
|
+
t: number;
|
|
1958
|
+
};
|
|
1871
1959
|
/** @description One bucket of an asset's price history at a fixed time-window resolution. */
|
|
1872
1960
|
AssetPriceHistoryRow: {
|
|
1873
1961
|
asset_symbol: string;
|
|
@@ -1903,32 +1991,13 @@ export interface components {
|
|
|
1903
1991
|
/** @enum {string} */
|
|
1904
1992
|
AssetVariant: "5m" | "15m" | "1h" | "4h" | "1d";
|
|
1905
1993
|
/**
|
|
1906
|
-
* @description
|
|
1907
|
-
*
|
|
1908
|
-
*
|
|
1994
|
+
* @description Metric to order by when `sort=<value>` is provided.
|
|
1995
|
+
*
|
|
1996
|
+
* `unique_*` variants rank by the number of distinct wallet addresses
|
|
1997
|
+
* active in the selected timeframe.
|
|
1998
|
+
* @enum {string}
|
|
1909
1999
|
*/
|
|
1910
|
-
|
|
1911
|
-
/** Format: int64 */
|
|
1912
|
-
ts: number;
|
|
1913
|
-
position_id: string;
|
|
1914
|
-
condition_id: string;
|
|
1915
|
-
/** Format: double */
|
|
1916
|
-
best_bid?: number | null;
|
|
1917
|
-
/** Format: double */
|
|
1918
|
-
best_ask?: number | null;
|
|
1919
|
-
/** Format: double */
|
|
1920
|
-
mid_price?: number | null;
|
|
1921
|
-
/** Format: double */
|
|
1922
|
-
spread?: number | null;
|
|
1923
|
-
/** Format: double */
|
|
1924
|
-
bid_liquidity_usd?: number | null;
|
|
1925
|
-
/** Format: double */
|
|
1926
|
-
ask_liquidity_usd?: number | null;
|
|
1927
|
-
/** Format: int32 */
|
|
1928
|
-
bid_levels?: number | null;
|
|
1929
|
-
/** Format: int32 */
|
|
1930
|
-
ask_levels?: number | null;
|
|
1931
|
-
};
|
|
2000
|
+
TagSortBy: "volume" | "shares_volume" | "txns" | "unique_traders" | "unique_makers" | "unique_takers" | "fees";
|
|
1932
2001
|
BondMarket: {
|
|
1933
2002
|
condition_id: string;
|
|
1934
2003
|
title?: string | null;
|
|
@@ -1960,90 +2029,8 @@ export interface components {
|
|
|
1960
2029
|
};
|
|
1961
2030
|
/** @enum {string} */
|
|
1962
2031
|
BondsSortBy: "end_date" | "apy" | "liquidity" | "volume";
|
|
1963
|
-
/**
|
|
1964
|
-
|
|
1965
|
-
* at end of bucket) and `/analytics/deltas` (per-bucket deltas). All metrics
|
|
1966
|
-
* the snapshot `/counts` returns are included.
|
|
1967
|
-
*
|
|
1968
|
-
* Short field names for compact JSON responses:
|
|
1969
|
-
* t=bucket (unix seconds), v=volume_usd, bv=buy_volume_usd, sv=sell_volume_usd,
|
|
1970
|
-
* ut=unique_traders, um=unique_makers, uk=unique_takers,
|
|
1971
|
-
* tc=txn_count, bc=buy_count, sc=sell_count,
|
|
1972
|
-
* rc=redemption_count, rv=redemption_volume_usd, mc=merge_count, mv=merge_volume_usd,
|
|
1973
|
-
* sp=split_count, spv=split_volume_usd, f=fees_usd, sh=shares_volume,
|
|
1974
|
-
* yv=yes_volume_usd, nv=no_volume_usd, yc=yes_count, nc=no_count,
|
|
1975
|
-
* bd_*=buy distribution by USD bucket
|
|
1976
|
-
*/
|
|
1977
|
-
TimeBucketRow: {
|
|
1978
|
-
/** Format: int32 */
|
|
1979
|
-
t: number;
|
|
1980
|
-
/** Format: double */
|
|
1981
|
-
v: number;
|
|
1982
|
-
/** Format: double */
|
|
1983
|
-
bv: number;
|
|
1984
|
-
/** Format: double */
|
|
1985
|
-
sv: number;
|
|
1986
|
-
/** Format: int64 */
|
|
1987
|
-
tc: number;
|
|
1988
|
-
/** Format: int64 */
|
|
1989
|
-
bc: number;
|
|
1990
|
-
/** Format: int64 */
|
|
1991
|
-
sc: number;
|
|
1992
|
-
/** Format: int64 */
|
|
1993
|
-
rc: number;
|
|
1994
|
-
/** Format: double */
|
|
1995
|
-
rv: number;
|
|
1996
|
-
/** Format: int64 */
|
|
1997
|
-
mc: number;
|
|
1998
|
-
/** Format: double */
|
|
1999
|
-
mv: number;
|
|
2000
|
-
/** Format: int64 */
|
|
2001
|
-
sp: number;
|
|
2002
|
-
/** Format: double */
|
|
2003
|
-
spv: number;
|
|
2004
|
-
/** Format: double */
|
|
2005
|
-
f: number;
|
|
2006
|
-
/** Format: double */
|
|
2007
|
-
sh: number;
|
|
2008
|
-
/** Format: double */
|
|
2009
|
-
yv: number;
|
|
2010
|
-
/** Format: double */
|
|
2011
|
-
nv: number;
|
|
2012
|
-
/** Format: int64 */
|
|
2013
|
-
yc: number;
|
|
2014
|
-
/** Format: int64 */
|
|
2015
|
-
nc: number;
|
|
2016
|
-
/**
|
|
2017
|
-
* Format: int64
|
|
2018
|
-
* @description Buy distribution — count of buy trades falling in each USD bucket.
|
|
2019
|
-
*/
|
|
2020
|
-
bd_u10: number;
|
|
2021
|
-
/** Format: int64 */
|
|
2022
|
-
bd_100: number;
|
|
2023
|
-
/** Format: int64 */
|
|
2024
|
-
bd_1k: number;
|
|
2025
|
-
/** Format: int64 */
|
|
2026
|
-
bd_10k: number;
|
|
2027
|
-
/** Format: int64 */
|
|
2028
|
-
bd_50k: number;
|
|
2029
|
-
/** Format: int64 */
|
|
2030
|
-
bd_50p: number;
|
|
2031
|
-
/**
|
|
2032
|
-
* Format: int64
|
|
2033
|
-
* @description Distinct traders ACTIVE in this bucket (window-unique, not first-time).
|
|
2034
|
-
*/
|
|
2035
|
-
ut: number;
|
|
2036
|
-
/**
|
|
2037
|
-
* Format: int64
|
|
2038
|
-
* @description Distinct makers active in this bucket.
|
|
2039
|
-
*/
|
|
2040
|
-
um: number;
|
|
2041
|
-
/**
|
|
2042
|
-
* Format: int64
|
|
2043
|
-
* @description Distinct takers active in this bucket.
|
|
2044
|
-
*/
|
|
2045
|
-
uk: number;
|
|
2046
|
-
};
|
|
2032
|
+
/** @enum {string} */
|
|
2033
|
+
SortDirection: "asc" | "desc";
|
|
2047
2034
|
BuilderFeeRate: {
|
|
2048
2035
|
code: string;
|
|
2049
2036
|
/** Format: int32 */
|
|
@@ -2307,10 +2294,21 @@ export interface components {
|
|
|
2307
2294
|
avg_vol_per_user: number;
|
|
2308
2295
|
};
|
|
2309
2296
|
/**
|
|
2310
|
-
* @description
|
|
2311
|
-
*
|
|
2312
|
-
*
|
|
2313
|
-
|
|
2297
|
+
* @description Market metadata for the market a trader's best / worst trade landed in.
|
|
2298
|
+
* Accompanies the existing flat `best_trade_pnl_usd` / `worst_trade_pnl_usd`
|
|
2299
|
+
* numerics on trader / event / category PnL summaries.
|
|
2300
|
+
*/
|
|
2301
|
+
TradeMarketRef: {
|
|
2302
|
+
condition_id?: string | null;
|
|
2303
|
+
market_slug?: string | null;
|
|
2304
|
+
title?: string | null;
|
|
2305
|
+
question?: string | null;
|
|
2306
|
+
image_url?: string | null;
|
|
2307
|
+
event_slug?: string | null;
|
|
2308
|
+
};
|
|
2309
|
+
/**
|
|
2310
|
+
* @description Trader profile info embedded in API responses.
|
|
2311
|
+
*
|
|
2314
2312
|
* Used in:
|
|
2315
2313
|
* - holders endpoints (market/event holders)
|
|
2316
2314
|
* - trades endpoints
|
|
@@ -2324,8 +2322,6 @@ export interface components {
|
|
|
2324
2322
|
x_username?: string | null;
|
|
2325
2323
|
verified_badge?: boolean;
|
|
2326
2324
|
};
|
|
2327
|
-
/** @enum {string} */
|
|
2328
|
-
TradeType: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "22" | "23" | "24";
|
|
2329
2325
|
/**
|
|
2330
2326
|
* @description Sort metric for the builders list endpoint.
|
|
2331
2327
|
* @enum {string}
|
|
@@ -2479,85 +2475,49 @@ export interface components {
|
|
|
2479
2475
|
* @enum {string}
|
|
2480
2476
|
*/
|
|
2481
2477
|
BuilderTimeframe: "lifetime" | "1d" | "7d" | "30d";
|
|
2482
|
-
/**
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
/**
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
/**
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
/**
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
/**
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
/**
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
}) | (components["schemas"]["AssertionSettledEvent"] & {
|
|
2526
|
-
/** @enum {string} */
|
|
2527
|
-
trade_type: "Settled";
|
|
2528
|
-
}) | (components["schemas"]["QuestionResolvedEvent"] & {
|
|
2529
|
-
/** @enum {string} */
|
|
2530
|
-
trade_type: "Resolution";
|
|
2531
|
-
}) | (components["schemas"]["ConditionResolutionEvent"] & {
|
|
2532
|
-
/** @enum {string} */
|
|
2533
|
-
trade_type: "ConditionResolution";
|
|
2534
|
-
}) | (components["schemas"]["QuestionResetEvent"] & {
|
|
2535
|
-
/** @enum {string} */
|
|
2536
|
-
trade_type: "Reset";
|
|
2537
|
-
}) | (components["schemas"]["QuestionFlaggedEvent"] & {
|
|
2538
|
-
/** @enum {string} */
|
|
2539
|
-
trade_type: "Flag";
|
|
2540
|
-
}) | (components["schemas"]["QuestionUnflaggedEvent"] & {
|
|
2541
|
-
/** @enum {string} */
|
|
2542
|
-
trade_type: "Unflag";
|
|
2543
|
-
}) | (components["schemas"]["QuestionPausedEvent"] & {
|
|
2544
|
-
/** @enum {string} */
|
|
2545
|
-
trade_type: "Pause";
|
|
2546
|
-
}) | (components["schemas"]["QuestionUnpausedEvent"] & {
|
|
2547
|
-
/** @enum {string} */
|
|
2548
|
-
trade_type: "Unpause";
|
|
2549
|
-
}) | (components["schemas"]["QuestionEmergencyResolvedEvent"] & {
|
|
2550
|
-
/** @enum {string} */
|
|
2551
|
-
trade_type: "ManualResolution";
|
|
2552
|
-
}) | (components["schemas"]["NegRiskOutcomeReportedEvent"] & {
|
|
2553
|
-
/** @enum {string} */
|
|
2554
|
-
trade_type: "NegRiskOutcomeReported";
|
|
2555
|
-
}) | (components["schemas"]["RegisterTokenTrade"] & {
|
|
2556
|
-
/** @enum {string} */
|
|
2557
|
-
trade_type: "RegisterToken";
|
|
2558
|
-
});
|
|
2559
|
-
/** @enum {string} */
|
|
2560
|
-
TradeSide: "0" | "1";
|
|
2478
|
+
/** @description Token outcome (position) */
|
|
2479
|
+
TokenOutcome: {
|
|
2480
|
+
token_id: string;
|
|
2481
|
+
outcome: string;
|
|
2482
|
+
};
|
|
2483
|
+
/** @description Market-level PnL entry */
|
|
2484
|
+
TraderMarketPnlEntry: {
|
|
2485
|
+
condition_id?: string | null;
|
|
2486
|
+
market_slug?: string | null;
|
|
2487
|
+
event_slug?: string | null;
|
|
2488
|
+
question?: string | null;
|
|
2489
|
+
image_url?: string | null;
|
|
2490
|
+
/** Format: int64 */
|
|
2491
|
+
outcomes_traded?: number | null;
|
|
2492
|
+
/** Format: int64 */
|
|
2493
|
+
total_buys?: number | null;
|
|
2494
|
+
/** Format: int64 */
|
|
2495
|
+
total_sells?: number | null;
|
|
2496
|
+
/** Format: int64 */
|
|
2497
|
+
total_redemptions?: number | null;
|
|
2498
|
+
/** Format: int64 */
|
|
2499
|
+
total_merges?: number | null;
|
|
2500
|
+
/** Format: double */
|
|
2501
|
+
buy_usd?: number | null;
|
|
2502
|
+
/** Format: double */
|
|
2503
|
+
sell_usd?: number | null;
|
|
2504
|
+
/** Format: double */
|
|
2505
|
+
redemption_usd?: number | null;
|
|
2506
|
+
/** Format: double */
|
|
2507
|
+
merge_usd?: number | null;
|
|
2508
|
+
/** Format: double */
|
|
2509
|
+
realized_pnl_usd?: number | null;
|
|
2510
|
+
/** Format: int64 */
|
|
2511
|
+
winning_outcomes?: number | null;
|
|
2512
|
+
/** Format: double */
|
|
2513
|
+
total_fees?: number | null;
|
|
2514
|
+
/** Format: int64 */
|
|
2515
|
+
first_trade_at?: number | null;
|
|
2516
|
+
/** Format: int64 */
|
|
2517
|
+
last_trade_at?: number | null;
|
|
2518
|
+
/** Format: double */
|
|
2519
|
+
realized_pnl_pct?: number | null;
|
|
2520
|
+
};
|
|
2561
2521
|
/** @description Output payload for Cancelled orders. */
|
|
2562
2522
|
CancelledTrade: {
|
|
2563
2523
|
id: string;
|
|
@@ -2588,77 +2548,96 @@ export interface components {
|
|
|
2588
2548
|
ChangeTimeframe: "1h" | "24h" | "7d" | "30d" | "1mo" | "1y";
|
|
2589
2549
|
/** @enum {string} */
|
|
2590
2550
|
ChartResolution: "1H" | "6H" | "1D" | "1W" | "1M" | "ALL";
|
|
2591
|
-
|
|
2592
|
-
trader:
|
|
2593
|
-
/** Format: double */
|
|
2594
|
-
realized_pnl_usd?: number | null;
|
|
2595
|
-
/** Format: double */
|
|
2596
|
-
realized_pnl_pct?: number | null;
|
|
2597
|
-
/** Format: double */
|
|
2598
|
-
buy_usd?: number | null;
|
|
2599
|
-
/** Format: double */
|
|
2600
|
-
sell_usd?: number | null;
|
|
2551
|
+
TopTraderRow: {
|
|
2552
|
+
trader: string;
|
|
2601
2553
|
/** Format: double */
|
|
2602
|
-
|
|
2554
|
+
volume_usd: number;
|
|
2555
|
+
/** Format: int64 */
|
|
2556
|
+
txn_count: number;
|
|
2603
2557
|
/** Format: double */
|
|
2604
|
-
|
|
2558
|
+
fees_usd: number;
|
|
2605
2559
|
/** Format: double */
|
|
2606
|
-
|
|
2560
|
+
builder_fees: number;
|
|
2561
|
+
};
|
|
2562
|
+
/** @description Trader profile info - backwards compatibility */
|
|
2563
|
+
TraderInfo: {
|
|
2564
|
+
address: string;
|
|
2565
|
+
name?: string | null;
|
|
2566
|
+
pseudonym?: string | null;
|
|
2567
|
+
profile_image?: string | null;
|
|
2568
|
+
x_username?: string | null;
|
|
2569
|
+
verified_badge?: boolean;
|
|
2570
|
+
};
|
|
2571
|
+
/** @description Outcome-level PnL entry (per outcome token / position_id) */
|
|
2572
|
+
TraderOutcomePnlEntry: {
|
|
2573
|
+
position_id?: string | null;
|
|
2574
|
+
condition_id?: string | null;
|
|
2575
|
+
market_slug?: string | null;
|
|
2576
|
+
event_slug?: string | null;
|
|
2577
|
+
title?: string | null;
|
|
2578
|
+
image_url?: string | null;
|
|
2579
|
+
outcome?: string | null;
|
|
2580
|
+
/** Format: int32 */
|
|
2581
|
+
outcome_index?: number | null;
|
|
2582
|
+
/** @description TRUE = won, FALSE = lost, NULL = open or sold before resolution */
|
|
2583
|
+
won?: boolean | null;
|
|
2607
2584
|
/** Format: int64 */
|
|
2608
2585
|
total_buys?: number | null;
|
|
2609
2586
|
/** Format: int64 */
|
|
2610
2587
|
total_sells?: number | null;
|
|
2611
|
-
/** Format: int64 */
|
|
2612
|
-
total_redemptions?: number | null;
|
|
2613
|
-
/** Format: int64 */
|
|
2614
|
-
total_merges?: number | null;
|
|
2615
|
-
/** Format: int64 */
|
|
2616
|
-
outcomes_traded?: number | null;
|
|
2617
|
-
/** Format: int64 */
|
|
2618
|
-
winning_outcomes?: number | null;
|
|
2619
|
-
/** Format: int64 */
|
|
2620
|
-
first_trade_at?: number | null;
|
|
2621
|
-
/** Format: int64 */
|
|
2622
|
-
last_trade_at?: number | null;
|
|
2623
|
-
};
|
|
2624
|
-
TopTraderPositionEntry: {
|
|
2625
|
-
trader: components["schemas"]["TraderInfo"];
|
|
2626
2588
|
/** Format: double */
|
|
2627
|
-
|
|
2628
|
-
/** Format: double */
|
|
2629
|
-
realized_pnl_pct?: number | null;
|
|
2630
|
-
/** Format: double */
|
|
2631
|
-
shares?: number | null;
|
|
2589
|
+
total_shares_bought?: number | null;
|
|
2632
2590
|
/** Format: double */
|
|
2633
|
-
|
|
2591
|
+
total_shares_sold?: number | null;
|
|
2634
2592
|
/** Format: double */
|
|
2635
|
-
|
|
2593
|
+
total_buy_usd?: number | null;
|
|
2636
2594
|
/** Format: double */
|
|
2595
|
+
total_sell_usd?: number | null;
|
|
2596
|
+
/**
|
|
2597
|
+
* Format: double
|
|
2598
|
+
* @description Payout on redemption (non-zero only if won)
|
|
2599
|
+
*/
|
|
2637
2600
|
redemption_usd?: number | null;
|
|
2638
|
-
/**
|
|
2639
|
-
|
|
2640
|
-
|
|
2601
|
+
/**
|
|
2602
|
+
* Format: double
|
|
2603
|
+
* @description VWAP price paid per share across all buys (0–1)
|
|
2604
|
+
*/
|
|
2641
2605
|
avg_entry_price?: number | null;
|
|
2642
|
-
/**
|
|
2606
|
+
/**
|
|
2607
|
+
* Format: double
|
|
2608
|
+
* @description VWAP price received per share across all sells (0–1)
|
|
2609
|
+
*/
|
|
2643
2610
|
avg_exit_price?: number | null;
|
|
2644
|
-
/** Format:
|
|
2645
|
-
|
|
2646
|
-
/** Format:
|
|
2647
|
-
|
|
2648
|
-
won?: boolean | null;
|
|
2611
|
+
/** Format: double */
|
|
2612
|
+
realized_pnl_usd?: number | null;
|
|
2613
|
+
/** Format: double */
|
|
2614
|
+
total_fees?: number | null;
|
|
2649
2615
|
/** Format: int64 */
|
|
2650
2616
|
first_trade_at?: number | null;
|
|
2651
2617
|
/** Format: int64 */
|
|
2652
2618
|
last_trade_at?: number | null;
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2619
|
+
/**
|
|
2620
|
+
* Format: double
|
|
2621
|
+
* @description Last traded price for this outcome (0–1). NULL if market_outcomes has no price yet.
|
|
2622
|
+
*/
|
|
2623
|
+
current_price?: number | null;
|
|
2624
|
+
/**
|
|
2625
|
+
* Format: double
|
|
2626
|
+
* @description Current shares held: balance / 1e6.
|
|
2627
|
+
*/
|
|
2628
|
+
current_shares_balance?: number | null;
|
|
2629
|
+
/**
|
|
2630
|
+
* Format: double
|
|
2631
|
+
* @description Estimated current USD value of held shares: (balance / 1e6) * current_price.
|
|
2632
|
+
* Only meaningful for open positions (balance above dust threshold).
|
|
2633
|
+
*/
|
|
2634
|
+
current_value?: number | null;
|
|
2635
|
+
/**
|
|
2636
|
+
* Format: double
|
|
2637
|
+
* @description Realized PnL as a percentage of total spend: (realized_pnl_usd / total_buy_usd) * 100.
|
|
2638
|
+
* NULL when total_buy_usd = 0.
|
|
2639
|
+
*/
|
|
2640
|
+
realized_pnl_pct?: number | null;
|
|
2662
2641
|
};
|
|
2663
2642
|
/** @description CLOB reward (public API format) */
|
|
2664
2643
|
ClobReward: {
|
|
@@ -2882,6 +2861,10 @@ export interface components {
|
|
|
2882
2861
|
/** Format: int32 */
|
|
2883
2862
|
unique_traders: number;
|
|
2884
2863
|
/** Format: int32 */
|
|
2864
|
+
unique_makers: number;
|
|
2865
|
+
/** Format: int32 */
|
|
2866
|
+
unique_takers: number;
|
|
2867
|
+
/** Format: int32 */
|
|
2885
2868
|
unique_builder_traders: number;
|
|
2886
2869
|
/** Format: double */
|
|
2887
2870
|
avg_trade_usd: number;
|
|
@@ -3067,6 +3050,10 @@ export interface components {
|
|
|
3067
3050
|
/** Format: int32 */
|
|
3068
3051
|
unique_traders: number;
|
|
3069
3052
|
/** Format: int32 */
|
|
3053
|
+
unique_makers: number;
|
|
3054
|
+
/** Format: int32 */
|
|
3055
|
+
unique_takers: number;
|
|
3056
|
+
/** Format: int32 */
|
|
3070
3057
|
unique_builder_traders: number;
|
|
3071
3058
|
/** Format: double */
|
|
3072
3059
|
avg_trade_usd: number;
|
|
@@ -3078,13 +3065,82 @@ export interface components {
|
|
|
3078
3065
|
/** @enum {string} */
|
|
3079
3066
|
EventSortBy: "volume" | "txns" | "unique_traders" | "title" | "creation_date" | "start_date" | "end_date" | "relevance";
|
|
3080
3067
|
/**
|
|
3081
|
-
* @description
|
|
3082
|
-
*
|
|
3083
|
-
* `unique_*` variants rank by the number of distinct wallet addresses
|
|
3084
|
-
* active in the selected timeframe.
|
|
3085
|
-
* @enum {string}
|
|
3068
|
+
* @description Tagged enum for all trade types — serializes with `"trade_type": "..."` discriminator
|
|
3069
|
+
* and only includes fields relevant to each type.
|
|
3086
3070
|
*/
|
|
3087
|
-
|
|
3071
|
+
TradeEvent: (components["schemas"]["OrderFilledTrade"] & {
|
|
3072
|
+
/** @enum {string} */
|
|
3073
|
+
trade_type: "OrderFilled";
|
|
3074
|
+
}) | (components["schemas"]["OrderFilledTrade"] & {
|
|
3075
|
+
/** @enum {string} */
|
|
3076
|
+
trade_type: "OrdersMatched";
|
|
3077
|
+
}) | (components["schemas"]["OrderFilledTrade"] & {
|
|
3078
|
+
/** @enum {string} */
|
|
3079
|
+
trade_type: "MakerRebate";
|
|
3080
|
+
}) | (components["schemas"]["OrderFilledTrade"] & {
|
|
3081
|
+
/** @enum {string} */
|
|
3082
|
+
trade_type: "Reward";
|
|
3083
|
+
}) | (components["schemas"]["OrderFilledTrade"] & {
|
|
3084
|
+
/** @enum {string} */
|
|
3085
|
+
trade_type: "Yield";
|
|
3086
|
+
}) | (components["schemas"]["RedemptionTrade"] & {
|
|
3087
|
+
/** @enum {string} */
|
|
3088
|
+
trade_type: "Redemption";
|
|
3089
|
+
}) | (components["schemas"]["MergeTrade"] & {
|
|
3090
|
+
/** @enum {string} */
|
|
3091
|
+
trade_type: "Merge";
|
|
3092
|
+
}) | (components["schemas"]["SplitTrade"] & {
|
|
3093
|
+
/** @enum {string} */
|
|
3094
|
+
trade_type: "Split";
|
|
3095
|
+
}) | (components["schemas"]["PositionsConvertedTrade"] & {
|
|
3096
|
+
/** @enum {string} */
|
|
3097
|
+
trade_type: "PositionsConverted";
|
|
3098
|
+
}) | (components["schemas"]["CancelledTrade"] & {
|
|
3099
|
+
/** @enum {string} */
|
|
3100
|
+
trade_type: "Cancelled";
|
|
3101
|
+
}) | (components["schemas"]["QuestionInitializedEvent"] & {
|
|
3102
|
+
/** @enum {string} */
|
|
3103
|
+
trade_type: "Initialization";
|
|
3104
|
+
}) | (components["schemas"]["AssertionMadeEvent"] & {
|
|
3105
|
+
/** @enum {string} */
|
|
3106
|
+
trade_type: "Proposal";
|
|
3107
|
+
}) | (components["schemas"]["AssertionDisputedEvent"] & {
|
|
3108
|
+
/** @enum {string} */
|
|
3109
|
+
trade_type: "Dispute";
|
|
3110
|
+
}) | (components["schemas"]["AssertionSettledEvent"] & {
|
|
3111
|
+
/** @enum {string} */
|
|
3112
|
+
trade_type: "Settled";
|
|
3113
|
+
}) | (components["schemas"]["QuestionResolvedEvent"] & {
|
|
3114
|
+
/** @enum {string} */
|
|
3115
|
+
trade_type: "Resolution";
|
|
3116
|
+
}) | (components["schemas"]["ConditionResolutionEvent"] & {
|
|
3117
|
+
/** @enum {string} */
|
|
3118
|
+
trade_type: "ConditionResolution";
|
|
3119
|
+
}) | (components["schemas"]["QuestionResetEvent"] & {
|
|
3120
|
+
/** @enum {string} */
|
|
3121
|
+
trade_type: "Reset";
|
|
3122
|
+
}) | (components["schemas"]["QuestionFlaggedEvent"] & {
|
|
3123
|
+
/** @enum {string} */
|
|
3124
|
+
trade_type: "Flag";
|
|
3125
|
+
}) | (components["schemas"]["QuestionUnflaggedEvent"] & {
|
|
3126
|
+
/** @enum {string} */
|
|
3127
|
+
trade_type: "Unflag";
|
|
3128
|
+
}) | (components["schemas"]["QuestionPausedEvent"] & {
|
|
3129
|
+
/** @enum {string} */
|
|
3130
|
+
trade_type: "Pause";
|
|
3131
|
+
}) | (components["schemas"]["QuestionUnpausedEvent"] & {
|
|
3132
|
+
/** @enum {string} */
|
|
3133
|
+
trade_type: "Unpause";
|
|
3134
|
+
}) | (components["schemas"]["QuestionEmergencyResolvedEvent"] & {
|
|
3135
|
+
/** @enum {string} */
|
|
3136
|
+
trade_type: "ManualResolution";
|
|
3137
|
+
}) | (components["schemas"]["NegRiskOutcomeReportedEvent"] & {
|
|
3138
|
+
/** @enum {string} */
|
|
3139
|
+
trade_type: "NegRiskOutcomeReported";
|
|
3140
|
+
}) | (components["schemas"]["RegisterTokenTrade"] & {
|
|
3141
|
+
/** @enum {string} */
|
|
3142
|
+
trade_type: "RegisterToken";
|
|
3143
|
+
});
|
|
3088
3144
|
/**
|
|
3089
3145
|
* @description One tag's stats aggregated across every builder routing activity into it.
|
|
3090
3146
|
*
|
|
@@ -3735,44 +3791,31 @@ export interface components {
|
|
|
3735
3791
|
slug?: string | null;
|
|
3736
3792
|
event_slug?: string | null;
|
|
3737
3793
|
};
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
/** Format: double */
|
|
3743
|
-
realized_pnl_pct?: number | null;
|
|
3744
|
-
/** Format: double */
|
|
3745
|
-
total_volume_usd?: number | null;
|
|
3746
|
-
/** Format: double */
|
|
3747
|
-
buy_usd?: number | null;
|
|
3748
|
-
/** Format: double */
|
|
3749
|
-
sell_usd?: number | null;
|
|
3750
|
-
/** Format: double */
|
|
3751
|
-
redemption_usd?: number | null;
|
|
3752
|
-
/** Format: double */
|
|
3753
|
-
merge_usd?: number | null;
|
|
3754
|
-
/** Format: double */
|
|
3755
|
-
total_fees?: number | null;
|
|
3756
|
-
/** Format: int64 */
|
|
3757
|
-
total_buys?: number | null;
|
|
3758
|
-
/** Format: int64 */
|
|
3759
|
-
total_sells?: number | null;
|
|
3760
|
-
/** Format: int64 */
|
|
3761
|
-
total_redemptions?: number | null;
|
|
3762
|
-
/** Format: int64 */
|
|
3763
|
-
total_merges?: number | null;
|
|
3764
|
-
/** Format: int64 */
|
|
3765
|
-
markets_traded?: number | null;
|
|
3794
|
+
/** @description Output payload for Split trades (deposit collateral → receive outcome tokens). */
|
|
3795
|
+
SplitTrade: {
|
|
3796
|
+
id: string;
|
|
3797
|
+
hash: string;
|
|
3766
3798
|
/** Format: int64 */
|
|
3767
|
-
|
|
3799
|
+
block?: number | null;
|
|
3768
3800
|
/** Format: int64 */
|
|
3769
|
-
|
|
3801
|
+
confirmed_at?: number | null;
|
|
3770
3802
|
/** Format: int64 */
|
|
3771
|
-
|
|
3803
|
+
received_at?: number | null;
|
|
3772
3804
|
/** Format: int64 */
|
|
3773
|
-
|
|
3805
|
+
log_index?: number | null;
|
|
3774
3806
|
/** Format: int64 */
|
|
3775
|
-
|
|
3807
|
+
block_index?: number | null;
|
|
3808
|
+
trader: components["schemas"]["TraderInfo"];
|
|
3809
|
+
condition_id?: string | null;
|
|
3810
|
+
question?: string | null;
|
|
3811
|
+
image_url?: string | null;
|
|
3812
|
+
slug?: string | null;
|
|
3813
|
+
event_slug?: string | null;
|
|
3814
|
+
/** Format: double */
|
|
3815
|
+
usd_amount: number;
|
|
3816
|
+
/** @description Per-position mint amounts */
|
|
3817
|
+
position_details?: components["schemas"]["PositionDetail"][];
|
|
3818
|
+
exchange: components["schemas"]["PolymarketExchange"];
|
|
3776
3819
|
};
|
|
3777
3820
|
/**
|
|
3778
3821
|
* @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
|
|
@@ -3883,25 +3926,12 @@ export interface components {
|
|
|
3883
3926
|
*/
|
|
3884
3927
|
builder_fee?: number | null;
|
|
3885
3928
|
};
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
event_slug?: string | null;
|
|
3889
|
-
question?: string | null;
|
|
3890
|
-
image_url?: string | null;
|
|
3891
|
-
/** Format: int64 */
|
|
3892
|
-
markets_traded?: number | null;
|
|
3893
|
-
/** Format: int64 */
|
|
3894
|
-
outcomes_traded?: number | null;
|
|
3895
|
-
/** Format: int64 */
|
|
3896
|
-
total_buys?: number | null;
|
|
3897
|
-
/** Format: int64 */
|
|
3898
|
-
total_sells?: number | null;
|
|
3899
|
-
/** Format: int64 */
|
|
3900
|
-
total_redemptions?: number | null;
|
|
3901
|
-
/** Format: int64 */
|
|
3902
|
-
total_merges?: number | null;
|
|
3929
|
+
TopTraderMarketEntry: {
|
|
3930
|
+
trader: components["schemas"]["TraderInfo"];
|
|
3903
3931
|
/** Format: double */
|
|
3904
|
-
|
|
3932
|
+
realized_pnl_usd?: number | null;
|
|
3933
|
+
/** Format: double */
|
|
3934
|
+
realized_pnl_pct?: number | null;
|
|
3905
3935
|
/** Format: double */
|
|
3906
3936
|
buy_usd?: number | null;
|
|
3907
3937
|
/** Format: double */
|
|
@@ -3911,19 +3941,23 @@ export interface components {
|
|
|
3911
3941
|
/** Format: double */
|
|
3912
3942
|
merge_usd?: number | null;
|
|
3913
3943
|
/** Format: double */
|
|
3914
|
-
|
|
3944
|
+
total_fees?: number | null;
|
|
3915
3945
|
/** Format: int64 */
|
|
3916
|
-
|
|
3946
|
+
total_buys?: number | null;
|
|
3917
3947
|
/** Format: int64 */
|
|
3918
|
-
|
|
3919
|
-
/** Format:
|
|
3920
|
-
|
|
3948
|
+
total_sells?: number | null;
|
|
3949
|
+
/** Format: int64 */
|
|
3950
|
+
total_redemptions?: number | null;
|
|
3951
|
+
/** Format: int64 */
|
|
3952
|
+
total_merges?: number | null;
|
|
3953
|
+
/** Format: int64 */
|
|
3954
|
+
outcomes_traded?: number | null;
|
|
3955
|
+
/** Format: int64 */
|
|
3956
|
+
winning_outcomes?: number | null;
|
|
3921
3957
|
/** Format: int64 */
|
|
3922
3958
|
first_trade_at?: number | null;
|
|
3923
3959
|
/** Format: int64 */
|
|
3924
3960
|
last_trade_at?: number | null;
|
|
3925
|
-
/** Format: double */
|
|
3926
|
-
realized_pnl_pct?: number | null;
|
|
3927
3961
|
};
|
|
3928
3962
|
OrderbookHistoryRow: {
|
|
3929
3963
|
/** Format: int64 */
|
|
@@ -4114,6 +4148,16 @@ export interface components {
|
|
|
4114
4148
|
* @default 0
|
|
4115
4149
|
*/
|
|
4116
4150
|
unique_traders: number;
|
|
4151
|
+
/**
|
|
4152
|
+
* Format: int32
|
|
4153
|
+
* @default 0
|
|
4154
|
+
*/
|
|
4155
|
+
unique_makers: number;
|
|
4156
|
+
/**
|
|
4157
|
+
* Format: int32
|
|
4158
|
+
* @default 0
|
|
4159
|
+
*/
|
|
4160
|
+
unique_takers: number;
|
|
4117
4161
|
/**
|
|
4118
4162
|
* Format: int32
|
|
4119
4163
|
* @default 0
|
|
@@ -4166,7 +4210,7 @@ export interface components {
|
|
|
4166
4210
|
pnl: number;
|
|
4167
4211
|
};
|
|
4168
4212
|
/** @enum {string} */
|
|
4169
|
-
PnlCandleResolution: "1m" | "1h" | "1d";
|
|
4213
|
+
PnlCandleResolution: "1m" | "1h" | "4h" | "1d" | "auto";
|
|
4170
4214
|
/** @enum {string} */
|
|
4171
4215
|
PnlCandleTimeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
4172
4216
|
/** @enum {string} */
|
|
@@ -4181,170 +4225,20 @@ export interface components {
|
|
|
4181
4225
|
* @enum {string}
|
|
4182
4226
|
*/
|
|
4183
4227
|
WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
4184
|
-
/**
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
block?: number | null;
|
|
4190
|
-
/** Format: int64 */
|
|
4191
|
-
confirmed_at?: number | null;
|
|
4192
|
-
/** Format: int64 */
|
|
4193
|
-
received_at?: number | null;
|
|
4194
|
-
/** Format: int64 */
|
|
4195
|
-
log_index?: number | null;
|
|
4196
|
-
/** Format: int64 */
|
|
4197
|
-
block_index?: number | null;
|
|
4198
|
-
oracle_contract: string;
|
|
4199
|
-
requester: string;
|
|
4200
|
-
proposer: string;
|
|
4201
|
-
disputer: string;
|
|
4202
|
-
identifier: string;
|
|
4203
|
-
timestamp: string;
|
|
4204
|
-
ancillary_data: string;
|
|
4205
|
-
/** Format: int64 */
|
|
4206
|
-
proposed_price: number;
|
|
4207
|
-
payout: string;
|
|
4208
|
-
disputed: boolean;
|
|
4209
|
-
condition_id?: string | null;
|
|
4210
|
-
proposed_outcome?: string | null;
|
|
4211
|
-
question?: string | null;
|
|
4212
|
-
image_url?: string | null;
|
|
4213
|
-
slug?: string | null;
|
|
4214
|
-
event_slug?: string | null;
|
|
4215
|
-
};
|
|
4228
|
+
/**
|
|
4229
|
+
* @description Sort metric for the trader → builders list.
|
|
4230
|
+
* @enum {string}
|
|
4231
|
+
*/
|
|
4232
|
+
TraderBuilderSortBy: "volume" | "txns" | "fees";
|
|
4216
4233
|
TraderWithPnl: components["schemas"]["Trader"] & {
|
|
4217
4234
|
pnl?: null | components["schemas"]["TraderPnlSummary"];
|
|
4218
4235
|
};
|
|
4219
|
-
/**
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
ts: number;
|
|
4226
|
-
/** Format: double */
|
|
4227
|
-
volume_usd: number;
|
|
4228
|
-
/** Format: double */
|
|
4229
|
-
buy_volume_usd: number;
|
|
4230
|
-
/** Format: double */
|
|
4231
|
-
sell_volume_usd: number;
|
|
4232
|
-
/** Format: int64 */
|
|
4233
|
-
unique_traders: number;
|
|
4234
|
-
/** Format: int64 */
|
|
4235
|
-
unique_makers: number;
|
|
4236
|
-
/** Format: int64 */
|
|
4237
|
-
unique_takers: number;
|
|
4238
|
-
/** Format: int64 */
|
|
4239
|
-
txn_count: number;
|
|
4240
|
-
/** Format: int64 */
|
|
4241
|
-
buy_count: number;
|
|
4242
|
-
/** Format: int64 */
|
|
4243
|
-
sell_count: number;
|
|
4244
|
-
/** Format: double */
|
|
4245
|
-
fees_usd: number;
|
|
4246
|
-
/** Format: double */
|
|
4247
|
-
builder_fees: number;
|
|
4248
|
-
/** Format: double */
|
|
4249
|
-
shares_volume: number;
|
|
4250
|
-
/** Format: double */
|
|
4251
|
-
yes_volume_usd: number;
|
|
4252
|
-
/** Format: double */
|
|
4253
|
-
no_volume_usd: number;
|
|
4254
|
-
/** Format: int64 */
|
|
4255
|
-
yes_count: number;
|
|
4256
|
-
/** Format: int64 */
|
|
4257
|
-
no_count: number;
|
|
4258
|
-
/** Format: int64 */
|
|
4259
|
-
buy_dist_under_10: number;
|
|
4260
|
-
/** Format: int64 */
|
|
4261
|
-
buy_dist_10_100: number;
|
|
4262
|
-
/** Format: int64 */
|
|
4263
|
-
buy_dist_100_1k: number;
|
|
4264
|
-
/** Format: int64 */
|
|
4265
|
-
buy_dist_1k_10k: number;
|
|
4266
|
-
/** Format: int64 */
|
|
4267
|
-
buy_dist_10k_50k: number;
|
|
4268
|
-
/** Format: int64 */
|
|
4269
|
-
buy_dist_50k_plus: number;
|
|
4270
|
-
/** Format: int64 */
|
|
4271
|
-
new_users: number;
|
|
4272
|
-
/** Format: double */
|
|
4273
|
-
avg_rev_per_user: number;
|
|
4274
|
-
/** Format: double */
|
|
4275
|
-
avg_vol_per_user: number;
|
|
4276
|
-
};
|
|
4277
|
-
/** @description Outcome-level PnL entry (per outcome token / position_id) */
|
|
4278
|
-
TraderOutcomePnlEntry: {
|
|
4279
|
-
position_id?: string | null;
|
|
4280
|
-
condition_id?: string | null;
|
|
4281
|
-
market_slug?: string | null;
|
|
4282
|
-
event_slug?: string | null;
|
|
4283
|
-
title?: string | null;
|
|
4284
|
-
image_url?: string | null;
|
|
4285
|
-
outcome?: string | null;
|
|
4286
|
-
/** Format: int32 */
|
|
4287
|
-
outcome_index?: number | null;
|
|
4288
|
-
/** @description TRUE = won, FALSE = lost, NULL = open or sold before resolution */
|
|
4289
|
-
won?: boolean | null;
|
|
4290
|
-
/** Format: int64 */
|
|
4291
|
-
total_buys?: number | null;
|
|
4292
|
-
/** Format: int64 */
|
|
4293
|
-
total_sells?: number | null;
|
|
4294
|
-
/** Format: double */
|
|
4295
|
-
total_shares_bought?: number | null;
|
|
4296
|
-
/** Format: double */
|
|
4297
|
-
total_shares_sold?: number | null;
|
|
4298
|
-
/** Format: double */
|
|
4299
|
-
total_buy_usd?: number | null;
|
|
4300
|
-
/** Format: double */
|
|
4301
|
-
total_sell_usd?: number | null;
|
|
4302
|
-
/**
|
|
4303
|
-
* Format: double
|
|
4304
|
-
* @description Payout on redemption (non-zero only if won)
|
|
4305
|
-
*/
|
|
4306
|
-
redemption_usd?: number | null;
|
|
4307
|
-
/**
|
|
4308
|
-
* Format: double
|
|
4309
|
-
* @description VWAP price paid per share across all buys (0–1)
|
|
4310
|
-
*/
|
|
4311
|
-
avg_entry_price?: number | null;
|
|
4312
|
-
/**
|
|
4313
|
-
* Format: double
|
|
4314
|
-
* @description VWAP price received per share across all sells (0–1)
|
|
4315
|
-
*/
|
|
4316
|
-
avg_exit_price?: number | null;
|
|
4317
|
-
/** Format: double */
|
|
4318
|
-
realized_pnl_usd?: number | null;
|
|
4319
|
-
/** Format: double */
|
|
4320
|
-
total_fees?: number | null;
|
|
4321
|
-
/** Format: int64 */
|
|
4322
|
-
first_trade_at?: number | null;
|
|
4323
|
-
/** Format: int64 */
|
|
4324
|
-
last_trade_at?: number | null;
|
|
4325
|
-
/**
|
|
4326
|
-
* Format: double
|
|
4327
|
-
* @description Last traded price for this outcome (0–1). NULL if market_outcomes has no price yet.
|
|
4328
|
-
*/
|
|
4329
|
-
current_price?: number | null;
|
|
4330
|
-
/**
|
|
4331
|
-
* Format: double
|
|
4332
|
-
* @description Current shares held: balance / 1e6.
|
|
4333
|
-
*/
|
|
4334
|
-
current_shares_balance?: number | null;
|
|
4335
|
-
/**
|
|
4336
|
-
* Format: double
|
|
4337
|
-
* @description Estimated current USD value of held shares: (balance / 1e6) * current_price.
|
|
4338
|
-
* Only meaningful for open positions (balance above dust threshold).
|
|
4339
|
-
*/
|
|
4340
|
-
current_value?: number | null;
|
|
4341
|
-
/**
|
|
4342
|
-
* Format: double
|
|
4343
|
-
* @description Realized PnL as a percentage of total spend: (realized_pnl_usd / total_buy_usd) * 100.
|
|
4344
|
-
* NULL when total_buy_usd = 0.
|
|
4345
|
-
*/
|
|
4346
|
-
realized_pnl_pct?: number | null;
|
|
4347
|
-
};
|
|
4236
|
+
/**
|
|
4237
|
+
* @description Timeframe for `?sort=...` — defines the window the metric is summed over
|
|
4238
|
+
* (or `lifetime` for all-time cumulative).
|
|
4239
|
+
* @enum {string}
|
|
4240
|
+
*/
|
|
4241
|
+
TagSortTimeframe: "lifetime" | "1h" | "24h" | "7d" | "30d" | "1mo";
|
|
4348
4242
|
/** @description Trader's global PnL summary (single trader) */
|
|
4349
4243
|
TraderPnlSummary: {
|
|
4350
4244
|
trader?: string | null;
|
|
@@ -4394,33 +4288,6 @@ export interface components {
|
|
|
4394
4288
|
/** Format: int64 */
|
|
4395
4289
|
last_trade_at?: number | null;
|
|
4396
4290
|
};
|
|
4397
|
-
/**
|
|
4398
|
-
* @description Per-metric percentage change over a lookback window for one trader
|
|
4399
|
-
* address. A `null` field means the window predates the trader's first
|
|
4400
|
-
* activity or the prior value was zero (percentage undefined).
|
|
4401
|
-
*/
|
|
4402
|
-
TraderMetricPctChange: {
|
|
4403
|
-
/** Format: double */
|
|
4404
|
-
volume_usd?: number | null;
|
|
4405
|
-
/** Format: double */
|
|
4406
|
-
buy_volume_usd?: number | null;
|
|
4407
|
-
/** Format: double */
|
|
4408
|
-
sell_volume_usd?: number | null;
|
|
4409
|
-
/** Format: double */
|
|
4410
|
-
merge_volume_usd?: number | null;
|
|
4411
|
-
/** Format: double */
|
|
4412
|
-
split_volume_usd?: number | null;
|
|
4413
|
-
/** Format: double */
|
|
4414
|
-
txn_count?: number | null;
|
|
4415
|
-
/** Format: double */
|
|
4416
|
-
fees_usd?: number | null;
|
|
4417
|
-
/** Format: double */
|
|
4418
|
-
shares_volume?: number | null;
|
|
4419
|
-
/** Format: double */
|
|
4420
|
-
yes_volume_usd?: number | null;
|
|
4421
|
-
/** Format: double */
|
|
4422
|
-
no_volume_usd?: number | null;
|
|
4423
|
-
};
|
|
4424
4291
|
TraderVolumeDataPoint: {
|
|
4425
4292
|
/** Format: int64 */
|
|
4426
4293
|
t: number;
|
|
@@ -4500,6 +4367,11 @@ export interface components {
|
|
|
4500
4367
|
/** Format: int64 */
|
|
4501
4368
|
bd_50p: number;
|
|
4502
4369
|
};
|
|
4370
|
+
/**
|
|
4371
|
+
* @description Polymarket UI category.
|
|
4372
|
+
* @enum {string}
|
|
4373
|
+
*/
|
|
4374
|
+
PolymarketCategory: "Politics" | "Sports" | "Crypto" | "Finance" | "Culture" | "Mentions" | "Weather" | "Economics" | "Tech";
|
|
4503
4375
|
/** @description A Polymarket event from the Gamma API */
|
|
4504
4376
|
PolymarketEvent: {
|
|
4505
4377
|
/** @default */
|
|
@@ -4640,25 +4512,31 @@ export interface components {
|
|
|
4640
4512
|
slug: string | null;
|
|
4641
4513
|
/** Format: double */
|
|
4642
4514
|
volume_usd?: number;
|
|
4515
|
+
/** Format: double */
|
|
4516
|
+
shares_volume?: number;
|
|
4517
|
+
/** Format: double */
|
|
4518
|
+
builder_usd_volume?: number;
|
|
4519
|
+
/** Format: double */
|
|
4520
|
+
builder_shares_volume?: number;
|
|
4643
4521
|
/** Format: int64 */
|
|
4644
4522
|
txn_count?: number;
|
|
4523
|
+
/** Format: int64 */
|
|
4524
|
+
builder_txn_count?: number;
|
|
4645
4525
|
/**
|
|
4646
4526
|
* Format: int64
|
|
4647
4527
|
* @description Distinct active traders in the window.
|
|
4648
4528
|
*/
|
|
4649
4529
|
unique_traders?: number;
|
|
4650
|
-
/**
|
|
4651
|
-
* Format: int64
|
|
4652
|
-
* @description Distinct active makers in the window.
|
|
4653
|
-
*/
|
|
4530
|
+
/** Format: int64 */
|
|
4654
4531
|
unique_makers?: number;
|
|
4655
|
-
/**
|
|
4656
|
-
* Format: int64
|
|
4657
|
-
* @description Distinct active takers in the window.
|
|
4658
|
-
*/
|
|
4532
|
+
/** Format: int64 */
|
|
4659
4533
|
unique_takers?: number;
|
|
4534
|
+
/** Format: int64 */
|
|
4535
|
+
unique_builder_traders?: number;
|
|
4660
4536
|
/** Format: double */
|
|
4661
4537
|
fees_usd?: number;
|
|
4538
|
+
/** Format: double */
|
|
4539
|
+
builder_fees_usd?: number;
|
|
4662
4540
|
};
|
|
4663
4541
|
/** @description Polymarket user profile (public API format) */
|
|
4664
4542
|
PolymarketUserProfile: {
|
|
@@ -4690,6 +4568,8 @@ export interface components {
|
|
|
4690
4568
|
};
|
|
4691
4569
|
/** @description Per-position detail for Split/Merge/Redemption trades. */
|
|
4692
4570
|
PositionDetail: {
|
|
4571
|
+
/** @description Market condition ID for this ERC1155 position. */
|
|
4572
|
+
condition_id?: string | null;
|
|
4693
4573
|
/** @description ERC1155 position ID */
|
|
4694
4574
|
position_id: string;
|
|
4695
4575
|
/**
|
|
@@ -4701,6 +4581,13 @@ export interface components {
|
|
|
4701
4581
|
outcome?: string | null;
|
|
4702
4582
|
/** @description Amount of shares created/burned/redeemed for this position */
|
|
4703
4583
|
amount: string;
|
|
4584
|
+
/**
|
|
4585
|
+
* @description Collateral paid out for this specific position, when applicable.
|
|
4586
|
+
*
|
|
4587
|
+
* For NegRisk PositionsConverted this is allocated only to burned NO
|
|
4588
|
+
* inputs. YES output details intentionally carry zero collateral.
|
|
4589
|
+
*/
|
|
4590
|
+
collateral_amount?: string;
|
|
4704
4591
|
};
|
|
4705
4592
|
/** @description Response for position (position_id) holders endpoint */
|
|
4706
4593
|
PositionHoldersResponse: {
|
|
@@ -4776,6 +4663,10 @@ export interface components {
|
|
|
4776
4663
|
/** Format: int32 */
|
|
4777
4664
|
unique_traders: number;
|
|
4778
4665
|
/** Format: int32 */
|
|
4666
|
+
unique_makers: number;
|
|
4667
|
+
/** Format: int32 */
|
|
4668
|
+
unique_takers: number;
|
|
4669
|
+
/** Format: int32 */
|
|
4779
4670
|
unique_builder_traders: number;
|
|
4780
4671
|
/** Format: double */
|
|
4781
4672
|
price_open: number;
|
|
@@ -4853,6 +4744,7 @@ export interface components {
|
|
|
4853
4744
|
fee?: number | null;
|
|
4854
4745
|
/** Format: double */
|
|
4855
4746
|
fee_pct?: number | null;
|
|
4747
|
+
position_details?: components["schemas"]["PositionDetail"][];
|
|
4856
4748
|
exchange: components["schemas"]["PolymarketExchange"];
|
|
4857
4749
|
};
|
|
4858
4750
|
/**
|
|
@@ -4860,16 +4752,32 @@ export interface components {
|
|
|
4860
4752
|
* @enum {string}
|
|
4861
4753
|
*/
|
|
4862
4754
|
TopTradersSortBy: "volume" | "txns" | "fees" | "builder_fees";
|
|
4863
|
-
|
|
4864
|
-
|
|
4755
|
+
/**
|
|
4756
|
+
* @description Per-metric percentage change over a lookback window for one trader
|
|
4757
|
+
* address. A `null` field means the window predates the trader's first
|
|
4758
|
+
* activity or the prior value was zero (percentage undefined).
|
|
4759
|
+
*/
|
|
4760
|
+
TraderMetricPctChange: {
|
|
4761
|
+
/** Format: double */
|
|
4762
|
+
volume_usd?: number | null;
|
|
4763
|
+
/** Format: double */
|
|
4764
|
+
buy_volume_usd?: number | null;
|
|
4765
|
+
/** Format: double */
|
|
4766
|
+
sell_volume_usd?: number | null;
|
|
4767
|
+
/** Format: double */
|
|
4768
|
+
merge_volume_usd?: number | null;
|
|
4769
|
+
/** Format: double */
|
|
4770
|
+
split_volume_usd?: number | null;
|
|
4865
4771
|
/** Format: double */
|
|
4866
|
-
|
|
4867
|
-
/** Format: int64 */
|
|
4868
|
-
txn_count: number;
|
|
4772
|
+
txn_count?: number | null;
|
|
4869
4773
|
/** Format: double */
|
|
4870
|
-
fees_usd
|
|
4774
|
+
fees_usd?: number | null;
|
|
4871
4775
|
/** Format: double */
|
|
4872
|
-
|
|
4776
|
+
shares_volume?: number | null;
|
|
4777
|
+
/** Format: double */
|
|
4778
|
+
yes_volume_usd?: number | null;
|
|
4779
|
+
/** Format: double */
|
|
4780
|
+
no_volume_usd?: number | null;
|
|
4873
4781
|
};
|
|
4874
4782
|
PredictionCandlestickBar: {
|
|
4875
4783
|
/** Format: double */
|
|
@@ -5106,60 +5014,309 @@ export interface components {
|
|
|
5106
5014
|
/** Format: int64 */
|
|
5107
5015
|
received_at?: number | null;
|
|
5108
5016
|
/** Format: int64 */
|
|
5109
|
-
log_index?: number | null;
|
|
5017
|
+
log_index?: number | null;
|
|
5018
|
+
/** Format: int64 */
|
|
5019
|
+
block_index?: number | null;
|
|
5020
|
+
oracle_contract: string;
|
|
5021
|
+
condition_id: string;
|
|
5022
|
+
question?: string | null;
|
|
5023
|
+
image_url?: string | null;
|
|
5024
|
+
slug?: string | null;
|
|
5025
|
+
event_slug?: string | null;
|
|
5026
|
+
};
|
|
5027
|
+
/** @description Output payload for Redemption trades (payout after market resolution). */
|
|
5028
|
+
RedemptionTrade: {
|
|
5029
|
+
id: string;
|
|
5030
|
+
hash: string;
|
|
5031
|
+
/** Format: int64 */
|
|
5032
|
+
block?: number | null;
|
|
5033
|
+
/** Format: int64 */
|
|
5034
|
+
confirmed_at?: number | null;
|
|
5035
|
+
/** Format: int64 */
|
|
5036
|
+
received_at?: number | null;
|
|
5037
|
+
/** Format: int64 */
|
|
5038
|
+
log_index?: number | null;
|
|
5039
|
+
/** Format: int64 */
|
|
5040
|
+
block_index?: number | null;
|
|
5041
|
+
trader: components["schemas"]["TraderInfo"];
|
|
5042
|
+
condition_id?: string | null;
|
|
5043
|
+
outcome?: string | null;
|
|
5044
|
+
/** Format: int32 */
|
|
5045
|
+
outcome_index?: number | null;
|
|
5046
|
+
question?: string | null;
|
|
5047
|
+
image_url?: string | null;
|
|
5048
|
+
slug?: string | null;
|
|
5049
|
+
event_slug?: string | null;
|
|
5050
|
+
/** Format: double */
|
|
5051
|
+
usd_amount: number;
|
|
5052
|
+
/** Format: int32 */
|
|
5053
|
+
winning_outcome_index?: number | null;
|
|
5054
|
+
/** @description Per-position burn amounts */
|
|
5055
|
+
position_details?: components["schemas"]["PositionDetail"][];
|
|
5056
|
+
exchange: components["schemas"]["PolymarketExchange"];
|
|
5057
|
+
};
|
|
5058
|
+
/** @enum {string} */
|
|
5059
|
+
TradeSide: "0" | "1";
|
|
5060
|
+
/** @enum {string} */
|
|
5061
|
+
TradeType: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "22" | "23" | "24";
|
|
5062
|
+
/** @description Output payload for RegisterToken events (YES/NO token pair registered for a condition). */
|
|
5063
|
+
RegisterTokenTrade: {
|
|
5064
|
+
id: string;
|
|
5065
|
+
hash: string;
|
|
5066
|
+
/** Format: int64 */
|
|
5067
|
+
block?: number | null;
|
|
5068
|
+
/** Format: int64 */
|
|
5069
|
+
confirmed_at?: number | null;
|
|
5070
|
+
/** Format: int64 */
|
|
5071
|
+
received_at?: number | null;
|
|
5072
|
+
/** Format: int64 */
|
|
5073
|
+
log_index?: number | null;
|
|
5074
|
+
/** Format: int64 */
|
|
5075
|
+
block_index?: number | null;
|
|
5076
|
+
condition_id: string;
|
|
5077
|
+
token0: string;
|
|
5078
|
+
token1: string;
|
|
5079
|
+
question?: string | null;
|
|
5080
|
+
image_url?: string | null;
|
|
5081
|
+
slug?: string | null;
|
|
5082
|
+
event_slug?: string | null;
|
|
5083
|
+
exchange: components["schemas"]["PolymarketExchange"];
|
|
5084
|
+
};
|
|
5085
|
+
TopTraderEventEntry: {
|
|
5086
|
+
trader: components["schemas"]["TraderInfo"];
|
|
5087
|
+
/** Format: double */
|
|
5088
|
+
realized_pnl_usd?: number | null;
|
|
5089
|
+
/** Format: double */
|
|
5090
|
+
realized_pnl_pct?: number | null;
|
|
5091
|
+
/** Format: double */
|
|
5092
|
+
total_volume_usd?: number | null;
|
|
5093
|
+
/** Format: double */
|
|
5094
|
+
buy_usd?: number | null;
|
|
5095
|
+
/** Format: double */
|
|
5096
|
+
sell_usd?: number | null;
|
|
5097
|
+
/** Format: double */
|
|
5098
|
+
redemption_usd?: number | null;
|
|
5099
|
+
/** Format: double */
|
|
5100
|
+
merge_usd?: number | null;
|
|
5101
|
+
/** Format: double */
|
|
5102
|
+
total_fees?: number | null;
|
|
5103
|
+
/** Format: int64 */
|
|
5104
|
+
total_buys?: number | null;
|
|
5105
|
+
/** Format: int64 */
|
|
5106
|
+
total_sells?: number | null;
|
|
5107
|
+
/** Format: int64 */
|
|
5108
|
+
total_redemptions?: number | null;
|
|
5109
|
+
/** Format: int64 */
|
|
5110
|
+
total_merges?: number | null;
|
|
5111
|
+
/** Format: int64 */
|
|
5112
|
+
markets_traded?: number | null;
|
|
5113
|
+
/** Format: int64 */
|
|
5114
|
+
outcomes_traded?: number | null;
|
|
5115
|
+
/** Format: int64 */
|
|
5116
|
+
winning_markets?: number | null;
|
|
5117
|
+
/** Format: int64 */
|
|
5118
|
+
losing_markets?: number | null;
|
|
5119
|
+
/** Format: int64 */
|
|
5120
|
+
first_trade_at?: number | null;
|
|
5121
|
+
/** Format: int64 */
|
|
5122
|
+
last_trade_at?: number | null;
|
|
5123
|
+
};
|
|
5124
|
+
/** @description V2 UMA OOv2: a price request was made (market initialization). */
|
|
5125
|
+
RequestPriceEvent: {
|
|
5126
|
+
id: string;
|
|
5127
|
+
hash: string;
|
|
5128
|
+
/** Format: int64 */
|
|
5129
|
+
block?: number | null;
|
|
5130
|
+
/** Format: int64 */
|
|
5131
|
+
confirmed_at?: number | null;
|
|
5132
|
+
/** Format: int64 */
|
|
5133
|
+
received_at?: number | null;
|
|
5134
|
+
/** Format: int64 */
|
|
5135
|
+
log_index?: number | null;
|
|
5136
|
+
/** Format: int64 */
|
|
5137
|
+
block_index?: number | null;
|
|
5138
|
+
oracle_contract: string;
|
|
5139
|
+
requester: string;
|
|
5140
|
+
identifier: string;
|
|
5141
|
+
/**
|
|
5142
|
+
* @description UMA request timestamp (seconds, decimal string).
|
|
5143
|
+
* The point in time the requester is asking the oracle to resolve the
|
|
5144
|
+
* price for — part of the request identity tuple
|
|
5145
|
+
* `(requester, identifier, timestamp, ancillaryData)`. Not the block
|
|
5146
|
+
* timestamp of this event; see `confirmed_at` for that.
|
|
5147
|
+
*/
|
|
5148
|
+
timestamp: string;
|
|
5149
|
+
ancillary_data: string;
|
|
5150
|
+
currency: string;
|
|
5151
|
+
reward: string;
|
|
5152
|
+
final_fee: string;
|
|
5153
|
+
condition_id?: string | null;
|
|
5154
|
+
question?: string | null;
|
|
5155
|
+
image_url?: string | null;
|
|
5156
|
+
slug?: string | null;
|
|
5157
|
+
event_slug?: string | null;
|
|
5158
|
+
};
|
|
5159
|
+
/** @description Counts of cohort traders active on day +1 / +7 / +30. */
|
|
5160
|
+
RetainedCounts: {
|
|
5161
|
+
/** Format: int64 */
|
|
5162
|
+
d1: number;
|
|
5163
|
+
/** Format: int64 */
|
|
5164
|
+
d7: number;
|
|
5165
|
+
/** Format: int64 */
|
|
5166
|
+
d30: number;
|
|
5167
|
+
};
|
|
5168
|
+
/** @description Retained counts as fractions of `cohort_size` (0 when cohort is empty). */
|
|
5169
|
+
RetentionFractions: {
|
|
5170
|
+
/** Format: double */
|
|
5171
|
+
d1: number;
|
|
5172
|
+
/** Format: double */
|
|
5173
|
+
d7: number;
|
|
5174
|
+
/** Format: double */
|
|
5175
|
+
d30: number;
|
|
5176
|
+
};
|
|
5177
|
+
/** @description Event-level PnL entry */
|
|
5178
|
+
TraderEventPnlEntry: {
|
|
5179
|
+
event_slug?: string | null;
|
|
5180
|
+
question?: string | null;
|
|
5181
|
+
image_url?: string | null;
|
|
5182
|
+
/** Format: int64 */
|
|
5183
|
+
markets_traded?: number | null;
|
|
5184
|
+
/** Format: int64 */
|
|
5185
|
+
outcomes_traded?: number | null;
|
|
5186
|
+
/** Format: int64 */
|
|
5187
|
+
total_buys?: number | null;
|
|
5188
|
+
/** Format: int64 */
|
|
5189
|
+
total_sells?: number | null;
|
|
5190
|
+
/** Format: int64 */
|
|
5191
|
+
total_redemptions?: number | null;
|
|
5192
|
+
/** Format: int64 */
|
|
5193
|
+
total_merges?: number | null;
|
|
5194
|
+
/** Format: double */
|
|
5195
|
+
total_volume_usd?: number | null;
|
|
5196
|
+
/** Format: double */
|
|
5197
|
+
buy_usd?: number | null;
|
|
5198
|
+
/** Format: double */
|
|
5199
|
+
sell_usd?: number | null;
|
|
5200
|
+
/** Format: double */
|
|
5201
|
+
redemption_usd?: number | null;
|
|
5202
|
+
/** Format: double */
|
|
5203
|
+
merge_usd?: number | null;
|
|
5204
|
+
/** Format: double */
|
|
5205
|
+
realized_pnl_usd?: number | null;
|
|
5206
|
+
/** Format: int64 */
|
|
5207
|
+
winning_markets?: number | null;
|
|
5208
|
+
/** Format: int64 */
|
|
5209
|
+
losing_markets?: number | null;
|
|
5210
|
+
/** Format: double */
|
|
5211
|
+
total_fees?: number | null;
|
|
5212
|
+
/** Format: int64 */
|
|
5213
|
+
first_trade_at?: number | null;
|
|
5214
|
+
/** Format: int64 */
|
|
5215
|
+
last_trade_at?: number | null;
|
|
5216
|
+
/** Format: double */
|
|
5217
|
+
realized_pnl_pct?: number | null;
|
|
5218
|
+
};
|
|
5219
|
+
/**
|
|
5220
|
+
* @description Bucket row returned by both `/analytics/timeseries` (cumulative values
|
|
5221
|
+
* at end of bucket) and `/analytics/deltas` (per-bucket deltas). All metrics
|
|
5222
|
+
* the snapshot `/counts` returns are included.
|
|
5223
|
+
*
|
|
5224
|
+
* Short field names for compact JSON responses:
|
|
5225
|
+
* t=bucket (unix seconds), v=volume_usd, bv=buy_volume_usd, sv=sell_volume_usd,
|
|
5226
|
+
* ut=unique_traders, um=unique_makers, uk=unique_takers,
|
|
5227
|
+
* tc=txn_count, bc=buy_count, sc=sell_count,
|
|
5228
|
+
* rc=redemption_count, rv=redemption_volume_usd, mc=merge_count, mv=merge_volume_usd,
|
|
5229
|
+
* sp=split_count, spv=split_volume_usd, f=fees_usd, sh=shares_volume,
|
|
5230
|
+
* yv=yes_volume_usd, nv=no_volume_usd, yc=yes_count, nc=no_count,
|
|
5231
|
+
* bd_*=buy distribution by USD bucket
|
|
5232
|
+
*/
|
|
5233
|
+
TimeBucketRow: {
|
|
5234
|
+
/** Format: int32 */
|
|
5235
|
+
t: number;
|
|
5236
|
+
/** Format: double */
|
|
5237
|
+
v: number;
|
|
5238
|
+
/** Format: double */
|
|
5239
|
+
bv: number;
|
|
5240
|
+
/** Format: double */
|
|
5241
|
+
sv: number;
|
|
5242
|
+
/** Format: int64 */
|
|
5243
|
+
tc: number;
|
|
5244
|
+
/** Format: int64 */
|
|
5245
|
+
bc: number;
|
|
5246
|
+
/** Format: int64 */
|
|
5247
|
+
sc: number;
|
|
5248
|
+
/** Format: int64 */
|
|
5249
|
+
rc: number;
|
|
5250
|
+
/** Format: double */
|
|
5251
|
+
rv: number;
|
|
5252
|
+
/** Format: int64 */
|
|
5253
|
+
mc: number;
|
|
5254
|
+
/** Format: double */
|
|
5255
|
+
mv: number;
|
|
5256
|
+
/** Format: int64 */
|
|
5257
|
+
sp: number;
|
|
5258
|
+
/** Format: double */
|
|
5259
|
+
spv: number;
|
|
5260
|
+
/** Format: double */
|
|
5261
|
+
f: number;
|
|
5262
|
+
/** Format: double */
|
|
5263
|
+
sh: number;
|
|
5264
|
+
/** Format: double */
|
|
5265
|
+
yv: number;
|
|
5266
|
+
/** Format: double */
|
|
5267
|
+
nv: number;
|
|
5268
|
+
/** Format: int64 */
|
|
5269
|
+
yc: number;
|
|
5110
5270
|
/** Format: int64 */
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
event_slug?: string | null;
|
|
5118
|
-
};
|
|
5119
|
-
/** @description Output payload for Redemption trades (payout after market resolution). */
|
|
5120
|
-
RedemptionTrade: {
|
|
5121
|
-
id: string;
|
|
5122
|
-
hash: string;
|
|
5271
|
+
nc: number;
|
|
5272
|
+
/**
|
|
5273
|
+
* Format: int64
|
|
5274
|
+
* @description Buy distribution — count of buy trades falling in each USD bucket.
|
|
5275
|
+
*/
|
|
5276
|
+
bd_u10: number;
|
|
5123
5277
|
/** Format: int64 */
|
|
5124
|
-
|
|
5278
|
+
bd_100: number;
|
|
5125
5279
|
/** Format: int64 */
|
|
5126
|
-
|
|
5280
|
+
bd_1k: number;
|
|
5127
5281
|
/** Format: int64 */
|
|
5128
|
-
|
|
5282
|
+
bd_10k: number;
|
|
5129
5283
|
/** Format: int64 */
|
|
5130
|
-
|
|
5284
|
+
bd_50k: number;
|
|
5131
5285
|
/** Format: int64 */
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5286
|
+
bd_50p: number;
|
|
5287
|
+
/**
|
|
5288
|
+
* Format: int64
|
|
5289
|
+
* @description Distinct traders ACTIVE in this bucket (window-unique, not first-time).
|
|
5290
|
+
*/
|
|
5291
|
+
ut: number;
|
|
5292
|
+
/**
|
|
5293
|
+
* Format: int64
|
|
5294
|
+
* @description Distinct makers active in this bucket.
|
|
5295
|
+
*/
|
|
5296
|
+
um: number;
|
|
5297
|
+
/**
|
|
5298
|
+
* Format: int64
|
|
5299
|
+
* @description Distinct takers active in this bucket.
|
|
5300
|
+
*/
|
|
5301
|
+
uk: number;
|
|
5302
|
+
};
|
|
5303
|
+
SearchResponse: {
|
|
5304
|
+
events?: components["schemas"]["PolymarketEvent"][] | null;
|
|
5305
|
+
events_pagination?: null | components["schemas"]["PaginationMeta"];
|
|
5306
|
+
markets?: components["schemas"]["MarketResponse"][] | null;
|
|
5307
|
+
markets_pagination?: null | components["schemas"]["PaginationMeta"];
|
|
5308
|
+
traders?: components["schemas"]["TraderWithPnl"][] | null;
|
|
5309
|
+
traders_pagination?: null | components["schemas"]["PaginationMeta"];
|
|
5310
|
+
builders?: components["schemas"]["BuilderMetadata"][] | null;
|
|
5311
|
+
builders_pagination?: null | components["schemas"]["PaginationMeta"];
|
|
5149
5312
|
};
|
|
5150
5313
|
/**
|
|
5151
|
-
* @description
|
|
5152
|
-
* (or `lifetime` for all-time cumulative).
|
|
5314
|
+
* @description Combined sort options valid for both events and markets in search
|
|
5153
5315
|
* @enum {string}
|
|
5154
5316
|
*/
|
|
5155
|
-
|
|
5156
|
-
/** @description
|
|
5157
|
-
|
|
5158
|
-
token_id: string;
|
|
5159
|
-
outcome: string;
|
|
5160
|
-
};
|
|
5161
|
-
/** @description Output payload for RegisterToken events (YES/NO token pair registered for a condition). */
|
|
5162
|
-
RegisterTokenTrade: {
|
|
5317
|
+
SearchSortBy: "volume" | "txns" | "unique_traders" | "relevance" | "title" | "creation_date" | "start_date" | "end_date" | "liquidity" | "holders" | "end_time" | "start_time" | "created_time";
|
|
5318
|
+
/** @description V2 UMA OOv2: a price request was settled (final resolution). */
|
|
5319
|
+
SettleEvent: {
|
|
5163
5320
|
id: string;
|
|
5164
5321
|
hash: string;
|
|
5165
5322
|
/** Format: int64 */
|
|
@@ -5172,15 +5329,29 @@ export interface components {
|
|
|
5172
5329
|
log_index?: number | null;
|
|
5173
5330
|
/** Format: int64 */
|
|
5174
5331
|
block_index?: number | null;
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5332
|
+
oracle_contract: string;
|
|
5333
|
+
requester: string;
|
|
5334
|
+
proposer: string;
|
|
5335
|
+
disputer: string;
|
|
5336
|
+
identifier: string;
|
|
5337
|
+
timestamp: string;
|
|
5338
|
+
ancillary_data: string;
|
|
5339
|
+
/** Format: int64 */
|
|
5340
|
+
proposed_price: number;
|
|
5341
|
+
payout: string;
|
|
5342
|
+
disputed: boolean;
|
|
5343
|
+
condition_id?: string | null;
|
|
5344
|
+
proposed_outcome?: string | null;
|
|
5178
5345
|
question?: string | null;
|
|
5179
5346
|
image_url?: string | null;
|
|
5180
5347
|
slug?: string | null;
|
|
5181
5348
|
event_slug?: string | null;
|
|
5182
|
-
exchange: components["schemas"]["PolymarketExchange"];
|
|
5183
5349
|
};
|
|
5350
|
+
/**
|
|
5351
|
+
* @description Direction filter for spike webhooks.
|
|
5352
|
+
* @enum {string}
|
|
5353
|
+
*/
|
|
5354
|
+
SpikeDirection: "up" | "down" | "both";
|
|
5184
5355
|
SimpleTimeframeMetrics: {
|
|
5185
5356
|
/**
|
|
5186
5357
|
* Format: double
|
|
@@ -5231,78 +5402,26 @@ export interface components {
|
|
|
5231
5402
|
* Format: int32
|
|
5232
5403
|
* @default 0
|
|
5233
5404
|
*/
|
|
5234
|
-
|
|
5235
|
-
};
|
|
5236
|
-
/** @description V2 UMA OOv2: a price request was made (market initialization). */
|
|
5237
|
-
RequestPriceEvent: {
|
|
5238
|
-
id: string;
|
|
5239
|
-
hash: string;
|
|
5240
|
-
/** Format: int64 */
|
|
5241
|
-
block?: number | null;
|
|
5242
|
-
/** Format: int64 */
|
|
5243
|
-
confirmed_at?: number | null;
|
|
5244
|
-
/** Format: int64 */
|
|
5245
|
-
received_at?: number | null;
|
|
5246
|
-
/** Format: int64 */
|
|
5247
|
-
log_index?: number | null;
|
|
5248
|
-
/** Format: int64 */
|
|
5249
|
-
block_index?: number | null;
|
|
5250
|
-
oracle_contract: string;
|
|
5251
|
-
requester: string;
|
|
5252
|
-
identifier: string;
|
|
5405
|
+
unique_makers: number;
|
|
5253
5406
|
/**
|
|
5254
|
-
*
|
|
5255
|
-
*
|
|
5256
|
-
* price for — part of the request identity tuple
|
|
5257
|
-
* `(requester, identifier, timestamp, ancillaryData)`. Not the block
|
|
5258
|
-
* timestamp of this event; see `confirmed_at` for that.
|
|
5407
|
+
* Format: int32
|
|
5408
|
+
* @default 0
|
|
5259
5409
|
*/
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
question?: string | null;
|
|
5267
|
-
image_url?: string | null;
|
|
5268
|
-
slug?: string | null;
|
|
5269
|
-
event_slug?: string | null;
|
|
5270
|
-
};
|
|
5271
|
-
/** @description Counts of cohort traders active on day +1 / +7 / +30. */
|
|
5272
|
-
RetainedCounts: {
|
|
5273
|
-
/** Format: int64 */
|
|
5274
|
-
d1: number;
|
|
5275
|
-
/** Format: int64 */
|
|
5276
|
-
d7: number;
|
|
5277
|
-
/** Format: int64 */
|
|
5278
|
-
d30: number;
|
|
5410
|
+
unique_takers: number;
|
|
5411
|
+
/**
|
|
5412
|
+
* Format: int32
|
|
5413
|
+
* @default 0
|
|
5414
|
+
*/
|
|
5415
|
+
unique_builder_traders: number;
|
|
5279
5416
|
};
|
|
5280
|
-
|
|
5281
|
-
|
|
5417
|
+
TopTraderPositionEntry: {
|
|
5418
|
+
trader: components["schemas"]["TraderInfo"];
|
|
5282
5419
|
/** Format: double */
|
|
5283
|
-
|
|
5420
|
+
realized_pnl_usd?: number | null;
|
|
5284
5421
|
/** Format: double */
|
|
5285
|
-
|
|
5422
|
+
realized_pnl_pct?: number | null;
|
|
5286
5423
|
/** Format: double */
|
|
5287
|
-
|
|
5288
|
-
};
|
|
5289
|
-
/** @description Market-level PnL entry */
|
|
5290
|
-
TraderMarketPnlEntry: {
|
|
5291
|
-
condition_id?: string | null;
|
|
5292
|
-
market_slug?: string | null;
|
|
5293
|
-
event_slug?: string | null;
|
|
5294
|
-
question?: string | null;
|
|
5295
|
-
image_url?: string | null;
|
|
5296
|
-
/** Format: int64 */
|
|
5297
|
-
outcomes_traded?: number | null;
|
|
5298
|
-
/** Format: int64 */
|
|
5299
|
-
total_buys?: number | null;
|
|
5300
|
-
/** Format: int64 */
|
|
5301
|
-
total_sells?: number | null;
|
|
5302
|
-
/** Format: int64 */
|
|
5303
|
-
total_redemptions?: number | null;
|
|
5304
|
-
/** Format: int64 */
|
|
5305
|
-
total_merges?: number | null;
|
|
5424
|
+
shares?: number | null;
|
|
5306
5425
|
/** Format: double */
|
|
5307
5426
|
buy_usd?: number | null;
|
|
5308
5427
|
/** Format: double */
|
|
@@ -5310,37 +5429,21 @@ export interface components {
|
|
|
5310
5429
|
/** Format: double */
|
|
5311
5430
|
redemption_usd?: number | null;
|
|
5312
5431
|
/** Format: double */
|
|
5313
|
-
|
|
5432
|
+
total_fees?: number | null;
|
|
5314
5433
|
/** Format: double */
|
|
5315
|
-
|
|
5316
|
-
/** Format: int64 */
|
|
5317
|
-
winning_outcomes?: number | null;
|
|
5434
|
+
avg_entry_price?: number | null;
|
|
5318
5435
|
/** Format: double */
|
|
5319
|
-
|
|
5436
|
+
avg_exit_price?: number | null;
|
|
5437
|
+
/** Format: int64 */
|
|
5438
|
+
total_buys?: number | null;
|
|
5439
|
+
/** Format: int64 */
|
|
5440
|
+
total_sells?: number | null;
|
|
5441
|
+
won?: boolean | null;
|
|
5320
5442
|
/** Format: int64 */
|
|
5321
5443
|
first_trade_at?: number | null;
|
|
5322
5444
|
/** Format: int64 */
|
|
5323
5445
|
last_trade_at?: number | null;
|
|
5324
|
-
/** Format: double */
|
|
5325
|
-
realized_pnl_pct?: number | null;
|
|
5326
|
-
};
|
|
5327
|
-
/** @enum {string} */
|
|
5328
|
-
TagChangeTimeframe: "1h" | "24h" | "7d" | "30d" | "1mo";
|
|
5329
|
-
SearchResponse: {
|
|
5330
|
-
events?: components["schemas"]["PolymarketEvent"][] | null;
|
|
5331
|
-
events_pagination?: null | components["schemas"]["PaginationMeta"];
|
|
5332
|
-
markets?: components["schemas"]["MarketResponse"][] | null;
|
|
5333
|
-
markets_pagination?: null | components["schemas"]["PaginationMeta"];
|
|
5334
|
-
traders?: components["schemas"]["TraderWithPnl"][] | null;
|
|
5335
|
-
traders_pagination?: null | components["schemas"]["PaginationMeta"];
|
|
5336
|
-
builders?: components["schemas"]["BuilderMetadata"][] | null;
|
|
5337
|
-
builders_pagination?: null | components["schemas"]["PaginationMeta"];
|
|
5338
5446
|
};
|
|
5339
|
-
/**
|
|
5340
|
-
* @description Combined sort options valid for both events and markets in search
|
|
5341
|
-
* @enum {string}
|
|
5342
|
-
*/
|
|
5343
|
-
SearchSortBy: "volume" | "txns" | "unique_traders" | "relevance" | "title" | "creation_date" | "start_date" | "end_date" | "liquidity" | "holders" | "end_time" | "start_time" | "created_time";
|
|
5344
5447
|
};
|
|
5345
5448
|
responses: never;
|
|
5346
5449
|
parameters: never;
|
|
@@ -5511,6 +5614,39 @@ export interface operations {
|
|
|
5511
5614
|
};
|
|
5512
5615
|
};
|
|
5513
5616
|
};
|
|
5617
|
+
get_asset_candlestick: {
|
|
5618
|
+
parameters: {
|
|
5619
|
+
query: {
|
|
5620
|
+
/** @description Asset ticker: BTC, ETH, XRP, SOL, DOGE, BNB, HYPE */
|
|
5621
|
+
asset_symbol: components["schemas"]["AssetSymbol"];
|
|
5622
|
+
/** @description Candle interval: 1, 5, 15, 30, 60, 240, D, 1D */
|
|
5623
|
+
resolution: components["schemas"]["CandlestickResolution"];
|
|
5624
|
+
/** @description Number of candles (max: 2500) */
|
|
5625
|
+
count_back?: number;
|
|
5626
|
+
/** @description Start timestamp (Unix seconds) */
|
|
5627
|
+
from?: number;
|
|
5628
|
+
/** @description End timestamp (Unix seconds) */
|
|
5629
|
+
to?: number;
|
|
5630
|
+
/** @description Cursor-based pagination key from previous response */
|
|
5631
|
+
pagination_key?: string;
|
|
5632
|
+
};
|
|
5633
|
+
header?: never;
|
|
5634
|
+
path?: never;
|
|
5635
|
+
cookie?: never;
|
|
5636
|
+
};
|
|
5637
|
+
requestBody?: never;
|
|
5638
|
+
responses: {
|
|
5639
|
+
/** @description OHLC candlestick data */
|
|
5640
|
+
200: {
|
|
5641
|
+
headers: {
|
|
5642
|
+
[name: string]: unknown;
|
|
5643
|
+
};
|
|
5644
|
+
content: {
|
|
5645
|
+
"application/json": components["schemas"]["AssetCandlestickBar"][];
|
|
5646
|
+
};
|
|
5647
|
+
};
|
|
5648
|
+
};
|
|
5649
|
+
};
|
|
5514
5650
|
list_builders: {
|
|
5515
5651
|
parameters: {
|
|
5516
5652
|
query?: {
|
|
@@ -5808,13 +5944,13 @@ export interface operations {
|
|
|
5808
5944
|
};
|
|
5809
5945
|
requestBody?: never;
|
|
5810
5946
|
responses: {
|
|
5811
|
-
/** @description Per-builder breakdown */
|
|
5947
|
+
/** @description Per-builder breakdown, each with embedded display metadata. */
|
|
5812
5948
|
200: {
|
|
5813
5949
|
headers: {
|
|
5814
5950
|
[name: string]: unknown;
|
|
5815
5951
|
};
|
|
5816
5952
|
content: {
|
|
5817
|
-
"application/json": components["schemas"]["
|
|
5953
|
+
"application/json": components["schemas"]["TagBuilderRowWithMetadata"][];
|
|
5818
5954
|
};
|
|
5819
5955
|
};
|
|
5820
5956
|
};
|