@liberfi.io/ui-predict 0.1.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.
@@ -0,0 +1,1029 @@
1
+ /**
2
+ * Image Optimized object structure
3
+ */
4
+ interface ImageOptimized {
5
+ /** Image ID */
6
+ id?: string | null;
7
+ /** Source image URL */
8
+ imageUrlSource?: string | null;
9
+ /** Optimized image URL */
10
+ imageUrlOptimized?: string | null;
11
+ /** Source image size in KB */
12
+ imageSizeKbSource?: number | null;
13
+ /** Optimized image size in KB */
14
+ imageSizeKbOptimized?: number | null;
15
+ /** Whether optimization is complete */
16
+ imageOptimizedComplete?: boolean | null;
17
+ /** Last updated timestamp */
18
+ imageOptimizedLastUpdated?: string | null;
19
+ /** Related ID */
20
+ relID?: number | null;
21
+ /** Field name */
22
+ field?: string | null;
23
+ /** Relation name */
24
+ relname?: string | null;
25
+ }
26
+ /**
27
+ * Market Event structure
28
+ */
29
+ interface MarketEvent {
30
+ /** Event ID */
31
+ id?: string | null;
32
+ /** Event ticker */
33
+ ticker?: string | null;
34
+ /** Event slug */
35
+ slug?: string | null;
36
+ /** Event title */
37
+ title?: string | null;
38
+ /** Event subtitle */
39
+ subtitle?: string | null;
40
+ /** Event description */
41
+ description?: string | null;
42
+ /** Resolution source */
43
+ resolutionSource?: string | null;
44
+ /** Start date */
45
+ startDate?: string | null;
46
+ /** Creation date */
47
+ creationDate?: string | null;
48
+ /** End date */
49
+ endDate?: string | null;
50
+ /** Event image URL */
51
+ image?: string | null;
52
+ /** Event icon URL */
53
+ icon?: string | null;
54
+ /** Whether event is active */
55
+ active?: boolean | null;
56
+ /** Whether event is closed */
57
+ closed?: boolean | null;
58
+ /** Whether event is archived */
59
+ archived?: boolean | null;
60
+ /** Whether event is new */
61
+ new?: boolean | null;
62
+ /** Whether event is featured */
63
+ featured?: boolean | null;
64
+ /** Whether event is restricted */
65
+ restricted?: boolean | null;
66
+ /** Event liquidity */
67
+ liquidity?: number | null;
68
+ /** Event volume */
69
+ volume?: number | null;
70
+ /** Open interest */
71
+ openInterest?: number | null;
72
+ /** Sort by field */
73
+ sortBy?: string | null;
74
+ /** Event category */
75
+ category?: string | null;
76
+ /** Event subcategory */
77
+ subcategory?: string | null;
78
+ /** Created at timestamp */
79
+ createdAt?: string | null;
80
+ /** Updated at timestamp */
81
+ updatedAt?: string | null;
82
+ /** Competitive score */
83
+ competitive?: number | null;
84
+ /** 24 hour volume */
85
+ volume24hr?: number | null;
86
+ /** 1 week volume */
87
+ volume1wk?: number | null;
88
+ /** 1 month volume */
89
+ volume1mo?: number | null;
90
+ /** 1 year volume */
91
+ volume1yr?: number | null;
92
+ /** Enable order book */
93
+ enableOrderBook?: boolean | null;
94
+ /** AMM liquidity */
95
+ liquidityAmm?: number | null;
96
+ /** CLOB liquidity */
97
+ liquidityClob?: number | null;
98
+ /** Comment count */
99
+ commentCount?: number | null;
100
+ /** Create your own market */
101
+ cyom?: boolean | null;
102
+ /** Show all outcomes */
103
+ showAllOutcomes?: boolean | null;
104
+ /** Show market images */
105
+ showMarketImages?: boolean | null;
106
+ /** Enable negative risk */
107
+ enableNegRisk?: boolean | null;
108
+ /** Negative risk augmented */
109
+ negRiskAugmented?: boolean | null;
110
+ /** Pending deployment */
111
+ pendingDeployment?: boolean | null;
112
+ /** Currently deploying */
113
+ deploying?: boolean | null;
114
+ }
115
+ /**
116
+ * Market Category structure
117
+ */
118
+ interface MarketCategory {
119
+ /** Category ID */
120
+ id?: string | null;
121
+ /** Category label */
122
+ label?: string | null;
123
+ /** Parent category */
124
+ parentCategory?: string | null;
125
+ /** Category slug */
126
+ slug?: string | null;
127
+ /** Published at timestamp */
128
+ publishedAt?: string | null;
129
+ /** Created by user ID */
130
+ createdBy?: string | null;
131
+ /** Updated by user ID */
132
+ updatedBy?: string | null;
133
+ /** Created at timestamp */
134
+ createdAt?: string | null;
135
+ /** Updated at timestamp */
136
+ updatedAt?: string | null;
137
+ }
138
+ /**
139
+ * Market data structure based on Polymarket API
140
+ */
141
+ interface Market {
142
+ /** Market ID */
143
+ id: string;
144
+ /** Market question */
145
+ question: string | null;
146
+ /** Condition ID */
147
+ conditionId: string;
148
+ /** Market slug */
149
+ slug: string | null;
150
+ /** Whether market is active */
151
+ active: boolean | null;
152
+ /** Whether market is closed */
153
+ closed: boolean | null;
154
+ /** Market volume */
155
+ volume: string | null;
156
+ /** Market liquidity */
157
+ liquidity: string | null;
158
+ /** Market end date */
159
+ endDate: string | null;
160
+ /** Market start date */
161
+ startDate: string | null;
162
+ /** Market category */
163
+ category: string | null;
164
+ /** Market description */
165
+ description: string | null;
166
+ /** Market outcomes */
167
+ outcomes: string | null;
168
+ /** Outcome prices */
169
+ outcomePrices: string | null;
170
+ /** Twitter card image URL */
171
+ twitterCardImage?: string | null;
172
+ /** Resolution source */
173
+ resolutionSource?: string | null;
174
+ /** AMM type */
175
+ ammType?: string | null;
176
+ /** Sponsor name */
177
+ sponsorName?: string | null;
178
+ /** Sponsor image URL */
179
+ sponsorImage?: string | null;
180
+ /** X-axis value */
181
+ xAxisValue?: string | null;
182
+ /** Y-axis value */
183
+ yAxisValue?: string | null;
184
+ /** Denomination token */
185
+ denominationToken?: string | null;
186
+ /** Market fee */
187
+ fee?: string | null;
188
+ /** Market image URL */
189
+ image?: string | null;
190
+ /** Market icon URL */
191
+ icon?: string | null;
192
+ /** Lower bound value */
193
+ lowerBound?: string | null;
194
+ /** Upper bound value */
195
+ upperBound?: string | null;
196
+ /** Market type */
197
+ marketType?: string | null;
198
+ /** Format type */
199
+ formatType?: string | null;
200
+ /** Lower bound date */
201
+ lowerBoundDate?: string | null;
202
+ /** Upper bound date */
203
+ upperBoundDate?: string | null;
204
+ /** Market maker address */
205
+ marketMakerAddress?: string;
206
+ /** Created by user ID */
207
+ createdBy?: number | null;
208
+ /** Updated by user ID */
209
+ updatedBy?: number | null;
210
+ /** Creation timestamp */
211
+ createdAt?: string | null;
212
+ /** Update timestamp */
213
+ updatedAt?: string | null;
214
+ /** Closed time */
215
+ closedTime?: string | null;
216
+ /** Wide format flag */
217
+ wideFormat?: boolean | null;
218
+ /** New market flag */
219
+ new?: boolean | null;
220
+ /** Mailchimp tag */
221
+ mailchimpTag?: string | null;
222
+ /** Featured market flag */
223
+ featured?: boolean | null;
224
+ /** Archived flag */
225
+ archived?: boolean | null;
226
+ /** Resolved by */
227
+ resolvedBy?: string | null;
228
+ /** Restricted flag */
229
+ restricted?: boolean | null;
230
+ /** Market group ID */
231
+ marketGroup?: number | null;
232
+ /** Group item title */
233
+ groupItemTitle?: string | null;
234
+ /** Group item threshold */
235
+ groupItemThreshold?: string | null;
236
+ /** Question ID */
237
+ questionID?: string | null;
238
+ /** UMA end date */
239
+ umaEndDate?: string | null;
240
+ /** Enable order book flag */
241
+ enableOrderBook?: boolean | null;
242
+ /** Order price minimum tick size */
243
+ orderPriceMinTickSize?: number | null;
244
+ /** Order minimum size */
245
+ orderMinSize?: number | null;
246
+ /** UMA resolution status */
247
+ umaResolutionStatus?: string | null;
248
+ /** Curation order */
249
+ curationOrder?: number | null;
250
+ /** Volume (numeric) */
251
+ volumeNum?: number | null;
252
+ /** Liquidity (numeric) */
253
+ liquidityNum?: number | null;
254
+ /** End date (ISO format) */
255
+ endDateIso?: string | null;
256
+ /** Start date (ISO format) */
257
+ startDateIso?: string | null;
258
+ /** UMA end date (ISO format) */
259
+ umaEndDateIso?: string | null;
260
+ /** Has reviewed dates flag */
261
+ hasReviewedDates?: boolean | null;
262
+ /** Ready for cron flag */
263
+ readyForCron?: boolean | null;
264
+ /** Comments enabled flag */
265
+ commentsEnabled?: boolean | null;
266
+ /** 24-hour volume */
267
+ volume24hr?: number | null;
268
+ /** 1-week volume */
269
+ volume1wk?: number | null;
270
+ /** 1-month volume */
271
+ volume1mo?: number | null;
272
+ /** 1-year volume */
273
+ volume1yr?: number | null;
274
+ /** Game start time */
275
+ gameStartTime?: string | null;
276
+ /** Seconds delay */
277
+ secondsDelay?: number | null;
278
+ /** CLOB token IDs */
279
+ clobTokenIds?: string | null;
280
+ /** Disqus thread ID */
281
+ disqusThread?: string | null;
282
+ /** Short outcomes */
283
+ shortOutcomes?: string | null;
284
+ /** Team A ID */
285
+ teamAID?: string | null;
286
+ /** Team B ID */
287
+ teamBID?: string | null;
288
+ /** UMA bond */
289
+ umaBond?: string | null;
290
+ /** UMA reward */
291
+ umaReward?: string | null;
292
+ /** FPMM live flag */
293
+ fpmmLive?: boolean | null;
294
+ /** 24-hour AMM volume */
295
+ volume24hrAmm?: number | null;
296
+ /** 1-week AMM volume */
297
+ volume1wkAmm?: number | null;
298
+ /** 1-month AMM volume */
299
+ volume1moAmm?: number | null;
300
+ /** 1-year AMM volume */
301
+ volume1yrAmm?: number | null;
302
+ /** 24-hour CLOB volume */
303
+ volume24hrClob?: number | null;
304
+ /** 1-week CLOB volume */
305
+ volume1wkClob?: number | null;
306
+ /** 1-month CLOB volume */
307
+ volume1moClob?: number | null;
308
+ /** 1-year CLOB volume */
309
+ volume1yrClob?: number | null;
310
+ /** AMM volume */
311
+ volumeAmm?: number | null;
312
+ /** CLOB volume */
313
+ volumeClob?: number | null;
314
+ /** AMM liquidity */
315
+ liquidityAmm?: number | null;
316
+ /** CLOB liquidity */
317
+ liquidityClob?: number | null;
318
+ /** Maker base fee */
319
+ makerBaseFee?: number | null;
320
+ /** Taker base fee */
321
+ takerBaseFee?: number | null;
322
+ /** Custom liveness */
323
+ customLiveness?: number | null;
324
+ /** Accepting orders flag */
325
+ acceptingOrders?: boolean | null;
326
+ /** Notifications enabled flag */
327
+ notificationsEnabled?: boolean | null;
328
+ /** Market score */
329
+ score?: number | null;
330
+ /** Image optimized object */
331
+ imageOptimized?: ImageOptimized | null;
332
+ /** Icon optimized object */
333
+ iconOptimized?: ImageOptimized | null;
334
+ /** Associated events */
335
+ events?: MarketEvent[] | null;
336
+ /** Market categories */
337
+ categories?: MarketCategory[] | null;
338
+ /** Market tags */
339
+ tags?: MarketTag[] | null;
340
+ /** Creator address */
341
+ creator?: string | null;
342
+ /** Ready flag */
343
+ ready?: boolean | null;
344
+ /** Funded flag */
345
+ funded?: boolean | null;
346
+ /** Past slugs */
347
+ pastSlugs?: string | null;
348
+ /** Ready timestamp */
349
+ readyTimestamp?: string | null;
350
+ /** Funded timestamp */
351
+ fundedTimestamp?: string | null;
352
+ /** Accepting orders timestamp */
353
+ acceptingOrdersTimestamp?: string | null;
354
+ /** Competitive score */
355
+ competitive?: number | null;
356
+ /** Rewards minimum size */
357
+ rewardsMinSize?: number | null;
358
+ /** Rewards maximum spread */
359
+ rewardsMaxSpread?: number | null;
360
+ /** Market spread */
361
+ spread?: number | null;
362
+ /** Automatically resolved flag */
363
+ automaticallyResolved?: boolean | null;
364
+ /** One day price change */
365
+ oneDayPriceChange?: number | null;
366
+ /** One hour price change */
367
+ oneHourPriceChange?: number | null;
368
+ /** One week price change */
369
+ oneWeekPriceChange?: number | null;
370
+ /** One month price change */
371
+ oneMonthPriceChange?: number | null;
372
+ /** One year price change */
373
+ oneYearPriceChange?: number | null;
374
+ /** Last trade price */
375
+ lastTradePrice?: number | null;
376
+ /** Best bid price */
377
+ bestBid?: number | null;
378
+ /** Best ask price */
379
+ bestAsk?: number | null;
380
+ /** Automatically active flag */
381
+ automaticallyActive?: boolean | null;
382
+ /** Clear book on start flag */
383
+ clearBookOnStart?: boolean | null;
384
+ /** Chart color */
385
+ chartColor?: string | null;
386
+ /** Series color */
387
+ seriesColor?: string | null;
388
+ /** Show GMP series flag */
389
+ showGmpSeries?: boolean | null;
390
+ /** Show GMP outcome flag */
391
+ showGmpOutcome?: boolean | null;
392
+ /** Manual activation flag */
393
+ manualActivation?: boolean | null;
394
+ /** Negative risk other flag */
395
+ negRiskOther?: boolean | null;
396
+ /** Game ID */
397
+ gameId?: string | null;
398
+ /** Group item range */
399
+ groupItemRange?: string | null;
400
+ /** Sports market type */
401
+ sportsMarketType?: string | null;
402
+ /** Line value */
403
+ line?: number | null;
404
+ /** UMA resolution statuses */
405
+ umaResolutionStatuses?: string | null;
406
+ /** Pending deployment flag */
407
+ pendingDeployment?: boolean | null;
408
+ /** Deploying flag */
409
+ deploying?: boolean | null;
410
+ /** Deploying timestamp */
411
+ deployingTimestamp?: string | null;
412
+ /** Scheduled deployment timestamp */
413
+ scheduledDeploymentTimestamp?: string | null;
414
+ /** RFQ enabled flag */
415
+ rfqEnabled?: boolean | null;
416
+ /** Event start time */
417
+ eventStartTime?: string | null;
418
+ }
419
+ /**
420
+ * Market query options
421
+ */
422
+ interface MarketQueryOptions {
423
+ limit?: number;
424
+ offset?: number;
425
+ order?: string;
426
+ ascending?: boolean;
427
+ id?: number[];
428
+ slug?: string[];
429
+ clobTokenIds?: string[];
430
+ conditionIds?: string[];
431
+ marketMakerAddress?: string[];
432
+ liquidityNumMin?: number;
433
+ liquidityNumMax?: number;
434
+ volumeNumMin?: number;
435
+ volumeNumMax?: number;
436
+ startDateMin?: string;
437
+ startDateMax?: string;
438
+ endDateMin?: string;
439
+ endDateMax?: string;
440
+ tagId?: number;
441
+ relatedTags?: boolean;
442
+ cyom?: boolean;
443
+ umaResolutionStatus?: string;
444
+ gameId?: string;
445
+ sportsMarketTypes?: string[];
446
+ rewardsMinSize?: number;
447
+ questionIds?: string[];
448
+ includeTag?: boolean;
449
+ closed?: boolean;
450
+ }
451
+ /**
452
+ * Market tag structure based on Polymarket API
453
+ */
454
+ interface MarketTag {
455
+ /** Tag ID */
456
+ id: string;
457
+ /** Tag label */
458
+ label: string | null;
459
+ /** Tag slug */
460
+ slug: string | null;
461
+ /** Force show flag */
462
+ forceShow: boolean | null;
463
+ /** Published date */
464
+ publishedAt: string | null;
465
+ /** Created by user ID */
466
+ createdBy: number | null;
467
+ /** Updated by user ID */
468
+ updatedBy: number | null;
469
+ /** Creation date */
470
+ createdAt: string | null;
471
+ /** Update date */
472
+ updatedAt: string | null;
473
+ /** Force hide flag */
474
+ forceHide: boolean | null;
475
+ /** Is carousel flag */
476
+ isCarousel: boolean | null;
477
+ }
478
+ /**
479
+ * Market Price Side enum
480
+ */
481
+ declare enum PriceSide {
482
+ BUY = "BUY",
483
+ SELL = "SELL"
484
+ }
485
+ /**
486
+ * Market Price Response
487
+ */
488
+ interface MarketPrice {
489
+ /** The market price (as string to maintain precision) */
490
+ price: string;
491
+ }
492
+ /**
493
+ * Market Price Query Options
494
+ */
495
+ interface MarketPriceQuery {
496
+ tokenId: string;
497
+ side: PriceSide;
498
+ }
499
+ /**
500
+ * Token Price Data - prices for both BUY and SELL sides
501
+ */
502
+ interface TokenPriceData {
503
+ /** Buy price for the token */
504
+ BUY: string;
505
+ /** Sell price for the token */
506
+ SELL: string;
507
+ }
508
+ /**
509
+ * Multiple Market Prices Response
510
+ * Map of token_id to price data (BUY/SELL prices)
511
+ */
512
+ interface MultipleMarketPrices {
513
+ [tokenId: string]: TokenPriceData;
514
+ }
515
+ /**
516
+ * Market Price Request Item for batch price requests
517
+ */
518
+ interface MarketPriceRequestItem {
519
+ /** The unique identifier for the token */
520
+ token_id: string;
521
+ /** The side of the market (BUY or SELL) */
522
+ side: PriceSide;
523
+ }
524
+ /**
525
+ * Search event structure
526
+ */
527
+ interface SearchEvent {
528
+ id: string;
529
+ ticker: string | null;
530
+ slug: string | null;
531
+ title: string | null;
532
+ subtitle: string | null;
533
+ description: string | null;
534
+ resolutionSource: string | null;
535
+ startDate: string | null;
536
+ creationDate: string | null;
537
+ endDate: string | null;
538
+ image: string | null;
539
+ icon: string | null;
540
+ active: boolean | null;
541
+ closed: boolean | null;
542
+ archived: boolean | null;
543
+ new: boolean | null;
544
+ featured: boolean | null;
545
+ restricted: boolean | null;
546
+ liquidity: number | null;
547
+ volume: number | null;
548
+ openInterest: number | null;
549
+ sortBy: string | null;
550
+ category: string | null;
551
+ subcategory: string | null;
552
+ isTemplate: boolean | null;
553
+ templateVariables: string | null;
554
+ published_at: string | null;
555
+ createdBy: string | null;
556
+ updatedBy: string | null;
557
+ createdAt: string | null;
558
+ updatedAt: string | null;
559
+ commentsEnabled: boolean | null;
560
+ competitive: number | null;
561
+ volume24hr: number | null;
562
+ volume1wk: number | null;
563
+ volume1mo: number | null;
564
+ volume1yr: number | null;
565
+ featuredImage: string | null;
566
+ disqusThread: string | null;
567
+ parentEvent: string | null;
568
+ enableOrderBook: boolean | null;
569
+ liquidityAmm: number | null;
570
+ liquidityClob: number | null;
571
+ negRisk: boolean | null;
572
+ negRiskMarketID: string | null;
573
+ negRiskFeeBips: number | null;
574
+ commentCount: number | null;
575
+ markets?: Market[];
576
+ }
577
+ /**
578
+ * Search tag structure
579
+ */
580
+ interface SearchTag {
581
+ id: string;
582
+ label: string | null;
583
+ slug: string | null;
584
+ event_count: number | null;
585
+ }
586
+ /**
587
+ * Search profile structure
588
+ */
589
+ interface SearchProfile {
590
+ id: string;
591
+ name: string | null;
592
+ user: number | null;
593
+ referral: string | null;
594
+ createdBy: number | null;
595
+ updatedBy: number | null;
596
+ createdAt: string | null;
597
+ updatedAt: string | null;
598
+ utmSource: string | null;
599
+ utmMedium: string | null;
600
+ utmCampaign: string | null;
601
+ utmContent: string | null;
602
+ utmTerm: string | null;
603
+ walletActivated: boolean | null;
604
+ pseudonym: string | null;
605
+ displayUsernamePublic: boolean | null;
606
+ profileImage: string | null;
607
+ bio: string | null;
608
+ proxyWallet: string | null;
609
+ isCloseOnly: boolean | null;
610
+ isCertReq: boolean | null;
611
+ certReqDate: string | null;
612
+ }
613
+ /**
614
+ * Search pagination structure
615
+ */
616
+ interface SearchPagination {
617
+ /** Whether there are more results */
618
+ hasMore: boolean;
619
+ /** Total number of results */
620
+ totalResults: number | null;
621
+ }
622
+ /**
623
+ * Search result structure based on Polymarket API
624
+ */
625
+ interface SearchResult {
626
+ /** Search events */
627
+ events: SearchEvent[] | null;
628
+ /** Search tags */
629
+ tags: SearchTag[] | null;
630
+ /** Search profiles */
631
+ profiles: SearchProfile[] | null;
632
+ /** Pagination information */
633
+ pagination: SearchPagination;
634
+ }
635
+ /**
636
+ * Search query options
637
+ */
638
+ interface SearchQueryOptions {
639
+ q: string;
640
+ cache?: boolean;
641
+ eventsStatus?: string;
642
+ limitPerType?: number;
643
+ page?: number;
644
+ eventsTag?: string[];
645
+ keepClosedMarkets?: number;
646
+ sort?: string;
647
+ ascending?: boolean;
648
+ searchTags?: boolean;
649
+ searchProfiles?: boolean;
650
+ recurrence?: string;
651
+ excludeTagId?: number[];
652
+ optimized?: boolean;
653
+ }
654
+ /**
655
+ * Price History Interval Options
656
+ */
657
+ declare enum PriceHistoryInterval {
658
+ ONE_MINUTE = "1m",
659
+ ONE_HOUR = "1h",
660
+ SIX_HOURS = "6h",
661
+ ONE_DAY = "1d",
662
+ ONE_WEEK = "1w",
663
+ MAX = "max"
664
+ }
665
+ /**
666
+ * Price History Data Point
667
+ */
668
+ interface PriceHistoryPoint {
669
+ /** Unix timestamp */
670
+ t: number;
671
+ /** Price at timestamp */
672
+ p: number;
673
+ }
674
+ /**
675
+ * Price History Response
676
+ */
677
+ interface PriceHistory {
678
+ /** Array of price history data points */
679
+ history: PriceHistoryPoint[];
680
+ }
681
+ /**
682
+ * Price History Query Options
683
+ */
684
+ interface PriceHistoryQuery {
685
+ market: string;
686
+ startTs?: number;
687
+ endTs?: number;
688
+ interval?: PriceHistoryInterval;
689
+ fidelity?: number;
690
+ }
691
+ /**
692
+ * Event Creator object
693
+ */
694
+ interface EventCreator {
695
+ /** Creator ID */
696
+ id: string;
697
+ /** Creator name */
698
+ creatorName?: string | null;
699
+ /** Creator handle */
700
+ creatorHandle?: string | null;
701
+ /** Creator URL */
702
+ creatorUrl?: string | null;
703
+ /** Creator image URL */
704
+ creatorImage?: string | null;
705
+ /** Created timestamp */
706
+ createdAt?: string | null;
707
+ /** Updated timestamp */
708
+ updatedAt?: string | null;
709
+ }
710
+ /**
711
+ * Chat object
712
+ */
713
+ interface Chat {
714
+ /** Chat ID */
715
+ id: string;
716
+ /** Channel ID */
717
+ channelId?: string | null;
718
+ /** Channel name */
719
+ channelName?: string | null;
720
+ /** Channel image URL */
721
+ channelImage?: string | null;
722
+ /** Whether chat is live */
723
+ live?: boolean | null;
724
+ /** Chat start time */
725
+ startTime?: string | null;
726
+ /** Chat end time */
727
+ endTime?: string | null;
728
+ }
729
+ /**
730
+ * Template object
731
+ */
732
+ interface Template {
733
+ /** Template ID */
734
+ id: string;
735
+ /** Event title */
736
+ eventTitle?: string | null;
737
+ /** Event slug */
738
+ eventSlug?: string | null;
739
+ /** Event image URL */
740
+ eventImage?: string | null;
741
+ /** Market title */
742
+ marketTitle?: string | null;
743
+ /** Template description */
744
+ description?: string | null;
745
+ /** Resolution source */
746
+ resolutionSource?: string | null;
747
+ /** Negative risk enabled */
748
+ negRisk?: boolean | null;
749
+ /** Sort by field */
750
+ sortBy?: string | null;
751
+ /** Show market images */
752
+ showMarketImages?: boolean | null;
753
+ /** Series slug */
754
+ seriesSlug?: string | null;
755
+ /** Outcomes JSON string */
756
+ outcomes?: string | null;
757
+ }
758
+ /**
759
+ * Event object from Polymarket API
760
+ */
761
+ interface Event {
762
+ /** Event ID */
763
+ id: string;
764
+ /** Event ticker */
765
+ ticker?: string | null;
766
+ /** Event slug */
767
+ slug?: string | null;
768
+ /** Event title */
769
+ title?: string | null;
770
+ /** Event subtitle */
771
+ subtitle?: string | null;
772
+ /** Event description */
773
+ description?: string | null;
774
+ /** Resolution source */
775
+ resolutionSource?: string | null;
776
+ /** Start date */
777
+ startDate?: string | null;
778
+ /** Creation date */
779
+ creationDate?: string | null;
780
+ /** End date */
781
+ endDate?: string | null;
782
+ /** Event image URL */
783
+ image?: string | null;
784
+ /** Event icon URL */
785
+ icon?: string | null;
786
+ /** Whether event is active */
787
+ active?: boolean | null;
788
+ /** Whether event is closed */
789
+ closed?: boolean | null;
790
+ /** Whether event is archived */
791
+ archived?: boolean | null;
792
+ /** Whether event is new */
793
+ new?: boolean | null;
794
+ /** Whether event is featured */
795
+ featured?: boolean | null;
796
+ /** Whether event is restricted */
797
+ restricted?: boolean | null;
798
+ /** Event liquidity */
799
+ liquidity?: number | null;
800
+ /** Event volume */
801
+ volume?: number | null;
802
+ /** Open interest */
803
+ openInterest?: number | null;
804
+ /** Sort by field */
805
+ sortBy?: string | null;
806
+ /** Event category */
807
+ category?: string | null;
808
+ /** Event subcategory */
809
+ subcategory?: string | null;
810
+ /** Whether event is template */
811
+ isTemplate?: boolean | null;
812
+ /** Template variables JSON string */
813
+ templateVariables?: string | null;
814
+ /** Published timestamp */
815
+ published_at?: string | null;
816
+ /** Created by user ID */
817
+ createdBy?: string | null;
818
+ /** Updated by user ID */
819
+ updatedBy?: string | null;
820
+ /** Creation timestamp */
821
+ createdAt?: string | null;
822
+ /** Update timestamp */
823
+ updatedAt?: string | null;
824
+ /** Whether comments are enabled */
825
+ commentsEnabled?: boolean | null;
826
+ /** Competitive score */
827
+ competitive?: number | null;
828
+ /** 24h volume */
829
+ volume24hr?: number | null;
830
+ /** 1 week volume */
831
+ volume1wk?: number | null;
832
+ /** 1 month volume */
833
+ volume1mo?: number | null;
834
+ /** 1 year volume */
835
+ volume1yr?: number | null;
836
+ /** Featured image URL */
837
+ featuredImage?: string | null;
838
+ /** Disqus thread identifier */
839
+ disqusThread?: string | null;
840
+ /** Parent event ID */
841
+ parentEvent?: string | null;
842
+ /** Whether order book is enabled */
843
+ enableOrderBook?: boolean | null;
844
+ /** AMM liquidity */
845
+ liquidityAmm?: number | null;
846
+ /** CLOB liquidity */
847
+ liquidityClob?: number | null;
848
+ /** Negative risk enabled */
849
+ negRisk?: boolean | null;
850
+ /** Negative risk market ID */
851
+ negRiskMarketID?: string | null;
852
+ /** Negative risk fee in basis points */
853
+ negRiskFeeBips?: number | null;
854
+ /** Comment count */
855
+ commentCount?: number | null;
856
+ /** Image optimized object */
857
+ imageOptimized?: ImageOptimized | null;
858
+ /** Icon optimized object */
859
+ iconOptimized?: ImageOptimized | null;
860
+ /** Featured image optimized object */
861
+ featuredImageOptimized?: ImageOptimized | null;
862
+ /** Sub events array */
863
+ subEvents?: string[] | null;
864
+ /** Associated markets */
865
+ markets?: Market[] | null;
866
+ /** CYOM flag */
867
+ cyom?: boolean | null;
868
+ /** Closed time */
869
+ closedTime?: string | null;
870
+ /** Show all outcomes */
871
+ showAllOutcomes?: boolean | null;
872
+ /** Show market images */
873
+ showMarketImages?: boolean | null;
874
+ /** Automatically resolved */
875
+ automaticallyResolved?: boolean | null;
876
+ /** Enable negative risk */
877
+ enableNegRisk?: boolean | null;
878
+ /** Automatically active */
879
+ automaticallyActive?: boolean | null;
880
+ /** Event date */
881
+ eventDate?: string | null;
882
+ /** Start time */
883
+ startTime?: string | null;
884
+ /** Event week number */
885
+ eventWeek?: number | null;
886
+ /** Series slug */
887
+ seriesSlug?: string | null;
888
+ /** Score */
889
+ score?: string | null;
890
+ /** Elapsed time */
891
+ elapsed?: string | null;
892
+ /** Period */
893
+ period?: string | null;
894
+ /** Whether event is live */
895
+ live?: boolean | null;
896
+ /** Whether event has ended */
897
+ ended?: boolean | null;
898
+ /** Finished timestamp */
899
+ finishedTimestamp?: string | null;
900
+ /** GMP chart mode */
901
+ gmpChartMode?: string | null;
902
+ /** Event creators */
903
+ eventCreators?: EventCreator[] | null;
904
+ /** Tweet count */
905
+ tweetCount?: number | null;
906
+ /** Chats */
907
+ chats?: Chat[] | null;
908
+ /** Featured order */
909
+ featuredOrder?: number | null;
910
+ /** Estimate value flag */
911
+ estimateValue?: boolean | null;
912
+ /** Cannot estimate flag */
913
+ cantEstimate?: boolean | null;
914
+ /** Estimated value */
915
+ estimatedValue?: string | null;
916
+ /** Templates */
917
+ templates?: Template[] | null;
918
+ /** Spreads main line */
919
+ spreadsMainLine?: number | null;
920
+ /** Totals main line */
921
+ totalsMainLine?: number | null;
922
+ /** Carousel map */
923
+ carouselMap?: string | null;
924
+ /** Pending deployment */
925
+ pendingDeployment?: boolean | null;
926
+ /** Deploying */
927
+ deploying?: boolean | null;
928
+ /** Deploying timestamp */
929
+ deployingTimestamp?: string | null;
930
+ /** Scheduled deployment timestamp */
931
+ scheduledDeploymentTimestamp?: string | null;
932
+ /** Game status */
933
+ gameStatus?: string | null;
934
+ }
935
+ /**
936
+ * Event Query Options
937
+ */
938
+ interface EventQueryOptions {
939
+ limit?: number;
940
+ offset?: number;
941
+ order?: string;
942
+ active?: boolean;
943
+ closed?: boolean;
944
+ archived?: boolean;
945
+ featured?: boolean;
946
+ restricted?: boolean;
947
+ new?: boolean;
948
+ live?: boolean;
949
+ ended?: boolean;
950
+ category?: string;
951
+ subcategory?: string;
952
+ startDate?: string;
953
+ endDate?: string;
954
+ creationDate?: string;
955
+ ticker?: string;
956
+ slug?: string;
957
+ title?: string;
958
+ isTemplate?: boolean;
959
+ enableOrderBook?: boolean;
960
+ negRisk?: boolean;
961
+ commentsEnabled?: boolean;
962
+ automaticallyResolved?: boolean;
963
+ automaticallyActive?: boolean;
964
+ showAllOutcomes?: boolean;
965
+ showMarketImages?: boolean;
966
+ enableNegRisk?: boolean;
967
+ pendingDeployment?: boolean;
968
+ deploying?: boolean;
969
+ seriesSlug?: string;
970
+ parentEvent?: string;
971
+ eventWeek?: number;
972
+ gameStatus?: string;
973
+ }
974
+ interface IPredictClient {
975
+ /**
976
+ * Get markets list
977
+ */
978
+ getMarkets(options?: MarketQueryOptions): Promise<Market[]>;
979
+ /**
980
+ * Get market by ID
981
+ */
982
+ getMarketById(id: string, includeTag?: boolean): Promise<Market>;
983
+ /**
984
+ * Get market by slug
985
+ */
986
+ getMarketBySlug(slug: string, includeTag?: boolean): Promise<Market>;
987
+ /**
988
+ * Get market tags by ID
989
+ */
990
+ getMarketTagsById(id: string): Promise<MarketTag[]>;
991
+ /**
992
+ * Search markets, events, and profiles
993
+ */
994
+ search(options: SearchQueryOptions): Promise<SearchResult>;
995
+ /**
996
+ * Get market price for a specific token and side
997
+ */
998
+ getMarketPrice(query: MarketPriceQuery): Promise<MarketPrice>;
999
+ /**
1000
+ * Get multiple market prices for all tokens
1001
+ */
1002
+ getMultipleMarketPrices(): Promise<MultipleMarketPrices>;
1003
+ /**
1004
+ * Get multiple market prices by request (POST method with specific tokens)
1005
+ */
1006
+ getMultipleMarketPricesByRequest(requests: MarketPriceRequestItem[]): Promise<MultipleMarketPrices>;
1007
+ /**
1008
+ * Get price history for a traded token
1009
+ */
1010
+ getPriceHistory(query: PriceHistoryQuery): Promise<PriceHistory>;
1011
+ /**
1012
+ * Get events list
1013
+ */
1014
+ getEvents(options?: EventQueryOptions): Promise<Event[]>;
1015
+ /**
1016
+ * Get event by ID
1017
+ */
1018
+ getEventById(id: string, includeChat?: boolean, includeTemplate?: boolean): Promise<Event>;
1019
+ /**
1020
+ * Get event tags by ID
1021
+ */
1022
+ getEventTagsById(id: string): Promise<MarketTag[]>;
1023
+ /**
1024
+ * Get event by slug
1025
+ */
1026
+ getEventBySlug(slug: string): Promise<Event>;
1027
+ }
1028
+
1029
+ export { type Chat as C, type Event as E, type IPredictClient as I, type Market as M, type PriceHistory as P, type SearchQueryOptions as S, type TokenPriceData as T, type EventQueryOptions as a, PriceHistoryInterval as b, type MarketQueryOptions as c, type MarketTag as d, type SearchResult as e, type MarketPriceQuery as f, type MarketPrice as g, type MultipleMarketPrices as h, type MarketPriceRequestItem as i, type PriceHistoryQuery as j, type ImageOptimized as k, type MarketEvent as l, type MarketCategory as m, PriceSide as n, type SearchEvent as o, type SearchTag as p, type SearchProfile as q, type SearchPagination as r, type PriceHistoryPoint as s, type EventCreator as t, type Template as u };