@polymarket/bindings 0.7.0 → 0.9.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.
@@ -1,5 +1,5 @@
1
- import { TokenId, DecimalString, EpochMilliseconds, ConditionId, IsoDateTimeString, OrderSide, OrderType, TradeStatus, BaseUnits, CommentId, CommentParentEntityType, EventId, SeriesId, ImageOptimizationId } from '../index.js';
2
1
  import { z } from 'zod';
2
+ import { PositionId, TokenId, ConditionId, DecimalString, EpochMilliseconds, IsoDateTimeString, OrderSide, OrderType, TradeStatus, BaseUnits, CommentId, CommentParentEntityType, EventId, SeriesId, ImageOptimizationId } from '../index.js';
3
3
  import { P as PerpsInstrumentId, V as PerpsKlineInterval, c as PerpsDepositStatus, j as PerpsTradeId, ac as PerpsOrderId, k as PerpsSide, b as PerpsFundingPaymentId, a4 as PerpsNotificationId, a9 as PerpsNotificationType, a6 as PerpsNotificationOrderType, $ as PerpsMarginType, av as PerpsTimeInForce, af as PerpsOrderStatus, ax as PerpsTpSlKind, aB as PerpsTpSlScope, d as PerpsWithdrawalId, e as PerpsKnownWithdrawalStatus } from '../orders-CAELACaR.js';
4
4
  import * as _polymarket_types from '@polymarket/types';
5
5
  import { R as ReactionType } from '../comment-C-jBbhp7.js';
@@ -18,8 +18,8 @@ declare const OrderBookLevelSchema: z.ZodObject<{
18
18
  type OrderBookLevel = z.infer<typeof OrderBookLevelSchema>;
19
19
  declare const MarketBookEventSchema: z.ZodPipe<z.ZodObject<{
20
20
  event_type: z.ZodLiteral<"book">;
21
- market: z.ZodString;
22
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
21
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
22
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
23
23
  bids: z.ZodArray<z.ZodObject<{
24
24
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
25
25
  size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
@@ -38,12 +38,14 @@ declare const MarketBookEventSchema: z.ZodPipe<z.ZodObject<{
38
38
  topic: "market";
39
39
  type: "book";
40
40
  payload: {
41
- tokenId: TokenId;
41
+ conditionId: ConditionId;
42
+ market: ConditionId;
43
+ assetId: PositionId | TokenId;
44
+ tokenId: PositionId | TokenId;
42
45
  minOrderSize: DecimalString | null | undefined;
43
46
  tickSize: DecimalString | null | undefined;
44
47
  negRisk: boolean | null | undefined;
45
48
  lastTradePrice: DecimalString | null | undefined;
46
- market: string;
47
49
  bids: {
48
50
  price: DecimalString;
49
51
  size: DecimalString;
@@ -57,8 +59,8 @@ declare const MarketBookEventSchema: z.ZodPipe<z.ZodObject<{
57
59
  };
58
60
  }, {
59
61
  event_type: "book";
60
- market: string;
61
- asset_id: TokenId;
62
+ market: ConditionId;
63
+ asset_id: PositionId | TokenId;
62
64
  bids: {
63
65
  price: DecimalString;
64
66
  size: DecimalString;
@@ -74,38 +76,42 @@ declare const MarketBookEventSchema: z.ZodPipe<z.ZodObject<{
74
76
  neg_risk?: boolean | null | undefined;
75
77
  last_trade_price?: DecimalString | null | undefined;
76
78
  }>>;
77
- type MarketBookEvent = z.infer<typeof MarketBookEventSchema>;
78
- declare const PriceChangeSchema: z.ZodPipe<z.ZodObject<{
79
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
80
- price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
81
- size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
82
- side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
83
- hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
- best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
85
- best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
86
- }, z.core.$strip>, z.ZodTransform<{
87
- tokenId: TokenId;
88
- bestBid: DecimalString | null | undefined;
89
- bestAsk: DecimalString | null | undefined;
90
- price: DecimalString;
91
- size: DecimalString;
92
- side: OrderSide;
93
- hash?: string | null | undefined;
94
- }, {
95
- asset_id: TokenId;
79
+ type MarketBookEvent = {
80
+ topic: 'market';
81
+ type: 'book';
82
+ payload: {
83
+ assetId: PositionId | TokenId;
84
+ /** @deprecated Use `assetId`. */
85
+ tokenId: PositionId | TokenId;
86
+ conditionId: ConditionId;
87
+ /** @deprecated Use `conditionId`. */
88
+ market: ConditionId;
89
+ bids: OrderBookLevel[];
90
+ asks: OrderBookLevel[];
91
+ hash?: string | null;
92
+ timestamp?: EpochMilliseconds | null;
93
+ minOrderSize: DecimalString | null | undefined;
94
+ tickSize: DecimalString | null | undefined;
95
+ negRisk: boolean | null | undefined;
96
+ lastTradePrice: DecimalString | null | undefined;
97
+ };
98
+ };
99
+ type PriceChange = {
100
+ assetId: PositionId | TokenId;
101
+ /** @deprecated Use `assetId`. */
102
+ tokenId: PositionId | TokenId;
96
103
  price: DecimalString;
97
104
  size: DecimalString;
98
105
  side: OrderSide;
99
- hash?: string | null | undefined;
100
- best_bid?: DecimalString | null | undefined;
101
- best_ask?: DecimalString | null | undefined;
102
- }>>;
103
- type PriceChange = z.infer<typeof PriceChangeSchema>;
106
+ hash?: string | null;
107
+ bestBid: DecimalString | null | undefined;
108
+ bestAsk: DecimalString | null | undefined;
109
+ };
104
110
  declare const MarketPriceChangeEventSchema: z.ZodPipe<z.ZodObject<{
105
111
  event_type: z.ZodLiteral<"price_change">;
106
- market: z.ZodString;
112
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
107
113
  price_changes: z.ZodArray<z.ZodPipe<z.ZodObject<{
108
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
114
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
109
115
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
110
116
  size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
111
117
  side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
@@ -113,7 +119,8 @@ declare const MarketPriceChangeEventSchema: z.ZodPipe<z.ZodObject<{
113
119
  best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
114
120
  best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
115
121
  }, z.core.$strip>, z.ZodTransform<{
116
- tokenId: TokenId;
122
+ assetId: PositionId | TokenId;
123
+ tokenId: PositionId | TokenId;
117
124
  bestBid: DecimalString | null | undefined;
118
125
  bestAsk: DecimalString | null | undefined;
119
126
  price: DecimalString;
@@ -121,7 +128,7 @@ declare const MarketPriceChangeEventSchema: z.ZodPipe<z.ZodObject<{
121
128
  side: OrderSide;
122
129
  hash?: string | null | undefined;
123
130
  }, {
124
- asset_id: TokenId;
131
+ asset_id: PositionId | TokenId;
125
132
  price: DecimalString;
126
133
  size: DecimalString;
127
134
  side: OrderSide;
@@ -134,8 +141,11 @@ declare const MarketPriceChangeEventSchema: z.ZodPipe<z.ZodObject<{
134
141
  topic: "market";
135
142
  type: "price_change";
136
143
  payload: {
144
+ conditionId: ConditionId;
145
+ market: ConditionId;
137
146
  priceChanges: {
138
- tokenId: TokenId;
147
+ assetId: PositionId | TokenId;
148
+ tokenId: PositionId | TokenId;
139
149
  bestBid: DecimalString | null | undefined;
140
150
  bestAsk: DecimalString | null | undefined;
141
151
  price: DecimalString;
@@ -143,14 +153,14 @@ declare const MarketPriceChangeEventSchema: z.ZodPipe<z.ZodObject<{
143
153
  side: OrderSide;
144
154
  hash?: string | null | undefined;
145
155
  }[];
146
- market: string;
147
156
  timestamp?: EpochMilliseconds | null | undefined;
148
157
  };
149
158
  }, {
150
159
  event_type: "price_change";
151
- market: string;
160
+ market: ConditionId;
152
161
  price_changes: {
153
- tokenId: TokenId;
162
+ assetId: PositionId | TokenId;
163
+ tokenId: PositionId | TokenId;
154
164
  bestBid: DecimalString | null | undefined;
155
165
  bestAsk: DecimalString | null | undefined;
156
166
  price: DecimalString;
@@ -160,11 +170,21 @@ declare const MarketPriceChangeEventSchema: z.ZodPipe<z.ZodObject<{
160
170
  }[];
161
171
  timestamp?: EpochMilliseconds | null | undefined;
162
172
  }>>;
163
- type MarketPriceChangeEvent = z.infer<typeof MarketPriceChangeEventSchema>;
173
+ type MarketPriceChangeEvent = {
174
+ topic: 'market';
175
+ type: 'price_change';
176
+ payload: {
177
+ conditionId: ConditionId;
178
+ /** @deprecated Use `conditionId`. */
179
+ market: ConditionId;
180
+ priceChanges: PriceChange[];
181
+ timestamp?: EpochMilliseconds | null;
182
+ };
183
+ };
164
184
  declare const MarketLastTradePriceEventSchema: z.ZodPipe<z.ZodObject<{
165
185
  event_type: z.ZodLiteral<"last_trade_price">;
166
- market: z.ZodString;
167
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
186
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
187
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
168
188
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
169
189
  size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
170
190
  fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
@@ -175,10 +195,12 @@ declare const MarketLastTradePriceEventSchema: z.ZodPipe<z.ZodObject<{
175
195
  topic: "market";
176
196
  type: "last_trade_price";
177
197
  payload: {
178
- tokenId: TokenId;
198
+ conditionId: ConditionId;
199
+ market: ConditionId;
200
+ assetId: PositionId | TokenId;
201
+ tokenId: PositionId | TokenId;
179
202
  feeRateBps: DecimalString | null | undefined;
180
203
  transactionHash: string | null | undefined;
181
- market: string;
182
204
  price: DecimalString;
183
205
  side: OrderSide;
184
206
  size?: DecimalString | null | undefined;
@@ -186,8 +208,8 @@ declare const MarketLastTradePriceEventSchema: z.ZodPipe<z.ZodObject<{
186
208
  };
187
209
  }, {
188
210
  event_type: "last_trade_price";
189
- market: string;
190
- asset_id: TokenId;
211
+ market: ConditionId;
212
+ asset_id: PositionId | TokenId;
191
213
  price: DecimalString;
192
214
  side: OrderSide;
193
215
  size?: DecimalString | null | undefined;
@@ -195,11 +217,28 @@ declare const MarketLastTradePriceEventSchema: z.ZodPipe<z.ZodObject<{
195
217
  timestamp?: EpochMilliseconds | null | undefined;
196
218
  transaction_hash?: string | null | undefined;
197
219
  }>>;
198
- type MarketLastTradePriceEvent = z.infer<typeof MarketLastTradePriceEventSchema>;
220
+ type MarketLastTradePriceEvent = {
221
+ topic: 'market';
222
+ type: 'last_trade_price';
223
+ payload: {
224
+ assetId: PositionId | TokenId;
225
+ /** @deprecated Use `assetId`. */
226
+ tokenId: PositionId | TokenId;
227
+ conditionId: ConditionId;
228
+ /** @deprecated Use `conditionId`. */
229
+ market: ConditionId;
230
+ price: DecimalString;
231
+ side: OrderSide;
232
+ size?: DecimalString | null;
233
+ feeRateBps: DecimalString | null | undefined;
234
+ timestamp?: EpochMilliseconds | null;
235
+ transactionHash: string | null | undefined;
236
+ };
237
+ };
199
238
  declare const MarketTickSizeChangeEventSchema: z.ZodPipe<z.ZodObject<{
200
239
  event_type: z.ZodLiteral<"tick_size_change">;
201
- market: z.ZodString;
202
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
240
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
241
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
203
242
  old_tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
204
243
  new_tick_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
205
244
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
@@ -207,25 +246,41 @@ declare const MarketTickSizeChangeEventSchema: z.ZodPipe<z.ZodObject<{
207
246
  topic: "market";
208
247
  type: "tick_size_change";
209
248
  payload: {
210
- tokenId: TokenId;
249
+ conditionId: ConditionId;
250
+ market: ConditionId;
251
+ assetId: PositionId | TokenId;
252
+ tokenId: PositionId | TokenId;
211
253
  oldTickSize: DecimalString | null | undefined;
212
254
  newTickSize: DecimalString;
213
- market: string;
214
255
  timestamp?: EpochMilliseconds | null | undefined;
215
256
  };
216
257
  }, {
217
258
  event_type: "tick_size_change";
218
- market: string;
219
- asset_id: TokenId;
259
+ market: ConditionId;
260
+ asset_id: PositionId | TokenId;
220
261
  new_tick_size: DecimalString;
221
262
  old_tick_size?: DecimalString | null | undefined;
222
263
  timestamp?: EpochMilliseconds | null | undefined;
223
264
  }>>;
224
- type MarketTickSizeChangeEvent = z.infer<typeof MarketTickSizeChangeEventSchema>;
265
+ type MarketTickSizeChangeEvent = {
266
+ topic: 'market';
267
+ type: 'tick_size_change';
268
+ payload: {
269
+ assetId: PositionId | TokenId;
270
+ /** @deprecated Use `assetId`. */
271
+ tokenId: PositionId | TokenId;
272
+ conditionId: ConditionId;
273
+ /** @deprecated Use `conditionId`. */
274
+ market: ConditionId;
275
+ oldTickSize: DecimalString | null | undefined;
276
+ newTickSize: DecimalString;
277
+ timestamp?: EpochMilliseconds | null;
278
+ };
279
+ };
225
280
  declare const MarketBestBidAskEventSchema: z.ZodPipe<z.ZodObject<{
226
281
  event_type: z.ZodLiteral<"best_bid_ask">;
227
- market: z.ZodString;
228
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
282
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
283
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
229
284
  best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
230
285
  best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
231
286
  spread: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
@@ -234,23 +289,40 @@ declare const MarketBestBidAskEventSchema: z.ZodPipe<z.ZodObject<{
234
289
  topic: "market";
235
290
  type: "best_bid_ask";
236
291
  payload: {
237
- tokenId: TokenId;
292
+ conditionId: ConditionId;
293
+ market: ConditionId;
294
+ assetId: PositionId | TokenId;
295
+ tokenId: PositionId | TokenId;
238
296
  bestBid: DecimalString | null | undefined;
239
297
  bestAsk: DecimalString | null | undefined;
240
- market: string;
241
298
  spread?: DecimalString | null | undefined;
242
299
  timestamp?: EpochMilliseconds | null | undefined;
243
300
  };
244
301
  }, {
245
302
  event_type: "best_bid_ask";
246
- market: string;
247
- asset_id: TokenId;
303
+ market: ConditionId;
304
+ asset_id: PositionId | TokenId;
248
305
  best_bid?: DecimalString | null | undefined;
249
306
  best_ask?: DecimalString | null | undefined;
250
307
  spread?: DecimalString | null | undefined;
251
308
  timestamp?: EpochMilliseconds | null | undefined;
252
309
  }>>;
253
- type MarketBestBidAskEvent = z.infer<typeof MarketBestBidAskEventSchema>;
310
+ type MarketBestBidAskEvent = {
311
+ topic: 'market';
312
+ type: 'best_bid_ask';
313
+ payload: {
314
+ assetId: PositionId | TokenId;
315
+ /** @deprecated Use `assetId`. */
316
+ tokenId: PositionId | TokenId;
317
+ conditionId: ConditionId;
318
+ /** @deprecated Use `conditionId`. */
319
+ market: ConditionId;
320
+ bestBid: DecimalString | null | undefined;
321
+ bestAsk: DecimalString | null | undefined;
322
+ spread?: DecimalString | null;
323
+ timestamp?: EpochMilliseconds | null;
324
+ };
325
+ };
254
326
  declare const MarketEventMessageSchema: z.ZodObject<{
255
327
  id: z.ZodString;
256
328
  ticker: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -266,7 +338,7 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
266
338
  market: z.ZodString;
267
339
  slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
268
340
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
269
- assets_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>;
341
+ assets_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>>>>;
270
342
  outcomes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
271
343
  event_message: z.ZodOptional<z.ZodNullable<z.ZodObject<{
272
344
  id: z.ZodString;
@@ -292,7 +364,8 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
292
364
  topic: "market";
293
365
  type: "new_market";
294
366
  payload: {
295
- tokenIds: TokenId[] | null | undefined;
367
+ assetIds: (PositionId | TokenId)[] | null | undefined;
368
+ tokenIds: (PositionId | TokenId)[] | null | undefined;
296
369
  eventMessage: {
297
370
  id: string;
298
371
  ticker?: string | null | undefined;
@@ -327,7 +400,7 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
327
400
  question?: string | null | undefined;
328
401
  slug?: string | null | undefined;
329
402
  description?: string | null | undefined;
330
- assets_ids?: TokenId[] | null | undefined;
403
+ assets_ids?: (PositionId | TokenId)[] | null | undefined;
331
404
  outcomes?: string[] | null | undefined;
332
405
  event_message?: {
333
406
  id: string;
@@ -350,13 +423,41 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
350
423
  fees_enabled?: boolean | null | undefined;
351
424
  fee_schedule?: unknown;
352
425
  }>>;
353
- type NewMarketEvent = z.infer<typeof NewMarketEventSchema>;
426
+ type NewMarketEvent = {
427
+ topic: 'market';
428
+ type: 'new_market';
429
+ payload: {
430
+ id: string;
431
+ market: string;
432
+ assetIds: Array<PositionId | TokenId> | null | undefined;
433
+ /** @deprecated Use `assetIds`. */
434
+ tokenIds: Array<PositionId | TokenId> | null | undefined;
435
+ eventMessage: MarketEventMessage | null | undefined;
436
+ conditionId: ConditionId | null | undefined;
437
+ clobTokenIds: string[] | null | undefined;
438
+ sportsMarketType: string | null | undefined;
439
+ gameStartTime: IsoDateTimeString | null | undefined;
440
+ orderPriceMinTickSize: DecimalString | null | undefined;
441
+ groupItemTitle: string | null | undefined;
442
+ takerBaseFee: DecimalString | null | undefined;
443
+ feesEnabled: boolean | null | undefined;
444
+ feeSchedule: unknown;
445
+ question?: string | null;
446
+ slug?: string | null;
447
+ description?: string | null;
448
+ outcomes?: string[] | null;
449
+ timestamp?: EpochMilliseconds | null;
450
+ tags?: string[] | null;
451
+ active?: boolean | null;
452
+ line?: DecimalString | null;
453
+ };
454
+ };
354
455
  declare const MarketResolvedEventSchema: z.ZodPipe<z.ZodObject<{
355
456
  event_type: z.ZodLiteral<"market_resolved">;
356
457
  id: z.ZodString;
357
- market: z.ZodString;
358
- assets_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>;
359
- winning_asset_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>;
458
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
459
+ assets_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>>>>;
460
+ winning_asset_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>>>;
360
461
  winning_outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
361
462
  event_message: z.ZodOptional<z.ZodNullable<z.ZodObject<{
362
463
  id: z.ZodString;
@@ -371,8 +472,12 @@ declare const MarketResolvedEventSchema: z.ZodPipe<z.ZodObject<{
371
472
  topic: "market";
372
473
  type: "market_resolved";
373
474
  payload: {
374
- tokenIds: TokenId[] | null | undefined;
375
- winningTokenId: TokenId | null | undefined;
475
+ conditionId: ConditionId;
476
+ market: ConditionId;
477
+ assetIds: (PositionId | TokenId)[] | null | undefined;
478
+ tokenIds: (PositionId | TokenId)[] | null | undefined;
479
+ winningAssetId: PositionId | TokenId | null | undefined;
480
+ winningTokenId: PositionId | TokenId | null | undefined;
376
481
  winningOutcome: string | null | undefined;
377
482
  eventMessage: {
378
483
  id: string;
@@ -382,16 +487,15 @@ declare const MarketResolvedEventSchema: z.ZodPipe<z.ZodObject<{
382
487
  description?: string | null | undefined;
383
488
  } | null | undefined;
384
489
  id: string;
385
- market: string;
386
490
  timestamp?: EpochMilliseconds | null | undefined;
387
491
  tags?: string[] | null | undefined;
388
492
  };
389
493
  }, {
390
494
  event_type: "market_resolved";
391
495
  id: string;
392
- market: string;
393
- assets_ids?: TokenId[] | null | undefined;
394
- winning_asset_id?: TokenId | null | undefined;
496
+ market: ConditionId;
497
+ assets_ids?: (PositionId | TokenId)[] | null | undefined;
498
+ winning_asset_id?: PositionId | TokenId | null | undefined;
395
499
  winning_outcome?: string | null | undefined;
396
500
  event_message?: {
397
501
  id: string;
@@ -403,7 +507,26 @@ declare const MarketResolvedEventSchema: z.ZodPipe<z.ZodObject<{
403
507
  timestamp?: EpochMilliseconds | null | undefined;
404
508
  tags?: string[] | null | undefined;
405
509
  }>>;
406
- type MarketResolvedEvent = z.infer<typeof MarketResolvedEventSchema>;
510
+ type MarketResolvedEvent = {
511
+ topic: 'market';
512
+ type: 'market_resolved';
513
+ payload: {
514
+ id: string;
515
+ conditionId: ConditionId;
516
+ /** @deprecated Use `conditionId`. */
517
+ market: ConditionId;
518
+ assetIds: Array<PositionId | TokenId> | null | undefined;
519
+ /** @deprecated Use `assetIds`. */
520
+ tokenIds: Array<PositionId | TokenId> | null | undefined;
521
+ winningAssetId: PositionId | TokenId | null | undefined;
522
+ /** @deprecated Use `winningAssetId`. */
523
+ winningTokenId: PositionId | TokenId | null | undefined;
524
+ winningOutcome: string | null | undefined;
525
+ eventMessage: MarketEventMessage | null | undefined;
526
+ timestamp?: EpochMilliseconds | null;
527
+ tags?: string[] | null;
528
+ };
529
+ };
407
530
  declare enum UserOrderEventType {
408
531
  Placement = "PLACEMENT",
409
532
  Update = "UPDATE",
@@ -413,8 +536,8 @@ declare const UserOrderEventSchema: z.ZodPipe<z.ZodObject<{
413
536
  event_type: z.ZodLiteral<"order">;
414
537
  id: z.ZodString;
415
538
  owner: z.ZodString;
416
- market: z.ZodString;
417
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
539
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
540
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
418
541
  side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
419
542
  order_owner: z.ZodOptional<z.ZodNullable<z.ZodString>>;
420
543
  original_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
@@ -433,8 +556,11 @@ declare const UserOrderEventSchema: z.ZodPipe<z.ZodObject<{
433
556
  topic: "user";
434
557
  type: "order";
435
558
  payload: {
559
+ conditionId: ConditionId;
560
+ market: ConditionId;
436
561
  orderEventType: UserOrderEventType;
437
- tokenId: TokenId;
562
+ assetId: PositionId | TokenId;
563
+ tokenId: PositionId | TokenId;
438
564
  orderOwner: string | null | undefined;
439
565
  originalSize: DecimalString;
440
566
  sizeMatched: DecimalString;
@@ -445,7 +571,6 @@ declare const UserOrderEventSchema: z.ZodPipe<z.ZodObject<{
445
571
  makerAddress: string | null | undefined;
446
572
  id: string;
447
573
  owner: string;
448
- market: string;
449
574
  side: OrderSide;
450
575
  price: DecimalString;
451
576
  timestamp: EpochMilliseconds;
@@ -456,8 +581,8 @@ declare const UserOrderEventSchema: z.ZodPipe<z.ZodObject<{
456
581
  event_type: "order";
457
582
  id: string;
458
583
  owner: string;
459
- market: string;
460
- asset_id: TokenId;
584
+ market: ConditionId;
585
+ asset_id: PositionId | TokenId;
461
586
  side: OrderSide;
462
587
  original_size: DecimalString;
463
588
  size_matched: DecimalString;
@@ -473,49 +598,55 @@ declare const UserOrderEventSchema: z.ZodPipe<z.ZodObject<{
473
598
  status?: UserOrderStatus | null | undefined;
474
599
  maker_address?: string | null | undefined;
475
600
  }>>;
476
- type UserOrderEvent = z.infer<typeof UserOrderEventSchema>;
477
- declare const TradeMakerOrderSchema: z.ZodPipe<z.ZodObject<{
478
- order_id: z.ZodString;
479
- owner: z.ZodString;
480
- maker_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
481
- matched_amount: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
482
- price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
483
- fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
484
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
485
- outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
486
- outcome_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
487
- side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
488
- }, z.core.$strip>, z.ZodTransform<{
601
+ type UserOrderEvent = {
602
+ topic: 'user';
603
+ type: 'order';
604
+ payload: {
605
+ id: string;
606
+ owner: string;
607
+ assetId: PositionId | TokenId;
608
+ /** @deprecated Use `assetId`. */
609
+ tokenId: PositionId | TokenId;
610
+ conditionId: ConditionId;
611
+ /** @deprecated Use `conditionId`. */
612
+ market: ConditionId;
613
+ side: OrderSide;
614
+ orderOwner: string | null | undefined;
615
+ originalSize: DecimalString;
616
+ sizeMatched: DecimalString;
617
+ price: DecimalString;
618
+ associateTrades: string[] | null | undefined;
619
+ outcome?: string | null;
620
+ orderEventType: UserOrderEventType;
621
+ createdAt: IsoDateTimeString | null | undefined;
622
+ expiresAt: IsoDateTimeString | null | undefined;
623
+ orderType: OrderType | null | undefined;
624
+ status?: UserOrderStatus | null;
625
+ makerAddress: string | null | undefined;
626
+ timestamp: EpochMilliseconds;
627
+ };
628
+ };
629
+ type TradeMakerOrder = {
489
630
  orderId: string;
631
+ owner: string;
632
+ assetId: PositionId | TokenId;
633
+ /** @deprecated Use `assetId`. */
634
+ tokenId: PositionId | TokenId;
490
635
  makerAddress: string | null | undefined;
491
636
  matchedAmount: DecimalString;
637
+ price: DecimalString;
492
638
  feeRateBps: DecimalString | null | undefined;
493
- tokenId: TokenId;
639
+ outcome?: string | null;
494
640
  outcomeIndex: number | null | undefined;
495
- owner: string;
496
- price: DecimalString;
497
641
  side: OrderSide;
498
- outcome?: string | null | undefined;
499
- }, {
500
- order_id: string;
501
- owner: string;
502
- matched_amount: DecimalString;
503
- price: DecimalString;
504
- asset_id: TokenId;
505
- side: OrderSide;
506
- maker_address?: string | null | undefined;
507
- fee_rate_bps?: DecimalString | null | undefined;
508
- outcome?: string | null | undefined;
509
- outcome_index?: number | null | undefined;
510
- }>>;
511
- type TradeMakerOrder = z.infer<typeof TradeMakerOrderSchema>;
642
+ };
512
643
  declare const UserTradeEventSchema: z.ZodPipe<z.ZodObject<{
513
644
  event_type: z.ZodLiteral<"trade">;
514
645
  type: z.ZodLiteral<"TRADE">;
515
646
  id: z.ZodString;
516
647
  taker_order_id: z.ZodString;
517
- market: z.ZodString;
518
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
648
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
649
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
519
650
  side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
520
651
  size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
521
652
  fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
@@ -537,7 +668,7 @@ declare const UserTradeEventSchema: z.ZodPipe<z.ZodObject<{
537
668
  matched_amount: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
538
669
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
539
670
  fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
540
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
671
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
541
672
  outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
542
673
  outcome_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
543
674
  side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
@@ -546,7 +677,8 @@ declare const UserTradeEventSchema: z.ZodPipe<z.ZodObject<{
546
677
  makerAddress: string | null | undefined;
547
678
  matchedAmount: DecimalString;
548
679
  feeRateBps: DecimalString | null | undefined;
549
- tokenId: TokenId;
680
+ assetId: PositionId | TokenId;
681
+ tokenId: PositionId | TokenId;
550
682
  outcomeIndex: number | null | undefined;
551
683
  owner: string;
552
684
  price: DecimalString;
@@ -557,7 +689,7 @@ declare const UserTradeEventSchema: z.ZodPipe<z.ZodObject<{
557
689
  owner: string;
558
690
  matched_amount: DecimalString;
559
691
  price: DecimalString;
560
- asset_id: TokenId;
692
+ asset_id: PositionId | TokenId;
561
693
  side: OrderSide;
562
694
  maker_address?: string | null | undefined;
563
695
  fee_rate_bps?: DecimalString | null | undefined;
@@ -570,8 +702,11 @@ declare const UserTradeEventSchema: z.ZodPipe<z.ZodObject<{
570
702
  topic: "user";
571
703
  type: "trade";
572
704
  payload: {
705
+ conditionId: ConditionId;
706
+ market: ConditionId;
573
707
  takerOrderId: string;
574
- tokenId: TokenId;
708
+ assetId: PositionId | TokenId;
709
+ tokenId: PositionId | TokenId;
575
710
  feeRateBps: DecimalString | null | undefined;
576
711
  matchedAt: IsoDateTimeString | null | undefined;
577
712
  updatedAt: IsoDateTimeString | null | undefined;
@@ -584,7 +719,8 @@ declare const UserTradeEventSchema: z.ZodPipe<z.ZodObject<{
584
719
  makerAddress: string | null | undefined;
585
720
  matchedAmount: DecimalString;
586
721
  feeRateBps: DecimalString | null | undefined;
587
- tokenId: TokenId;
722
+ assetId: PositionId | TokenId;
723
+ tokenId: PositionId | TokenId;
588
724
  outcomeIndex: number | null | undefined;
589
725
  owner: string;
590
726
  price: DecimalString;
@@ -593,7 +729,6 @@ declare const UserTradeEventSchema: z.ZodPipe<z.ZodObject<{
593
729
  }[] | null | undefined;
594
730
  traderSide: "TAKER" | "MAKER" | null | undefined;
595
731
  id: string;
596
- market: string;
597
732
  side: OrderSide;
598
733
  size: DecimalString;
599
734
  price: DecimalString;
@@ -607,8 +742,8 @@ declare const UserTradeEventSchema: z.ZodPipe<z.ZodObject<{
607
742
  type: "TRADE";
608
743
  id: string;
609
744
  taker_order_id: string;
610
- market: string;
611
- asset_id: TokenId;
745
+ market: ConditionId;
746
+ asset_id: PositionId | TokenId;
612
747
  side: OrderSide;
613
748
  size: DecimalString;
614
749
  price: DecimalString;
@@ -629,7 +764,8 @@ declare const UserTradeEventSchema: z.ZodPipe<z.ZodObject<{
629
764
  makerAddress: string | null | undefined;
630
765
  matchedAmount: DecimalString;
631
766
  feeRateBps: DecimalString | null | undefined;
632
- tokenId: TokenId;
767
+ assetId: PositionId | TokenId;
768
+ tokenId: PositionId | TokenId;
633
769
  outcomeIndex: number | null | undefined;
634
770
  owner: string;
635
771
  price: DecimalString;
@@ -638,11 +774,40 @@ declare const UserTradeEventSchema: z.ZodPipe<z.ZodObject<{
638
774
  }[] | null | undefined;
639
775
  trader_side?: "TAKER" | "MAKER" | null | undefined;
640
776
  }>>;
641
- type UserTradeEvent = z.infer<typeof UserTradeEventSchema>;
777
+ type UserTradeEvent = {
778
+ topic: 'user';
779
+ type: 'trade';
780
+ payload: {
781
+ id: string;
782
+ takerOrderId: string;
783
+ assetId: PositionId | TokenId;
784
+ /** @deprecated Use `assetId`. */
785
+ tokenId: PositionId | TokenId;
786
+ conditionId: ConditionId;
787
+ /** @deprecated Use `conditionId`. */
788
+ market: ConditionId;
789
+ side: OrderSide;
790
+ size: DecimalString;
791
+ feeRateBps: DecimalString | null | undefined;
792
+ price: DecimalString;
793
+ status: TradeStatus;
794
+ matchedAt: IsoDateTimeString | null | undefined;
795
+ updatedAt: IsoDateTimeString | null | undefined;
796
+ outcome?: string | null;
797
+ owner: string;
798
+ tradeOwner: string | null | undefined;
799
+ makerAddress: string | null | undefined;
800
+ transactionHash: string | null | undefined;
801
+ bucketIndex: number | null | undefined;
802
+ makerOrders: TradeMakerOrder[] | null | undefined;
803
+ traderSide: 'TAKER' | 'MAKER' | null | undefined;
804
+ timestamp: EpochMilliseconds;
805
+ };
806
+ };
642
807
  declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
643
808
  event_type: z.ZodLiteral<"book">;
644
- market: z.ZodString;
645
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
809
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
810
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
646
811
  bids: z.ZodArray<z.ZodObject<{
647
812
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
648
813
  size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
@@ -661,12 +826,14 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
661
826
  topic: "market";
662
827
  type: "book";
663
828
  payload: {
664
- tokenId: TokenId;
829
+ conditionId: ConditionId;
830
+ market: ConditionId;
831
+ assetId: PositionId | TokenId;
832
+ tokenId: PositionId | TokenId;
665
833
  minOrderSize: DecimalString | null | undefined;
666
834
  tickSize: DecimalString | null | undefined;
667
835
  negRisk: boolean | null | undefined;
668
836
  lastTradePrice: DecimalString | null | undefined;
669
- market: string;
670
837
  bids: {
671
838
  price: DecimalString;
672
839
  size: DecimalString;
@@ -680,8 +847,8 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
680
847
  };
681
848
  }, {
682
849
  event_type: "book";
683
- market: string;
684
- asset_id: TokenId;
850
+ market: ConditionId;
851
+ asset_id: PositionId | TokenId;
685
852
  bids: {
686
853
  price: DecimalString;
687
854
  size: DecimalString;
@@ -698,9 +865,9 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
698
865
  last_trade_price?: DecimalString | null | undefined;
699
866
  }>>, z.ZodPipe<z.ZodObject<{
700
867
  event_type: z.ZodLiteral<"price_change">;
701
- market: z.ZodString;
868
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
702
869
  price_changes: z.ZodArray<z.ZodPipe<z.ZodObject<{
703
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
870
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
704
871
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
705
872
  size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
706
873
  side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
@@ -708,7 +875,8 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
708
875
  best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
709
876
  best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
710
877
  }, z.core.$strip>, z.ZodTransform<{
711
- tokenId: TokenId;
878
+ assetId: PositionId | TokenId;
879
+ tokenId: PositionId | TokenId;
712
880
  bestBid: DecimalString | null | undefined;
713
881
  bestAsk: DecimalString | null | undefined;
714
882
  price: DecimalString;
@@ -716,7 +884,7 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
716
884
  side: OrderSide;
717
885
  hash?: string | null | undefined;
718
886
  }, {
719
- asset_id: TokenId;
887
+ asset_id: PositionId | TokenId;
720
888
  price: DecimalString;
721
889
  size: DecimalString;
722
890
  side: OrderSide;
@@ -729,8 +897,11 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
729
897
  topic: "market";
730
898
  type: "price_change";
731
899
  payload: {
900
+ conditionId: ConditionId;
901
+ market: ConditionId;
732
902
  priceChanges: {
733
- tokenId: TokenId;
903
+ assetId: PositionId | TokenId;
904
+ tokenId: PositionId | TokenId;
734
905
  bestBid: DecimalString | null | undefined;
735
906
  bestAsk: DecimalString | null | undefined;
736
907
  price: DecimalString;
@@ -738,14 +909,14 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
738
909
  side: OrderSide;
739
910
  hash?: string | null | undefined;
740
911
  }[];
741
- market: string;
742
912
  timestamp?: EpochMilliseconds | null | undefined;
743
913
  };
744
914
  }, {
745
915
  event_type: "price_change";
746
- market: string;
916
+ market: ConditionId;
747
917
  price_changes: {
748
- tokenId: TokenId;
918
+ assetId: PositionId | TokenId;
919
+ tokenId: PositionId | TokenId;
749
920
  bestBid: DecimalString | null | undefined;
750
921
  bestAsk: DecimalString | null | undefined;
751
922
  price: DecimalString;
@@ -756,8 +927,8 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
756
927
  timestamp?: EpochMilliseconds | null | undefined;
757
928
  }>>, z.ZodPipe<z.ZodObject<{
758
929
  event_type: z.ZodLiteral<"last_trade_price">;
759
- market: z.ZodString;
760
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
930
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
931
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
761
932
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
762
933
  size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
763
934
  fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
@@ -768,10 +939,12 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
768
939
  topic: "market";
769
940
  type: "last_trade_price";
770
941
  payload: {
771
- tokenId: TokenId;
942
+ conditionId: ConditionId;
943
+ market: ConditionId;
944
+ assetId: PositionId | TokenId;
945
+ tokenId: PositionId | TokenId;
772
946
  feeRateBps: DecimalString | null | undefined;
773
947
  transactionHash: string | null | undefined;
774
- market: string;
775
948
  price: DecimalString;
776
949
  side: OrderSide;
777
950
  size?: DecimalString | null | undefined;
@@ -779,8 +952,8 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
779
952
  };
780
953
  }, {
781
954
  event_type: "last_trade_price";
782
- market: string;
783
- asset_id: TokenId;
955
+ market: ConditionId;
956
+ asset_id: PositionId | TokenId;
784
957
  price: DecimalString;
785
958
  side: OrderSide;
786
959
  size?: DecimalString | null | undefined;
@@ -789,8 +962,8 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
789
962
  transaction_hash?: string | null | undefined;
790
963
  }>>, z.ZodPipe<z.ZodObject<{
791
964
  event_type: z.ZodLiteral<"tick_size_change">;
792
- market: z.ZodString;
793
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
965
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
966
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
794
967
  old_tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
795
968
  new_tick_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
796
969
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
@@ -798,25 +971,27 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
798
971
  topic: "market";
799
972
  type: "tick_size_change";
800
973
  payload: {
801
- tokenId: TokenId;
974
+ conditionId: ConditionId;
975
+ market: ConditionId;
976
+ assetId: PositionId | TokenId;
977
+ tokenId: PositionId | TokenId;
802
978
  oldTickSize: DecimalString | null | undefined;
803
979
  newTickSize: DecimalString;
804
- market: string;
805
980
  timestamp?: EpochMilliseconds | null | undefined;
806
981
  };
807
982
  }, {
808
983
  event_type: "tick_size_change";
809
- market: string;
810
- asset_id: TokenId;
984
+ market: ConditionId;
985
+ asset_id: PositionId | TokenId;
811
986
  new_tick_size: DecimalString;
812
987
  old_tick_size?: DecimalString | null | undefined;
813
988
  timestamp?: EpochMilliseconds | null | undefined;
814
989
  }>>], "event_type">;
815
- type StandardMarketEvent = z.infer<typeof StandardMarketEventSchema>;
990
+ type StandardMarketEvent = MarketBookEvent | MarketPriceChangeEvent | MarketLastTradePriceEvent | MarketTickSizeChangeEvent;
816
991
  declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
817
992
  event_type: z.ZodLiteral<"best_bid_ask">;
818
- market: z.ZodString;
819
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
993
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
994
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
820
995
  best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
821
996
  best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
822
997
  spread: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
@@ -825,17 +1000,19 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
825
1000
  topic: "market";
826
1001
  type: "best_bid_ask";
827
1002
  payload: {
828
- tokenId: TokenId;
1003
+ conditionId: ConditionId;
1004
+ market: ConditionId;
1005
+ assetId: PositionId | TokenId;
1006
+ tokenId: PositionId | TokenId;
829
1007
  bestBid: DecimalString | null | undefined;
830
1008
  bestAsk: DecimalString | null | undefined;
831
- market: string;
832
1009
  spread?: DecimalString | null | undefined;
833
1010
  timestamp?: EpochMilliseconds | null | undefined;
834
1011
  };
835
1012
  }, {
836
1013
  event_type: "best_bid_ask";
837
- market: string;
838
- asset_id: TokenId;
1014
+ market: ConditionId;
1015
+ asset_id: PositionId | TokenId;
839
1016
  best_bid?: DecimalString | null | undefined;
840
1017
  best_ask?: DecimalString | null | undefined;
841
1018
  spread?: DecimalString | null | undefined;
@@ -847,7 +1024,7 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
847
1024
  market: z.ZodString;
848
1025
  slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
849
1026
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
850
- assets_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>;
1027
+ assets_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>>>>;
851
1028
  outcomes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
852
1029
  event_message: z.ZodOptional<z.ZodNullable<z.ZodObject<{
853
1030
  id: z.ZodString;
@@ -873,7 +1050,8 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
873
1050
  topic: "market";
874
1051
  type: "new_market";
875
1052
  payload: {
876
- tokenIds: TokenId[] | null | undefined;
1053
+ assetIds: (PositionId | TokenId)[] | null | undefined;
1054
+ tokenIds: (PositionId | TokenId)[] | null | undefined;
877
1055
  eventMessage: {
878
1056
  id: string;
879
1057
  ticker?: string | null | undefined;
@@ -908,7 +1086,7 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
908
1086
  question?: string | null | undefined;
909
1087
  slug?: string | null | undefined;
910
1088
  description?: string | null | undefined;
911
- assets_ids?: TokenId[] | null | undefined;
1089
+ assets_ids?: (PositionId | TokenId)[] | null | undefined;
912
1090
  outcomes?: string[] | null | undefined;
913
1091
  event_message?: {
914
1092
  id: string;
@@ -933,9 +1111,9 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
933
1111
  }>>, z.ZodPipe<z.ZodObject<{
934
1112
  event_type: z.ZodLiteral<"market_resolved">;
935
1113
  id: z.ZodString;
936
- market: z.ZodString;
937
- assets_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>;
938
- winning_asset_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>;
1114
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
1115
+ assets_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>>>>;
1116
+ winning_asset_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>>>;
939
1117
  winning_outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
940
1118
  event_message: z.ZodOptional<z.ZodNullable<z.ZodObject<{
941
1119
  id: z.ZodString;
@@ -950,8 +1128,12 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
950
1128
  topic: "market";
951
1129
  type: "market_resolved";
952
1130
  payload: {
953
- tokenIds: TokenId[] | null | undefined;
954
- winningTokenId: TokenId | null | undefined;
1131
+ conditionId: ConditionId;
1132
+ market: ConditionId;
1133
+ assetIds: (PositionId | TokenId)[] | null | undefined;
1134
+ tokenIds: (PositionId | TokenId)[] | null | undefined;
1135
+ winningAssetId: PositionId | TokenId | null | undefined;
1136
+ winningTokenId: PositionId | TokenId | null | undefined;
955
1137
  winningOutcome: string | null | undefined;
956
1138
  eventMessage: {
957
1139
  id: string;
@@ -961,16 +1143,15 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
961
1143
  description?: string | null | undefined;
962
1144
  } | null | undefined;
963
1145
  id: string;
964
- market: string;
965
1146
  timestamp?: EpochMilliseconds | null | undefined;
966
1147
  tags?: string[] | null | undefined;
967
1148
  };
968
1149
  }, {
969
1150
  event_type: "market_resolved";
970
1151
  id: string;
971
- market: string;
972
- assets_ids?: TokenId[] | null | undefined;
973
- winning_asset_id?: TokenId | null | undefined;
1152
+ market: ConditionId;
1153
+ assets_ids?: (PositionId | TokenId)[] | null | undefined;
1154
+ winning_asset_id?: PositionId | TokenId | null | undefined;
974
1155
  winning_outcome?: string | null | undefined;
975
1156
  event_message?: {
976
1157
  id: string;
@@ -982,11 +1163,11 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
982
1163
  timestamp?: EpochMilliseconds | null | undefined;
983
1164
  tags?: string[] | null | undefined;
984
1165
  }>>], "event_type">;
985
- type CustomMarketEvent = z.infer<typeof CustomMarketEventSchema>;
1166
+ type CustomMarketEvent = MarketBestBidAskEvent | NewMarketEvent | MarketResolvedEvent;
986
1167
  declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
987
1168
  event_type: z.ZodLiteral<"book">;
988
- market: z.ZodString;
989
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
1169
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
1170
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
990
1171
  bids: z.ZodArray<z.ZodObject<{
991
1172
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
992
1173
  size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
@@ -1005,12 +1186,14 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1005
1186
  topic: "market";
1006
1187
  type: "book";
1007
1188
  payload: {
1008
- tokenId: TokenId;
1189
+ conditionId: ConditionId;
1190
+ market: ConditionId;
1191
+ assetId: PositionId | TokenId;
1192
+ tokenId: PositionId | TokenId;
1009
1193
  minOrderSize: DecimalString | null | undefined;
1010
1194
  tickSize: DecimalString | null | undefined;
1011
1195
  negRisk: boolean | null | undefined;
1012
1196
  lastTradePrice: DecimalString | null | undefined;
1013
- market: string;
1014
1197
  bids: {
1015
1198
  price: DecimalString;
1016
1199
  size: DecimalString;
@@ -1024,8 +1207,8 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1024
1207
  };
1025
1208
  }, {
1026
1209
  event_type: "book";
1027
- market: string;
1028
- asset_id: TokenId;
1210
+ market: ConditionId;
1211
+ asset_id: PositionId | TokenId;
1029
1212
  bids: {
1030
1213
  price: DecimalString;
1031
1214
  size: DecimalString;
@@ -1042,9 +1225,9 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1042
1225
  last_trade_price?: DecimalString | null | undefined;
1043
1226
  }>>, z.ZodPipe<z.ZodObject<{
1044
1227
  event_type: z.ZodLiteral<"price_change">;
1045
- market: z.ZodString;
1228
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
1046
1229
  price_changes: z.ZodArray<z.ZodPipe<z.ZodObject<{
1047
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
1230
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
1048
1231
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1049
1232
  size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1050
1233
  side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
@@ -1052,7 +1235,8 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1052
1235
  best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
1053
1236
  best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
1054
1237
  }, z.core.$strip>, z.ZodTransform<{
1055
- tokenId: TokenId;
1238
+ assetId: PositionId | TokenId;
1239
+ tokenId: PositionId | TokenId;
1056
1240
  bestBid: DecimalString | null | undefined;
1057
1241
  bestAsk: DecimalString | null | undefined;
1058
1242
  price: DecimalString;
@@ -1060,7 +1244,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1060
1244
  side: OrderSide;
1061
1245
  hash?: string | null | undefined;
1062
1246
  }, {
1063
- asset_id: TokenId;
1247
+ asset_id: PositionId | TokenId;
1064
1248
  price: DecimalString;
1065
1249
  size: DecimalString;
1066
1250
  side: OrderSide;
@@ -1073,8 +1257,11 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1073
1257
  topic: "market";
1074
1258
  type: "price_change";
1075
1259
  payload: {
1260
+ conditionId: ConditionId;
1261
+ market: ConditionId;
1076
1262
  priceChanges: {
1077
- tokenId: TokenId;
1263
+ assetId: PositionId | TokenId;
1264
+ tokenId: PositionId | TokenId;
1078
1265
  bestBid: DecimalString | null | undefined;
1079
1266
  bestAsk: DecimalString | null | undefined;
1080
1267
  price: DecimalString;
@@ -1082,14 +1269,14 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1082
1269
  side: OrderSide;
1083
1270
  hash?: string | null | undefined;
1084
1271
  }[];
1085
- market: string;
1086
1272
  timestamp?: EpochMilliseconds | null | undefined;
1087
1273
  };
1088
1274
  }, {
1089
1275
  event_type: "price_change";
1090
- market: string;
1276
+ market: ConditionId;
1091
1277
  price_changes: {
1092
- tokenId: TokenId;
1278
+ assetId: PositionId | TokenId;
1279
+ tokenId: PositionId | TokenId;
1093
1280
  bestBid: DecimalString | null | undefined;
1094
1281
  bestAsk: DecimalString | null | undefined;
1095
1282
  price: DecimalString;
@@ -1100,8 +1287,8 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1100
1287
  timestamp?: EpochMilliseconds | null | undefined;
1101
1288
  }>>, z.ZodPipe<z.ZodObject<{
1102
1289
  event_type: z.ZodLiteral<"last_trade_price">;
1103
- market: z.ZodString;
1104
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
1290
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
1291
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
1105
1292
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1106
1293
  size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
1107
1294
  fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
@@ -1112,10 +1299,12 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1112
1299
  topic: "market";
1113
1300
  type: "last_trade_price";
1114
1301
  payload: {
1115
- tokenId: TokenId;
1302
+ conditionId: ConditionId;
1303
+ market: ConditionId;
1304
+ assetId: PositionId | TokenId;
1305
+ tokenId: PositionId | TokenId;
1116
1306
  feeRateBps: DecimalString | null | undefined;
1117
1307
  transactionHash: string | null | undefined;
1118
- market: string;
1119
1308
  price: DecimalString;
1120
1309
  side: OrderSide;
1121
1310
  size?: DecimalString | null | undefined;
@@ -1123,8 +1312,8 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1123
1312
  };
1124
1313
  }, {
1125
1314
  event_type: "last_trade_price";
1126
- market: string;
1127
- asset_id: TokenId;
1315
+ market: ConditionId;
1316
+ asset_id: PositionId | TokenId;
1128
1317
  price: DecimalString;
1129
1318
  side: OrderSide;
1130
1319
  size?: DecimalString | null | undefined;
@@ -1133,8 +1322,8 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1133
1322
  transaction_hash?: string | null | undefined;
1134
1323
  }>>, z.ZodPipe<z.ZodObject<{
1135
1324
  event_type: z.ZodLiteral<"tick_size_change">;
1136
- market: z.ZodString;
1137
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
1325
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
1326
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
1138
1327
  old_tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
1139
1328
  new_tick_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1140
1329
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
@@ -1142,23 +1331,25 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1142
1331
  topic: "market";
1143
1332
  type: "tick_size_change";
1144
1333
  payload: {
1145
- tokenId: TokenId;
1334
+ conditionId: ConditionId;
1335
+ market: ConditionId;
1336
+ assetId: PositionId | TokenId;
1337
+ tokenId: PositionId | TokenId;
1146
1338
  oldTickSize: DecimalString | null | undefined;
1147
1339
  newTickSize: DecimalString;
1148
- market: string;
1149
1340
  timestamp?: EpochMilliseconds | null | undefined;
1150
1341
  };
1151
1342
  }, {
1152
1343
  event_type: "tick_size_change";
1153
- market: string;
1154
- asset_id: TokenId;
1344
+ market: ConditionId;
1345
+ asset_id: PositionId | TokenId;
1155
1346
  new_tick_size: DecimalString;
1156
1347
  old_tick_size?: DecimalString | null | undefined;
1157
1348
  timestamp?: EpochMilliseconds | null | undefined;
1158
1349
  }>>, z.ZodPipe<z.ZodObject<{
1159
1350
  event_type: z.ZodLiteral<"best_bid_ask">;
1160
- market: z.ZodString;
1161
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
1351
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
1352
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
1162
1353
  best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
1163
1354
  best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
1164
1355
  spread: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
@@ -1167,17 +1358,19 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1167
1358
  topic: "market";
1168
1359
  type: "best_bid_ask";
1169
1360
  payload: {
1170
- tokenId: TokenId;
1361
+ conditionId: ConditionId;
1362
+ market: ConditionId;
1363
+ assetId: PositionId | TokenId;
1364
+ tokenId: PositionId | TokenId;
1171
1365
  bestBid: DecimalString | null | undefined;
1172
1366
  bestAsk: DecimalString | null | undefined;
1173
- market: string;
1174
1367
  spread?: DecimalString | null | undefined;
1175
1368
  timestamp?: EpochMilliseconds | null | undefined;
1176
1369
  };
1177
1370
  }, {
1178
1371
  event_type: "best_bid_ask";
1179
- market: string;
1180
- asset_id: TokenId;
1372
+ market: ConditionId;
1373
+ asset_id: PositionId | TokenId;
1181
1374
  best_bid?: DecimalString | null | undefined;
1182
1375
  best_ask?: DecimalString | null | undefined;
1183
1376
  spread?: DecimalString | null | undefined;
@@ -1189,7 +1382,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1189
1382
  market: z.ZodString;
1190
1383
  slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1191
1384
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1192
- assets_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>;
1385
+ assets_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>>>>;
1193
1386
  outcomes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1194
1387
  event_message: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1195
1388
  id: z.ZodString;
@@ -1215,7 +1408,8 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1215
1408
  topic: "market";
1216
1409
  type: "new_market";
1217
1410
  payload: {
1218
- tokenIds: TokenId[] | null | undefined;
1411
+ assetIds: (PositionId | TokenId)[] | null | undefined;
1412
+ tokenIds: (PositionId | TokenId)[] | null | undefined;
1219
1413
  eventMessage: {
1220
1414
  id: string;
1221
1415
  ticker?: string | null | undefined;
@@ -1250,7 +1444,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1250
1444
  question?: string | null | undefined;
1251
1445
  slug?: string | null | undefined;
1252
1446
  description?: string | null | undefined;
1253
- assets_ids?: TokenId[] | null | undefined;
1447
+ assets_ids?: (PositionId | TokenId)[] | null | undefined;
1254
1448
  outcomes?: string[] | null | undefined;
1255
1449
  event_message?: {
1256
1450
  id: string;
@@ -1275,9 +1469,9 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1275
1469
  }>>, z.ZodPipe<z.ZodObject<{
1276
1470
  event_type: z.ZodLiteral<"market_resolved">;
1277
1471
  id: z.ZodString;
1278
- market: z.ZodString;
1279
- assets_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>;
1280
- winning_asset_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>;
1472
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
1473
+ assets_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>>>>;
1474
+ winning_asset_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>>>;
1281
1475
  winning_outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1282
1476
  event_message: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1283
1477
  id: z.ZodString;
@@ -1292,8 +1486,12 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1292
1486
  topic: "market";
1293
1487
  type: "market_resolved";
1294
1488
  payload: {
1295
- tokenIds: TokenId[] | null | undefined;
1296
- winningTokenId: TokenId | null | undefined;
1489
+ conditionId: ConditionId;
1490
+ market: ConditionId;
1491
+ assetIds: (PositionId | TokenId)[] | null | undefined;
1492
+ tokenIds: (PositionId | TokenId)[] | null | undefined;
1493
+ winningAssetId: PositionId | TokenId | null | undefined;
1494
+ winningTokenId: PositionId | TokenId | null | undefined;
1297
1495
  winningOutcome: string | null | undefined;
1298
1496
  eventMessage: {
1299
1497
  id: string;
@@ -1303,16 +1501,15 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1303
1501
  description?: string | null | undefined;
1304
1502
  } | null | undefined;
1305
1503
  id: string;
1306
- market: string;
1307
1504
  timestamp?: EpochMilliseconds | null | undefined;
1308
1505
  tags?: string[] | null | undefined;
1309
1506
  };
1310
1507
  }, {
1311
1508
  event_type: "market_resolved";
1312
1509
  id: string;
1313
- market: string;
1314
- assets_ids?: TokenId[] | null | undefined;
1315
- winning_asset_id?: TokenId | null | undefined;
1510
+ market: ConditionId;
1511
+ assets_ids?: (PositionId | TokenId)[] | null | undefined;
1512
+ winning_asset_id?: PositionId | TokenId | null | undefined;
1316
1513
  winning_outcome?: string | null | undefined;
1317
1514
  event_message?: {
1318
1515
  id: string;
@@ -1329,8 +1526,8 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1329
1526
  event_type: z.ZodLiteral<"order">;
1330
1527
  id: z.ZodString;
1331
1528
  owner: z.ZodString;
1332
- market: z.ZodString;
1333
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
1529
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
1530
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
1334
1531
  side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
1335
1532
  order_owner: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1336
1533
  original_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
@@ -1349,8 +1546,11 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1349
1546
  topic: "user";
1350
1547
  type: "order";
1351
1548
  payload: {
1549
+ conditionId: ConditionId;
1550
+ market: ConditionId;
1352
1551
  orderEventType: UserOrderEventType;
1353
- tokenId: TokenId;
1552
+ assetId: PositionId | TokenId;
1553
+ tokenId: PositionId | TokenId;
1354
1554
  orderOwner: string | null | undefined;
1355
1555
  originalSize: DecimalString;
1356
1556
  sizeMatched: DecimalString;
@@ -1361,7 +1561,6 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1361
1561
  makerAddress: string | null | undefined;
1362
1562
  id: string;
1363
1563
  owner: string;
1364
- market: string;
1365
1564
  side: OrderSide;
1366
1565
  price: DecimalString;
1367
1566
  timestamp: EpochMilliseconds;
@@ -1372,8 +1571,8 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1372
1571
  event_type: "order";
1373
1572
  id: string;
1374
1573
  owner: string;
1375
- market: string;
1376
- asset_id: TokenId;
1574
+ market: ConditionId;
1575
+ asset_id: PositionId | TokenId;
1377
1576
  side: OrderSide;
1378
1577
  original_size: DecimalString;
1379
1578
  size_matched: DecimalString;
@@ -1393,8 +1592,8 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1393
1592
  type: z.ZodLiteral<"TRADE">;
1394
1593
  id: z.ZodString;
1395
1594
  taker_order_id: z.ZodString;
1396
- market: z.ZodString;
1397
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
1595
+ market: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
1596
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
1398
1597
  side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
1399
1598
  size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1400
1599
  fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
@@ -1416,7 +1615,7 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1416
1615
  matched_amount: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1417
1616
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1418
1617
  fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
1419
- asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
1618
+ asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId | TokenId, string>>;
1420
1619
  outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1421
1620
  outcome_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1422
1621
  side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
@@ -1425,7 +1624,8 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1425
1624
  makerAddress: string | null | undefined;
1426
1625
  matchedAmount: DecimalString;
1427
1626
  feeRateBps: DecimalString | null | undefined;
1428
- tokenId: TokenId;
1627
+ assetId: PositionId | TokenId;
1628
+ tokenId: PositionId | TokenId;
1429
1629
  outcomeIndex: number | null | undefined;
1430
1630
  owner: string;
1431
1631
  price: DecimalString;
@@ -1436,7 +1636,7 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1436
1636
  owner: string;
1437
1637
  matched_amount: DecimalString;
1438
1638
  price: DecimalString;
1439
- asset_id: TokenId;
1639
+ asset_id: PositionId | TokenId;
1440
1640
  side: OrderSide;
1441
1641
  maker_address?: string | null | undefined;
1442
1642
  fee_rate_bps?: DecimalString | null | undefined;
@@ -1449,8 +1649,11 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1449
1649
  topic: "user";
1450
1650
  type: "trade";
1451
1651
  payload: {
1652
+ conditionId: ConditionId;
1653
+ market: ConditionId;
1452
1654
  takerOrderId: string;
1453
- tokenId: TokenId;
1655
+ assetId: PositionId | TokenId;
1656
+ tokenId: PositionId | TokenId;
1454
1657
  feeRateBps: DecimalString | null | undefined;
1455
1658
  matchedAt: IsoDateTimeString | null | undefined;
1456
1659
  updatedAt: IsoDateTimeString | null | undefined;
@@ -1463,7 +1666,8 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1463
1666
  makerAddress: string | null | undefined;
1464
1667
  matchedAmount: DecimalString;
1465
1668
  feeRateBps: DecimalString | null | undefined;
1466
- tokenId: TokenId;
1669
+ assetId: PositionId | TokenId;
1670
+ tokenId: PositionId | TokenId;
1467
1671
  outcomeIndex: number | null | undefined;
1468
1672
  owner: string;
1469
1673
  price: DecimalString;
@@ -1472,7 +1676,6 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1472
1676
  }[] | null | undefined;
1473
1677
  traderSide: "TAKER" | "MAKER" | null | undefined;
1474
1678
  id: string;
1475
- market: string;
1476
1679
  side: OrderSide;
1477
1680
  size: DecimalString;
1478
1681
  price: DecimalString;
@@ -1486,8 +1689,8 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1486
1689
  type: "TRADE";
1487
1690
  id: string;
1488
1691
  taker_order_id: string;
1489
- market: string;
1490
- asset_id: TokenId;
1692
+ market: ConditionId;
1693
+ asset_id: PositionId | TokenId;
1491
1694
  side: OrderSide;
1492
1695
  size: DecimalString;
1493
1696
  price: DecimalString;
@@ -1508,7 +1711,8 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1508
1711
  makerAddress: string | null | undefined;
1509
1712
  matchedAmount: DecimalString;
1510
1713
  feeRateBps: DecimalString | null | undefined;
1511
- tokenId: TokenId;
1714
+ assetId: PositionId | TokenId;
1715
+ tokenId: PositionId | TokenId;
1512
1716
  outcomeIndex: number | null | undefined;
1513
1717
  owner: string;
1514
1718
  price: DecimalString;
@@ -1517,7 +1721,7 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1517
1721
  }[] | null | undefined;
1518
1722
  trader_side?: "TAKER" | "MAKER" | null | undefined;
1519
1723
  }>>], "event_type">;
1520
- type UserEvent = z.infer<typeof UserEventSchema>;
1724
+ type UserEvent = UserOrderEvent | UserTradeEvent;
1521
1725
 
1522
1726
  /**
1523
1727
  * @experimental This API may change in a breaking way in any release, including patch releases.