@structbuild/sdk 0.2.11 → 0.3.0

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.
@@ -887,6 +887,105 @@ export interface paths {
887
887
  export type webhooks = Record<string, never>;
888
888
  export interface components {
889
889
  schemas: {
890
+ /** @description Output payload for ERC1155 setApprovalForAll events. */
891
+ ApprovalTrade: {
892
+ id: string;
893
+ hash: string;
894
+ /** Format: int64 */
895
+ block: number;
896
+ /** Format: int64 */
897
+ confirmed_at: number;
898
+ /** Format: int64 */
899
+ log_index: number;
900
+ /** Format: int64 */
901
+ block_index: number;
902
+ trader: components["schemas"]["TraderInfo"];
903
+ operator: string;
904
+ approved: boolean;
905
+ question?: string | null;
906
+ image_url?: string | null;
907
+ slug?: string | null;
908
+ event_slug?: string | null;
909
+ exchange: components["schemas"]["PolymarketExchange"];
910
+ };
911
+ /** @description V3 UMA OOv3: an assertion was disputed. */
912
+ AssertionDisputedEvent: {
913
+ id: string;
914
+ hash: string;
915
+ /** Format: int64 */
916
+ block: number;
917
+ /** Format: int64 */
918
+ confirmed_at: number;
919
+ /** Format: int64 */
920
+ log_index: number;
921
+ /** Format: int64 */
922
+ block_index: number;
923
+ oracle_contract: string;
924
+ assertion_id: string;
925
+ caller: string;
926
+ disputer: string;
927
+ condition_id?: string | null;
928
+ question?: string | null;
929
+ image_url?: string | null;
930
+ slug?: string | null;
931
+ event_slug?: string | null;
932
+ };
933
+ /** @description V3 UMA OOv3: a new assertion (resolution proposal) was made. */
934
+ AssertionMadeEvent: {
935
+ id: string;
936
+ hash: string;
937
+ /** Format: int64 */
938
+ block: number;
939
+ /** Format: int64 */
940
+ confirmed_at: number;
941
+ /** Format: int64 */
942
+ log_index: number;
943
+ /** Format: int64 */
944
+ block_index: number;
945
+ oracle_contract: string;
946
+ assertion_id: string;
947
+ domain_id: string;
948
+ claim: string;
949
+ asserter: string;
950
+ callback_recipient: string;
951
+ escalation_manager: string;
952
+ caller: string;
953
+ /** Format: int64 */
954
+ expiration_time: number;
955
+ currency: string;
956
+ bond: string;
957
+ identifier: string;
958
+ condition_id?: string | null;
959
+ proposed_outcome?: string | null;
960
+ question?: string | null;
961
+ image_url?: string | null;
962
+ slug?: string | null;
963
+ event_slug?: string | null;
964
+ };
965
+ /** @description V3 UMA OOv3: an assertion liveness period expired and was settled. */
966
+ AssertionSettledEvent: {
967
+ id: string;
968
+ hash: string;
969
+ /** Format: int64 */
970
+ block: number;
971
+ /** Format: int64 */
972
+ confirmed_at: number;
973
+ /** Format: int64 */
974
+ log_index: number;
975
+ /** Format: int64 */
976
+ block_index: number;
977
+ oracle_contract: string;
978
+ assertion_id: string;
979
+ bond_recipient: string;
980
+ disputed: boolean;
981
+ settlement_resolution: boolean;
982
+ settle_caller: string;
983
+ condition_id?: string | null;
984
+ question?: string | null;
985
+ image_url?: string | null;
986
+ slug?: string | null;
987
+ event_slug?: string | null;
988
+ };
890
989
  /** @description A single asset price history record from the `asset_price_history` table. */
891
990
  AssetPriceHistoryRow: {
892
991
  asset_symbol: string;
@@ -948,6 +1047,25 @@ export interface components {
948
1047
  /** Format: double */
949
1048
  price: number;
950
1049
  };
1050
+ /** @description Output payload for Cancelled orders. */
1051
+ CancelledTrade: {
1052
+ id: string;
1053
+ hash: string;
1054
+ /** Format: int64 */
1055
+ block: number;
1056
+ /** Format: int64 */
1057
+ confirmed_at: number;
1058
+ /** Format: int64 */
1059
+ log_index: number;
1060
+ /** Format: int64 */
1061
+ block_index: number;
1062
+ order_hash: string;
1063
+ question?: string | null;
1064
+ image_url?: string | null;
1065
+ slug?: string | null;
1066
+ event_slug?: string | null;
1067
+ exchange: components["schemas"]["PolymarketExchange"];
1068
+ };
951
1069
  /** @enum {string} */
952
1070
  CandlestickResolution: "1" | "5" | "15" | "30" | "60" | "240" | "D" | "1D";
953
1071
  /** @enum {string} */
@@ -1014,6 +1132,27 @@ export interface components {
1014
1132
  /** Format: int32 */
1015
1133
  ask_levels?: number | null;
1016
1134
  };
1135
+ /** @description CTF ConditionResolution: positions become redeemable on the Conditional Tokens contract. */
1136
+ ConditionResolutionEvent: {
1137
+ id: string;
1138
+ hash: string;
1139
+ /** Format: int64 */
1140
+ block: number;
1141
+ /** Format: int64 */
1142
+ confirmed_at: number;
1143
+ /** Format: int64 */
1144
+ log_index: number;
1145
+ /** Format: int64 */
1146
+ block_index: number;
1147
+ oracle_contract: string;
1148
+ condition_id: string;
1149
+ oracle: string;
1150
+ proposed_outcome?: string | null;
1151
+ question?: string | null;
1152
+ image_url?: string | null;
1153
+ slug?: string | null;
1154
+ event_slug?: string | null;
1155
+ };
1017
1156
  /** @description Enriched market data for event API responses */
1018
1157
  EventMarket: {
1019
1158
  /** @default */
@@ -1223,45 +1362,6 @@ export interface components {
1223
1362
  /** @description Holders grouped by outcome */
1224
1363
  outcomes: components["schemas"]["OutcomeHolders"][];
1225
1364
  };
1226
- /** @description Market metadata (enriched, cached version) */
1227
- MarketMetadata: {
1228
- condition_id: string;
1229
- question: string;
1230
- description: string;
1231
- slug: string;
1232
- event_slug?: string | null;
1233
- event_id?: string | null;
1234
- event_title?: string | null;
1235
- series_slug?: string | null;
1236
- neg_risk: boolean;
1237
- tokens: components["schemas"]["TokenOutcome"][];
1238
- image_url?: string | null;
1239
- tags: string[];
1240
- /** Format: int64 */
1241
- created_time?: number | null;
1242
- /** Format: int64 */
1243
- start_time?: number | null;
1244
- /** Format: int64 */
1245
- game_start_time?: number | null;
1246
- /** Format: int64 */
1247
- closed_time?: number | null;
1248
- /** Format: int64 */
1249
- end_time?: number | null;
1250
- title?: string | null;
1251
- id?: string | null;
1252
- /** Format: double */
1253
- volume_usd?: number | null;
1254
- /** Format: double */
1255
- liquidity_usd?: number | null;
1256
- outcomes: components["schemas"]["MarketOutcome"][];
1257
- metrics: {
1258
- [key: string]: number;
1259
- };
1260
- market_maker_address?: string | null;
1261
- creator?: string | null;
1262
- category?: string | null;
1263
- clob_rewards: components["schemas"]["ClobReward"][];
1264
- };
1265
1365
  /** @description Market outcome with timeframe metrics (websocket API format) */
1266
1366
  MarketMetadataOutcome: {
1267
1367
  token_id: string;
@@ -1328,9 +1428,10 @@ export interface components {
1328
1428
  highest_probability?: number | null;
1329
1429
  /** Format: int64 */
1330
1430
  total_holders?: number | null;
1431
+ /** Format: double */
1432
+ total_daily_rate?: number | null;
1331
1433
  winning_outcome?: null | components["schemas"]["MarketOutcome"];
1332
1434
  outcomes?: components["schemas"]["MarketOutcome"][];
1333
- rewards?: components["schemas"]["MarketReward"][];
1334
1435
  clob_rewards?: components["schemas"]["ClobReward"][];
1335
1436
  tags?: string[];
1336
1437
  event_slug?: string | null;
@@ -1341,26 +1442,8 @@ export interface components {
1341
1442
  /** Format: double */
1342
1443
  relevance_score?: number | null;
1343
1444
  };
1344
- /** @description Reward info for market API responses */
1345
- MarketReward: {
1346
- /**
1347
- * Format: double
1348
- * @default null
1349
- */
1350
- min_size: number | null;
1351
- /**
1352
- * Format: double
1353
- * @default null
1354
- */
1355
- max_spread: number | null;
1356
- /**
1357
- * Format: double
1358
- * @default null
1359
- */
1360
- daily_rate: number | null;
1361
- };
1362
1445
  /** @enum {string} */
1363
- MarketSortBy: "volume" | "txns" | "unique_traders" | "liquidity" | "holders" | "end_time" | "start_time" | "created_time" | "relevance";
1446
+ MarketSortBy: "volume" | "txns" | "unique_traders" | "liquidity" | "holders" | "total_daily_rate" | "end_time" | "start_time" | "created_time" | "relevance";
1364
1447
  /** @enum {string} */
1365
1448
  MarketStatus: "open" | "closed" | "all";
1366
1449
  MarketVolumeChartResponse: {
@@ -1383,8 +1466,93 @@ export interface components {
1383
1466
  /** Format: int32 */
1384
1467
  ntc: number;
1385
1468
  };
1469
+ /** @description Output payload for Merge trades (burn outcome tokens → receive collateral). */
1470
+ MergeTrade: {
1471
+ id: string;
1472
+ hash: string;
1473
+ /** Format: int64 */
1474
+ block: number;
1475
+ /** Format: int64 */
1476
+ confirmed_at: number;
1477
+ /** Format: int64 */
1478
+ log_index: number;
1479
+ /** Format: int64 */
1480
+ block_index: number;
1481
+ trader: components["schemas"]["TraderInfo"];
1482
+ condition_id?: string | null;
1483
+ question?: string | null;
1484
+ image_url?: string | null;
1485
+ slug?: string | null;
1486
+ event_slug?: string | null;
1487
+ /** Format: double */
1488
+ usd_amount: number;
1489
+ /** @description Per-position burn amounts */
1490
+ position_details?: components["schemas"]["PositionDetail"][];
1491
+ exchange: components["schemas"]["PolymarketExchange"];
1492
+ };
1386
1493
  /** @enum {string} */
1387
1494
  MetricsTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
1495
+ /** @description NegRisk Adapter: outcome reported for a neg-risk market question. */
1496
+ NegRiskOutcomeReportedEvent: {
1497
+ id: string;
1498
+ hash: string;
1499
+ /** Format: int64 */
1500
+ block: number;
1501
+ /** Format: int64 */
1502
+ confirmed_at: number;
1503
+ /** Format: int64 */
1504
+ log_index: number;
1505
+ /** Format: int64 */
1506
+ block_index: number;
1507
+ oracle_contract: string;
1508
+ condition_id: string;
1509
+ proposed_outcome?: string | null;
1510
+ question?: string | null;
1511
+ image_url?: string | null;
1512
+ slug?: string | null;
1513
+ event_slug?: string | null;
1514
+ };
1515
+ /** @description Output payload for OrderFilled and OrdersMatched trades (actual buy/sell). */
1516
+ OrderFilledTrade: {
1517
+ id: string;
1518
+ hash: string;
1519
+ /** Format: int64 */
1520
+ block: number;
1521
+ /** Format: int64 */
1522
+ confirmed_at: number;
1523
+ /** Format: int64 */
1524
+ log_index: number;
1525
+ /** Format: int64 */
1526
+ block_index: number;
1527
+ order_hash: string;
1528
+ trader: components["schemas"]["TraderInfo"];
1529
+ taker: string;
1530
+ side: string;
1531
+ condition_id?: string | null;
1532
+ position_id: string;
1533
+ outcome?: string | null;
1534
+ /** Format: int32 */
1535
+ outcome_index?: number | null;
1536
+ question?: string | null;
1537
+ image_url?: string | null;
1538
+ slug?: string | null;
1539
+ event_slug?: string | null;
1540
+ /** Format: double */
1541
+ usd_amount: number;
1542
+ /** Format: double */
1543
+ shares_amount: number;
1544
+ /** Format: double */
1545
+ price: number;
1546
+ /** Format: double */
1547
+ probability?: number | null;
1548
+ /** Format: double */
1549
+ fee: number;
1550
+ /** Format: double */
1551
+ fee_shares: number;
1552
+ /** Format: double */
1553
+ fee_pct: number;
1554
+ exchange: components["schemas"]["PolymarketExchange"];
1555
+ };
1388
1556
  OrderbookHistoryRow: {
1389
1557
  /** Format: int64 */
1390
1558
  ts: number;
@@ -1638,6 +1806,11 @@ export interface components {
1638
1806
  /** @default null */
1639
1807
  series: null | components["schemas"]["PolymarketSeries"];
1640
1808
  };
1809
+ /**
1810
+ * @description Polymarket exchange contract types
1811
+ * @enum {string}
1812
+ */
1813
+ PolymarketExchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
1641
1814
  /**
1642
1815
  * @description A Polymarket series from the Gamma API
1643
1816
  * Series are parent groupings above events (e.g., "NBA Season 2024-25")
@@ -1725,6 +1898,18 @@ export interface components {
1725
1898
  outcome_index: number;
1726
1899
  data: components["schemas"]["PositionChartDataPoint"][];
1727
1900
  };
1901
+ /** @description Per-position detail for Split/Merge/Redemption trades. */
1902
+ PositionDetail: {
1903
+ /** @description ERC1155 position ID */
1904
+ position_id: string;
1905
+ /**
1906
+ * Format: int32
1907
+ * @description Outcome index (0 = Yes, 1 = No for binary)
1908
+ */
1909
+ outcome_index: number;
1910
+ /** @description Amount of shares created/burned/redeemed for this position */
1911
+ amount: string;
1912
+ };
1728
1913
  /** @description Response for position (position_id) holders endpoint */
1729
1914
  PositionHoldersResponse: {
1730
1915
  /** @description Position ID (ERC1155 token ID) */
@@ -1808,6 +1993,30 @@ export interface components {
1808
1993
  /** Format: int32 */
1809
1994
  stc: number;
1810
1995
  };
1996
+ /**
1997
+ * @description Output payload for NegRisk PositionsConverted trades
1998
+ * (convert NO-position tokens → YES tokens + collateral).
1999
+ */
2000
+ PositionsConvertedTrade: {
2001
+ id: string;
2002
+ hash: string;
2003
+ /** Format: int64 */
2004
+ block: number;
2005
+ /** Format: int64 */
2006
+ confirmed_at: number;
2007
+ /** Format: int64 */
2008
+ log_index: number;
2009
+ /** Format: int64 */
2010
+ block_index: number;
2011
+ trader: components["schemas"]["TraderInfo"];
2012
+ /** @description NegRisk umbrella market ID */
2013
+ market_id: string;
2014
+ /** @description Bitmask of question indices whose NO tokens are being converted */
2015
+ index_set: string;
2016
+ /** Format: double */
2017
+ shares_amount: number;
2018
+ exchange: components["schemas"]["PolymarketExchange"];
2019
+ };
1811
2020
  PredictionCandlestickBar: {
1812
2021
  /** Format: double */
1813
2022
  l?: number | null;
@@ -1826,17 +2035,197 @@ export interface components {
1826
2035
  /** Format: double */
1827
2036
  m?: number | null;
1828
2037
  };
1829
- /** @description Response format for prediction trades */
1830
- PredictionTradeResponse: {
2038
+ PriceJump: {
2039
+ /** Format: int64 */
2040
+ from: number;
2041
+ /** Format: int64 */
2042
+ to: number;
2043
+ /** Format: double */
2044
+ price_before: number;
2045
+ /** Format: double */
2046
+ price_after: number;
2047
+ /** Format: double */
2048
+ change_pct: number;
2049
+ direction: string;
2050
+ /** Format: double */
2051
+ volume: number;
2052
+ /** Format: int32 */
2053
+ trades_count: number;
2054
+ condition_id: string;
2055
+ };
2056
+ /** @description UMA CTF Adapter: admin emergency resolution. */
2057
+ QuestionEmergencyResolvedEvent: {
2058
+ id: string;
2059
+ hash: string;
2060
+ /** Format: int64 */
2061
+ block: number;
2062
+ /** Format: int64 */
2063
+ confirmed_at: number;
2064
+ /** Format: int64 */
2065
+ log_index: number;
2066
+ /** Format: int64 */
2067
+ block_index: number;
2068
+ oracle_contract: string;
2069
+ condition_id: string;
2070
+ proposed_outcome?: string | null;
2071
+ question?: string | null;
2072
+ image_url?: string | null;
2073
+ slug?: string | null;
2074
+ event_slug?: string | null;
2075
+ };
2076
+ /** @description UMA CTF Adapter: market flagged for emergency resolution. */
2077
+ QuestionFlaggedEvent: {
2078
+ id: string;
2079
+ hash: string;
2080
+ /** Format: int64 */
2081
+ block: number;
2082
+ /** Format: int64 */
2083
+ confirmed_at: number;
2084
+ /** Format: int64 */
2085
+ log_index: number;
2086
+ /** Format: int64 */
2087
+ block_index: number;
2088
+ oracle_contract: string;
2089
+ condition_id: string;
2090
+ question?: string | null;
2091
+ image_url?: string | null;
2092
+ slug?: string | null;
2093
+ event_slug?: string | null;
2094
+ };
2095
+ /** @description UMA CTF Adapter: questionID first initialized on-chain. */
2096
+ QuestionInitializedEvent: {
2097
+ id: string;
2098
+ hash: string;
2099
+ /** Format: int64 */
2100
+ block: number;
2101
+ /** Format: int64 */
2102
+ confirmed_at: number;
2103
+ /** Format: int64 */
2104
+ log_index: number;
2105
+ /** Format: int64 */
2106
+ block_index: number;
2107
+ oracle_contract: string;
2108
+ condition_id: string;
2109
+ creator: string;
2110
+ reward_token: string;
2111
+ reward: string;
2112
+ proposal_bond: string;
2113
+ question?: string | null;
2114
+ image_url?: string | null;
2115
+ slug?: string | null;
2116
+ event_slug?: string | null;
2117
+ };
2118
+ /** @description UMA CTF Adapter: market paused by admin. */
2119
+ QuestionPausedEvent: {
2120
+ id: string;
2121
+ hash: string;
2122
+ /** Format: int64 */
2123
+ block: number;
2124
+ /** Format: int64 */
2125
+ confirmed_at: number;
2126
+ /** Format: int64 */
2127
+ log_index: number;
2128
+ /** Format: int64 */
2129
+ block_index: number;
2130
+ oracle_contract: string;
2131
+ condition_id: string;
2132
+ question?: string | null;
2133
+ image_url?: string | null;
2134
+ slug?: string | null;
2135
+ event_slug?: string | null;
2136
+ };
2137
+ /** @description UMA CTF Adapter: dispute succeeded, market returns to active. */
2138
+ QuestionResetEvent: {
2139
+ id: string;
2140
+ hash: string;
2141
+ /** Format: int64 */
2142
+ block: number;
2143
+ /** Format: int64 */
2144
+ confirmed_at: number;
2145
+ /** Format: int64 */
2146
+ log_index: number;
2147
+ /** Format: int64 */
2148
+ block_index: number;
2149
+ oracle_contract: string;
2150
+ condition_id: string;
2151
+ question?: string | null;
2152
+ image_url?: string | null;
2153
+ slug?: string | null;
2154
+ event_slug?: string | null;
2155
+ };
2156
+ /** @description UMA CTF Adapter: market resolved with definitive outcome. */
2157
+ QuestionResolvedEvent: {
2158
+ id: string;
2159
+ hash: string;
2160
+ /** Format: int64 */
2161
+ block: number;
2162
+ /** Format: int64 */
2163
+ confirmed_at: number;
2164
+ /** Format: int64 */
2165
+ log_index: number;
2166
+ /** Format: int64 */
2167
+ block_index: number;
2168
+ oracle_contract: string;
2169
+ condition_id: string;
2170
+ /** Format: int64 */
2171
+ settled_price: number;
2172
+ proposed_outcome?: string | null;
2173
+ question?: string | null;
2174
+ image_url?: string | null;
2175
+ slug?: string | null;
2176
+ event_slug?: string | null;
2177
+ };
2178
+ /** @description UMA CTF Adapter: flag removed. */
2179
+ QuestionUnflaggedEvent: {
2180
+ id: string;
2181
+ hash: string;
2182
+ /** Format: int64 */
2183
+ block: number;
2184
+ /** Format: int64 */
2185
+ confirmed_at: number;
2186
+ /** Format: int64 */
2187
+ log_index: number;
2188
+ /** Format: int64 */
2189
+ block_index: number;
2190
+ oracle_contract: string;
2191
+ condition_id: string;
2192
+ question?: string | null;
2193
+ image_url?: string | null;
2194
+ slug?: string | null;
2195
+ event_slug?: string | null;
2196
+ };
2197
+ /** @description UMA CTF Adapter: market unpaused. */
2198
+ QuestionUnpausedEvent: {
2199
+ id: string;
2200
+ hash: string;
2201
+ /** Format: int64 */
2202
+ block: number;
2203
+ /** Format: int64 */
2204
+ confirmed_at: number;
2205
+ /** Format: int64 */
2206
+ log_index: number;
2207
+ /** Format: int64 */
2208
+ block_index: number;
2209
+ oracle_contract: string;
2210
+ condition_id: string;
2211
+ question?: string | null;
2212
+ image_url?: string | null;
2213
+ slug?: string | null;
2214
+ event_slug?: string | null;
2215
+ };
2216
+ /** @description Output payload for Redemption trades (payout after market resolution). */
2217
+ RedemptionTrade: {
1831
2218
  id: string;
1832
2219
  hash: string;
1833
2220
  /** Format: int64 */
1834
2221
  block: number;
1835
2222
  /** Format: int64 */
1836
2223
  confirmed_at: number;
2224
+ /** Format: int64 */
2225
+ log_index: number;
2226
+ /** Format: int64 */
2227
+ block_index: number;
1837
2228
  trader: components["schemas"]["TraderInfo"];
1838
- taker: string;
1839
- side?: string | null;
1840
2229
  condition_id?: string | null;
1841
2230
  outcome?: string | null;
1842
2231
  /** Format: int32 */
@@ -1847,38 +2236,32 @@ export interface components {
1847
2236
  event_slug?: string | null;
1848
2237
  /** Format: double */
1849
2238
  usd_amount: number;
1850
- /** Format: double */
1851
- shares_amount: number;
1852
- /** Format: double */
1853
- price: number;
1854
- /** Format: double */
1855
- probability?: number | null;
1856
- /** Format: double */
1857
- fee: number;
1858
- exchange: string;
1859
- trade_type: string;
1860
- /** Format: int64 */
1861
- log_index: number;
1862
- order_hash: string;
1863
- position_id: string;
2239
+ /** Format: int32 */
2240
+ winning_outcome_index?: number | null;
2241
+ /** @description Per-position burn amounts */
2242
+ position_details?: components["schemas"]["PositionDetail"][];
2243
+ exchange: components["schemas"]["PolymarketExchange"];
1864
2244
  };
1865
- PriceJump: {
2245
+ /** @description Output payload for RegisterToken events (YES/NO token pair registered for a condition). */
2246
+ RegisterTokenTrade: {
2247
+ id: string;
2248
+ hash: string;
1866
2249
  /** Format: int64 */
1867
- from: number;
2250
+ block: number;
1868
2251
  /** Format: int64 */
1869
- to: number;
1870
- /** Format: double */
1871
- price_before: number;
1872
- /** Format: double */
1873
- price_after: number;
1874
- /** Format: double */
1875
- change_pct: number;
1876
- direction: string;
1877
- /** Format: double */
1878
- volume: number;
1879
- /** Format: int32 */
1880
- trades_count: number;
2252
+ confirmed_at: number;
2253
+ /** Format: int64 */
2254
+ log_index: number;
2255
+ /** Format: int64 */
2256
+ block_index: number;
1881
2257
  condition_id: string;
2258
+ token0: string;
2259
+ token1: string;
2260
+ question?: string | null;
2261
+ image_url?: string | null;
2262
+ slug?: string | null;
2263
+ event_slug?: string | null;
2264
+ exchange: components["schemas"]["PolymarketExchange"];
1882
2265
  };
1883
2266
  SearchResponse: {
1884
2267
  events?: components["schemas"]["PolymarketEvent"][] | null;
@@ -1922,6 +2305,30 @@ export interface components {
1922
2305
  * @enum {string}
1923
2306
  */
1924
2307
  SpikeDirection: "up" | "down" | "both";
2308
+ /** @description Output payload for Split trades (deposit collateral → receive outcome tokens). */
2309
+ SplitTrade: {
2310
+ id: string;
2311
+ hash: string;
2312
+ /** Format: int64 */
2313
+ block: number;
2314
+ /** Format: int64 */
2315
+ confirmed_at: number;
2316
+ /** Format: int64 */
2317
+ log_index: number;
2318
+ /** Format: int64 */
2319
+ block_index: number;
2320
+ trader: components["schemas"]["TraderInfo"];
2321
+ condition_id?: string | null;
2322
+ question?: string | null;
2323
+ image_url?: string | null;
2324
+ slug?: string | null;
2325
+ event_slug?: string | null;
2326
+ /** Format: double */
2327
+ usd_amount: number;
2328
+ /** @description Per-position mint amounts */
2329
+ position_details?: components["schemas"]["PositionDetail"][];
2330
+ exchange: components["schemas"]["PolymarketExchange"];
2331
+ };
1925
2332
  /** @description Lightweight row — derived metrics only, no bids/asks JSONB. */
1926
2333
  SpreadRow: {
1927
2334
  /** Format: int64 */
@@ -1950,6 +2357,77 @@ export interface components {
1950
2357
  token_id: string;
1951
2358
  outcome: string;
1952
2359
  };
2360
+ /**
2361
+ * @description Tagged enum for all trade types — serializes with `"trade_type": "..."` discriminator
2362
+ * and only includes fields relevant to each type.
2363
+ */
2364
+ TradeEvent: (components["schemas"]["OrderFilledTrade"] & {
2365
+ /** @enum {string} */
2366
+ trade_type: "OrderFilled";
2367
+ }) | (components["schemas"]["OrderFilledTrade"] & {
2368
+ /** @enum {string} */
2369
+ trade_type: "OrdersMatched";
2370
+ }) | (components["schemas"]["RedemptionTrade"] & {
2371
+ /** @enum {string} */
2372
+ trade_type: "Redemption";
2373
+ }) | (components["schemas"]["MergeTrade"] & {
2374
+ /** @enum {string} */
2375
+ trade_type: "Merge";
2376
+ }) | (components["schemas"]["SplitTrade"] & {
2377
+ /** @enum {string} */
2378
+ trade_type: "Split";
2379
+ }) | (components["schemas"]["PositionsConvertedTrade"] & {
2380
+ /** @enum {string} */
2381
+ trade_type: "PositionsConverted";
2382
+ }) | (components["schemas"]["CancelledTrade"] & {
2383
+ /** @enum {string} */
2384
+ trade_type: "Cancelled";
2385
+ }) | (components["schemas"]["QuestionInitializedEvent"] & {
2386
+ /** @enum {string} */
2387
+ trade_type: "Initialization";
2388
+ }) | (components["schemas"]["AssertionMadeEvent"] & {
2389
+ /** @enum {string} */
2390
+ trade_type: "Proposal";
2391
+ }) | (components["schemas"]["AssertionDisputedEvent"] & {
2392
+ /** @enum {string} */
2393
+ trade_type: "Dispute";
2394
+ }) | (components["schemas"]["AssertionSettledEvent"] & {
2395
+ /** @enum {string} */
2396
+ trade_type: "Settled";
2397
+ }) | (components["schemas"]["QuestionResolvedEvent"] & {
2398
+ /** @enum {string} */
2399
+ trade_type: "Resolution";
2400
+ }) | (components["schemas"]["ConditionResolutionEvent"] & {
2401
+ /** @enum {string} */
2402
+ trade_type: "ConditionResolution";
2403
+ }) | (components["schemas"]["QuestionResetEvent"] & {
2404
+ /** @enum {string} */
2405
+ trade_type: "Reset";
2406
+ }) | (components["schemas"]["QuestionFlaggedEvent"] & {
2407
+ /** @enum {string} */
2408
+ trade_type: "Flag";
2409
+ }) | (components["schemas"]["QuestionUnflaggedEvent"] & {
2410
+ /** @enum {string} */
2411
+ trade_type: "Unflag";
2412
+ }) | (components["schemas"]["QuestionPausedEvent"] & {
2413
+ /** @enum {string} */
2414
+ trade_type: "Pause";
2415
+ }) | (components["schemas"]["QuestionUnpausedEvent"] & {
2416
+ /** @enum {string} */
2417
+ trade_type: "Unpause";
2418
+ }) | (components["schemas"]["QuestionEmergencyResolvedEvent"] & {
2419
+ /** @enum {string} */
2420
+ trade_type: "ManualResolution";
2421
+ }) | (components["schemas"]["NegRiskOutcomeReportedEvent"] & {
2422
+ /** @enum {string} */
2423
+ trade_type: "NegRiskOutcomeReported";
2424
+ }) | (components["schemas"]["RegisterTokenTrade"] & {
2425
+ /** @enum {string} */
2426
+ trade_type: "RegisterToken";
2427
+ }) | (components["schemas"]["ApprovalTrade"] & {
2428
+ /** @enum {string} */
2429
+ trade_type: "Approval";
2430
+ });
1953
2431
  /** @enum {string} */
1954
2432
  TradeSide: "0" | "1";
1955
2433
  /** @enum {string} */
@@ -2694,7 +3172,7 @@ export interface operations {
2694
3172
  search?: string;
2695
3173
  /** @description Filter by status: open, closed, or all (default: all) */
2696
3174
  status?: components["schemas"]["MarketStatus"];
2697
- /** @description Sort: volume, txns, unique_traders, liquidity, holders, end_time, start_time, created_time, relevance */
3175
+ /** @description Sort: volume, txns, unique_traders, liquidity, holders, total_daily_rate, end_time, start_time, created_time, relevance */
2698
3176
  sort_by?: components["schemas"]["MarketSortBy"];
2699
3177
  /** @description Sort direction: asc, desc (default: desc) */
2700
3178
  sort_dir?: components["schemas"]["SortDirection"];
@@ -3080,9 +3558,10 @@ export interface operations {
3080
3558
  highest_probability?: number | null;
3081
3559
  /** Format: int64 */
3082
3560
  total_holders?: number | null;
3561
+ /** Format: double */
3562
+ total_daily_rate?: number | null;
3083
3563
  winning_outcome?: null | components["schemas"]["MarketOutcome"];
3084
3564
  outcomes?: components["schemas"]["MarketOutcome"][];
3085
- rewards?: components["schemas"]["MarketReward"][];
3086
3565
  clob_rewards?: components["schemas"]["ClobReward"][];
3087
3566
  tags?: string[];
3088
3567
  event_slug?: string | null;
@@ -3143,8 +3622,10 @@ export interface operations {
3143
3622
  all?: boolean;
3144
3623
  /** @description Results per page (default: 10, max: 250) */
3145
3624
  limit?: number;
3146
- /** @description Offset-based pagination key (integer offset into result set) */
3147
- pagination_key?: number;
3625
+ /** @description Pagination offset (number of results to skip). Takes precedence over pagination_key. */
3626
+ offset?: number;
3627
+ /** @description Cursor-based pagination key obtained from previous response's pagination.pagination_key */
3628
+ pagination_key?: string;
3148
3629
  /** @description Sort newest first (default: true) */
3149
3630
  sort_desc?: boolean;
3150
3631
  /** @description Return truncated response optimized for AI consumers (default: false) */
@@ -3162,7 +3643,7 @@ export interface operations {
3162
3643
  [name: string]: unknown;
3163
3644
  };
3164
3645
  content: {
3165
- "application/json": components["schemas"]["PredictionTradeResponse"][];
3646
+ "application/json": components["schemas"]["TradeEvent"][];
3166
3647
  };
3167
3648
  };
3168
3649
  };
@@ -3261,9 +3742,10 @@ export interface operations {
3261
3742
  highest_probability?: number | null;
3262
3743
  /** Format: int64 */
3263
3744
  total_holders?: number | null;
3745
+ /** Format: double */
3746
+ total_daily_rate?: number | null;
3264
3747
  winning_outcome?: null | components["schemas"]["MarketOutcome"];
3265
3748
  outcomes?: components["schemas"]["MarketOutcome"][];
3266
- rewards?: components["schemas"]["MarketReward"][];
3267
3749
  clob_rewards?: components["schemas"]["ClobReward"][];
3268
3750
  tags?: string[];
3269
3751
  event_slug?: string | null;
@@ -4068,7 +4550,7 @@ export interface operations {
4068
4550
  [name: string]: unknown;
4069
4551
  };
4070
4552
  content: {
4071
- "application/json": components["schemas"]["PredictionTradeResponse"][];
4553
+ "application/json": components["schemas"]["TradeEvent"][];
4072
4554
  };
4073
4555
  };
4074
4556
  };