@structbuild/sdk 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -252,7 +252,7 @@ export interface paths {
252
252
  };
253
253
  /**
254
254
  * Get bonds
255
- * @description Retrieve a list of bond markets sorted by yield, filtered by probability and time to expiry
255
+ * @description Retrieve bond markets with sorting, probability range filter, and offset pagination
256
256
  */
257
257
  get: operations["get_bonds"];
258
258
  put?: never;
@@ -412,7 +412,7 @@ export interface paths {
412
412
  };
413
413
  /**
414
414
  * Get market by slug
415
- * @description Retrieve a single market by its slug with optional nested tags, event, and metrics
415
+ * @description Retrieve one or more markets by slug. Supports batch lookups via query params. Returns an array of MarketResponse objects.
416
416
  */
417
417
  get: operations["get_market_by_slug"];
418
418
  put?: never;
@@ -472,7 +472,7 @@ export interface paths {
472
472
  };
473
473
  /**
474
474
  * Get market by condition ID
475
- * @description Retrieve a single market by its condition ID with optional nested tags, event, and metrics
475
+ * @description Retrieve one or more markets by condition ID. Supports batch lookups via query params. Returns an array of MarketResponse objects.
476
476
  */
477
477
  get: operations["get_market"];
478
478
  put?: never;
@@ -623,6 +623,26 @@ export interface paths {
623
623
  patch?: never;
624
624
  trace?: never;
625
625
  };
626
+ "/polymarket/series/{identifier}/events": {
627
+ parameters: {
628
+ query?: never;
629
+ header?: never;
630
+ path?: never;
631
+ cookie?: never;
632
+ };
633
+ /**
634
+ * Get series events
635
+ * @description Returns a paginated list of events belonging to a specific Polymarket series, with full market data for each event.
636
+ */
637
+ get: operations["get_series_events"];
638
+ put?: never;
639
+ post?: never;
640
+ delete?: never;
641
+ options?: never;
642
+ head?: never;
643
+ patch?: never;
644
+ trace?: never;
645
+ };
626
646
  "/polymarket/tags": {
627
647
  parameters: {
628
648
  query?: never;
@@ -632,7 +652,7 @@ export interface paths {
632
652
  };
633
653
  /**
634
654
  * Get tags
635
- * @description Retrieve all available event tags/categories. Uses cursor-based pagination for efficient traversal.
655
+ * @description Retrieve all available event tags/categories. Supports both cursor-based and offset-based pagination.
636
656
  */
637
657
  get: operations["get_tags"];
638
658
  put?: never;
@@ -892,13 +912,15 @@ export interface components {
892
912
  id: string;
893
913
  hash: string;
894
914
  /** Format: int64 */
895
- block: number;
915
+ block?: number | null;
896
916
  /** Format: int64 */
897
- confirmed_at: number;
917
+ confirmed_at?: number | null;
898
918
  /** Format: int64 */
899
- log_index: number;
919
+ received_at?: number | null;
900
920
  /** Format: int64 */
901
- block_index: number;
921
+ log_index?: number | null;
922
+ /** Format: int64 */
923
+ block_index?: number | null;
902
924
  trader: components["schemas"]["TraderInfo"];
903
925
  operator: string;
904
926
  approved: boolean;
@@ -913,13 +935,15 @@ export interface components {
913
935
  id: string;
914
936
  hash: string;
915
937
  /** Format: int64 */
916
- block: number;
938
+ block?: number | null;
939
+ /** Format: int64 */
940
+ confirmed_at?: number | null;
917
941
  /** Format: int64 */
918
- confirmed_at: number;
942
+ received_at?: number | null;
919
943
  /** Format: int64 */
920
- log_index: number;
944
+ log_index?: number | null;
921
945
  /** Format: int64 */
922
- block_index: number;
946
+ block_index?: number | null;
923
947
  oracle_contract: string;
924
948
  assertion_id: string;
925
949
  caller: string;
@@ -935,13 +959,15 @@ export interface components {
935
959
  id: string;
936
960
  hash: string;
937
961
  /** Format: int64 */
938
- block: number;
962
+ block?: number | null;
939
963
  /** Format: int64 */
940
- confirmed_at: number;
964
+ confirmed_at?: number | null;
941
965
  /** Format: int64 */
942
- log_index: number;
966
+ received_at?: number | null;
943
967
  /** Format: int64 */
944
- block_index: number;
968
+ log_index?: number | null;
969
+ /** Format: int64 */
970
+ block_index?: number | null;
945
971
  oracle_contract: string;
946
972
  assertion_id: string;
947
973
  domain_id: string;
@@ -967,13 +993,15 @@ export interface components {
967
993
  id: string;
968
994
  hash: string;
969
995
  /** Format: int64 */
970
- block: number;
996
+ block?: number | null;
997
+ /** Format: int64 */
998
+ confirmed_at?: number | null;
971
999
  /** Format: int64 */
972
- confirmed_at: number;
1000
+ received_at?: number | null;
973
1001
  /** Format: int64 */
974
- log_index: number;
1002
+ log_index?: number | null;
975
1003
  /** Format: int64 */
976
- block_index: number;
1004
+ block_index?: number | null;
977
1005
  oracle_contract: string;
978
1006
  assertion_id: string;
979
1007
  bond_recipient: string;
@@ -1037,6 +1065,8 @@ export interface components {
1037
1065
  apy: number;
1038
1066
  /** Format: double */
1039
1067
  volume_24h?: number | null;
1068
+ /** Format: double */
1069
+ liquidity?: number | null;
1040
1070
  outcomes: components["schemas"]["BondOutcome"][];
1041
1071
  };
1042
1072
  BondOutcome: {
@@ -1052,14 +1082,16 @@ export interface components {
1052
1082
  id: string;
1053
1083
  hash: string;
1054
1084
  /** Format: int64 */
1055
- block: number;
1085
+ block?: number | null;
1086
+ /** Format: int64 */
1087
+ confirmed_at?: number | null;
1056
1088
  /** Format: int64 */
1057
- confirmed_at: number;
1089
+ received_at?: number | null;
1058
1090
  /** Format: int64 */
1059
- log_index: number;
1091
+ log_index?: number | null;
1060
1092
  /** Format: int64 */
1061
- block_index: number;
1062
- order_hash: string;
1093
+ block_index?: number | null;
1094
+ order_hash?: string | null;
1063
1095
  question?: string | null;
1064
1096
  image_url?: string | null;
1065
1097
  slug?: string | null;
@@ -1137,13 +1169,15 @@ export interface components {
1137
1169
  id: string;
1138
1170
  hash: string;
1139
1171
  /** Format: int64 */
1140
- block: number;
1172
+ block?: number | null;
1141
1173
  /** Format: int64 */
1142
- confirmed_at: number;
1174
+ confirmed_at?: number | null;
1143
1175
  /** Format: int64 */
1144
- log_index: number;
1176
+ received_at?: number | null;
1145
1177
  /** Format: int64 */
1146
- block_index: number;
1178
+ log_index?: number | null;
1179
+ /** Format: int64 */
1180
+ block_index?: number | null;
1147
1181
  oracle_contract: string;
1148
1182
  condition_id: string;
1149
1183
  oracle: string;
@@ -1390,6 +1424,18 @@ export interface components {
1390
1424
  * @default null
1391
1425
  */
1392
1426
  outcome_index: number | null;
1427
+ /**
1428
+ * Format: int64
1429
+ * @description Block of the most recent price update for this outcome.
1430
+ * @default null
1431
+ */
1432
+ latest_block: number | null;
1433
+ /**
1434
+ * Format: int64
1435
+ * @description Unix-seconds timestamp of the most recent price update.
1436
+ * @default null
1437
+ */
1438
+ latest_confirmed_at: number | null;
1393
1439
  };
1394
1440
  /** @enum {string} */
1395
1441
  MarketPnlSortBy: "realized_pnl_usd" | "buy_usd" | "total_buys" | "total_fees" | "outcomes_traded" | "realized_pnl_pct";
@@ -1471,13 +1517,15 @@ export interface components {
1471
1517
  id: string;
1472
1518
  hash: string;
1473
1519
  /** Format: int64 */
1474
- block: number;
1520
+ block?: number | null;
1475
1521
  /** Format: int64 */
1476
- confirmed_at: number;
1522
+ confirmed_at?: number | null;
1477
1523
  /** Format: int64 */
1478
- log_index: number;
1524
+ received_at?: number | null;
1479
1525
  /** Format: int64 */
1480
- block_index: number;
1526
+ log_index?: number | null;
1527
+ /** Format: int64 */
1528
+ block_index?: number | null;
1481
1529
  trader: components["schemas"]["TraderInfo"];
1482
1530
  condition_id?: string | null;
1483
1531
  question?: string | null;
@@ -1497,13 +1545,15 @@ export interface components {
1497
1545
  id: string;
1498
1546
  hash: string;
1499
1547
  /** Format: int64 */
1500
- block: number;
1548
+ block?: number | null;
1549
+ /** Format: int64 */
1550
+ confirmed_at?: number | null;
1501
1551
  /** Format: int64 */
1502
- confirmed_at: number;
1552
+ received_at?: number | null;
1503
1553
  /** Format: int64 */
1504
- log_index: number;
1554
+ log_index?: number | null;
1505
1555
  /** Format: int64 */
1506
- block_index: number;
1556
+ block_index?: number | null;
1507
1557
  oracle_contract: string;
1508
1558
  condition_id: string;
1509
1559
  proposed_outcome?: string | null;
@@ -1517,16 +1567,18 @@ export interface components {
1517
1567
  id: string;
1518
1568
  hash: string;
1519
1569
  /** Format: int64 */
1520
- block: number;
1570
+ block?: number | null;
1521
1571
  /** Format: int64 */
1522
- confirmed_at: number;
1572
+ confirmed_at?: number | null;
1523
1573
  /** Format: int64 */
1524
- log_index: number;
1574
+ received_at?: number | null;
1525
1575
  /** Format: int64 */
1526
- block_index: number;
1527
- order_hash: string;
1576
+ log_index?: number | null;
1577
+ /** Format: int64 */
1578
+ block_index?: number | null;
1579
+ order_hash?: string | null;
1528
1580
  trader: components["schemas"]["TraderInfo"];
1529
- taker: string;
1581
+ taker?: string | null;
1530
1582
  side: string;
1531
1583
  condition_id?: string | null;
1532
1584
  position_id: string;
@@ -1546,11 +1598,11 @@ export interface components {
1546
1598
  /** Format: double */
1547
1599
  probability?: number | null;
1548
1600
  /** Format: double */
1549
- fee: number;
1601
+ fee?: number | null;
1550
1602
  /** Format: double */
1551
- fee_shares: number;
1603
+ fee_shares?: number | null;
1552
1604
  /** Format: double */
1553
- fee_pct: number;
1605
+ fee_pct?: number | null;
1554
1606
  exchange: components["schemas"]["PolymarketExchange"];
1555
1607
  };
1556
1608
  OrderbookHistoryRow: {
@@ -1907,6 +1959,8 @@ export interface components {
1907
1959
  * @description Outcome index (0 = Yes, 1 = No for binary)
1908
1960
  */
1909
1961
  outcome_index: number;
1962
+ /** @description Outcome name (e.g. "Yes", "No") — enriched from market metadata */
1963
+ outcome?: string | null;
1910
1964
  /** @description Amount of shares created/burned/redeemed for this position */
1911
1965
  amount: string;
1912
1966
  };
@@ -1967,7 +2021,7 @@ export interface components {
1967
2021
  price_close: number;
1968
2022
  };
1969
2023
  /** @enum {string} */
1970
- PositionPnlSortBy: "realized_pnl_usd" | "buy_usd" | "sell_usd" | "redemption_usd" | "total_buys" | "total_sells" | "total_shares_bought" | "total_shares_sold" | "avg_entry_price" | "avg_exit_price" | "total_fees" | "first_trade_at" | "last_trade_at" | "current_value" | "realized_pnl_pct" | "title";
2024
+ PositionPnlSortBy: "realized_pnl_usd" | "total_buy_usd" | "total_sell_usd" | "redemption_usd" | "total_buys" | "total_sells" | "total_shares_bought" | "total_shares_sold" | "avg_entry_price" | "avg_exit_price" | "total_fees" | "first_trade_at" | "last_trade_at" | "current_value" | "realized_pnl_pct" | "title";
1971
2025
  /**
1972
2026
  * @description Position status filter for open/closed positions.
1973
2027
  * @enum {string}
@@ -2001,13 +2055,15 @@ export interface components {
2001
2055
  id: string;
2002
2056
  hash: string;
2003
2057
  /** Format: int64 */
2004
- block: number;
2058
+ block?: number | null;
2005
2059
  /** Format: int64 */
2006
- confirmed_at: number;
2060
+ confirmed_at?: number | null;
2007
2061
  /** Format: int64 */
2008
- log_index: number;
2062
+ received_at?: number | null;
2009
2063
  /** Format: int64 */
2010
- block_index: number;
2064
+ log_index?: number | null;
2065
+ /** Format: int64 */
2066
+ block_index?: number | null;
2011
2067
  trader: components["schemas"]["TraderInfo"];
2012
2068
  /** @description NegRisk umbrella market ID */
2013
2069
  market_id: string;
@@ -2058,13 +2114,15 @@ export interface components {
2058
2114
  id: string;
2059
2115
  hash: string;
2060
2116
  /** Format: int64 */
2061
- block: number;
2117
+ block?: number | null;
2118
+ /** Format: int64 */
2119
+ confirmed_at?: number | null;
2062
2120
  /** Format: int64 */
2063
- confirmed_at: number;
2121
+ received_at?: number | null;
2064
2122
  /** Format: int64 */
2065
- log_index: number;
2123
+ log_index?: number | null;
2066
2124
  /** Format: int64 */
2067
- block_index: number;
2125
+ block_index?: number | null;
2068
2126
  oracle_contract: string;
2069
2127
  condition_id: string;
2070
2128
  proposed_outcome?: string | null;
@@ -2078,13 +2136,15 @@ export interface components {
2078
2136
  id: string;
2079
2137
  hash: string;
2080
2138
  /** Format: int64 */
2081
- block: number;
2139
+ block?: number | null;
2082
2140
  /** Format: int64 */
2083
- confirmed_at: number;
2141
+ confirmed_at?: number | null;
2084
2142
  /** Format: int64 */
2085
- log_index: number;
2143
+ received_at?: number | null;
2086
2144
  /** Format: int64 */
2087
- block_index: number;
2145
+ log_index?: number | null;
2146
+ /** Format: int64 */
2147
+ block_index?: number | null;
2088
2148
  oracle_contract: string;
2089
2149
  condition_id: string;
2090
2150
  question?: string | null;
@@ -2097,13 +2157,15 @@ export interface components {
2097
2157
  id: string;
2098
2158
  hash: string;
2099
2159
  /** Format: int64 */
2100
- block: number;
2160
+ block?: number | null;
2161
+ /** Format: int64 */
2162
+ confirmed_at?: number | null;
2101
2163
  /** Format: int64 */
2102
- confirmed_at: number;
2164
+ received_at?: number | null;
2103
2165
  /** Format: int64 */
2104
- log_index: number;
2166
+ log_index?: number | null;
2105
2167
  /** Format: int64 */
2106
- block_index: number;
2168
+ block_index?: number | null;
2107
2169
  oracle_contract: string;
2108
2170
  condition_id: string;
2109
2171
  creator: string;
@@ -2120,13 +2182,15 @@ export interface components {
2120
2182
  id: string;
2121
2183
  hash: string;
2122
2184
  /** Format: int64 */
2123
- block: number;
2185
+ block?: number | null;
2124
2186
  /** Format: int64 */
2125
- confirmed_at: number;
2187
+ confirmed_at?: number | null;
2126
2188
  /** Format: int64 */
2127
- log_index: number;
2189
+ received_at?: number | null;
2128
2190
  /** Format: int64 */
2129
- block_index: number;
2191
+ log_index?: number | null;
2192
+ /** Format: int64 */
2193
+ block_index?: number | null;
2130
2194
  oracle_contract: string;
2131
2195
  condition_id: string;
2132
2196
  question?: string | null;
@@ -2139,13 +2203,15 @@ export interface components {
2139
2203
  id: string;
2140
2204
  hash: string;
2141
2205
  /** Format: int64 */
2142
- block: number;
2206
+ block?: number | null;
2207
+ /** Format: int64 */
2208
+ confirmed_at?: number | null;
2143
2209
  /** Format: int64 */
2144
- confirmed_at: number;
2210
+ received_at?: number | null;
2145
2211
  /** Format: int64 */
2146
- log_index: number;
2212
+ log_index?: number | null;
2147
2213
  /** Format: int64 */
2148
- block_index: number;
2214
+ block_index?: number | null;
2149
2215
  oracle_contract: string;
2150
2216
  condition_id: string;
2151
2217
  question?: string | null;
@@ -2158,13 +2224,15 @@ export interface components {
2158
2224
  id: string;
2159
2225
  hash: string;
2160
2226
  /** Format: int64 */
2161
- block: number;
2227
+ block?: number | null;
2162
2228
  /** Format: int64 */
2163
- confirmed_at: number;
2229
+ confirmed_at?: number | null;
2164
2230
  /** Format: int64 */
2165
- log_index: number;
2231
+ received_at?: number | null;
2166
2232
  /** Format: int64 */
2167
- block_index: number;
2233
+ log_index?: number | null;
2234
+ /** Format: int64 */
2235
+ block_index?: number | null;
2168
2236
  oracle_contract: string;
2169
2237
  condition_id: string;
2170
2238
  /** Format: int64 */
@@ -2180,13 +2248,15 @@ export interface components {
2180
2248
  id: string;
2181
2249
  hash: string;
2182
2250
  /** Format: int64 */
2183
- block: number;
2251
+ block?: number | null;
2252
+ /** Format: int64 */
2253
+ confirmed_at?: number | null;
2184
2254
  /** Format: int64 */
2185
- confirmed_at: number;
2255
+ received_at?: number | null;
2186
2256
  /** Format: int64 */
2187
- log_index: number;
2257
+ log_index?: number | null;
2188
2258
  /** Format: int64 */
2189
- block_index: number;
2259
+ block_index?: number | null;
2190
2260
  oracle_contract: string;
2191
2261
  condition_id: string;
2192
2262
  question?: string | null;
@@ -2199,13 +2269,15 @@ export interface components {
2199
2269
  id: string;
2200
2270
  hash: string;
2201
2271
  /** Format: int64 */
2202
- block: number;
2272
+ block?: number | null;
2203
2273
  /** Format: int64 */
2204
- confirmed_at: number;
2274
+ confirmed_at?: number | null;
2205
2275
  /** Format: int64 */
2206
- log_index: number;
2276
+ received_at?: number | null;
2207
2277
  /** Format: int64 */
2208
- block_index: number;
2278
+ log_index?: number | null;
2279
+ /** Format: int64 */
2280
+ block_index?: number | null;
2209
2281
  oracle_contract: string;
2210
2282
  condition_id: string;
2211
2283
  question?: string | null;
@@ -2218,13 +2290,15 @@ export interface components {
2218
2290
  id: string;
2219
2291
  hash: string;
2220
2292
  /** Format: int64 */
2221
- block: number;
2293
+ block?: number | null;
2294
+ /** Format: int64 */
2295
+ confirmed_at?: number | null;
2222
2296
  /** Format: int64 */
2223
- confirmed_at: number;
2297
+ received_at?: number | null;
2224
2298
  /** Format: int64 */
2225
- log_index: number;
2299
+ log_index?: number | null;
2226
2300
  /** Format: int64 */
2227
- block_index: number;
2301
+ block_index?: number | null;
2228
2302
  trader: components["schemas"]["TraderInfo"];
2229
2303
  condition_id?: string | null;
2230
2304
  outcome?: string | null;
@@ -2247,13 +2321,15 @@ export interface components {
2247
2321
  id: string;
2248
2322
  hash: string;
2249
2323
  /** Format: int64 */
2250
- block: number;
2324
+ block?: number | null;
2325
+ /** Format: int64 */
2326
+ confirmed_at?: number | null;
2251
2327
  /** Format: int64 */
2252
- confirmed_at: number;
2328
+ received_at?: number | null;
2253
2329
  /** Format: int64 */
2254
- log_index: number;
2330
+ log_index?: number | null;
2255
2331
  /** Format: int64 */
2256
- block_index: number;
2332
+ block_index?: number | null;
2257
2333
  condition_id: string;
2258
2334
  token0: string;
2259
2335
  token1: string;
@@ -2310,13 +2386,15 @@ export interface components {
2310
2386
  id: string;
2311
2387
  hash: string;
2312
2388
  /** Format: int64 */
2313
- block: number;
2389
+ block?: number | null;
2314
2390
  /** Format: int64 */
2315
- confirmed_at: number;
2391
+ confirmed_at?: number | null;
2316
2392
  /** Format: int64 */
2317
- log_index: number;
2393
+ received_at?: number | null;
2318
2394
  /** Format: int64 */
2319
- block_index: number;
2395
+ log_index?: number | null;
2396
+ /** Format: int64 */
2397
+ block_index?: number | null;
2320
2398
  trader: components["schemas"]["TraderInfo"];
2321
2399
  condition_id?: string | null;
2322
2400
  question?: string | null;
@@ -2489,6 +2567,8 @@ export interface components {
2489
2567
  first_trade_at?: number | null;
2490
2568
  /** Format: int64 */
2491
2569
  last_trade_at?: number | null;
2570
+ /** Format: double */
2571
+ realized_pnl_pct?: number | null;
2492
2572
  };
2493
2573
  /** @description Trader profile info - backwards compatibility */
2494
2574
  TraderInfo: {
@@ -2502,6 +2582,7 @@ export interface components {
2502
2582
  /** @description Market-level PnL entry */
2503
2583
  TraderMarketPnlEntry: {
2504
2584
  condition_id?: string | null;
2585
+ market_slug?: string | null;
2505
2586
  event_slug?: string | null;
2506
2587
  question?: string | null;
2507
2588
  image_url?: string | null;
@@ -2533,6 +2614,8 @@ export interface components {
2533
2614
  first_trade_at?: number | null;
2534
2615
  /** Format: int64 */
2535
2616
  last_trade_at?: number | null;
2617
+ /** Format: double */
2618
+ realized_pnl_pct?: number | null;
2536
2619
  };
2537
2620
  /** @description Outcome-level PnL entry (per outcome token / position_id) */
2538
2621
  TraderOutcomePnlEntry: {
@@ -2703,12 +2786,12 @@ export interface operations {
2703
2786
  * @description Asset ticker: BTC, ETH, XRP, SOL, DOGE, BNB, HYPE
2704
2787
  * @example BTC
2705
2788
  */
2706
- asset_symbol: string;
2789
+ asset_symbol: components["schemas"]["AssetSymbol"];
2707
2790
  /**
2708
2791
  * @description Time window: 5m, 15m, 1h, 4h, 1d
2709
2792
  * @example 1h
2710
2793
  */
2711
- variant: string;
2794
+ variant: components["schemas"]["AssetVariant"];
2712
2795
  /** @description Start timestamp in seconds (Unix epoch, inclusive) */
2713
2796
  from?: number;
2714
2797
  /** @description End timestamp in seconds (Unix epoch, inclusive) */
@@ -2869,13 +2952,13 @@ export interface operations {
2869
2952
  };
2870
2953
  requestBody?: never;
2871
2954
  responses: {
2872
- /** @description Event metrics for the specified timeframe(s). Returns single object for one timeframe, array for multiple. */
2955
+ /** @description Event metrics. **Note:** returns a single object for one timeframe, or an array of objects for comma-separated timeframes or 'all'. */
2873
2956
  200: {
2874
2957
  headers: {
2875
2958
  [name: string]: unknown;
2876
2959
  };
2877
2960
  content: {
2878
- "application/json": components["schemas"]["EventMetricsResponse"];
2961
+ "application/json": components["schemas"]["EventMetricsResponse"][];
2879
2962
  };
2880
2963
  };
2881
2964
  /** @description Invalid timeframe */
@@ -3050,8 +3133,16 @@ export interface operations {
3050
3133
  condition_id?: string;
3051
3134
  /** @description Market slug (e.g. `will-trump-win`) */
3052
3135
  market_slug?: string;
3053
- /** @description Time range in hours (default: 24, max: 336 = 14 days) */
3136
+ /** @description Start timestamp (Unix seconds). If omitted, derived from `hours` param. */
3137
+ from?: number;
3138
+ /** @description End timestamp (Unix seconds). Defaults to now. */
3139
+ to?: number;
3140
+ /** @description Number of candles to return (default: 500, max: 2500) */
3141
+ count_back?: number;
3142
+ /** @description Fallback time range in hours when `from`/`to` are not provided (default: 24, max: 336 = 14 days) */
3054
3143
  hours?: number;
3144
+ /** @description Cursor-based pagination key from previous response */
3145
+ pagination_key?: string;
3055
3146
  };
3056
3147
  header?: never;
3057
3148
  path?: never;
@@ -3123,8 +3214,16 @@ export interface operations {
3123
3214
  get_position_holders_history: {
3124
3215
  parameters: {
3125
3216
  query?: {
3126
- /** @description Time range in hours (default: 24, max: 336 = 14 days) */
3217
+ /** @description Start timestamp (Unix seconds). If omitted, derived from `hours` param. */
3218
+ from?: number;
3219
+ /** @description End timestamp (Unix seconds). Defaults to now. */
3220
+ to?: number;
3221
+ /** @description Number of candles to return (default: 500, max: 2500) */
3222
+ count_back?: number;
3223
+ /** @description Fallback time range in hours when `from`/`to` are not provided (default: 24, max: 336 = 14 days) */
3127
3224
  hours?: number;
3225
+ /** @description Cursor-based pagination key from previous response */
3226
+ pagination_key?: string;
3128
3227
  };
3129
3228
  header?: never;
3130
3229
  path: {
@@ -3254,12 +3353,16 @@ export interface operations {
3254
3353
  query?: {
3255
3354
  /** @description Minimum probability threshold (default: 0.85) */
3256
3355
  min_probability?: number;
3356
+ /** @description Maximum probability threshold (e.g. 0.99) */
3357
+ max_probability?: number;
3257
3358
  /** @description Maximum hours until market end */
3258
3359
  max_hours?: number;
3360
+ /** @description Sort by: apy, liquidity, volume, end_date (default: end_date) */
3361
+ sort_by?: string;
3259
3362
  /** @description Number of results (default: 10, max: 250) */
3260
3363
  limit?: number;
3261
- /** @description Cursor for pagination: end_date (unix epoch) of the last item from the previous page */
3262
- pagination_key?: number;
3364
+ /** @description Offset for pagination (default: 0) */
3365
+ offset?: number;
3263
3366
  };
3264
3367
  header?: never;
3265
3368
  path?: never;
@@ -3267,7 +3370,7 @@ export interface operations {
3267
3370
  };
3268
3371
  requestBody?: never;
3269
3372
  responses: {
3270
- /** @description List of bond markets sorted by yield */
3373
+ /** @description List of bond markets */
3271
3374
  200: {
3272
3375
  headers: {
3273
3376
  [name: string]: unknown;
@@ -3291,6 +3394,8 @@ export interface operations {
3291
3394
  from?: number;
3292
3395
  /** @description End timestamp (Unix seconds) */
3293
3396
  to?: number;
3397
+ /** @description Cursor-based pagination key from previous response */
3398
+ pagination_key?: string;
3294
3399
  };
3295
3400
  header?: never;
3296
3401
  path?: never;
@@ -3352,13 +3457,13 @@ export interface operations {
3352
3457
  };
3353
3458
  requestBody?: never;
3354
3459
  responses: {
3355
- /** @description Market metrics for the specified timeframe(s). Returns single object for one timeframe, array for multiple. */
3460
+ /** @description Market metrics. **Note:** returns a single object for one timeframe, or an array of objects for comma-separated timeframes or 'all'. */
3356
3461
  200: {
3357
3462
  headers: {
3358
3463
  [name: string]: unknown;
3359
3464
  };
3360
3465
  content: {
3361
- "application/json": components["schemas"]["ConditionMetricsResponse"];
3466
+ "application/json": components["schemas"]["ConditionMetricsResponse"][];
3362
3467
  };
3363
3468
  };
3364
3469
  /** @description Invalid timeframe */
@@ -3383,6 +3488,8 @@ export interface operations {
3383
3488
  from?: number;
3384
3489
  /** @description End timestamp (Unix seconds) */
3385
3490
  to?: number;
3491
+ /** @description Cursor-based pagination key from previous response */
3492
+ pagination_key?: string;
3386
3493
  };
3387
3494
  header?: never;
3388
3495
  path?: never;
@@ -3415,13 +3522,13 @@ export interface operations {
3415
3522
  };
3416
3523
  requestBody?: never;
3417
3524
  responses: {
3418
- /** @description Position metrics for the specified timeframe(s). Returns single object for one timeframe, array for multiple. */
3525
+ /** @description Position metrics. **Note:** returns a single object for one timeframe, or an array of objects for comma-separated timeframes or 'all'. */
3419
3526
  200: {
3420
3527
  headers: {
3421
3528
  [name: string]: unknown;
3422
3529
  };
3423
3530
  content: {
3424
- "application/json": components["schemas"]["PositionMetricsResponse"];
3531
+ "application/json": components["schemas"]["PositionMetricsResponse"][];
3425
3532
  };
3426
3533
  };
3427
3534
  /** @description Invalid timeframe */
@@ -3446,6 +3553,8 @@ export interface operations {
3446
3553
  from?: number;
3447
3554
  /** @description End timestamp (Unix seconds) */
3448
3555
  to?: number;
3556
+ /** @description Cursor-based pagination key from previous response */
3557
+ pagination_key?: string;
3449
3558
  };
3450
3559
  header?: never;
3451
3560
  path?: never;
@@ -3500,6 +3609,24 @@ export interface operations {
3500
3609
  get_market_by_slug: {
3501
3610
  parameters: {
3502
3611
  query?: {
3612
+ /** @description Comma-separated condition IDs (max 50) */
3613
+ condition_ids?: string;
3614
+ /** @description Comma-separated question IDs (max 50) */
3615
+ question_ids?: string;
3616
+ /** @description Comma-separated market IDs (max 50) */
3617
+ market_ids?: string;
3618
+ /** @description Comma-separated market slugs (max 50) */
3619
+ market_slugs?: string;
3620
+ /** @description Comma-separated event slugs (max 50) */
3621
+ event_slugs?: string;
3622
+ /** @description Comma-separated tag filters (max 50) */
3623
+ tags?: string;
3624
+ /** @description Comma-separated position IDs to resolve to markets (max 50) */
3625
+ position_ids?: string;
3626
+ /** @description Search string (3-100 characters) */
3627
+ search?: string;
3628
+ /** @description Metrics timeframe (default: 24h) */
3629
+ timeframe?: components["schemas"]["MetricsTimeframe"];
3503
3630
  /** @description Include tags array (default: true) */
3504
3631
  include_tags?: boolean;
3505
3632
  /** @description Include event object (default: true) */
@@ -3518,7 +3645,7 @@ export interface operations {
3518
3645
  };
3519
3646
  requestBody?: never;
3520
3647
  responses: {
3521
- /** @description Market with metadata, outcomes, tags, event, and metrics */
3648
+ /** @description Array of markets with metadata, outcomes, tags, event, and metrics */
3522
3649
  200: {
3523
3650
  headers: {
3524
3651
  [name: string]: unknown;
@@ -3571,7 +3698,7 @@ export interface operations {
3571
3698
  };
3572
3699
  /** Format: double */
3573
3700
  relevance_score?: number | null;
3574
- };
3701
+ }[];
3575
3702
  };
3576
3703
  };
3577
3704
  /** @description Market not found */
@@ -3663,6 +3790,8 @@ export interface operations {
3663
3790
  from?: number;
3664
3791
  /** @description End timestamp (Unix seconds) */
3665
3792
  to?: number;
3793
+ /** @description Cursor-based pagination key from previous response */
3794
+ pagination_key?: string;
3666
3795
  };
3667
3796
  header?: never;
3668
3797
  path?: never;
@@ -3684,6 +3813,24 @@ export interface operations {
3684
3813
  get_market: {
3685
3814
  parameters: {
3686
3815
  query?: {
3816
+ /** @description Comma-separated condition IDs (max 50) */
3817
+ condition_ids?: string;
3818
+ /** @description Comma-separated question IDs (max 50) */
3819
+ question_ids?: string;
3820
+ /** @description Comma-separated market IDs (max 50) */
3821
+ market_ids?: string;
3822
+ /** @description Comma-separated market slugs (max 50) */
3823
+ market_slugs?: string;
3824
+ /** @description Comma-separated event slugs (max 50) */
3825
+ event_slugs?: string;
3826
+ /** @description Comma-separated tag filters (max 50) */
3827
+ tags?: string;
3828
+ /** @description Comma-separated position IDs to resolve to markets (max 50) */
3829
+ position_ids?: string;
3830
+ /** @description Search string (3-100 characters) */
3831
+ search?: string;
3832
+ /** @description Metrics timeframe (default: 24h) */
3833
+ timeframe?: components["schemas"]["MetricsTimeframe"];
3687
3834
  /** @description Include tags array (default: true) */
3688
3835
  include_tags?: boolean;
3689
3836
  /** @description Include event object (default: true) */
@@ -3702,7 +3849,7 @@ export interface operations {
3702
3849
  };
3703
3850
  requestBody?: never;
3704
3851
  responses: {
3705
- /** @description Market with metadata, outcomes, tags, event, and metrics */
3852
+ /** @description Array of markets with metadata, outcomes, tags, event, and metrics */
3706
3853
  200: {
3707
3854
  headers: {
3708
3855
  [name: string]: unknown;
@@ -3755,7 +3902,7 @@ export interface operations {
3755
3902
  };
3756
3903
  /** Format: double */
3757
3904
  relevance_score?: number | null;
3758
- };
3905
+ }[];
3759
3906
  };
3760
3907
  };
3761
3908
  /** @description Market not found */
@@ -3968,7 +4115,7 @@ export interface operations {
3968
4115
  max_spread?: number;
3969
4116
  /** @description Only return rows where total liquidity (bid + ask) >= this value */
3970
4117
  min_liquidity?: number;
3971
- /** @description Number of results (default: 100, max: 1000) */
4118
+ /** @description Number of results (default: 20, max: 200) */
3972
4119
  limit?: number;
3973
4120
  /** @description Cursor from previous response's pagination.pagination_key */
3974
4121
  pagination_key?: string;
@@ -4142,11 +4289,56 @@ export interface operations {
4142
4289
  };
4143
4290
  };
4144
4291
  };
4292
+ get_series_events: {
4293
+ parameters: {
4294
+ query?: {
4295
+ /** @description Filter by active events only (default: false) */
4296
+ active?: boolean;
4297
+ /** @description Include tags array (default: true) */
4298
+ include_tags?: boolean;
4299
+ /** @description Include markets array (default: true) */
4300
+ include_markets?: boolean;
4301
+ /** @description Include metrics (default: true) */
4302
+ include_metrics?: boolean;
4303
+ /** @description Number of events to return (default: 20, max: 250) */
4304
+ limit?: number;
4305
+ /** @description Offset for pagination (default: 0) */
4306
+ pagination_key?: string;
4307
+ };
4308
+ header?: never;
4309
+ path: {
4310
+ /** @description Series slug (e.g. 'btc-weekly-close') or series ID */
4311
+ identifier: string;
4312
+ };
4313
+ cookie?: never;
4314
+ };
4315
+ requestBody?: never;
4316
+ responses: {
4317
+ /** @description List of events in this series */
4318
+ 200: {
4319
+ headers: {
4320
+ [name: string]: unknown;
4321
+ };
4322
+ content: {
4323
+ "application/json": components["schemas"]["PolymarketEvent"][];
4324
+ };
4325
+ };
4326
+ /** @description Series not found */
4327
+ 404: {
4328
+ headers: {
4329
+ [name: string]: unknown;
4330
+ };
4331
+ content?: never;
4332
+ };
4333
+ };
4334
+ };
4145
4335
  get_tags: {
4146
4336
  parameters: {
4147
4337
  query?: {
4148
4338
  /** @description Results limit (default: 10, max: 250) */
4149
4339
  limit?: number;
4340
+ /** @description Offset-based pagination (number of results to skip). Takes precedence over pagination_key. */
4341
+ offset?: number;
4150
4342
  /** @description Cursor-based pagination key */
4151
4343
  pagination_key?: string;
4152
4344
  };
@@ -4315,7 +4507,7 @@ export interface operations {
4315
4507
  query?: {
4316
4508
  /** @description Timeframe: 1d, 7d, 30d, lifetime (default: lifetime) */
4317
4509
  timeframe?: components["schemas"]["PnlTimeframe"];
4318
- /** @description Sort: realized_pnl_usd, total_volume_usd, markets_traded, total_fees (default: realized_pnl_usd) */
4510
+ /** @description Sort: realized_pnl_usd, total_volume_usd, markets_traded, total_fees, realized_pnl_pct (default: realized_pnl_usd) */
4319
4511
  sort_by?: components["schemas"]["EventPnlSortBy"];
4320
4512
  /** @description Sort direction: asc, desc (default: desc) */
4321
4513
  sort_direction?: components["schemas"]["SortDirection"];
@@ -4353,7 +4545,7 @@ export interface operations {
4353
4545
  query?: {
4354
4546
  /** @description Timeframe: 1d, 7d, 30d, lifetime (default: lifetime) */
4355
4547
  timeframe?: components["schemas"]["PnlTimeframe"];
4356
- /** @description Sort: realized_pnl_usd, buy_usd, total_buys, total_fees, outcomes_traded (default: realized_pnl_usd) */
4548
+ /** @description Sort: realized_pnl_usd, buy_usd, total_buys, total_fees, outcomes_traded, realized_pnl_pct (default: realized_pnl_usd) */
4357
4549
  sort_by?: components["schemas"]["MarketPnlSortBy"];
4358
4550
  /** @description Sort direction: asc, desc (default: desc) */
4359
4551
  sort_direction?: components["schemas"]["SortDirection"];