@structbuild/sdk 0.1.8 → 0.1.10
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 +115 -214
- package/dist/index.cjs +3 -10
- package/dist/index.cjs.map +5 -5
- package/dist/index.js +3 -10
- package/dist/index.js.map +5 -5
- package/dist/namespaces/holders.d.ts +1 -3
- package/dist/namespaces/trader.d.ts +5 -5
- package/dist/types/http.d.ts +5 -0
- package/dist/types/index.d.ts +2 -66
- package/package.json +1 -1
|
@@ -43,46 +43,6 @@ export interface paths {
|
|
|
43
43
|
patch?: never;
|
|
44
44
|
trace?: never;
|
|
45
45
|
};
|
|
46
|
-
"/polymarket/holders/events/{event_slug}": {
|
|
47
|
-
parameters: {
|
|
48
|
-
query?: never;
|
|
49
|
-
header?: never;
|
|
50
|
-
path?: never;
|
|
51
|
-
cookie?: never;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Get event holders
|
|
55
|
-
* @description Retrieve holders aggregated across all markets in an event, sorted by total shares. Uses cursor-based pagination for efficient traversal.
|
|
56
|
-
*/
|
|
57
|
-
get: operations["get_event_holders"];
|
|
58
|
-
put?: never;
|
|
59
|
-
post?: never;
|
|
60
|
-
delete?: never;
|
|
61
|
-
options?: never;
|
|
62
|
-
head?: never;
|
|
63
|
-
patch?: never;
|
|
64
|
-
trace?: never;
|
|
65
|
-
};
|
|
66
|
-
"/polymarket/holders/events/{event_slug}/history": {
|
|
67
|
-
parameters: {
|
|
68
|
-
query?: never;
|
|
69
|
-
header?: never;
|
|
70
|
-
path?: never;
|
|
71
|
-
cookie?: never;
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Get event holders history
|
|
75
|
-
* @description Retrieve historical holder count snapshots for an event over a time range
|
|
76
|
-
*/
|
|
77
|
-
get: operations["get_event_holders_history"];
|
|
78
|
-
put?: never;
|
|
79
|
-
post?: never;
|
|
80
|
-
delete?: never;
|
|
81
|
-
options?: never;
|
|
82
|
-
head?: never;
|
|
83
|
-
patch?: never;
|
|
84
|
-
trace?: never;
|
|
85
|
-
};
|
|
86
46
|
"/polymarket/holders/markets/{condition_id}": {
|
|
87
47
|
parameters: {
|
|
88
48
|
query?: never;
|
|
@@ -691,11 +651,11 @@ export interface components {
|
|
|
691
651
|
condition_id: string;
|
|
692
652
|
title?: string | null;
|
|
693
653
|
question: string;
|
|
694
|
-
|
|
654
|
+
market_slug: string;
|
|
695
655
|
event_slug?: string | null;
|
|
696
656
|
image_url?: string | null;
|
|
697
657
|
/** Format: int64 */
|
|
698
|
-
|
|
658
|
+
end_time: number;
|
|
699
659
|
/** Format: int32 */
|
|
700
660
|
best_outcome_index: number;
|
|
701
661
|
/** Format: double */
|
|
@@ -703,7 +663,7 @@ export interface components {
|
|
|
703
663
|
/** Format: double */
|
|
704
664
|
apy: number;
|
|
705
665
|
/** Format: double */
|
|
706
|
-
|
|
666
|
+
volume_24h?: number | null;
|
|
707
667
|
outcomes: components["schemas"]["BondOutcome"][];
|
|
708
668
|
};
|
|
709
669
|
BondOutcome: {
|
|
@@ -741,64 +701,6 @@ export interface components {
|
|
|
741
701
|
/** Format: int32 */
|
|
742
702
|
unique_traders: number;
|
|
743
703
|
};
|
|
744
|
-
/** @description Holder data for event-level queries (aggregated across markets) */
|
|
745
|
-
EventHolder: {
|
|
746
|
-
/** @description Trader profile information */
|
|
747
|
-
trader: components["schemas"]["Trader"];
|
|
748
|
-
/** @description Total shares across all positions in this event */
|
|
749
|
-
total_shares: string;
|
|
750
|
-
/** @description USD value of all shares (sum of shares * price per position) */
|
|
751
|
-
shares_usd?: string | null;
|
|
752
|
-
/**
|
|
753
|
-
* Format: int32
|
|
754
|
-
* @description Number of distinct positions held
|
|
755
|
-
*/
|
|
756
|
-
position_count: number;
|
|
757
|
-
/** @description USD balance (USDe on Polygon) */
|
|
758
|
-
usd_balance?: string | null;
|
|
759
|
-
/**
|
|
760
|
-
* Format: double
|
|
761
|
-
* @description Lifetime realized PnL in USD
|
|
762
|
-
*/
|
|
763
|
-
realized_pnl_usd?: number | null;
|
|
764
|
-
};
|
|
765
|
-
/** @description Event-level PnL data for a holder */
|
|
766
|
-
EventHolderPnl: {
|
|
767
|
-
/** Format: double */
|
|
768
|
-
realized_pnl_usd?: number | null;
|
|
769
|
-
/** Format: double */
|
|
770
|
-
total_volume_usd?: number | null;
|
|
771
|
-
/** Format: double */
|
|
772
|
-
buy_usd?: number | null;
|
|
773
|
-
/** Format: double */
|
|
774
|
-
sell_usd?: number | null;
|
|
775
|
-
/** Format: double */
|
|
776
|
-
total_fees?: number | null;
|
|
777
|
-
/** Format: int64 */
|
|
778
|
-
markets_traded?: number | null;
|
|
779
|
-
/** Format: int64 */
|
|
780
|
-
winning_markets?: number | null;
|
|
781
|
-
/** Format: int64 */
|
|
782
|
-
losing_markets?: number | null;
|
|
783
|
-
/** Format: int64 */
|
|
784
|
-
first_trade_at?: number | null;
|
|
785
|
-
/** Format: int64 */
|
|
786
|
-
last_trade_at?: number | null;
|
|
787
|
-
};
|
|
788
|
-
/** @description Response for event holders endpoint */
|
|
789
|
-
EventHoldersResponse: {
|
|
790
|
-
/** @description Event slug */
|
|
791
|
-
event_slug: string;
|
|
792
|
-
/** @description Event title */
|
|
793
|
-
title?: string | null;
|
|
794
|
-
/**
|
|
795
|
-
* Format: int64
|
|
796
|
-
* @description Total unique holders across all markets (from holder_stats)
|
|
797
|
-
*/
|
|
798
|
-
total_holders: number;
|
|
799
|
-
/** @description Top holders across all markets */
|
|
800
|
-
holders: components["schemas"]["EventHolder"][];
|
|
801
|
-
};
|
|
802
704
|
/** @description Enriched market data for event API responses */
|
|
803
705
|
EventMarket: {
|
|
804
706
|
/** @default */
|
|
@@ -810,14 +712,19 @@ export interface components {
|
|
|
810
712
|
/** @default */
|
|
811
713
|
question: string;
|
|
812
714
|
/** @default */
|
|
813
|
-
|
|
715
|
+
market_slug: string;
|
|
814
716
|
/** @default */
|
|
815
717
|
status: string;
|
|
816
718
|
/**
|
|
817
719
|
* Format: int64
|
|
818
720
|
* @default null
|
|
819
721
|
*/
|
|
820
|
-
|
|
722
|
+
created_time: number | null;
|
|
723
|
+
/**
|
|
724
|
+
* Format: int64
|
|
725
|
+
* @default null
|
|
726
|
+
*/
|
|
727
|
+
end_time: number | null;
|
|
821
728
|
/**
|
|
822
729
|
* Format: double
|
|
823
730
|
* @default null
|
|
@@ -845,13 +752,17 @@ export interface components {
|
|
|
845
752
|
clob_rewards: components["schemas"]["ClobReward"][];
|
|
846
753
|
/** @default [] */
|
|
847
754
|
outcomes: components["schemas"]["EventMarketOutcome"][];
|
|
755
|
+
/** @default null */
|
|
756
|
+
winning_outcome: null | components["schemas"]["EventMarketOutcome"];
|
|
848
757
|
};
|
|
849
|
-
/** @description Market outcome
|
|
758
|
+
/** @description Market outcome for event API responses */
|
|
850
759
|
EventMarketOutcome: {
|
|
851
760
|
name: string;
|
|
852
761
|
/** Format: double */
|
|
853
|
-
|
|
762
|
+
price?: number | null;
|
|
854
763
|
position_id?: string | null;
|
|
764
|
+
/** Format: int32 */
|
|
765
|
+
outcome_index?: number | null;
|
|
855
766
|
};
|
|
856
767
|
/** @description Response type for event metrics query */
|
|
857
768
|
EventMetricsResponse: {
|
|
@@ -1051,10 +962,74 @@ export interface components {
|
|
|
1051
962
|
};
|
|
1052
963
|
/** @enum {string} */
|
|
1053
964
|
MarketPnlSortBy: "realized_pnl_usd" | "buy_usd" | "total_buys" | "total_fees" | "outcomes_traded";
|
|
965
|
+
/** @description Formatted market response with structured metrics, tags, outcomes, and event */
|
|
966
|
+
MarketResponse: {
|
|
967
|
+
condition_id: string;
|
|
968
|
+
id?: string | null;
|
|
969
|
+
market_slug?: string | null;
|
|
970
|
+
question?: string | null;
|
|
971
|
+
title?: string | null;
|
|
972
|
+
description?: string | null;
|
|
973
|
+
image_url?: string | null;
|
|
974
|
+
oracle?: string | null;
|
|
975
|
+
status: string;
|
|
976
|
+
/** Format: int64 */
|
|
977
|
+
created_time?: number | null;
|
|
978
|
+
/** Format: int64 */
|
|
979
|
+
start_time?: number | null;
|
|
980
|
+
/** Format: int64 */
|
|
981
|
+
game_start_time?: number | null;
|
|
982
|
+
/** Format: int64 */
|
|
983
|
+
closed_time?: number | null;
|
|
984
|
+
/** Format: int64 */
|
|
985
|
+
end_time?: number | null;
|
|
986
|
+
accepting_orders?: boolean | null;
|
|
987
|
+
uma_resolution_status?: string | null;
|
|
988
|
+
is_neg_risk?: boolean | null;
|
|
989
|
+
market_maker_address?: string | null;
|
|
990
|
+
creator?: string | null;
|
|
991
|
+
category?: string | null;
|
|
992
|
+
/** Format: double */
|
|
993
|
+
volume_usd?: number | null;
|
|
994
|
+
/** Format: double */
|
|
995
|
+
liquidity_usd?: number | null;
|
|
996
|
+
/** Format: double */
|
|
997
|
+
highest_probability?: number | null;
|
|
998
|
+
/** Format: int64 */
|
|
999
|
+
total_holders?: number | null;
|
|
1000
|
+
winning_outcome?: null | components["schemas"]["MarketOutcome"];
|
|
1001
|
+
outcomes?: components["schemas"]["MarketOutcome"][];
|
|
1002
|
+
rewards?: components["schemas"]["MarketReward"][];
|
|
1003
|
+
clob_rewards?: components["schemas"]["ClobReward"][];
|
|
1004
|
+
tags?: string[];
|
|
1005
|
+
event_slug?: string | null;
|
|
1006
|
+
resolution_source?: string | null;
|
|
1007
|
+
metrics?: {
|
|
1008
|
+
[key: string]: components["schemas"]["SimpleTimeframeMetrics"];
|
|
1009
|
+
};
|
|
1010
|
+
};
|
|
1011
|
+
/** @description Reward info for market API responses */
|
|
1012
|
+
MarketReward: {
|
|
1013
|
+
/**
|
|
1014
|
+
* Format: double
|
|
1015
|
+
* @default null
|
|
1016
|
+
*/
|
|
1017
|
+
min_size: number | null;
|
|
1018
|
+
/**
|
|
1019
|
+
* Format: double
|
|
1020
|
+
* @default null
|
|
1021
|
+
*/
|
|
1022
|
+
max_spread: number | null;
|
|
1023
|
+
/**
|
|
1024
|
+
* Format: double
|
|
1025
|
+
* @default null
|
|
1026
|
+
*/
|
|
1027
|
+
daily_rate: number | null;
|
|
1028
|
+
};
|
|
1054
1029
|
/** @enum {string} */
|
|
1055
1030
|
MarketSortBy: "volume" | "txns" | "unique_traders" | "liquidity" | "holders" | "end_time" | "start_time" | "created_time" | "created_at" | "relevance";
|
|
1056
1031
|
/** @enum {string} */
|
|
1057
|
-
MarketStatus: "open" | "closed";
|
|
1032
|
+
MarketStatus: "open" | "closed" | "all";
|
|
1058
1033
|
MarketVolumeChartResponse: {
|
|
1059
1034
|
volumes: components["schemas"]["MarketVolumeDataPoint"][];
|
|
1060
1035
|
has_more: boolean;
|
|
@@ -1194,7 +1169,7 @@ export interface components {
|
|
|
1194
1169
|
/** @default */
|
|
1195
1170
|
id: string;
|
|
1196
1171
|
/** @default null */
|
|
1197
|
-
|
|
1172
|
+
event_slug: string | null;
|
|
1198
1173
|
/** @default null */
|
|
1199
1174
|
title: string | null;
|
|
1200
1175
|
/** @default null */
|
|
@@ -1216,12 +1191,12 @@ export interface components {
|
|
|
1216
1191
|
* Format: int64
|
|
1217
1192
|
* @default null
|
|
1218
1193
|
*/
|
|
1219
|
-
|
|
1194
|
+
start_time: number | null;
|
|
1220
1195
|
/**
|
|
1221
1196
|
* Format: int64
|
|
1222
1197
|
* @default null
|
|
1223
1198
|
*/
|
|
1224
|
-
|
|
1199
|
+
end_time: number | null;
|
|
1225
1200
|
/** @default false */
|
|
1226
1201
|
neg_risk: boolean;
|
|
1227
1202
|
/** @default null */
|
|
@@ -1249,7 +1224,7 @@ export interface components {
|
|
|
1249
1224
|
* Format: int64
|
|
1250
1225
|
* @default null
|
|
1251
1226
|
*/
|
|
1252
|
-
|
|
1227
|
+
created_time: number | null;
|
|
1253
1228
|
/**
|
|
1254
1229
|
* Format: int64
|
|
1255
1230
|
* @default null
|
|
@@ -1407,8 +1382,6 @@ export interface components {
|
|
|
1407
1382
|
/** Format: double */
|
|
1408
1383
|
price_close: number;
|
|
1409
1384
|
};
|
|
1410
|
-
/** @enum {string} */
|
|
1411
|
-
PositionStatus: "active" | "resolved" | "all";
|
|
1412
1385
|
PositionVolumeChartResponse: {
|
|
1413
1386
|
volumes: components["schemas"]["PositionVolumeDataPoint"][];
|
|
1414
1387
|
has_more: boolean;
|
|
@@ -1447,10 +1420,6 @@ export interface components {
|
|
|
1447
1420
|
/** Format: double */
|
|
1448
1421
|
m?: number | null;
|
|
1449
1422
|
};
|
|
1450
|
-
PredictionCandlestickResponseData: {
|
|
1451
|
-
candles: components["schemas"]["PredictionCandlestickBar"][];
|
|
1452
|
-
has_more: boolean;
|
|
1453
|
-
};
|
|
1454
1423
|
/** @description Response format for prediction trades */
|
|
1455
1424
|
PredictionTradeResponse: {
|
|
1456
1425
|
id: string;
|
|
@@ -1545,7 +1514,7 @@ export interface components {
|
|
|
1545
1514
|
/** @enum {string} */
|
|
1546
1515
|
TradeSide: "0" | "1";
|
|
1547
1516
|
/** @enum {string} */
|
|
1548
|
-
TradeType: "0" | "1" | "2";
|
|
1517
|
+
TradeType: "0" | "1" | "2" | "4";
|
|
1549
1518
|
/**
|
|
1550
1519
|
* @description Trader profile info embedded in API responses
|
|
1551
1520
|
*
|
|
@@ -1605,19 +1574,19 @@ export interface operations {
|
|
|
1605
1574
|
get_events: {
|
|
1606
1575
|
parameters: {
|
|
1607
1576
|
query?: {
|
|
1608
|
-
/** @description Filter by event ID(s) - comma-separated (max 50). Cannot be used with '
|
|
1577
|
+
/** @description Filter by event ID(s) - comma-separated (max 50). Cannot be used with 'event_slugs'. Example: id=99600,99601,99583 */
|
|
1609
1578
|
id?: string;
|
|
1610
|
-
/** @description Filter by event slug(s) - comma-separated (max 50). Cannot be used with 'id'. Example:
|
|
1611
|
-
|
|
1579
|
+
/** @description Filter by event slug(s) - comma-separated (max 50). Cannot be used with 'id'. Example: event_slugs=will-trump-win,bitcoin-100k */
|
|
1580
|
+
event_slugs?: string;
|
|
1612
1581
|
/** @description Search in title and description (3-100 characters). Example: search=trump */
|
|
1613
1582
|
search?: string;
|
|
1614
|
-
/** @description Sort: volume, txns, unique_traders, title, creation_date, start_date, end_date, relevance (relevance only works in search mode) */
|
|
1583
|
+
/** @description Sort: volume, txns, unique_traders, title, creation_date, start_date, end_date, relevance (relevance only works in search mode) (default: volume) */
|
|
1615
1584
|
sort_by?: components["schemas"]["EventSortBy"];
|
|
1616
|
-
/** @description Sort direction: asc, desc */
|
|
1585
|
+
/** @description Sort direction: asc, desc (default: desc) */
|
|
1617
1586
|
sort_dir?: components["schemas"]["SortDirection"];
|
|
1618
|
-
/** @description Metrics timeframe: 1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d */
|
|
1587
|
+
/** @description Metrics timeframe: 1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d (default: 24h) */
|
|
1619
1588
|
timeframe?: components["schemas"]["MetricsTimeframe"];
|
|
1620
|
-
/** @description Filter by status: open or
|
|
1589
|
+
/** @description Filter by status: open, closed, or all (default: all) */
|
|
1621
1590
|
status?: components["schemas"]["MarketStatus"];
|
|
1622
1591
|
/** @description Comma-separated category filters */
|
|
1623
1592
|
categories?: string;
|
|
@@ -1656,7 +1625,7 @@ export interface operations {
|
|
|
1656
1625
|
};
|
|
1657
1626
|
requestBody?: never;
|
|
1658
1627
|
responses: {
|
|
1659
|
-
/** @description List of Polymarket events with nested tags, markets, and series */
|
|
1628
|
+
/** @description List of Polymarket events with nested tags, markets, and series. Response includes `pagination: { has_more, pagination_key }` for cursor-based pagination. */
|
|
1660
1629
|
200: {
|
|
1661
1630
|
headers: {
|
|
1662
1631
|
[name: string]: unknown;
|
|
@@ -1713,80 +1682,6 @@ export interface operations {
|
|
|
1713
1682
|
};
|
|
1714
1683
|
};
|
|
1715
1684
|
};
|
|
1716
|
-
get_event_holders: {
|
|
1717
|
-
parameters: {
|
|
1718
|
-
query?: {
|
|
1719
|
-
/** @description Results limit (default: 10, max: 100) */
|
|
1720
|
-
limit?: number;
|
|
1721
|
-
/** @description Cursor-based pagination key (base64-encoded, obtained from previous response's pagination.pagination_key) */
|
|
1722
|
-
pagination_key?: string;
|
|
1723
|
-
/** @description Minimum total shares held (decimal string) */
|
|
1724
|
-
min_shares?: string;
|
|
1725
|
-
/** @description Maximum total shares held (decimal string) */
|
|
1726
|
-
max_shares?: string;
|
|
1727
|
-
/** @description PnL timeframe: 1d, 7d, 30d, lifetime (default: lifetime) */
|
|
1728
|
-
timeframe?: components["schemas"]["PnlTimeframe"];
|
|
1729
|
-
};
|
|
1730
|
-
header?: never;
|
|
1731
|
-
path: {
|
|
1732
|
-
/** @description Event slug */
|
|
1733
|
-
event_slug: string;
|
|
1734
|
-
};
|
|
1735
|
-
cookie?: never;
|
|
1736
|
-
};
|
|
1737
|
-
requestBody?: never;
|
|
1738
|
-
responses: {
|
|
1739
|
-
/** @description Event holders aggregated across markets (sorted by total_shares DESC) */
|
|
1740
|
-
200: {
|
|
1741
|
-
headers: {
|
|
1742
|
-
[name: string]: unknown;
|
|
1743
|
-
};
|
|
1744
|
-
content: {
|
|
1745
|
-
"application/json": components["schemas"]["EventHoldersResponse"];
|
|
1746
|
-
};
|
|
1747
|
-
};
|
|
1748
|
-
/** @description Event not found */
|
|
1749
|
-
404: {
|
|
1750
|
-
headers: {
|
|
1751
|
-
[name: string]: unknown;
|
|
1752
|
-
};
|
|
1753
|
-
content?: never;
|
|
1754
|
-
};
|
|
1755
|
-
};
|
|
1756
|
-
};
|
|
1757
|
-
get_event_holders_history: {
|
|
1758
|
-
parameters: {
|
|
1759
|
-
query?: {
|
|
1760
|
-
/** @description Time range in hours (default: 24, max: 336 = 14 days) */
|
|
1761
|
-
hours?: number;
|
|
1762
|
-
};
|
|
1763
|
-
header?: never;
|
|
1764
|
-
path: {
|
|
1765
|
-
/** @description Event slug */
|
|
1766
|
-
event_slug: string;
|
|
1767
|
-
};
|
|
1768
|
-
cookie?: never;
|
|
1769
|
-
};
|
|
1770
|
-
requestBody?: never;
|
|
1771
|
-
responses: {
|
|
1772
|
-
/** @description Event holder count history with automatic view selection (1m/5m/15m/1h/6h buckets) */
|
|
1773
|
-
200: {
|
|
1774
|
-
headers: {
|
|
1775
|
-
[name: string]: unknown;
|
|
1776
|
-
};
|
|
1777
|
-
content: {
|
|
1778
|
-
"application/json": components["schemas"]["HolderHistoryCandle"][];
|
|
1779
|
-
};
|
|
1780
|
-
};
|
|
1781
|
-
/** @description Event not found */
|
|
1782
|
-
404: {
|
|
1783
|
-
headers: {
|
|
1784
|
-
[name: string]: unknown;
|
|
1785
|
-
};
|
|
1786
|
-
content?: never;
|
|
1787
|
-
};
|
|
1788
|
-
};
|
|
1789
|
-
};
|
|
1790
1685
|
get_market_holders: {
|
|
1791
1686
|
parameters: {
|
|
1792
1687
|
query?: {
|
|
@@ -1880,7 +1775,7 @@ export interface operations {
|
|
|
1880
1775
|
};
|
|
1881
1776
|
requestBody?: never;
|
|
1882
1777
|
responses: {
|
|
1883
|
-
/** @description Position holders (sorted by shares DESC) */
|
|
1778
|
+
/** @description Position holders (sorted by shares DESC). Response includes `pagination: { has_more, pagination_key }` for cursor-based pagination. */
|
|
1884
1779
|
200: {
|
|
1885
1780
|
headers: {
|
|
1886
1781
|
[name: string]: unknown;
|
|
@@ -1948,7 +1843,7 @@ export interface operations {
|
|
|
1948
1843
|
position_ids?: string;
|
|
1949
1844
|
/** @description Search in title (3-100 characters) */
|
|
1950
1845
|
search?: string;
|
|
1951
|
-
/** @description Filter by status: open or
|
|
1846
|
+
/** @description Filter by status: open, closed, or all (default: all) */
|
|
1952
1847
|
status?: components["schemas"]["MarketStatus"];
|
|
1953
1848
|
/** @description Sort: volume, txns, unique_traders, liquidity, holders, end_time, start_time, created_time, created_at, relevance */
|
|
1954
1849
|
sort_by?: components["schemas"]["MarketSortBy"];
|
|
@@ -1994,7 +1889,7 @@ export interface operations {
|
|
|
1994
1889
|
include_event?: boolean;
|
|
1995
1890
|
/** @description Include all timeframe metrics (default: true) */
|
|
1996
1891
|
include_metrics?: boolean;
|
|
1997
|
-
/** @description Results limit (default:
|
|
1892
|
+
/** @description Results limit (default: 10, max: 100) */
|
|
1998
1893
|
limit?: number;
|
|
1999
1894
|
/** @description Cursor-based pagination key (base64-encoded, obtained from previous response's pagination.pagination_key) */
|
|
2000
1895
|
pagination_key?: string;
|
|
@@ -2005,7 +1900,7 @@ export interface operations {
|
|
|
2005
1900
|
};
|
|
2006
1901
|
requestBody?: never;
|
|
2007
1902
|
responses: {
|
|
2008
|
-
/** @description List of markets with metadata, outcomes, tags, event, and metrics */
|
|
1903
|
+
/** @description List of markets with metadata, outcomes, tags, event, and metrics. Response includes `pagination: { has_more, pagination_key }` for cursor-based pagination. */
|
|
2009
1904
|
200: {
|
|
2010
1905
|
headers: {
|
|
2011
1906
|
[name: string]: unknown;
|
|
@@ -2028,7 +1923,7 @@ export interface operations {
|
|
|
2028
1923
|
min_probability?: number;
|
|
2029
1924
|
/** @description Maximum hours until market end */
|
|
2030
1925
|
max_hours?: number;
|
|
2031
|
-
/** @description Number of results (default: 10, max:
|
|
1926
|
+
/** @description Number of results (default: 10, max: 250) */
|
|
2032
1927
|
limit?: number;
|
|
2033
1928
|
/** @description Cursor for pagination: end_date (unix epoch) of the last item from the previous page */
|
|
2034
1929
|
pagination_key?: number;
|
|
@@ -2076,7 +1971,7 @@ export interface operations {
|
|
|
2076
1971
|
[name: string]: unknown;
|
|
2077
1972
|
};
|
|
2078
1973
|
content: {
|
|
2079
|
-
"application/json": components["schemas"]["
|
|
1974
|
+
"application/json": components["schemas"]["PredictionCandlestickBar"][];
|
|
2080
1975
|
};
|
|
2081
1976
|
};
|
|
2082
1977
|
};
|
|
@@ -2146,7 +2041,7 @@ export interface operations {
|
|
|
2146
2041
|
[name: string]: unknown;
|
|
2147
2042
|
};
|
|
2148
2043
|
content: {
|
|
2149
|
-
"application/json": components["schemas"]["
|
|
2044
|
+
"application/json": components["schemas"]["PredictionCandlestickBar"][];
|
|
2150
2045
|
};
|
|
2151
2046
|
};
|
|
2152
2047
|
};
|
|
@@ -2515,7 +2410,7 @@ export interface operations {
|
|
|
2515
2410
|
};
|
|
2516
2411
|
requestBody?: never;
|
|
2517
2412
|
responses: {
|
|
2518
|
-
/** @description Global PnL leaderboard with trader stats */
|
|
2413
|
+
/** @description Global PnL leaderboard with trader stats. Response includes `pagination: { has_more, pagination_key }` for cursor-based pagination. */
|
|
2519
2414
|
200: {
|
|
2520
2415
|
headers: {
|
|
2521
2416
|
[name: string]: unknown;
|
|
@@ -2546,7 +2441,9 @@ export interface operations {
|
|
|
2546
2441
|
headers: {
|
|
2547
2442
|
[name: string]: unknown;
|
|
2548
2443
|
};
|
|
2549
|
-
content
|
|
2444
|
+
content: {
|
|
2445
|
+
"application/json": components["schemas"]["GlobalPnlTrader"];
|
|
2446
|
+
};
|
|
2550
2447
|
};
|
|
2551
2448
|
/** @description Trader not found */
|
|
2552
2449
|
404: {
|
|
@@ -2612,7 +2509,7 @@ export interface operations {
|
|
|
2612
2509
|
};
|
|
2613
2510
|
requestBody?: never;
|
|
2614
2511
|
responses: {
|
|
2615
|
-
/** @description Event-level PnL entries for this trader */
|
|
2512
|
+
/** @description Event-level PnL entries for this trader. Response includes `pagination: { has_more, pagination_key }` for offset-based pagination. */
|
|
2616
2513
|
200: {
|
|
2617
2514
|
headers: {
|
|
2618
2515
|
[name: string]: unknown;
|
|
@@ -2648,7 +2545,7 @@ export interface operations {
|
|
|
2648
2545
|
};
|
|
2649
2546
|
requestBody?: never;
|
|
2650
2547
|
responses: {
|
|
2651
|
-
/** @description Market-level PnL entries for this trader */
|
|
2548
|
+
/** @description Market-level PnL entries for this trader. Response includes `pagination: { has_more, pagination_key }` for offset-based pagination. */
|
|
2652
2549
|
200: {
|
|
2653
2550
|
headers: {
|
|
2654
2551
|
[name: string]: unknown;
|
|
@@ -2672,7 +2569,7 @@ export interface operations {
|
|
|
2672
2569
|
};
|
|
2673
2570
|
requestBody?: never;
|
|
2674
2571
|
responses: {
|
|
2675
|
-
/** @description Full portfolio with stats, positions, and PnL chart */
|
|
2572
|
+
/** @description Full portfolio with stats, positions, and PnL chart. Positions include `pagination: { has_more, pagination_key }` for offset-based pagination. */
|
|
2676
2573
|
200: {
|
|
2677
2574
|
headers: {
|
|
2678
2575
|
[name: string]: unknown;
|
|
@@ -2706,7 +2603,7 @@ export interface operations {
|
|
|
2706
2603
|
};
|
|
2707
2604
|
requestBody?: never;
|
|
2708
2605
|
responses: {
|
|
2709
|
-
/** @description Trader positions with market metadata and PnL */
|
|
2606
|
+
/** @description Trader positions with market metadata and PnL. Response includes `pagination: { has_more, pagination_key }` for offset-based pagination. */
|
|
2710
2607
|
200: {
|
|
2711
2608
|
headers: {
|
|
2712
2609
|
[name: string]: unknown;
|
|
@@ -2732,7 +2629,9 @@ export interface operations {
|
|
|
2732
2629
|
headers: {
|
|
2733
2630
|
[name: string]: unknown;
|
|
2734
2631
|
};
|
|
2735
|
-
content
|
|
2632
|
+
content: {
|
|
2633
|
+
"application/json": components["schemas"]["PolymarketUserProfile"];
|
|
2634
|
+
};
|
|
2736
2635
|
};
|
|
2737
2636
|
/** @description Profile not found */
|
|
2738
2637
|
404: {
|
|
@@ -2760,7 +2659,9 @@ export interface operations {
|
|
|
2760
2659
|
headers: {
|
|
2761
2660
|
[name: string]: unknown;
|
|
2762
2661
|
};
|
|
2763
|
-
content
|
|
2662
|
+
content: {
|
|
2663
|
+
"application/json": components["schemas"]["PolymarketUserProfile"][];
|
|
2664
|
+
};
|
|
2764
2665
|
};
|
|
2765
2666
|
/** @description Invalid request (empty addresses or more than 20) */
|
|
2766
2667
|
400: {
|
package/dist/index.cjs
CHANGED
|
@@ -241,7 +241,8 @@ class HttpClient {
|
|
|
241
241
|
data: body.data,
|
|
242
242
|
message: body.message ?? null,
|
|
243
243
|
success: body.success,
|
|
244
|
-
info: body.info
|
|
244
|
+
info: body.info,
|
|
245
|
+
pagination: body.pagination
|
|
245
246
|
};
|
|
246
247
|
}
|
|
247
248
|
return { data: body, message: null, success: true };
|
|
@@ -332,10 +333,6 @@ class HoldersNamespace extends Namespace {
|
|
|
332
333
|
const { conditionId, ...query } = params;
|
|
333
334
|
return this.get(venue, `/holders/markets/${encodeURIComponent(conditionId)}`, { params: query });
|
|
334
335
|
}
|
|
335
|
-
async getEventHolders(params, venue) {
|
|
336
|
-
const { eventSlug, ...query } = params;
|
|
337
|
-
return this.get(venue, `/holders/events/${encodeURIComponent(eventSlug)}`, { params: query });
|
|
338
|
-
}
|
|
339
336
|
async getPositionHolders(params, venue) {
|
|
340
337
|
const { positionId, ...query } = params;
|
|
341
338
|
return this.get(venue, `/holders/positions/${encodeURIComponent(positionId)}`, { params: query });
|
|
@@ -344,10 +341,6 @@ class HoldersNamespace extends Namespace {
|
|
|
344
341
|
const { conditionId, ...query } = params;
|
|
345
342
|
return this.get(venue, `/holders/markets/${encodeURIComponent(conditionId)}/history`, { params: query });
|
|
346
343
|
}
|
|
347
|
-
async getEventHoldersHistory(params, venue) {
|
|
348
|
-
const { eventSlug, ...query } = params;
|
|
349
|
-
return this.get(venue, `/holders/events/${encodeURIComponent(eventSlug)}/history`, { params: query });
|
|
350
|
-
}
|
|
351
344
|
async getPositionHoldersHistory(params, venue) {
|
|
352
345
|
const { positionId, ...query } = params;
|
|
353
346
|
return this.get(venue, `/holders/positions/${encodeURIComponent(positionId)}/history`, { params: query });
|
|
@@ -932,5 +925,5 @@ async function* paginate(fetcher, params, pageSize = DEFAULT_PAGE_SIZE) {
|
|
|
932
925
|
}
|
|
933
926
|
}
|
|
934
927
|
|
|
935
|
-
//# debugId=
|
|
928
|
+
//# debugId=F7A181E2EFA4BE4264756E2164756E21
|
|
936
929
|
//# sourceMappingURL=index.js.map
|