@structbuild/sdk 0.6.7 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -975,6 +975,8 @@ export interface components {
975
975
  trader: string;
976
976
  /** @description Order filler wallet address (lowercase) */
977
977
  taker: string;
978
+ /** @description Maker trader display metadata (address + name / pseudonym / image / x / verified) */
979
+ trader_info: components["schemas"]["WebhookTraderInfo"];
978
980
  /** @description ERC-1155 outcome token ID */
979
981
  position_id: string;
980
982
  /** @description Parent market condition ID (0x-prefixed hex) */
@@ -1031,9 +1033,9 @@ export interface components {
1031
1033
  */
1032
1034
  price: number;
1033
1035
  /** @description Exchange contract that processed the trade */
1034
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
1036
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "ComboExchange" | "ComboCombinatorialModule" | "ComboNegRiskModule" | "Unknown";
1035
1037
  /** @description Trade type (webhook events only fire on order fills) */
1036
- trade_type: "OrderFilled" | "OrdersMatched";
1038
+ trade_type: "OrderFilled" | "OrdersMatched" | "ComboExecution";
1037
1039
  };
1038
1040
  /** @description Global PnL webhook payload. */
1039
1041
  GlobalPnlPayload: {
@@ -1704,6 +1706,8 @@ export interface components {
1704
1706
  trader: string;
1705
1707
  /** @description Order filler wallet address (lowercase) */
1706
1708
  taker: string;
1709
+ /** @description Maker trader display metadata (address + name / pseudonym / image / x / verified) */
1710
+ trader_info: components["schemas"]["WebhookTraderInfo"];
1707
1711
  /** @description ERC-1155 outcome token ID */
1708
1712
  position_id: string;
1709
1713
  /** @description Parent market condition ID */
@@ -1765,22 +1769,24 @@ export interface components {
1765
1769
  */
1766
1770
  probability?: number | null;
1767
1771
  /** @description Exchange contract that processed the trade */
1768
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
1772
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "ComboExchange" | "ComboCombinatorialModule" | "ComboNegRiskModule" | "Unknown";
1769
1773
  /** @description Trade type (webhook events only fire on order fills) */
1770
- trade_type: "OrderFilled" | "OrdersMatched";
1774
+ trade_type: "OrderFilled" | "OrdersMatched" | "ComboExecution";
1771
1775
  };
1772
1776
  /**
1773
1777
  * @description Trade types accepted by `trader_new_trade.trade_types`. Webhook fires on
1774
1778
  * fill-style trades only.
1775
1779
  * @enum {string}
1776
1780
  */
1777
- NewTradeFilterType: "OrderFilled" | "OrdersMatched";
1781
+ NewTradeFilterType: "OrderFilled" | "OrdersMatched" | "ComboExecution";
1778
1782
  /** @description Payload delivered on every order-filled trade */
1779
1783
  NewTradePayload: {
1780
1784
  /** @description Limit-order maker wallet address (lowercase) */
1781
1785
  trader: string;
1782
1786
  /** @description Order filler wallet address (lowercase) */
1783
1787
  taker: string;
1788
+ /** @description Maker trader display metadata (address + name / pseudonym / image / x / verified) */
1789
+ trader_info: components["schemas"]["WebhookTraderInfo"];
1784
1790
  /** @description ERC-1155 outcome token ID */
1785
1791
  position_id: string;
1786
1792
  /** @description Parent market condition ID */
@@ -1842,9 +1848,9 @@ export interface components {
1842
1848
  */
1843
1849
  probability?: number | null;
1844
1850
  /** @description Exchange contract that processed the trade */
1845
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
1851
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "ComboExchange" | "ComboCombinatorialModule" | "ComboNegRiskModule" | "Unknown";
1846
1852
  /** @description Trade type (webhook events only fire on order fills) */
1847
- trade_type: "OrderFilled" | "OrdersMatched";
1853
+ trade_type: "OrderFilled" | "OrdersMatched" | "ComboExecution";
1848
1854
  /**
1849
1855
  * @description CLOB V2 builder code (lower-cased `0x...` bytes32 hex). Absent on V1
1850
1856
  * trades; may be `0x0000…` for V2 trades placed without a builder code.
@@ -3451,7 +3457,7 @@ export interface components {
3451
3457
  * full set of typed prediction-trade variants.
3452
3458
  * @enum {string}
3453
3459
  */
3454
- TradeEventFilterType: "OrderFilled" | "OrdersMatched" | "MakerRebate" | "Reward" | "Yield" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken";
3460
+ TradeEventFilterType: "OrderFilled" | "OrdersMatched" | "MakerRebate" | "Reward" | "Yield" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "ComboCreation" | "ComboExecution" | "ComboStatusUpdate" | "ComboPositionsSplit" | "ComboPositionsMerged" | "ComboSplitOnCondition" | "ComboMergedOnCondition" | "ComboExtracted" | "ComboInjected" | "ComboConvertedToYesBasket" | "ComboMergedFromYesBasket" | "ComboCompressed" | "ComboPositionRedeemed" | "ComboWrapped" | "ComboUnwrapped" | "ComboHorizontalSplit" | "ComboHorizontalMerge" | "ComboPositionConverted" | "ComboPositionMigrated" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken";
3455
3461
  /** @description Subscription filters for the `trader_category_pnl` event. All fields are optional. */
3456
3462
  TraderCategoryPnlFilters: {
3457
3463
  /**
@@ -3710,8 +3716,8 @@ export interface components {
3710
3716
  * @description Only fire when outcome probability is ≤ this value.
3711
3717
  */
3712
3718
  max_price?: number | null;
3713
- /** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
3714
- trade_types?: ("OrderFilled" | "OrdersMatched")[] | null;
3719
+ /** @description Only fire for these fill-style trade types. Empty = OrderFilled, OrdersMatched, and ComboExecution only (default). */
3720
+ trade_types?: ("OrderFilled" | "OrdersMatched" | "ComboExecution")[] | null;
3715
3721
  /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3716
3722
  exclude_shortterm_markets?: boolean | null;
3717
3723
  };
@@ -3767,7 +3773,7 @@ export interface components {
3767
3773
  */
3768
3774
  max_price?: number | null;
3769
3775
  /** @description Only fire for these trade types. Empty = all supported trade-event variants. */
3770
- trade_types?: ("OrderFilled" | "OrdersMatched" | "MakerRebate" | "Reward" | "Yield" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken")[] | null;
3776
+ trade_types?: ("OrderFilled" | "OrdersMatched" | "MakerRebate" | "Reward" | "Yield" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "ComboCreation" | "ComboExecution" | "ComboStatusUpdate" | "ComboPositionsSplit" | "ComboPositionsMerged" | "ComboSplitOnCondition" | "ComboMergedOnCondition" | "ComboExtracted" | "ComboInjected" | "ComboConvertedToYesBasket" | "ComboMergedFromYesBasket" | "ComboCompressed" | "ComboPositionRedeemed" | "ComboWrapped" | "ComboUnwrapped" | "ComboHorizontalSplit" | "ComboHorizontalMerge" | "ComboPositionConverted" | "ComboPositionMigrated" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken")[] | null;
3771
3777
  /** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
3772
3778
  exclude_shortterm_markets?: boolean | null;
3773
3779
  };
@@ -4133,12 +4139,36 @@ export interface components {
4133
4139
  * @enum {string}
4134
4140
  */
4135
4141
  WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d" | "lifetime";
4142
+ /**
4143
+ * @description Trader display metadata nested into trade-fill webhook payloads.
4144
+ *
4145
+ * Mirrors the shape used by the trade-event and PnL alert payloads. `address`
4146
+ * (the lower-cased maker wallet) is always present; the remaining fields are
4147
+ * sourced from the producer-enriched `trader_profile` carried on the trade and
4148
+ * are omitted until that profile has been resolved.
4149
+ */
4150
+ WebhookTraderInfo: {
4151
+ /** @description Maker wallet address (lower-cased) */
4152
+ address: string;
4153
+ /** @description Display name */
4154
+ name?: string | null;
4155
+ /** @description Polymarket pseudonym */
4156
+ pseudonym?: string | null;
4157
+ /** @description Profile image URL (our CDN copy when available) */
4158
+ profile_image?: string | null;
4159
+ /** @description Linked X (Twitter) username */
4160
+ x_username?: string | null;
4161
+ /** @description Whether the trader carries a verified badge */
4162
+ verified_badge: boolean;
4163
+ };
4136
4164
  /** @description Payload delivered when a trade exceeds the configured size and probability thresholds */
4137
4165
  WhaleTradePayload: {
4138
4166
  /** @description Limit-order maker wallet address (lowercase) */
4139
4167
  trader: string;
4140
4168
  /** @description Order filler wallet address (lowercase) */
4141
4169
  taker: string;
4170
+ /** @description Maker trader display metadata (address + name / pseudonym / image / x / verified) */
4171
+ trader_info: components["schemas"]["WebhookTraderInfo"];
4142
4172
  /** @description ERC-1155 outcome token ID */
4143
4173
  position_id: string;
4144
4174
  /** @description Parent market condition ID */
@@ -4200,9 +4230,9 @@ export interface components {
4200
4230
  */
4201
4231
  probability?: number | null;
4202
4232
  /** @description Exchange contract that processed the trade */
4203
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
4233
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "ComboExchange" | "ComboCombinatorialModule" | "ComboNegRiskModule" | "Unknown";
4204
4234
  /** @description Trade type (webhook events only fire on order fills) */
4205
- trade_type: "OrderFilled" | "OrdersMatched";
4235
+ trade_type: "OrderFilled" | "OrdersMatched" | "ComboExecution";
4206
4236
  /**
4207
4237
  * @description CLOB V2 builder code (lower-cased `0x...` bytes32 hex). Absent on V1
4208
4238
  * trades; may be `0x0000…` for V2 trades placed without a builder code.
@@ -4234,6 +4264,8 @@ export interface components {
4234
4264
  subscribe_all?: boolean;
4235
4265
  /** @description Filter values that were rejected (invalid format or unknown type) */
4236
4266
  rejected?: string[];
4267
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
4268
+ compression?: boolean;
4237
4269
  };
4238
4270
  /** @description Subscribe to the oracle events stream. No filters = subscribe to all events. */
4239
4271
  OracleEventsStreamSubscribeMessage: {
@@ -4297,6 +4329,8 @@ export interface components {
4297
4329
  event_slugs?: string[];
4298
4330
  /** @description Ids that failed normalization or exceeded the per-sub cap. */
4299
4331
  rejected?: string[];
4332
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
4333
+ compression?: boolean;
4300
4334
  /** @description Non-null when the subscribe was rejected. */
4301
4335
  error?: string | null;
4302
4336
  };
@@ -4374,7 +4408,7 @@ export interface components {
4374
4408
  /** @description Trader wallet addresses (lowercase 0x-prefixed) */
4375
4409
  traders?: string[];
4376
4410
  /** @description Only receive events of these types. Empty array = all types. */
4377
- trade_types?: ("OrderFilled" | "OrdersMatched" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "MakerRebate" | "Reward" | "Yield" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken")[];
4411
+ trade_types?: ("OrderFilled" | "OrdersMatched" | "ComboExecution" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "MakerRebate" | "Reward" | "Yield" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken")[];
4378
4412
  /**
4379
4413
  * @description Trade status filter: "confirmed" (default) = on-chain only, "pending" = mempool only, "all" = both
4380
4414
  * @enum {string}
@@ -4404,6 +4438,8 @@ export interface components {
4404
4438
  status?: "confirmed" | "pending" | "all";
4405
4439
  /** @description Whether to subscribe to all matching events. */
4406
4440
  subscribe_all?: boolean;
4441
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
4442
+ compression?: boolean;
4407
4443
  /** @description Filter values that were rejected (invalid format or unknown type) */
4408
4444
  rejected?: string[];
4409
4445
  };
@@ -4419,7 +4455,7 @@ export interface components {
4419
4455
  * @description Trade type.
4420
4456
  * @enum {string}
4421
4457
  */
4422
- trade_type: "OrderFilled" | "OrdersMatched";
4458
+ trade_type: "OrderFilled" | "OrdersMatched" | "ComboExecution";
4423
4459
  /** @description Event ID. */
4424
4460
  id: string;
4425
4461
  /** @description Transaction hash. */
@@ -4916,6 +4952,8 @@ export interface components {
4916
4952
  AssetPricesSubscribeResponse: {
4917
4953
  /** @description Accepted symbols. Empty array means subscribed to all symbols. */
4918
4954
  asset_symbols?: string[];
4955
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
4956
+ compression?: boolean;
4919
4957
  };
4920
4958
  /** @description Server-pushed event: a crypto-asset price tick. Envelope type: "asset_price_tick". */
4921
4959
  AssetPriceTickEvent: {
@@ -4966,7 +5004,7 @@ export interface components {
4966
5004
  */
4967
5005
  published_at: number;
4968
5006
  };
4969
- /** @description Subscribe to the asset window updates stream. At least one of asset_symbols or timeframes must be non-empty. */
5007
+ /** @description Subscribe to the asset window updates stream. At least one of asset_symbols or timeframes must be non-empty, or set subscribe_all for the firehose. */
4970
5008
  AssetWindowUpdatesSubscribeMessage: {
4971
5009
  /**
4972
5010
  * @description Subscription action.
@@ -4977,6 +5015,8 @@ export interface components {
4977
5015
  asset_symbols?: string[];
4978
5016
  /** @description Candle sizes to filter by. "1d" and "24h" are treated as equivalent. */
4979
5017
  timeframes?: ("5m" | "15m" | "1h" | "4h" | "1d" | "24h")[];
5018
+ /** @description Firehose: receive every window update across all symbols and timeframes. Filters are ignored when set. */
5019
+ subscribe_all?: boolean;
4980
5020
  };
4981
5021
  /** @description Server acknowledgement for an asset window updates subscription */
4982
5022
  AssetWindowUpdatesSubscribeResponse: {
@@ -4984,12 +5024,16 @@ export interface components {
4984
5024
  asset_symbols?: string[];
4985
5025
  /** @description Accepted metric timeframes. */
4986
5026
  timeframes?: string[];
5027
+ /** @description Whether the firehose subscription is active. */
5028
+ subscribe_all?: boolean;
5029
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
5030
+ compression?: boolean;
4987
5031
  /** @description Set if the subscription was rejected (e.g. no filters provided) */
4988
5032
  error?: string | null;
4989
5033
  };
4990
5034
  /** @description Server-pushed event from the polymarket_asset_window_updates room. Same payload as AssetPriceWindowUpdateEvent. Envelope type: "asset_price_window_update". */
4991
5035
  AssetWindowUpdateEvent: components["schemas"]["AssetPriceWindowUpdateEvent"];
4992
- /** @description Subscribe to the market metrics stream. condition_ids is required and must be non-empty. */
5036
+ /** @description Subscribe to the market metrics stream. condition_ids is required and must be non-empty, unless subscribe_all is set. */
4993
5037
  MarketMetricsSubscribeMessage: {
4994
5038
  /**
4995
5039
  * @description Subscription action.
@@ -4997,9 +5041,11 @@ export interface components {
4997
5041
  */
4998
5042
  action: "subscribe" | "unsubscribe_all";
4999
5043
  /** @description 64-char hex condition IDs (with or without 0x prefix) */
5000
- condition_ids: string[];
5044
+ condition_ids?: string[];
5001
5045
  /** @description Accepted metric timeframes. */
5002
5046
  timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | "lifetime")[];
5047
+ /** @description Firehose: receive metrics updates for every market condition. condition_ids are ignored when set; the timeframes filter still applies. */
5048
+ subscribe_all?: boolean;
5003
5049
  };
5004
5050
  /** @description Server acknowledgement for a market metrics subscription */
5005
5051
  MarketMetricsSubscribeResponse: {
@@ -5011,6 +5057,10 @@ export interface components {
5011
5057
  rejected?: string[];
5012
5058
  /** @description Set if the entire subscription was rejected */
5013
5059
  error?: string | null;
5060
+ /** @description Whether the firehose subscription is active. */
5061
+ subscribe_all?: boolean;
5062
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
5063
+ compression?: boolean;
5014
5064
  };
5015
5065
  /** @description Server-pushed event: metrics update for one timeframe of a condition. Envelope type: "market_metrics_update". One event is emitted per timeframe window on each update. */
5016
5066
  MarketMetricsEvent: {
@@ -5069,18 +5119,34 @@ export interface components {
5069
5119
  */
5070
5120
  unique_builder_traders: number;
5071
5121
  };
5072
- /** @description Subscribe to the event metrics stream. event_slugs is required and must be non-empty. */
5122
+ /** @description Subscribe to the event metrics stream. event_slugs is required and must be non-empty, unless subscribe_all is set. */
5073
5123
  EventMetricsSubscribeMessage: {
5074
5124
  /**
5075
5125
  * @description Subscription action.
5076
5126
  * @enum {string}
5077
5127
  */
5078
5128
  action: "subscribe" | "unsubscribe_all";
5079
- /** @description Event slugs (lowercase) */
5080
- event_slugs: string[];
5129
+ /** @description Event slugs (lowercase). Required unless subscribe_all is set. */
5130
+ event_slugs?: string[];
5081
5131
  /** @description Accepted metric timeframes. */
5082
5132
  timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | "lifetime")[];
5083
- };
5133
+ /** @description Firehose: receive every update on this stream (event_slugs is ignored when set; the timeframes filter still applies). */
5134
+ subscribe_all?: boolean;
5135
+ } & ({
5136
+ /** @enum {unknown} */
5137
+ action: "unsubscribe_all";
5138
+ } | {
5139
+ /** @enum {unknown} */
5140
+ action: "subscribe";
5141
+ /** @enum {unknown} */
5142
+ subscribe_all: true;
5143
+ } | {
5144
+ /** @enum {unknown} */
5145
+ action: "subscribe";
5146
+ /** @enum {unknown} */
5147
+ subscribe_all?: false;
5148
+ event_slugs: unknown;
5149
+ });
5084
5150
  /** @description Server acknowledgement for an event metrics subscription */
5085
5151
  EventMetricsSubscribeResponse: {
5086
5152
  /** @description Accepted event slugs. */
@@ -5089,6 +5155,10 @@ export interface components {
5089
5155
  timeframes?: string[];
5090
5156
  /** @description Rejected filter values. */
5091
5157
  rejected?: string[];
5158
+ /** @description Whether the firehose subscription is active. */
5159
+ subscribe_all?: boolean;
5160
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
5161
+ compression?: boolean;
5092
5162
  /** @description Subscription error message. */
5093
5163
  error?: string | null;
5094
5164
  };
@@ -5149,7 +5219,7 @@ export interface components {
5149
5219
  */
5150
5220
  unique_builder_traders: number;
5151
5221
  };
5152
- /** @description Subscribe to the tag metrics stream. tags is required and must be non-empty. */
5222
+ /** @description Subscribe to the tag metrics stream. tags is required and must be non-empty, unless subscribe_all is set. */
5153
5223
  TagMetricsSubscribeMessage: {
5154
5224
  /**
5155
5225
  * @description Subscription action.
@@ -5157,9 +5227,11 @@ export interface components {
5157
5227
  */
5158
5228
  action: "subscribe" | "unsubscribe_all";
5159
5229
  /** @description Tag labels or slugs, matched case-insensitively */
5160
- tags: string[];
5230
+ tags?: string[];
5161
5231
  /** @description Accepted metric timeframes. */
5162
5232
  timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | "lifetime")[];
5233
+ /** @description Firehose: receive metrics updates for every tag on this stream. The tags filter is ignored when set; the timeframes filter still applies. */
5234
+ subscribe_all?: boolean;
5163
5235
  };
5164
5236
  /** @description Server acknowledgement for a tag metrics subscription */
5165
5237
  TagMetricsSubscribeResponse: {
@@ -5169,6 +5241,10 @@ export interface components {
5169
5241
  timeframes?: string[];
5170
5242
  /** @description Rejected filter values. */
5171
5243
  rejected?: string[];
5244
+ /** @description Whether the firehose subscription is active. */
5245
+ subscribe_all?: boolean;
5246
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
5247
+ compression?: boolean;
5172
5248
  /** @description Subscription error message. */
5173
5249
  error?: string | null;
5174
5250
  };
@@ -5229,7 +5305,7 @@ export interface components {
5229
5305
  */
5230
5306
  unique_builder_traders: number;
5231
5307
  };
5232
- /** @description Subscribe to the position metrics stream. position_ids is required and must be non-empty. */
5308
+ /** @description Subscribe to the position metrics stream. position_ids is required and must be non-empty, unless subscribe_all is set. */
5233
5309
  PositionMetricsSubscribeMessage: {
5234
5310
  /**
5235
5311
  * @description Subscription action.
@@ -5237,9 +5313,11 @@ export interface components {
5237
5313
  */
5238
5314
  action: "subscribe" | "unsubscribe_all";
5239
5315
  /** @description ERC-1155 outcome token IDs (decimal or hex strings) */
5240
- position_ids: string[];
5316
+ position_ids?: string[];
5241
5317
  /** @description Accepted metric timeframes. */
5242
5318
  timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | "lifetime")[];
5319
+ /** @description Firehose: receive every metrics update across all positions (position_ids is ignored when set; the timeframes filter still applies). */
5320
+ subscribe_all?: boolean;
5243
5321
  };
5244
5322
  /** @description Server acknowledgement for a position metrics subscription */
5245
5323
  PositionMetricsSubscribeResponse: {
@@ -5249,6 +5327,10 @@ export interface components {
5249
5327
  timeframes?: string[];
5250
5328
  /** @description Rejected filter values. */
5251
5329
  rejected?: string[];
5330
+ /** @description Whether the firehose subscription is active. */
5331
+ subscribe_all?: boolean;
5332
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
5333
+ compression?: boolean;
5252
5334
  /** @description Subscription error message. */
5253
5335
  error?: string | null;
5254
5336
  };
@@ -5382,6 +5464,21 @@ export interface components {
5382
5464
  action: "subscribe" | "unsubscribe_all";
5383
5465
  /** @description ERC-1155 outcome token IDs (decimal or hex). Empty/omitted = all positions. */
5384
5466
  position_ids?: string[];
5467
+ /** @description Firehose: receive every position liquidity update on this stream (filters are ignored when set). */
5468
+ subscribe_all?: boolean;
5469
+ };
5470
+ /** @description Server acknowledgement for a position liquidity subscription. */
5471
+ PositionLiquiditySubscribeResponse: {
5472
+ /** @description Accepted position IDs (empty = firehose). */
5473
+ ids?: string[];
5474
+ /** @description Rejected filter values. */
5475
+ rejected?: string[];
5476
+ /** @description Whether the firehose subscription is active. */
5477
+ subscribe_all?: boolean;
5478
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
5479
+ compression?: boolean;
5480
+ /** @description Subscription error message. */
5481
+ error?: string | null;
5385
5482
  };
5386
5483
  /** @description Server-pushed event: latest USD liquidity for an outcome token. Envelope type: "position_liquidity_update". */
5387
5484
  PositionLiquidityEvent: {
@@ -5404,6 +5501,21 @@ export interface components {
5404
5501
  action: "subscribe" | "unsubscribe_all";
5405
5502
  /** @description 64-char hex market IDs. Empty/omitted = all markets. */
5406
5503
  condition_ids?: string[];
5504
+ /** @description Firehose: receive every update on this stream (filters are ignored when set). */
5505
+ subscribe_all?: boolean;
5506
+ };
5507
+ /** @description Server acknowledgement for a market liquidity subscription. */
5508
+ MarketLiquiditySubscribeResponse: {
5509
+ /** @description Accepted condition IDs (empty = firehose). */
5510
+ ids?: string[];
5511
+ /** @description Rejected filter values. */
5512
+ rejected?: string[];
5513
+ /** @description Whether the firehose subscription is active. */
5514
+ subscribe_all?: boolean;
5515
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
5516
+ compression?: boolean;
5517
+ /** @description Subscription error message. */
5518
+ error?: string | null;
5407
5519
  };
5408
5520
  /** @description Server-pushed event: latest total USD liquidity for a market. Envelope type: "market_liquidity_update". */
5409
5521
  MarketLiquidityEvent: {
@@ -5426,6 +5538,8 @@ export interface components {
5426
5538
  action: "subscribe" | "unsubscribe_all";
5427
5539
  /** @description Event slugs. Empty/omitted = all events. */
5428
5540
  event_slugs?: string[];
5541
+ /** @description Firehose: receive every event's liquidity updates (filters are ignored when set). */
5542
+ subscribe_all?: boolean;
5429
5543
  };
5430
5544
  /** @description Server-pushed event: latest total USD liquidity for an event. Envelope type: "event_liquidity_update". */
5431
5545
  EventLiquidityEvent: {
@@ -5439,14 +5553,14 @@ export interface components {
5439
5553
  */
5440
5554
  liquidity_updated_at: number;
5441
5555
  };
5442
- /** @description Subscribe to the trader PnL stream. `traders` is required and must be non-empty. `update_types` and `timeframes` are optional narrowing filters — omit or leave empty to receive all update types / timeframes. */
5556
+ /** @description Subscribe to the trader PnL stream. `traders` is required and must be non-empty. `update_types` and `timeframes` are optional narrowing filters — omit or leave empty to receive all update types / timeframes. Firehose / `subscribe_all` is not supported. */
5443
5557
  TraderPnlSubscribeMessage: {
5444
5558
  /**
5445
5559
  * @description Subscription action.
5446
5560
  * @enum {string}
5447
5561
  */
5448
5562
  action: "subscribe" | "unsubscribe_all";
5449
- /** @description EVM wallet addresses */
5563
+ /** @description EVM wallet addresses. Required. */
5450
5564
  traders: string[];
5451
5565
  /** @description Restrict pushed updates to this subset of PnL granularities. Empty/omitted = all four. Unknown values reject the subscription. */
5452
5566
  update_types?: ("global" | "market" | "category")[];
@@ -5465,6 +5579,8 @@ export interface components {
5465
5579
  timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
5466
5580
  /** @description Trader addresses that were rejected (invalid EVM format). */
5467
5581
  rejected?: string[];
5582
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
5583
+ compression?: boolean;
5468
5584
  /** @description Set if the entire subscription was rejected (e.g. empty traders, or an invalid update_type / timeframe value). */
5469
5585
  error?: string | null;
5470
5586
  };
@@ -6033,18 +6149,34 @@ export interface components {
6033
6149
  block: number;
6034
6150
  data: components["schemas"]["TraderCategoryResolutionRow"][];
6035
6151
  };
6036
- /** @description Subscribe to the trader positions stream. `traders` is required and must be non-empty. `dirty_kinds` is an optional narrowing filter — empty/omitted or `["all"]` = receive every kind of update. */
6152
+ /** @description Subscribe to the trader positions stream. `traders` is required and must be non-empty unless `subscribe_all` is set. `dirty_kinds` is an optional narrowing filter — empty/omitted or `["all"]` = receive every kind of update. */
6037
6153
  TraderPositionsSubscribeMessage: {
6038
6154
  /**
6039
6155
  * @description Subscription action.
6040
6156
  * @enum {string}
6041
6157
  */
6042
6158
  action: "subscribe" | "unsubscribe_all";
6043
- /** @description EVM wallet addresses */
6044
- traders: string[];
6045
- /** @description Restrict pushed updates to this subset of update kinds. Omit, leave empty, or pass `["all"]` to accept every kind (the default). Unknown values reject the subscription. */
6159
+ /** @description EVM wallet addresses. Required and non-empty unless subscribe_all is set. */
6160
+ traders?: string[];
6161
+ /** @description Restrict pushed updates to this subset of update kinds. Omit, leave empty, or pass `["all"]` to accept every kind (the default). Unknown values reject the subscription. Also applies to firehose subscriptions. */
6046
6162
  dirty_kinds?: ("trade" | "price" | "position_resolved" | "all")[];
6047
- };
6163
+ /** @description Firehose: receive every position update on this stream (`traders` is ignored when set; `dirty_kinds` still applies). */
6164
+ subscribe_all?: boolean;
6165
+ } & ({
6166
+ /** @enum {unknown} */
6167
+ action: "unsubscribe_all";
6168
+ } | {
6169
+ /** @enum {unknown} */
6170
+ action: "subscribe";
6171
+ /** @enum {unknown} */
6172
+ subscribe_all: true;
6173
+ } | {
6174
+ /** @enum {unknown} */
6175
+ action: "subscribe";
6176
+ /** @enum {unknown} */
6177
+ subscribe_all?: false;
6178
+ traders: unknown;
6179
+ });
6048
6180
  /** @description Server acknowledgement for a trader positions subscription. */
6049
6181
  TraderPositionsSubscribeResponse: {
6050
6182
  /** @description Accepted trader wallets. */
@@ -6053,6 +6185,10 @@ export interface components {
6053
6185
  dirty_kinds?: ("trade" | "price" | "position_resolved")[];
6054
6186
  /** @description Rejected filter values. */
6055
6187
  rejected?: string[];
6188
+ /** @description Whether the firehose subscription is active. */
6189
+ subscribe_all?: boolean;
6190
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
6191
+ compression?: boolean;
6056
6192
  /** @description Subscription error message. */
6057
6193
  error?: string | null;
6058
6194
  };
@@ -6260,17 +6396,19 @@ export interface components {
6260
6396
  block: number;
6261
6397
  data: components["schemas"]["TraderPositionResolutionRow"][];
6262
6398
  };
6263
- /** @description Subscribe to the trader exit markers stream. `traders` is required and must be non-empty. `reasons` is an optional narrowing filter — empty/omitted or `["all"]` = receive every exit reason. */
6399
+ /** @description Subscribe to the trader exit markers stream. `traders` is required and must be non-empty unless `subscribe_all` is set. `reasons` is an optional narrowing filter — empty/omitted or `["all"]` = receive every exit reason. */
6264
6400
  TraderExitMarkersSubscribeMessage: {
6265
6401
  /**
6266
6402
  * @description Subscription action.
6267
6403
  * @enum {string}
6268
6404
  */
6269
6405
  action: "subscribe" | "unsubscribe_all";
6270
- /** @description EVM wallet addresses */
6271
- traders: string[];
6406
+ /** @description EVM wallet addresses. Required unless subscribe_all is set. */
6407
+ traders?: string[];
6272
6408
  /** @description Restrict pushed exits to this subset of reasons. Omit, leave empty, or pass `["all"]` to accept every reason (the default). Unknown values reject the subscription. */
6273
6409
  reasons?: ("resolved_win" | "resolved_loss" | "sold_win" | "sold_loss" | "all")[];
6410
+ /** @description Firehose: receive exits for every trader on this stream. The traders filter is ignored when set; reasons still applies. */
6411
+ subscribe_all?: boolean;
6274
6412
  };
6275
6413
  /** @description Server acknowledgement for a trader exit markers subscription. */
6276
6414
  TraderExitMarkersSubscribeResponse: {
@@ -6280,6 +6418,10 @@ export interface components {
6280
6418
  reasons?: ("resolved_win" | "resolved_loss" | "sold_win" | "sold_loss")[];
6281
6419
  /** @description Rejected filter values. */
6282
6420
  rejected?: string[];
6421
+ /** @description Whether the firehose subscription is active. */
6422
+ subscribe_all?: boolean;
6423
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
6424
+ compression?: boolean;
6283
6425
  /** @description Subscription error message. */
6284
6426
  error?: string | null;
6285
6427
  };
@@ -6342,13 +6484,15 @@ export interface components {
6342
6484
  block: number;
6343
6485
  data: components["schemas"]["TraderExitMarkerRow"][];
6344
6486
  };
6345
- /** @description Subscribe to holder metrics for explicit positions, conditions, or events. At least one identifier array must be non-empty. Omitted arrays receive no updates for that metric family. Up to 500 total identifiers are accepted. */
6487
+ /** @description Subscribe to holder metrics for explicit positions, conditions, or events. At least one identifier array must be non-empty, unless subscribe_all is set. Omitted arrays receive no updates for that metric family. Up to 500 total identifiers are accepted. */
6346
6488
  HolderMetricsSubscribeMessage: {
6347
6489
  /**
6348
6490
  * @description Subscription action.
6349
6491
  * @enum {string}
6350
6492
  */
6351
6493
  action: "subscribe" | "unsubscribe_all";
6494
+ /** @description Firehose: receive every update on this stream (filters are ignored when set). */
6495
+ subscribe_all?: boolean;
6352
6496
  /** @description Position token IDs to receive position holder metrics for. */
6353
6497
  position_ids?: string[];
6354
6498
  /** @description Condition IDs to receive condition holder metrics for. */
@@ -6356,6 +6500,21 @@ export interface components {
6356
6500
  /** @description Event slugs to receive event holder metrics for. */
6357
6501
  event_slugs?: string[];
6358
6502
  };
6503
+ /** @description Server acknowledgement for a holder metrics subscription. */
6504
+ HolderMetricsSubscribeResponse: {
6505
+ /** @description Accepted position IDs. */
6506
+ position_ids?: string[];
6507
+ /** @description Accepted condition IDs. */
6508
+ condition_ids?: string[];
6509
+ /** @description Accepted event slugs. */
6510
+ event_slugs?: string[];
6511
+ /** @description Whether the firehose subscription is active. */
6512
+ subscribe_all?: boolean;
6513
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
6514
+ compression?: boolean;
6515
+ /** @description Subscription error message. */
6516
+ error?: string | null;
6517
+ };
6359
6518
  PositionHolderMetricsRow: {
6360
6519
  /** @description Unix timestamp in seconds. */
6361
6520
  ts?: number;
@@ -6430,21 +6589,23 @@ export interface components {
6430
6589
  block: number;
6431
6590
  data: components["schemas"]["EventHolderMetricsRow"][];
6432
6591
  };
6433
- /** @description Subscribe to the accounts stream. `wallets` is required. Share balance updates (`accounts_update`) are always delivered. Set `include_usdce`, `include_pusd`, or `include_matic` to also receive those balance streams. */
6592
+ /** @description Subscribe to the accounts stream. `wallets` is required unless `subscribe_all` is set. Share balance updates (`accounts_update`) are always delivered. Set `include_usdce`, `include_pusd`, or `include_matic` to also receive those balance streams. */
6434
6593
  AccountsSubscribeMessage: {
6435
6594
  /**
6436
6595
  * @description Subscription action.
6437
6596
  * @enum {string}
6438
6597
  */
6439
6598
  action: "subscribe" | "unsubscribe_all";
6440
- /** @description EVM wallet addresses */
6441
- wallets: string[];
6599
+ /** @description EVM wallet addresses. Required unless subscribe_all is set. */
6600
+ wallets?: string[];
6442
6601
  /** @description Also stream USDCe collateral balance updates for subscribed wallets (V1) */
6443
6602
  include_usdce?: boolean;
6444
6603
  /** @description Also stream pUSD collateral balance updates for subscribed wallets (V2 CLOB) */
6445
6604
  include_pusd?: boolean;
6446
6605
  /** @description Also stream MATIC gas balance updates for subscribed wallets */
6447
6606
  include_matic?: boolean;
6607
+ /** @description Firehose: receive balance updates for every wallet on this stream. The wallets filter is ignored when set; the include_* flags still gate the extra token streams. */
6608
+ subscribe_all?: boolean;
6448
6609
  };
6449
6610
  /** @description Server acknowledgement for an accounts subscription */
6450
6611
  AccountsSubscribeResponse: {
@@ -6458,6 +6619,10 @@ export interface components {
6458
6619
  include_pusd?: boolean;
6459
6620
  /** @description Whether to include MATIC balances. */
6460
6621
  include_matic?: boolean;
6622
+ /** @description Whether the firehose subscription is active. */
6623
+ subscribe_all?: boolean;
6624
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
6625
+ compression?: boolean;
6461
6626
  /** @description Subscription error message. */
6462
6627
  error?: string | null;
6463
6628
  };
@@ -6541,7 +6706,7 @@ export interface components {
6541
6706
  */
6542
6707
  updated_at: number;
6543
6708
  };
6544
- /** @description Subscribe to the order book stream. At least one filter is required. Maximum 500 combined condition_ids + position_ids per client. No `type` field is needed — the server routes by room_id. */
6709
+ /** @description Subscribe to the order book stream. At least one filter is required unless `subscribe_all` is true. Maximum 500 combined condition_ids + position_ids per client. No `type` field is needed — the server routes by room_id. */
6545
6710
  OrderBookSubscribeMessage: {
6546
6711
  /**
6547
6712
  * @description Subscription action.
@@ -6552,6 +6717,8 @@ export interface components {
6552
6717
  condition_ids?: string[];
6553
6718
  /** @description Token / asset IDs (individual outcome positions, hex strings). */
6554
6719
  position_ids?: string[];
6720
+ /** @description Firehose: receive every orderbook snapshot across all markets, delivered as conflated `order_book_batch` envelopes every 50ms. Filters are ignored when set. */
6721
+ subscribe_all?: boolean;
6555
6722
  };
6556
6723
  /** @description Server acknowledgement for an order book subscription. Envelope type: "order_book_stream_subscribe_response". */
6557
6724
  OrderBookSubscribeResponse: {
@@ -6561,6 +6728,26 @@ export interface components {
6561
6728
  position_ids?: string[];
6562
6729
  /** @description Filter values that were rejected (invalid format or limit exceeded) */
6563
6730
  rejected?: string[];
6731
+ /** @description Whether the firehose subscription is active */
6732
+ subscribe_all?: boolean;
6733
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake) */
6734
+ compression?: boolean;
6735
+ /** @description Subscription error message. */
6736
+ error?: string | null;
6737
+ };
6738
+ /** @description Server-pushed firehose batch: all orderbook snapshots from the last 50ms window, conflated per asset (newest book per asset). Envelope type: "order_book_batch". Sent only to `subscribe_all` subscribers. */
6739
+ OrderBookBatchEvent: {
6740
+ /** @enum {string} */
6741
+ type: "order_book_batch";
6742
+ /**
6743
+ * @description WebSocket room ID.
6744
+ * @enum {string}
6745
+ */
6746
+ room_id: "polymarket_order_book";
6747
+ /** @description Number of snapshots in this batch */
6748
+ count: number;
6749
+ /** @description Conflated snapshots, ordered by timestamp ascending */
6750
+ data: components["schemas"]["OrderBookUpdateEvent"][];
6564
6751
  };
6565
6752
  /** @description A single order book price level. Matches the HTTP order book API's OrderbookLevel. */
6566
6753
  OrderBookLevel: {
@@ -6623,6 +6810,8 @@ export interface components {
6623
6810
  subscribe_all?: boolean;
6624
6811
  /** @description Filter values that were rejected */
6625
6812
  rejected?: string[];
6813
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake) */
6814
+ compression?: boolean;
6626
6815
  };
6627
6816
  /** @description Server-pushed CLOB reward change event. Envelope type: "clob_rewards_update". */
6628
6817
  ClobRewardsUpdateEvent: {
@@ -6740,6 +6929,8 @@ export interface components {
6740
6929
  event_slugs?: string[];
6741
6930
  /** @description Ids that failed normalization (ids mode). */
6742
6931
  rejected?: string[];
6932
+ /** @description Whether zstd-compressed binary delivery is active for this connection (negotiated at handshake). */
6933
+ compression?: boolean;
6743
6934
  /** @description Non-null when the subscribe was rejected (invalid cadence, bad filter, too many subs, …). */
6744
6935
  error?: string | null;
6745
6936
  };
@@ -6792,7 +6983,7 @@ export interface components {
6792
6983
  event_slugs?: string[];
6793
6984
  };
6794
6985
  /**
6795
- * OrderFilled / OrdersMatched
6986
+ * OrderFilled / OrdersMatched / ComboExecution
6796
6987
  * @description A buy/sell trade was matched on the exchange.
6797
6988
  */
6798
6989
  TradeOrderFilledEvent: {
@@ -6800,7 +6991,7 @@ export interface components {
6800
6991
  * @description Trade type.
6801
6992
  * @enum {string}
6802
6993
  */
6803
- trade_type: "OrderFilled" | "OrdersMatched";
6994
+ trade_type: "OrderFilled" | "OrdersMatched" | "ComboExecution";
6804
6995
  /** @description Event ID. */
6805
6996
  id: string;
6806
6997
  /** @description Transaction hash. */