@polymarket/bindings 0.0.0-canary-20260421120448

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.
@@ -0,0 +1,835 @@
1
+ import * as _polymarket_types from '@polymarket/types';
2
+ import { TxHash } from '@polymarket/types';
3
+ import { NotificationId, ApiKey, TokenId } from '../index.js';
4
+ import { z } from 'zod';
5
+
6
+ declare const ClosedOnlyModeSchema: z.ZodObject<{
7
+ closed_only: z.ZodBoolean;
8
+ }, z.core.$strip>;
9
+ type ClosedOnlyMode = z.infer<typeof ClosedOnlyModeSchema>;
10
+ declare const OpenOrderSchema: z.ZodObject<{
11
+ asset_id: z.ZodString;
12
+ associate_trades: z.ZodArray<z.ZodString>;
13
+ created_at: z.ZodNumber;
14
+ expiration: z.ZodString;
15
+ id: z.ZodString;
16
+ maker_address: z.ZodString;
17
+ market: z.ZodString;
18
+ order_type: z.ZodString;
19
+ original_size: z.ZodString;
20
+ outcome: z.ZodString;
21
+ owner: z.ZodString;
22
+ price: z.ZodString;
23
+ side: z.ZodString;
24
+ size_matched: z.ZodString;
25
+ status: z.ZodString;
26
+ }, z.core.$strip>;
27
+ type OpenOrder = z.infer<typeof OpenOrderSchema>;
28
+ declare const OpenOrdersPageSchema: z.ZodObject<{
29
+ count: z.ZodNumber;
30
+ data: z.ZodArray<z.ZodObject<{
31
+ asset_id: z.ZodString;
32
+ associate_trades: z.ZodArray<z.ZodString>;
33
+ created_at: z.ZodNumber;
34
+ expiration: z.ZodString;
35
+ id: z.ZodString;
36
+ maker_address: z.ZodString;
37
+ market: z.ZodString;
38
+ order_type: z.ZodString;
39
+ original_size: z.ZodString;
40
+ outcome: z.ZodString;
41
+ owner: z.ZodString;
42
+ price: z.ZodString;
43
+ side: z.ZodString;
44
+ size_matched: z.ZodString;
45
+ status: z.ZodString;
46
+ }, z.core.$strip>>;
47
+ limit: z.ZodNumber;
48
+ next_cursor: z.ZodString;
49
+ }, z.core.$strip>;
50
+ type OpenOrdersPage = z.infer<typeof OpenOrdersPageSchema>;
51
+ declare const MakerOrderSchema: z.ZodObject<{
52
+ asset_id: z.ZodString;
53
+ fee_rate_bps: z.ZodString;
54
+ maker_address: z.ZodString;
55
+ matched_amount: z.ZodString;
56
+ order_id: z.ZodString;
57
+ outcome: z.ZodString;
58
+ owner: z.ZodString;
59
+ price: z.ZodString;
60
+ side: z.ZodString;
61
+ }, z.core.$strip>;
62
+ declare const ClobTradeSchema: z.ZodObject<{
63
+ asset_id: z.ZodString;
64
+ bucket_index: z.ZodNumber;
65
+ fee_rate_bps: z.ZodString;
66
+ id: z.ZodString;
67
+ last_update: z.ZodString;
68
+ maker_address: z.ZodString;
69
+ maker_orders: z.ZodArray<z.ZodObject<{
70
+ asset_id: z.ZodString;
71
+ fee_rate_bps: z.ZodString;
72
+ maker_address: z.ZodString;
73
+ matched_amount: z.ZodString;
74
+ order_id: z.ZodString;
75
+ outcome: z.ZodString;
76
+ owner: z.ZodString;
77
+ price: z.ZodString;
78
+ side: z.ZodString;
79
+ }, z.core.$strip>>;
80
+ market: z.ZodString;
81
+ match_time: z.ZodString;
82
+ outcome: z.ZodString;
83
+ owner: z.ZodString;
84
+ price: z.ZodString;
85
+ side: z.ZodString;
86
+ size: z.ZodString;
87
+ status: z.ZodString;
88
+ taker_order_id: z.ZodString;
89
+ trader_side: z.ZodEnum<{
90
+ TAKER: "TAKER";
91
+ MAKER: "MAKER";
92
+ }>;
93
+ transaction_hash: z.ZodString;
94
+ }, z.core.$strip>;
95
+ type ClobTrade = z.infer<typeof ClobTradeSchema>;
96
+ declare const ClobTradesPageSchema: z.ZodObject<{
97
+ count: z.ZodNumber;
98
+ data: z.ZodArray<z.ZodObject<{
99
+ asset_id: z.ZodString;
100
+ bucket_index: z.ZodNumber;
101
+ fee_rate_bps: z.ZodString;
102
+ id: z.ZodString;
103
+ last_update: z.ZodString;
104
+ maker_address: z.ZodString;
105
+ maker_orders: z.ZodArray<z.ZodObject<{
106
+ asset_id: z.ZodString;
107
+ fee_rate_bps: z.ZodString;
108
+ maker_address: z.ZodString;
109
+ matched_amount: z.ZodString;
110
+ order_id: z.ZodString;
111
+ outcome: z.ZodString;
112
+ owner: z.ZodString;
113
+ price: z.ZodString;
114
+ side: z.ZodString;
115
+ }, z.core.$strip>>;
116
+ market: z.ZodString;
117
+ match_time: z.ZodString;
118
+ outcome: z.ZodString;
119
+ owner: z.ZodString;
120
+ price: z.ZodString;
121
+ side: z.ZodString;
122
+ size: z.ZodString;
123
+ status: z.ZodString;
124
+ taker_order_id: z.ZodString;
125
+ trader_side: z.ZodEnum<{
126
+ TAKER: "TAKER";
127
+ MAKER: "MAKER";
128
+ }>;
129
+ transaction_hash: z.ZodString;
130
+ }, z.core.$strip>>;
131
+ limit: z.ZodNumber;
132
+ next_cursor: z.ZodString;
133
+ }, z.core.$strip>;
134
+ type ClobTradesPage = z.infer<typeof ClobTradesPageSchema>;
135
+ declare const NotificationSchema: z.ZodObject<{
136
+ id: z.ZodPipe<z.ZodNumber, z.ZodTransform<NotificationId, number>>;
137
+ owner: z.ZodString;
138
+ payload: z.ZodUnknown;
139
+ timestamp: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
140
+ type: z.ZodNumber;
141
+ }, z.core.$strip>;
142
+ type Notification = z.infer<typeof NotificationSchema>;
143
+ declare const NotificationsResponseSchema: z.ZodArray<z.ZodObject<{
144
+ id: z.ZodPipe<z.ZodNumber, z.ZodTransform<NotificationId, number>>;
145
+ owner: z.ZodString;
146
+ payload: z.ZodUnknown;
147
+ timestamp: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
148
+ type: z.ZodNumber;
149
+ }, z.core.$strip>>;
150
+ type NotificationsResponse = z.infer<typeof NotificationsResponseSchema>;
151
+ declare enum AssetType {
152
+ COLLATERAL = "COLLATERAL",
153
+ CONDITIONAL = "CONDITIONAL"
154
+ }
155
+ declare const AssetTypeSchema: z.ZodEnum<typeof AssetType>;
156
+ declare const BalanceAllowanceResponseSchema: z.ZodObject<{
157
+ allowances: z.ZodRecord<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>>;
158
+ balance: z.ZodString;
159
+ }, z.core.$strip>;
160
+ type BalanceAllowanceResponse = z.infer<typeof BalanceAllowanceResponseSchema>;
161
+ declare const OrderScoringResponseSchema: z.ZodObject<{
162
+ scoring: z.ZodBoolean;
163
+ }, z.core.$strip>;
164
+ type OrderScoringResponse = z.infer<typeof OrderScoringResponseSchema>;
165
+ declare const OrdersScoringResponseSchema: z.ZodRecord<z.ZodString, z.ZodBoolean>;
166
+ type OrdersScoringResponse = z.infer<typeof OrdersScoringResponseSchema>;
167
+ declare const UserEarningSchema: z.ZodObject<{
168
+ asset_address: z.ZodString;
169
+ asset_rate: z.ZodNumber;
170
+ condition_id: z.ZodString;
171
+ date: z.ZodString;
172
+ earnings: z.ZodNumber;
173
+ maker_address: z.ZodString;
174
+ }, z.core.$strip>;
175
+ type UserEarning = z.infer<typeof UserEarningSchema>;
176
+ declare const UserEarningsPageSchema: z.ZodObject<{
177
+ count: z.ZodNumber;
178
+ data: z.ZodArray<z.ZodObject<{
179
+ asset_address: z.ZodString;
180
+ asset_rate: z.ZodNumber;
181
+ condition_id: z.ZodString;
182
+ date: z.ZodString;
183
+ earnings: z.ZodNumber;
184
+ maker_address: z.ZodString;
185
+ }, z.core.$strip>>;
186
+ limit: z.ZodNumber;
187
+ next_cursor: z.ZodString;
188
+ }, z.core.$strip>;
189
+ type UserEarningsPage = z.infer<typeof UserEarningsPageSchema>;
190
+ declare const TotalUserEarningSchema: z.ZodObject<{
191
+ asset_address: z.ZodString;
192
+ asset_rate: z.ZodNumber;
193
+ date: z.ZodString;
194
+ earnings: z.ZodNumber;
195
+ maker_address: z.ZodString;
196
+ }, z.core.$strip>;
197
+ type TotalUserEarning = z.infer<typeof TotalUserEarningSchema>;
198
+ declare const TotalUserEarningsResponseSchema: z.ZodArray<z.ZodObject<{
199
+ asset_address: z.ZodString;
200
+ asset_rate: z.ZodNumber;
201
+ date: z.ZodString;
202
+ earnings: z.ZodNumber;
203
+ maker_address: z.ZodString;
204
+ }, z.core.$strip>>;
205
+ type TotalUserEarningsResponse = z.infer<typeof TotalUserEarningsResponseSchema>;
206
+ declare const RewardsPercentagesSchema: z.ZodRecord<z.ZodString, z.ZodNumber>;
207
+ type RewardsPercentages = z.infer<typeof RewardsPercentagesSchema>;
208
+ declare const TokenSchema: z.ZodObject<{
209
+ outcome: z.ZodString;
210
+ price: z.ZodNumber;
211
+ token_id: z.ZodString;
212
+ }, z.core.$strip>;
213
+ declare const RewardsConfigSchema: z.ZodObject<{
214
+ asset_address: z.ZodString;
215
+ end_date: z.ZodString;
216
+ rate_per_day: z.ZodNumber;
217
+ start_date: z.ZodString;
218
+ total_rewards: z.ZodNumber;
219
+ }, z.core.$strip>;
220
+ declare const EarningSchema: z.ZodObject<{
221
+ asset_address: z.ZodString;
222
+ asset_rate: z.ZodNumber;
223
+ earnings: z.ZodNumber;
224
+ }, z.core.$strip>;
225
+ declare const UserRewardsEarningSchema: z.ZodObject<{
226
+ condition_id: z.ZodString;
227
+ earning_percentage: z.ZodNumber;
228
+ earnings: z.ZodArray<z.ZodObject<{
229
+ asset_address: z.ZodString;
230
+ asset_rate: z.ZodNumber;
231
+ earnings: z.ZodNumber;
232
+ }, z.core.$strip>>;
233
+ event_slug: z.ZodString;
234
+ image: z.ZodString;
235
+ maker_address: z.ZodString;
236
+ market_competitiveness: z.ZodNumber;
237
+ market_slug: z.ZodString;
238
+ question: z.ZodString;
239
+ rewards_config: z.ZodArray<z.ZodObject<{
240
+ asset_address: z.ZodString;
241
+ end_date: z.ZodString;
242
+ rate_per_day: z.ZodNumber;
243
+ start_date: z.ZodString;
244
+ total_rewards: z.ZodNumber;
245
+ }, z.core.$strip>>;
246
+ rewards_max_spread: z.ZodNumber;
247
+ rewards_min_size: z.ZodNumber;
248
+ tokens: z.ZodArray<z.ZodObject<{
249
+ outcome: z.ZodString;
250
+ price: z.ZodNumber;
251
+ token_id: z.ZodString;
252
+ }, z.core.$strip>>;
253
+ }, z.core.$strip>;
254
+ type UserRewardsEarning = z.infer<typeof UserRewardsEarningSchema>;
255
+ declare const UserRewardsEarningsPageSchema: z.ZodObject<{
256
+ count: z.ZodNumber;
257
+ data: z.ZodArray<z.ZodObject<{
258
+ condition_id: z.ZodString;
259
+ earning_percentage: z.ZodNumber;
260
+ earnings: z.ZodArray<z.ZodObject<{
261
+ asset_address: z.ZodString;
262
+ asset_rate: z.ZodNumber;
263
+ earnings: z.ZodNumber;
264
+ }, z.core.$strip>>;
265
+ event_slug: z.ZodString;
266
+ image: z.ZodString;
267
+ maker_address: z.ZodString;
268
+ market_competitiveness: z.ZodNumber;
269
+ market_slug: z.ZodString;
270
+ question: z.ZodString;
271
+ rewards_config: z.ZodArray<z.ZodObject<{
272
+ asset_address: z.ZodString;
273
+ end_date: z.ZodString;
274
+ rate_per_day: z.ZodNumber;
275
+ start_date: z.ZodString;
276
+ total_rewards: z.ZodNumber;
277
+ }, z.core.$strip>>;
278
+ rewards_max_spread: z.ZodNumber;
279
+ rewards_min_size: z.ZodNumber;
280
+ tokens: z.ZodArray<z.ZodObject<{
281
+ outcome: z.ZodString;
282
+ price: z.ZodNumber;
283
+ token_id: z.ZodString;
284
+ }, z.core.$strip>>;
285
+ }, z.core.$strip>>;
286
+ limit: z.ZodNumber;
287
+ next_cursor: z.ZodString;
288
+ }, z.core.$strip>;
289
+ type UserRewardsEarningsPage = z.infer<typeof UserRewardsEarningsPageSchema>;
290
+
291
+ declare const RawApiKeyCredsSchema: z.ZodObject<{
292
+ apiKey: z.ZodPipe<z.ZodString, z.ZodTransform<ApiKey, string>>;
293
+ secret: z.ZodString;
294
+ passphrase: z.ZodString;
295
+ }, z.core.$strip>;
296
+ declare const ApiKeyCredsSchema: z.ZodPipe<z.ZodObject<{
297
+ apiKey: z.ZodPipe<z.ZodString, z.ZodTransform<ApiKey, string>>;
298
+ secret: z.ZodString;
299
+ passphrase: z.ZodString;
300
+ }, z.core.$strip>, z.ZodTransform<{
301
+ key: ApiKey;
302
+ passphrase: string;
303
+ secret: string;
304
+ }, {
305
+ apiKey: ApiKey;
306
+ secret: string;
307
+ passphrase: string;
308
+ }>>;
309
+ type ApiKeyCreds = z.infer<typeof ApiKeyCredsSchema>;
310
+ declare const ApiKeysResponseSchema: z.ZodObject<{
311
+ apiKeys: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ApiKey, string>>>;
312
+ }, z.core.$strip>;
313
+ type ApiKeysResponse = z.infer<typeof ApiKeysResponseSchema>;
314
+ declare const BuilderApiKeyCredsSchema: z.ZodObject<{
315
+ key: z.ZodPipe<z.ZodString, z.ZodTransform<ApiKey, string>>;
316
+ secret: z.ZodString;
317
+ passphrase: z.ZodString;
318
+ }, z.core.$strip>;
319
+ type BuilderApiKeyCreds = z.infer<typeof BuilderApiKeyCredsSchema>;
320
+ declare const BuilderApiKeySchema: z.ZodObject<{
321
+ key: z.ZodPipe<z.ZodString, z.ZodTransform<ApiKey, string>>;
322
+ createdAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
323
+ revokedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>>;
324
+ }, z.core.$strip>;
325
+ type BuilderApiKey = z.infer<typeof BuilderApiKeySchema>;
326
+ declare const BuilderApiKeysResponseSchema: z.ZodPipe<z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<ApiKey, string>>, z.ZodTransform<{
327
+ key: ApiKey;
328
+ }, ApiKey>>, z.ZodObject<{
329
+ key: z.ZodPipe<z.ZodString, z.ZodTransform<ApiKey, string>>;
330
+ createdAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
331
+ revokedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>>;
332
+ }, z.core.$strip>]>>, z.ZodTransform<{
333
+ key: ApiKey;
334
+ createdAt?: string | undefined;
335
+ revokedAt?: string | null | undefined;
336
+ }[], ({
337
+ key: ApiKey;
338
+ createdAt?: string | undefined;
339
+ revokedAt?: string | null | undefined;
340
+ } | {
341
+ key: ApiKey;
342
+ })[]>>;
343
+ type BuilderApiKeysResponse = z.infer<typeof BuilderApiKeysResponseSchema>;
344
+
345
+ declare enum OrderSide {
346
+ BUY = "BUY",
347
+ SELL = "SELL"
348
+ }
349
+ declare enum OrderType {
350
+ GTC = "GTC",
351
+ FOK = "FOK",
352
+ GTD = "GTD",
353
+ FAK = "FAK"
354
+ }
355
+ declare const OrderSideSchema: z.ZodEnum<typeof OrderSide>;
356
+ declare const OrderTypeSchema: z.ZodEnum<typeof OrderType>;
357
+
358
+ declare const BuilderTradeSchema: z.ZodObject<{
359
+ id: z.ZodString;
360
+ tradeType: z.ZodString;
361
+ takerOrderHash: z.ZodString;
362
+ builder: z.ZodString;
363
+ market: z.ZodString;
364
+ assetId: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
365
+ side: z.ZodEnum<typeof OrderSide>;
366
+ size: z.ZodString;
367
+ sizeUsdc: z.ZodString;
368
+ price: z.ZodString;
369
+ status: z.ZodString;
370
+ outcome: z.ZodString;
371
+ outcomeIndex: z.ZodNumber;
372
+ owner: z.ZodString;
373
+ maker: z.ZodString;
374
+ transactionHash: z.ZodString;
375
+ matchTime: z.ZodString;
376
+ bucketIndex: z.ZodNumber;
377
+ fee: z.ZodString;
378
+ feeUsdc: z.ZodString;
379
+ err_msg: z.ZodOptional<z.ZodNullable<z.ZodString>>;
380
+ createdAt: z.ZodOptional<z.ZodString>;
381
+ updatedAt: z.ZodOptional<z.ZodString>;
382
+ }, z.core.$loose>;
383
+ type BuilderTrade = z.infer<typeof BuilderTradeSchema>;
384
+ declare const PaginatedBuilderTradesSchema: z.ZodObject<{
385
+ limit: z.ZodNumber;
386
+ count: z.ZodNumber;
387
+ next_cursor: z.ZodString;
388
+ data: z.ZodArray<z.ZodObject<{
389
+ id: z.ZodString;
390
+ tradeType: z.ZodString;
391
+ takerOrderHash: z.ZodString;
392
+ builder: z.ZodString;
393
+ market: z.ZodString;
394
+ assetId: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
395
+ side: z.ZodEnum<typeof OrderSide>;
396
+ size: z.ZodString;
397
+ sizeUsdc: z.ZodString;
398
+ price: z.ZodString;
399
+ status: z.ZodString;
400
+ outcome: z.ZodString;
401
+ outcomeIndex: z.ZodNumber;
402
+ owner: z.ZodString;
403
+ maker: z.ZodString;
404
+ transactionHash: z.ZodString;
405
+ matchTime: z.ZodString;
406
+ bucketIndex: z.ZodNumber;
407
+ fee: z.ZodString;
408
+ feeUsdc: z.ZodString;
409
+ err_msg: z.ZodOptional<z.ZodNullable<z.ZodString>>;
410
+ createdAt: z.ZodOptional<z.ZodString>;
411
+ updatedAt: z.ZodOptional<z.ZodString>;
412
+ }, z.core.$loose>>;
413
+ }, z.core.$strip>;
414
+ type PaginatedBuilderTrades = z.infer<typeof PaginatedBuilderTradesSchema>;
415
+
416
+ declare const CancelOrdersResponseSchema: z.ZodObject<{
417
+ canceled: z.ZodArray<z.ZodString>;
418
+ not_canceled: z.ZodRecord<z.ZodString, z.ZodString>;
419
+ }, z.core.$strip>;
420
+ type CancelOrdersResponse = z.infer<typeof CancelOrdersResponseSchema>;
421
+
422
+ declare const FeeRateSchema: z.ZodObject<{
423
+ base_fee: z.ZodNumber;
424
+ }, z.core.$loose>;
425
+ declare const FetchFeeRateResponseSchema: z.ZodObject<{
426
+ base_fee: z.ZodNumber;
427
+ }, z.core.$loose>;
428
+ type FeeRate = z.infer<typeof FeeRateSchema>;
429
+ type FetchFeeRateResponse = z.infer<typeof FetchFeeRateResponseSchema>;
430
+
431
+ declare enum PriceHistoryInterval {
432
+ MAX = "max",
433
+ ONE_WEEK = "1w",
434
+ ONE_DAY = "1d",
435
+ SIX_HOURS = "6h",
436
+ ONE_HOUR = "1h"
437
+ }
438
+ declare const PriceHistoryIntervalSchema: z.ZodEnum<typeof PriceHistoryInterval>;
439
+ declare const MidpointSchema: z.ZodObject<{
440
+ mid: z.ZodString;
441
+ }, z.core.$loose>;
442
+ type Midpoint = z.infer<typeof MidpointSchema>;
443
+ declare const MidpointsSchema: z.ZodRecord<z.ZodString, z.ZodString>;
444
+ type Midpoints = z.infer<typeof MidpointsSchema>;
445
+ declare const PriceSchema: z.ZodObject<{
446
+ price: z.ZodString;
447
+ }, z.core.$loose>;
448
+ type Price = z.infer<typeof PriceSchema>;
449
+ declare const PricesBySideSchema: z.ZodRecord<z.ZodEnum<typeof OrderSide>, z.ZodOptional<z.ZodString>>;
450
+ type PricesBySide = z.infer<typeof PricesBySideSchema>;
451
+ declare const PricesSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<typeof OrderSide>, z.ZodOptional<z.ZodString>>>;
452
+ type Prices = z.infer<typeof PricesSchema>;
453
+ declare const SpreadSchema: z.ZodObject<{
454
+ spread: z.ZodString;
455
+ }, z.core.$loose>;
456
+ type Spread = z.infer<typeof SpreadSchema>;
457
+ declare const SpreadsSchema: z.ZodRecord<z.ZodString, z.ZodString>;
458
+ type Spreads = z.infer<typeof SpreadsSchema>;
459
+ declare const LastTradePriceSchema: z.ZodObject<{
460
+ price: z.ZodString;
461
+ side: z.ZodEnum<typeof OrderSide>;
462
+ }, z.core.$loose>;
463
+ type LastTradePrice = z.infer<typeof LastTradePriceSchema>;
464
+ declare const LastTradePriceForTokenResponseSchema: z.ZodPipe<z.ZodObject<{
465
+ price: z.ZodString;
466
+ side: z.ZodEnum<typeof OrderSide>;
467
+ token_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
468
+ }, z.core.$strip>, z.ZodTransform<{
469
+ tokenId: TokenId;
470
+ price: string;
471
+ side: OrderSide;
472
+ }, {
473
+ price: string;
474
+ side: OrderSide;
475
+ token_id: TokenId;
476
+ }>>;
477
+ type LastTradePriceForTokenResponse = z.infer<typeof LastTradePriceForTokenResponseSchema>;
478
+ declare const LastTradePriceForTokenSchema: z.ZodObject<{
479
+ tokenId: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
480
+ price: z.ZodString;
481
+ side: z.ZodEnum<typeof OrderSide>;
482
+ }, z.core.$strip>;
483
+ type LastTradePriceForToken = z.infer<typeof LastTradePriceForTokenSchema>;
484
+ declare const LastTradePricesSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
485
+ price: z.ZodString;
486
+ side: z.ZodEnum<typeof OrderSide>;
487
+ token_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
488
+ }, z.core.$strip>, z.ZodTransform<{
489
+ tokenId: TokenId;
490
+ price: string;
491
+ side: OrderSide;
492
+ }, {
493
+ price: string;
494
+ side: OrderSide;
495
+ token_id: TokenId;
496
+ }>>>;
497
+ type LastTradePrices = z.infer<typeof LastTradePricesSchema>;
498
+ declare const PriceHistoryPointSchema: z.ZodObject<{
499
+ t: z.ZodNumber;
500
+ p: z.ZodNumber;
501
+ }, z.core.$strip>;
502
+ type PriceHistoryPoint = z.infer<typeof PriceHistoryPointSchema>;
503
+ declare const PriceHistorySchema: z.ZodObject<{
504
+ history: z.ZodArray<z.ZodObject<{
505
+ t: z.ZodNumber;
506
+ p: z.ZodNumber;
507
+ }, z.core.$strip>>;
508
+ }, z.core.$loose>;
509
+ type PriceHistory = z.infer<typeof PriceHistorySchema>;
510
+
511
+ declare const NegRiskSchema: z.ZodObject<{
512
+ neg_risk: z.ZodBoolean;
513
+ }, z.core.$loose>;
514
+ declare const FetchNegRiskResponseSchema: z.ZodObject<{
515
+ neg_risk: z.ZodBoolean;
516
+ }, z.core.$loose>;
517
+ type NegRisk = z.infer<typeof NegRiskSchema>;
518
+ type FetchNegRiskResponse = z.infer<typeof FetchNegRiskResponseSchema>;
519
+
520
+ declare const OrderBookLevelSchema: z.ZodObject<{
521
+ price: z.ZodString;
522
+ size: z.ZodString;
523
+ }, z.core.$loose>;
524
+ declare const OrderBookSchema: z.ZodObject<{
525
+ market: z.ZodString;
526
+ asset_id: z.ZodString;
527
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
528
+ bids: z.ZodArray<z.ZodObject<{
529
+ price: z.ZodString;
530
+ size: z.ZodString;
531
+ }, z.core.$loose>>;
532
+ asks: z.ZodArray<z.ZodObject<{
533
+ price: z.ZodString;
534
+ size: z.ZodString;
535
+ }, z.core.$loose>>;
536
+ min_order_size: z.ZodString;
537
+ tick_size: z.ZodString;
538
+ neg_risk: z.ZodBoolean;
539
+ last_trade_price: z.ZodOptional<z.ZodNullable<z.ZodString>>;
540
+ hash: z.ZodString;
541
+ }, z.core.$loose>;
542
+ declare const FetchOrderBookResponseSchema: z.ZodObject<{
543
+ market: z.ZodString;
544
+ asset_id: z.ZodString;
545
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
546
+ bids: z.ZodArray<z.ZodObject<{
547
+ price: z.ZodString;
548
+ size: z.ZodString;
549
+ }, z.core.$loose>>;
550
+ asks: z.ZodArray<z.ZodObject<{
551
+ price: z.ZodString;
552
+ size: z.ZodString;
553
+ }, z.core.$loose>>;
554
+ min_order_size: z.ZodString;
555
+ tick_size: z.ZodString;
556
+ neg_risk: z.ZodBoolean;
557
+ last_trade_price: z.ZodOptional<z.ZodNullable<z.ZodString>>;
558
+ hash: z.ZodString;
559
+ }, z.core.$loose>;
560
+ declare const OrderBooksSchema: z.ZodArray<z.ZodObject<{
561
+ market: z.ZodString;
562
+ asset_id: z.ZodString;
563
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
564
+ bids: z.ZodArray<z.ZodObject<{
565
+ price: z.ZodString;
566
+ size: z.ZodString;
567
+ }, z.core.$loose>>;
568
+ asks: z.ZodArray<z.ZodObject<{
569
+ price: z.ZodString;
570
+ size: z.ZodString;
571
+ }, z.core.$loose>>;
572
+ min_order_size: z.ZodString;
573
+ tick_size: z.ZodString;
574
+ neg_risk: z.ZodBoolean;
575
+ last_trade_price: z.ZodOptional<z.ZodNullable<z.ZodString>>;
576
+ hash: z.ZodString;
577
+ }, z.core.$loose>>;
578
+ type OrderBookLevel = z.infer<typeof OrderBookLevelSchema>;
579
+ type OrderBook = z.infer<typeof OrderBookSchema>;
580
+ type OrderBooks = z.infer<typeof OrderBooksSchema>;
581
+ type FetchOrderBookResponse = z.infer<typeof FetchOrderBookResponseSchema>;
582
+
583
+ declare const RawOrderResponseSchema: z.ZodObject<{
584
+ errorMsg: z.ZodString;
585
+ makingAmount: z.ZodString;
586
+ orderID: z.ZodString;
587
+ status: z.ZodString;
588
+ success: z.ZodBoolean;
589
+ takingAmount: z.ZodString;
590
+ tradeIDs: z.ZodDefault<z.ZodArray<z.ZodString>>;
591
+ transactionsHashes: z.ZodDefault<z.ZodArray<z.ZodString>>;
592
+ }, z.core.$strip>;
593
+ type RawOrderResponse = z.infer<typeof RawOrderResponseSchema>;
594
+ declare const RawOrderResponsesSchema: z.ZodArray<z.ZodObject<{
595
+ errorMsg: z.ZodString;
596
+ makingAmount: z.ZodString;
597
+ orderID: z.ZodString;
598
+ status: z.ZodString;
599
+ success: z.ZodBoolean;
600
+ takingAmount: z.ZodString;
601
+ tradeIDs: z.ZodDefault<z.ZodArray<z.ZodString>>;
602
+ transactionsHashes: z.ZodDefault<z.ZodArray<z.ZodString>>;
603
+ }, z.core.$strip>>;
604
+ type RawOrderResponses = z.infer<typeof RawOrderResponsesSchema>;
605
+ declare enum OrderPostStatus {
606
+ LIVE = "live",
607
+ MATCHED = "matched",
608
+ DELAYED = "delayed"
609
+ }
610
+ declare const OrderPostStatusSchema: z.ZodEnum<typeof OrderPostStatus>;
611
+ declare enum OrderResponseErrorCode {
612
+ UNMATCHED = "unmatched",
613
+ MARKET_NOT_READY = "market_not_ready",
614
+ NOT_ENOUGH_BALANCE = "not_enough_balance",
615
+ INVALID_NONCE = "invalid_nonce",
616
+ INVALID_EXPIRATION = "invalid_expiration",
617
+ POST_ONLY_WOULD_CROSS = "post_only_would_cross",
618
+ FOK_NOT_FILLED = "fok_not_filled",
619
+ FAK_NOT_FILLED = "fak_not_filled",
620
+ UNKNOWN = "unknown"
621
+ }
622
+ declare const OrderResponseErrorCodeSchema: z.ZodEnum<typeof OrderResponseErrorCode>;
623
+ type AcceptedOrderResponse = {
624
+ ok: true;
625
+ orderId: string;
626
+ status: OrderPostStatus;
627
+ makingAmount: string;
628
+ takingAmount: string;
629
+ transactionsHashes: TxHash[];
630
+ tradeIds: string[];
631
+ };
632
+ type RejectedOrderResponse = {
633
+ ok: false;
634
+ code: OrderResponseErrorCode;
635
+ message: string;
636
+ };
637
+ type OrderResponse = AcceptedOrderResponse | RejectedOrderResponse;
638
+ type OrderResponses = OrderResponse[];
639
+ declare const AcceptedOrderResponseSchema: z.ZodObject<{
640
+ ok: z.ZodLiteral<true>;
641
+ orderId: z.ZodString;
642
+ status: z.ZodEnum<typeof OrderPostStatus>;
643
+ makingAmount: z.ZodString;
644
+ takingAmount: z.ZodString;
645
+ tradeIds: z.ZodArray<z.ZodString>;
646
+ transactionsHashes: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TxHash, string>>>;
647
+ }, z.core.$strip>;
648
+ declare const RejectedOrderResponseSchema: z.ZodObject<{
649
+ ok: z.ZodLiteral<false>;
650
+ code: z.ZodEnum<typeof OrderResponseErrorCode>;
651
+ message: z.ZodString;
652
+ }, z.core.$strip>;
653
+ declare const OrderResponseSchema: z.ZodPipe<z.ZodObject<{
654
+ errorMsg: z.ZodString;
655
+ makingAmount: z.ZodString;
656
+ orderID: z.ZodString;
657
+ status: z.ZodString;
658
+ success: z.ZodBoolean;
659
+ takingAmount: z.ZodString;
660
+ tradeIDs: z.ZodDefault<z.ZodArray<z.ZodString>>;
661
+ transactionsHashes: z.ZodDefault<z.ZodArray<z.ZodString>>;
662
+ }, z.core.$strip>, z.ZodTransform<AcceptedOrderResponse | RejectedOrderResponse, {
663
+ errorMsg: string;
664
+ makingAmount: string;
665
+ orderID: string;
666
+ status: string;
667
+ success: boolean;
668
+ takingAmount: string;
669
+ tradeIDs: string[];
670
+ transactionsHashes: string[];
671
+ }>>;
672
+ declare const OrderResponsesSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
673
+ errorMsg: z.ZodString;
674
+ makingAmount: z.ZodString;
675
+ orderID: z.ZodString;
676
+ status: z.ZodString;
677
+ success: z.ZodBoolean;
678
+ takingAmount: z.ZodString;
679
+ tradeIDs: z.ZodDefault<z.ZodArray<z.ZodString>>;
680
+ transactionsHashes: z.ZodDefault<z.ZodArray<z.ZodString>>;
681
+ }, z.core.$strip>, z.ZodTransform<AcceptedOrderResponse | RejectedOrderResponse, {
682
+ errorMsg: string;
683
+ makingAmount: string;
684
+ orderID: string;
685
+ status: string;
686
+ success: boolean;
687
+ takingAmount: string;
688
+ tradeIDs: string[];
689
+ transactionsHashes: string[];
690
+ }>>>;
691
+
692
+ declare const END_CURSOR = "LTE=";
693
+
694
+ declare const CurrentRewardConfigSchema: z.ZodObject<{
695
+ id: z.ZodOptional<z.ZodNumber>;
696
+ asset_address: z.ZodString;
697
+ start_date: z.ZodString;
698
+ end_date: z.ZodOptional<z.ZodString>;
699
+ rate_per_day: z.ZodNumber;
700
+ total_rewards: z.ZodOptional<z.ZodNumber>;
701
+ }, z.core.$loose>;
702
+ type CurrentRewardConfig = z.infer<typeof CurrentRewardConfigSchema>;
703
+ declare const CurrentRewardSchema: z.ZodObject<{
704
+ condition_id: z.ZodString;
705
+ rewards_max_spread: z.ZodOptional<z.ZodNumber>;
706
+ rewards_min_size: z.ZodOptional<z.ZodNumber>;
707
+ rewards_config: z.ZodOptional<z.ZodArray<z.ZodObject<{
708
+ id: z.ZodOptional<z.ZodNumber>;
709
+ asset_address: z.ZodString;
710
+ start_date: z.ZodString;
711
+ end_date: z.ZodOptional<z.ZodString>;
712
+ rate_per_day: z.ZodNumber;
713
+ total_rewards: z.ZodOptional<z.ZodNumber>;
714
+ }, z.core.$loose>>>;
715
+ sponsored_daily_rate: z.ZodOptional<z.ZodNumber>;
716
+ sponsors_count: z.ZodOptional<z.ZodNumber>;
717
+ native_daily_rate: z.ZodOptional<z.ZodNumber>;
718
+ total_daily_rate: z.ZodOptional<z.ZodNumber>;
719
+ }, z.core.$loose>;
720
+ type CurrentReward = z.infer<typeof CurrentRewardSchema>;
721
+ declare const PaginatedCurrentRewardsSchema: z.ZodObject<{
722
+ limit: z.ZodNumber;
723
+ count: z.ZodNumber;
724
+ next_cursor: z.ZodString;
725
+ data: z.ZodArray<z.ZodObject<{
726
+ condition_id: z.ZodString;
727
+ rewards_max_spread: z.ZodOptional<z.ZodNumber>;
728
+ rewards_min_size: z.ZodOptional<z.ZodNumber>;
729
+ rewards_config: z.ZodOptional<z.ZodArray<z.ZodObject<{
730
+ id: z.ZodOptional<z.ZodNumber>;
731
+ asset_address: z.ZodString;
732
+ start_date: z.ZodString;
733
+ end_date: z.ZodOptional<z.ZodString>;
734
+ rate_per_day: z.ZodNumber;
735
+ total_rewards: z.ZodOptional<z.ZodNumber>;
736
+ }, z.core.$loose>>>;
737
+ sponsored_daily_rate: z.ZodOptional<z.ZodNumber>;
738
+ sponsors_count: z.ZodOptional<z.ZodNumber>;
739
+ native_daily_rate: z.ZodOptional<z.ZodNumber>;
740
+ total_daily_rate: z.ZodOptional<z.ZodNumber>;
741
+ }, z.core.$loose>>;
742
+ }, z.core.$strip>;
743
+ type PaginatedCurrentRewards = z.infer<typeof PaginatedCurrentRewardsSchema>;
744
+ declare const RewardTokenSchema: z.ZodObject<{
745
+ token_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
746
+ outcome: z.ZodString;
747
+ price: z.ZodNumber;
748
+ }, z.core.$strip>;
749
+ type RewardToken = z.infer<typeof RewardTokenSchema>;
750
+ declare const RewardConfigSchema: z.ZodObject<{
751
+ asset_address: z.ZodString;
752
+ start_date: z.ZodString;
753
+ end_date: z.ZodOptional<z.ZodString>;
754
+ rate_per_day: z.ZodNumber;
755
+ total_rewards: z.ZodOptional<z.ZodNumber>;
756
+ }, z.core.$loose>;
757
+ type RewardConfig = z.infer<typeof RewardConfigSchema>;
758
+ declare const MarketRewardSchema: z.ZodObject<{
759
+ condition_id: z.ZodString;
760
+ question: z.ZodString;
761
+ market_slug: z.ZodOptional<z.ZodString>;
762
+ event_slug: z.ZodOptional<z.ZodString>;
763
+ image: z.ZodOptional<z.ZodString>;
764
+ rewards_max_spread: z.ZodOptional<z.ZodNumber>;
765
+ rewards_min_size: z.ZodOptional<z.ZodNumber>;
766
+ market_competitiveness: z.ZodOptional<z.ZodNumber>;
767
+ tokens: z.ZodArray<z.ZodObject<{
768
+ token_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
769
+ outcome: z.ZodString;
770
+ price: z.ZodNumber;
771
+ }, z.core.$strip>>;
772
+ rewards_config: z.ZodOptional<z.ZodArray<z.ZodObject<{
773
+ asset_address: z.ZodString;
774
+ start_date: z.ZodString;
775
+ end_date: z.ZodOptional<z.ZodString>;
776
+ rate_per_day: z.ZodNumber;
777
+ total_rewards: z.ZodOptional<z.ZodNumber>;
778
+ }, z.core.$loose>>>;
779
+ }, z.core.$loose>;
780
+ type MarketReward = z.infer<typeof MarketRewardSchema>;
781
+ declare const PaginatedMarketRewardsSchema: z.ZodObject<{
782
+ limit: z.ZodNumber;
783
+ count: z.ZodNumber;
784
+ next_cursor: z.ZodString;
785
+ data: z.ZodArray<z.ZodObject<{
786
+ condition_id: z.ZodString;
787
+ question: z.ZodString;
788
+ market_slug: z.ZodOptional<z.ZodString>;
789
+ event_slug: z.ZodOptional<z.ZodString>;
790
+ image: z.ZodOptional<z.ZodString>;
791
+ rewards_max_spread: z.ZodOptional<z.ZodNumber>;
792
+ rewards_min_size: z.ZodOptional<z.ZodNumber>;
793
+ market_competitiveness: z.ZodOptional<z.ZodNumber>;
794
+ tokens: z.ZodArray<z.ZodObject<{
795
+ token_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
796
+ outcome: z.ZodString;
797
+ price: z.ZodNumber;
798
+ }, z.core.$strip>>;
799
+ rewards_config: z.ZodOptional<z.ZodArray<z.ZodObject<{
800
+ asset_address: z.ZodString;
801
+ start_date: z.ZodString;
802
+ end_date: z.ZodOptional<z.ZodString>;
803
+ rate_per_day: z.ZodNumber;
804
+ total_rewards: z.ZodOptional<z.ZodNumber>;
805
+ }, z.core.$loose>>>;
806
+ }, z.core.$loose>>;
807
+ }, z.core.$strip>;
808
+ type PaginatedMarketRewards = z.infer<typeof PaginatedMarketRewardsSchema>;
809
+
810
+ declare enum SignatureType {
811
+ /**
812
+ * ECDSA EIP712 signatures signed by EOAs
813
+ */
814
+ EOA = 0,
815
+ /**
816
+ * EIP712 signatures signed by EOAs that own Polymarket Proxy wallets
817
+ */
818
+ POLY_PROXY = 1,
819
+ /**
820
+ * EIP712 signatures signed by EOAs that own Polymarket Gnosis safes
821
+ */
822
+ POLY_GNOSIS_SAFE = 2
823
+ }
824
+ declare const SignatureTypeSchema: z.ZodEnum<typeof SignatureType>;
825
+
826
+ declare const TickSizeSchema: z.ZodObject<{
827
+ minimum_tick_size: z.ZodUnion<readonly [z.ZodLiteral<0.1>, z.ZodLiteral<0.01>, z.ZodLiteral<0.001>, z.ZodLiteral<0.0001>]>;
828
+ }, z.core.$loose>;
829
+ declare const FetchTickSizeResponseSchema: z.ZodObject<{
830
+ minimum_tick_size: z.ZodUnion<readonly [z.ZodLiteral<0.1>, z.ZodLiteral<0.01>, z.ZodLiteral<0.001>, z.ZodLiteral<0.0001>]>;
831
+ }, z.core.$loose>;
832
+ type TickSize = z.infer<typeof TickSizeSchema>;
833
+ type FetchTickSizeResponse = z.infer<typeof FetchTickSizeResponseSchema>;
834
+
835
+ export { type AcceptedOrderResponse, AcceptedOrderResponseSchema, type ApiKeyCreds, ApiKeyCredsSchema, type ApiKeysResponse, ApiKeysResponseSchema, AssetType, AssetTypeSchema, type BalanceAllowanceResponse, BalanceAllowanceResponseSchema, type BuilderApiKey, type BuilderApiKeyCreds, BuilderApiKeyCredsSchema, BuilderApiKeySchema, type BuilderApiKeysResponse, BuilderApiKeysResponseSchema, type BuilderTrade, BuilderTradeSchema, type CancelOrdersResponse, CancelOrdersResponseSchema, type ClobTrade, ClobTradeSchema, type ClobTradesPage, ClobTradesPageSchema, type ClosedOnlyMode, ClosedOnlyModeSchema, type CurrentReward, type CurrentRewardConfig, CurrentRewardSchema, END_CURSOR, EarningSchema, type FeeRate, FeeRateSchema, type FetchFeeRateResponse, FetchFeeRateResponseSchema, type FetchNegRiskResponse, FetchNegRiskResponseSchema, type FetchOrderBookResponse, FetchOrderBookResponseSchema, type FetchTickSizeResponse, FetchTickSizeResponseSchema, type LastTradePrice, type LastTradePriceForToken, type LastTradePriceForTokenResponse, LastTradePriceSchema, type LastTradePrices, LastTradePricesSchema, MakerOrderSchema, type MarketReward, MarketRewardSchema, type Midpoint, MidpointSchema, type Midpoints, MidpointsSchema, type NegRisk, NegRiskSchema, type Notification, NotificationSchema, type NotificationsResponse, NotificationsResponseSchema, type OpenOrder, OpenOrderSchema, type OpenOrdersPage, OpenOrdersPageSchema, type OrderBook, type OrderBookLevel, OrderBookLevelSchema, OrderBookSchema, type OrderBooks, OrderBooksSchema, OrderPostStatus, OrderPostStatusSchema, type OrderResponse, OrderResponseErrorCode, OrderResponseErrorCodeSchema, OrderResponseSchema, type OrderResponses, OrderResponsesSchema, type OrderScoringResponse, OrderScoringResponseSchema, OrderSide, OrderSideSchema, OrderType, OrderTypeSchema, type OrdersScoringResponse, OrdersScoringResponseSchema, type PaginatedBuilderTrades, PaginatedBuilderTradesSchema, type PaginatedCurrentRewards, PaginatedCurrentRewardsSchema, type PaginatedMarketRewards, PaginatedMarketRewardsSchema, type Price, type PriceHistory, PriceHistoryInterval, PriceHistoryIntervalSchema, type PriceHistoryPoint, PriceHistorySchema, PriceSchema, type Prices, type PricesBySide, PricesSchema, RawApiKeyCredsSchema, type RawOrderResponse, RawOrderResponseSchema, type RawOrderResponses, RawOrderResponsesSchema, type RejectedOrderResponse, RejectedOrderResponseSchema, type RewardConfig, type RewardToken, RewardsConfigSchema, type RewardsPercentages, RewardsPercentagesSchema, SignatureType, SignatureTypeSchema, type Spread, SpreadSchema, type Spreads, SpreadsSchema, type TickSize, TickSizeSchema, TokenSchema, type TotalUserEarning, TotalUserEarningSchema, type TotalUserEarningsResponse, TotalUserEarningsResponseSchema, type UserEarning, UserEarningSchema, type UserEarningsPage, UserEarningsPageSchema, type UserRewardsEarning, UserRewardsEarningSchema, type UserRewardsEarningsPage, UserRewardsEarningsPageSchema };