@polymarket/bindings 0.13.0 → 0.14.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.
Files changed (39) hide show
  1. package/dist/chunk-JPPG656Y.js +2 -0
  2. package/dist/chunk-JPPG656Y.js.map +1 -0
  3. package/dist/chunk-YXNKEMRF.js +2 -0
  4. package/dist/chunk-YXNKEMRF.js.map +1 -0
  5. package/dist/chunk-ZMJTXTXA.js +2 -0
  6. package/dist/chunk-ZMJTXTXA.js.map +1 -0
  7. package/dist/clob/index.d.ts +489 -8
  8. package/dist/clob/index.js +1 -1
  9. package/dist/clob/index.js.map +1 -1
  10. package/dist/combos/index.d.ts +1 -1
  11. package/dist/combos/index.js +1 -1
  12. package/dist/combos/index.js.map +1 -1
  13. package/dist/{comment-CKJIqOZS.d.ts → comment-tQ-L48Di.d.ts} +2 -2
  14. package/dist/data/index.d.ts +276 -9
  15. package/dist/data/index.js +1 -1
  16. package/dist/data/index.js.map +1 -1
  17. package/dist/gamma/index.d.ts +79 -4
  18. package/dist/gamma/index.js +1 -1
  19. package/dist/gamma/index.js.map +1 -1
  20. package/dist/index.d.ts +108 -213
  21. package/dist/index.js +1 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/{orders-BV68_6ST.d.ts → orders-SIFuRgWc.d.ts} +114 -2
  24. package/dist/perps/index.d.ts +76 -3
  25. package/dist/perps/index.js +1 -1
  26. package/dist/perps/index.js.map +1 -1
  27. package/dist/relayer/index.d.ts +1 -1
  28. package/dist/relayer/index.js +1 -1
  29. package/dist/shared-QrXQ5O6x.d.ts +223 -0
  30. package/dist/subscriptions/index.d.ts +316 -23
  31. package/dist/subscriptions/index.js +1 -1
  32. package/dist/subscriptions/index.js.map +1 -1
  33. package/package.json +2 -2
  34. package/dist/chunk-2FRDSBWY.js +0 -2
  35. package/dist/chunk-2FRDSBWY.js.map +0 -1
  36. package/dist/chunk-3IZ4N7C2.js +0 -2
  37. package/dist/chunk-3IZ4N7C2.js.map +0 -1
  38. package/dist/chunk-Z6SGQXSJ.js +0 -2
  39. package/dist/chunk-Z6SGQXSJ.js.map +0 -1
@@ -1,16 +1,18 @@
1
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
- import { P as PerpsInstrumentId, a as PerpsBuilderEarningId, b as PerpsTradeId, c as PerpsOrderId, d as PerpsClientOrderId, e as PerpsLiquidityRole, f as PerpsKlineInterval, g as PerpsDepositStatus, h as PerpsSide, i as PerpsFundingPaymentId, j as PerpsNotificationId, k as PerpsNotificationType, l as PerpsNotificationOrderType, m as PerpsMarginType, n as PerpsTimeInForce, o as PerpsOrderStatus, p as PerpsChaseId, q as PerpsTpSlKind, r as PerpsTpSlScope, s as PerpsWithdrawalId, t as PerpsKnownWithdrawalStatus } from '../orders-BV68_6ST.js';
2
+ import { am as PositionId, aK as TokenId, u as ConditionId, y as DecimalString, H as EpochMilliseconds, $ as IsoDateTimeString, af as OrderSide, ah as OrderType, aM as TradeStatus, B as BaseUnits, q as CommentId, s as CommentParentEntityType, O as EventId, az as SeriesId, V as ImageOptimizationId } from '../shared-QrXQ5O6x.js';
3
+ import { P as PerpsInstrumentId, B as PerpsBuilderEarningId, k as PerpsTradeId, n as PerpsOrderId, m as PerpsClientOrderId, az as PerpsLiquidityRole, ap as PerpsKlineInterval, c as PerpsDepositStatus, l as PerpsSide, aw as PerpsLiquidationMethod, b as PerpsFundingPaymentId, aF as PerpsNotificationId, aK as PerpsNotificationType, aH as PerpsNotificationOrderType, aA as PerpsMarginType, b5 as PerpsTimeInForce, aP as PerpsOrderStatus, a0 as PerpsChaseId, b7 as PerpsTpSlKind, bb as PerpsTpSlScope, g as PerpsWithdrawalId, h as PerpsKnownWithdrawalStatus } from '../orders-SIFuRgWc.js';
4
4
  import * as _polymarket_types from '@polymarket/types';
5
- import { R as ReactionType } from '../comment-CKJIqOZS.js';
5
+ import { l as ReactionType } from '../comment-tQ-L48Di.js';
6
6
 
7
7
  declare enum UserOrderStatus {
8
8
  Live = "LIVE",
9
9
  Matched = "MATCHED",
10
10
  Delayed = "DELAYED",
11
11
  Unmatched = "UNMATCHED",
12
- Canceled = "CANCELED"
12
+ Canceled = "CANCELED",
13
+ Invalid = "INVALID"
13
14
  }
15
+ type CanceledWithReasonStatus = `CANCELED_${string}`;
14
16
  declare const OrderBookLevelSchema: z.ZodObject<{
15
17
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
16
18
  size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
@@ -354,7 +356,7 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
354
356
  clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
355
357
  sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
356
358
  line: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
357
- game_start_time: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>>>;
359
+ game_start_time: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>>>>;
358
360
  order_price_min_tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
359
361
  group_item_title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
360
362
  taker_base_fee: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
@@ -549,7 +551,7 @@ declare const UserOrderEventSchema: z.ZodPipe<z.ZodObject<{
549
551
  created_at: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>>>;
550
552
  expiration: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString | undefined, string>>>>;
551
553
  order_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof OrderType>>>;
552
- status: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof UserOrderStatus>>>;
554
+ status: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<typeof UserOrderStatus>, z.ZodCustom<`CANCELED_${string}`, `CANCELED_${string}`>]>>>;
553
555
  maker_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
554
556
  timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>;
555
557
  }, z.core.$strip>, z.ZodTransform<{
@@ -575,7 +577,7 @@ declare const UserOrderEventSchema: z.ZodPipe<z.ZodObject<{
575
577
  price: DecimalString;
576
578
  timestamp: EpochMilliseconds;
577
579
  outcome?: string | null | undefined;
578
- status?: UserOrderStatus | null | undefined;
580
+ status?: `CANCELED_${string}` | UserOrderStatus | null | undefined;
579
581
  };
580
582
  }, {
581
583
  event_type: "order";
@@ -595,7 +597,7 @@ declare const UserOrderEventSchema: z.ZodPipe<z.ZodObject<{
595
597
  created_at?: IsoDateTimeString | null | undefined;
596
598
  expiration?: IsoDateTimeString | null | undefined;
597
599
  order_type?: OrderType | null | undefined;
598
- status?: UserOrderStatus | null | undefined;
600
+ status?: `CANCELED_${string}` | UserOrderStatus | null | undefined;
599
601
  maker_address?: string | null | undefined;
600
602
  }>>;
601
603
  type UserOrderEvent = {
@@ -621,7 +623,7 @@ type UserOrderEvent = {
621
623
  createdAt: IsoDateTimeString | null | undefined;
622
624
  expiresAt: IsoDateTimeString | null | undefined;
623
625
  orderType: OrderType | null | undefined;
624
- status?: UserOrderStatus | null;
626
+ status?: UserOrderStatus | CanceledWithReasonStatus | null;
625
627
  makerAddress: string | null | undefined;
626
628
  timestamp: EpochMilliseconds;
627
629
  };
@@ -1040,7 +1042,7 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
1040
1042
  clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1041
1043
  sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1042
1044
  line: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
1043
- game_start_time: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>>>;
1045
+ game_start_time: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>>>>;
1044
1046
  order_price_min_tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
1045
1047
  group_item_title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1046
1048
  taker_base_fee: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
@@ -1398,7 +1400,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1398
1400
  clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1399
1401
  sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1400
1402
  line: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
1401
- game_start_time: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>>>;
1403
+ game_start_time: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>>>>;
1402
1404
  order_price_min_tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
1403
1405
  group_item_title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1404
1406
  taker_base_fee: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
@@ -1539,7 +1541,7 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1539
1541
  created_at: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>>>;
1540
1542
  expiration: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString | undefined, string>>>>;
1541
1543
  order_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof OrderType>>>;
1542
- status: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof UserOrderStatus>>>;
1544
+ status: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<typeof UserOrderStatus>, z.ZodCustom<`CANCELED_${string}`, `CANCELED_${string}`>]>>>;
1543
1545
  maker_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1544
1546
  timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>;
1545
1547
  }, z.core.$strip>, z.ZodTransform<{
@@ -1565,7 +1567,7 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1565
1567
  price: DecimalString;
1566
1568
  timestamp: EpochMilliseconds;
1567
1569
  outcome?: string | null | undefined;
1568
- status?: UserOrderStatus | null | undefined;
1570
+ status?: `CANCELED_${string}` | UserOrderStatus | null | undefined;
1569
1571
  };
1570
1572
  }, {
1571
1573
  event_type: "order";
@@ -1585,7 +1587,7 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1585
1587
  created_at?: IsoDateTimeString | null | undefined;
1586
1588
  expiration?: IsoDateTimeString | null | undefined;
1587
1589
  order_type?: OrderType | null | undefined;
1588
- status?: UserOrderStatus | null | undefined;
1590
+ status?: `CANCELED_${string}` | UserOrderStatus | null | undefined;
1589
1591
  maker_address?: string | null | undefined;
1590
1592
  }>>, z.ZodPipe<z.ZodObject<{
1591
1593
  event_type: z.ZodLiteral<"trade">;
@@ -1728,6 +1730,7 @@ type UserEvent = UserOrderEvent | UserTradeEvent;
1728
1730
  */
1729
1731
  declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
1730
1732
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1733
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
1731
1734
  sq: z.ZodNumber;
1732
1735
  ch: z.ZodString;
1733
1736
  data: z.ZodArray<z.ZodPipe<z.ZodObject<{
@@ -1763,6 +1766,8 @@ declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
1763
1766
  type: "trade";
1764
1767
  channel: string;
1765
1768
  timestamp: EpochMilliseconds;
1769
+ /** Newest reflected event time; null means the event horizon is unknown. */
1770
+ eventTimestamp: EpochMilliseconds | null;
1766
1771
  sequence: number;
1767
1772
  payload: {
1768
1773
  tradeId: PerpsTradeId;
@@ -1776,6 +1781,7 @@ declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
1776
1781
  }[];
1777
1782
  }, {
1778
1783
  ts: EpochMilliseconds;
1784
+ ets: EpochMilliseconds | null;
1779
1785
  sq: number;
1780
1786
  ch: string;
1781
1787
  data: {
@@ -1798,6 +1804,7 @@ type PerpsTradeEvent = z.infer<typeof PerpsTradeEventSchema>;
1798
1804
  */
1799
1805
  declare const PerpsBboEventSchema: z.ZodPipe<z.ZodObject<{
1800
1806
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1807
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
1801
1808
  sq: z.ZodNumber;
1802
1809
  ch: z.ZodString;
1803
1810
  data: z.ZodPipe<z.ZodObject<{
@@ -1824,6 +1831,8 @@ declare const PerpsBboEventSchema: z.ZodPipe<z.ZodObject<{
1824
1831
  type: "bbo";
1825
1832
  channel: string;
1826
1833
  timestamp: EpochMilliseconds;
1834
+ /** Newest reflected event time; null means the event horizon is unknown. */
1835
+ eventTimestamp: EpochMilliseconds | null;
1827
1836
  sequence: number;
1828
1837
  payload: {
1829
1838
  instrumentId: PerpsInstrumentId;
@@ -1834,6 +1843,7 @@ declare const PerpsBboEventSchema: z.ZodPipe<z.ZodObject<{
1834
1843
  };
1835
1844
  }, {
1836
1845
  ts: EpochMilliseconds;
1846
+ ets: EpochMilliseconds | null;
1837
1847
  sq: number;
1838
1848
  ch: string;
1839
1849
  data: {
@@ -1853,6 +1863,7 @@ type PerpsBboEvent = z.infer<typeof PerpsBboEventSchema>;
1853
1863
  */
1854
1864
  declare const PerpsBookEventSchema: z.ZodPipe<z.ZodObject<{
1855
1865
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1866
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
1856
1867
  sq: z.ZodNumber;
1857
1868
  ch: z.ZodString;
1858
1869
  data: z.ZodPipe<z.ZodObject<{
@@ -1888,6 +1899,8 @@ declare const PerpsBookEventSchema: z.ZodPipe<z.ZodObject<{
1888
1899
  type: "book";
1889
1900
  channel: string;
1890
1901
  timestamp: EpochMilliseconds;
1902
+ /** Newest reflected event time; null means the event horizon is unknown. */
1903
+ eventTimestamp: EpochMilliseconds | null;
1891
1904
  sequence: number;
1892
1905
  payload: {
1893
1906
  bids: {
@@ -1902,6 +1915,7 @@ declare const PerpsBookEventSchema: z.ZodPipe<z.ZodObject<{
1902
1915
  };
1903
1916
  }, {
1904
1917
  ts: EpochMilliseconds;
1918
+ ets: EpochMilliseconds | null;
1905
1919
  sq: number;
1906
1920
  ch: string;
1907
1921
  data: {
@@ -1924,6 +1938,7 @@ type PerpsBookEvent = z.infer<typeof PerpsBookEventSchema>;
1924
1938
  */
1925
1939
  declare const PerpsTickerEventSchema: z.ZodPipe<z.ZodObject<{
1926
1940
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1941
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
1927
1942
  sq: z.ZodNumber;
1928
1943
  ch: z.ZodString;
1929
1944
  data: z.ZodPipe<z.ZodObject<{
@@ -1959,6 +1974,8 @@ declare const PerpsTickerEventSchema: z.ZodPipe<z.ZodObject<{
1959
1974
  type: "ticker";
1960
1975
  channel: string;
1961
1976
  timestamp: EpochMilliseconds;
1977
+ /** Newest reflected event time; null means the event horizon is unknown. */
1978
+ eventTimestamp: EpochMilliseconds | null;
1962
1979
  sequence: number;
1963
1980
  payload: {
1964
1981
  instrumentId: PerpsInstrumentId;
@@ -1972,6 +1989,7 @@ declare const PerpsTickerEventSchema: z.ZodPipe<z.ZodObject<{
1972
1989
  };
1973
1990
  }, {
1974
1991
  ts: EpochMilliseconds;
1992
+ ets: EpochMilliseconds | null;
1975
1993
  sq: number;
1976
1994
  ch: string;
1977
1995
  data: {
@@ -1994,6 +2012,7 @@ type PerpsTickerEvent = z.infer<typeof PerpsTickerEventSchema>;
1994
2012
  */
1995
2013
  declare const PerpsStatisticEventSchema: z.ZodPipe<z.ZodObject<{
1996
2014
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2015
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
1997
2016
  sq: z.ZodNumber;
1998
2017
  ch: z.ZodString;
1999
2018
  data: z.ZodPipe<z.ZodObject<{
@@ -2041,6 +2060,8 @@ declare const PerpsStatisticEventSchema: z.ZodPipe<z.ZodObject<{
2041
2060
  type: "statistic";
2042
2061
  channel: string;
2043
2062
  timestamp: EpochMilliseconds;
2063
+ /** Newest reflected event time; null means the event horizon is unknown. */
2064
+ eventTimestamp: EpochMilliseconds | null;
2044
2065
  sequence: number;
2045
2066
  payload: {
2046
2067
  instrumentId: PerpsInstrumentId;
@@ -2058,6 +2079,7 @@ declare const PerpsStatisticEventSchema: z.ZodPipe<z.ZodObject<{
2058
2079
  };
2059
2080
  }, {
2060
2081
  ts: EpochMilliseconds;
2082
+ ets: EpochMilliseconds | null;
2061
2083
  sq: number;
2062
2084
  ch: string;
2063
2085
  data: {
@@ -2084,6 +2106,7 @@ type PerpsStatisticEvent = z.infer<typeof PerpsStatisticEventSchema>;
2084
2106
  */
2085
2107
  declare const PerpsCandleEventSchema: z.ZodPipe<z.ZodObject<{
2086
2108
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2109
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
2087
2110
  sq: z.ZodNumber;
2088
2111
  ch: z.ZodString;
2089
2112
  data: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodNumber], null>, z.ZodTransform<{
@@ -2100,6 +2123,8 @@ declare const PerpsCandleEventSchema: z.ZodPipe<z.ZodObject<{
2100
2123
  type: "candle";
2101
2124
  channel: string;
2102
2125
  timestamp: EpochMilliseconds;
2126
+ /** Newest reflected event time; null means the event horizon is unknown. */
2127
+ eventTimestamp: EpochMilliseconds | null;
2103
2128
  sequence: number;
2104
2129
  payload: {
2105
2130
  instrumentId: PerpsInstrumentId;
@@ -2116,6 +2141,7 @@ declare const PerpsCandleEventSchema: z.ZodPipe<z.ZodObject<{
2116
2141
  };
2117
2142
  }, {
2118
2143
  ts: EpochMilliseconds;
2144
+ ets: EpochMilliseconds | null;
2119
2145
  sq: number;
2120
2146
  ch: string;
2121
2147
  data: {
@@ -2137,6 +2163,7 @@ type PerpsCandleEvent = z.infer<typeof PerpsCandleEventSchema>;
2137
2163
  */
2138
2164
  declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
2139
2165
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2166
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
2140
2167
  sq: z.ZodNumber;
2141
2168
  ch: z.ZodString;
2142
2169
  data: z.ZodArray<z.ZodPipe<z.ZodObject<{
@@ -2172,6 +2199,8 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2172
2199
  type: "trade";
2173
2200
  channel: string;
2174
2201
  timestamp: EpochMilliseconds;
2202
+ /** Newest reflected event time; null means the event horizon is unknown. */
2203
+ eventTimestamp: EpochMilliseconds | null;
2175
2204
  sequence: number;
2176
2205
  payload: {
2177
2206
  tradeId: PerpsTradeId;
@@ -2185,6 +2214,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2185
2214
  }[];
2186
2215
  }, {
2187
2216
  ts: EpochMilliseconds;
2217
+ ets: EpochMilliseconds | null;
2188
2218
  sq: number;
2189
2219
  ch: string;
2190
2220
  data: {
@@ -2199,6 +2229,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2199
2229
  }[];
2200
2230
  }>>, z.ZodPipe<z.ZodObject<{
2201
2231
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2232
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
2202
2233
  sq: z.ZodNumber;
2203
2234
  ch: z.ZodString;
2204
2235
  data: z.ZodPipe<z.ZodObject<{
@@ -2225,6 +2256,8 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2225
2256
  type: "bbo";
2226
2257
  channel: string;
2227
2258
  timestamp: EpochMilliseconds;
2259
+ /** Newest reflected event time; null means the event horizon is unknown. */
2260
+ eventTimestamp: EpochMilliseconds | null;
2228
2261
  sequence: number;
2229
2262
  payload: {
2230
2263
  instrumentId: PerpsInstrumentId;
@@ -2235,6 +2268,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2235
2268
  };
2236
2269
  }, {
2237
2270
  ts: EpochMilliseconds;
2271
+ ets: EpochMilliseconds | null;
2238
2272
  sq: number;
2239
2273
  ch: string;
2240
2274
  data: {
@@ -2246,6 +2280,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2246
2280
  };
2247
2281
  }>>, z.ZodPipe<z.ZodObject<{
2248
2282
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2283
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
2249
2284
  sq: z.ZodNumber;
2250
2285
  ch: z.ZodString;
2251
2286
  data: z.ZodPipe<z.ZodObject<{
@@ -2281,6 +2316,8 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2281
2316
  type: "book";
2282
2317
  channel: string;
2283
2318
  timestamp: EpochMilliseconds;
2319
+ /** Newest reflected event time; null means the event horizon is unknown. */
2320
+ eventTimestamp: EpochMilliseconds | null;
2284
2321
  sequence: number;
2285
2322
  payload: {
2286
2323
  bids: {
@@ -2295,6 +2332,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2295
2332
  };
2296
2333
  }, {
2297
2334
  ts: EpochMilliseconds;
2335
+ ets: EpochMilliseconds | null;
2298
2336
  sq: number;
2299
2337
  ch: string;
2300
2338
  data: {
@@ -2309,6 +2347,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2309
2347
  };
2310
2348
  }>>, z.ZodPipe<z.ZodObject<{
2311
2349
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2350
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
2312
2351
  sq: z.ZodNumber;
2313
2352
  ch: z.ZodString;
2314
2353
  data: z.ZodPipe<z.ZodObject<{
@@ -2344,6 +2383,8 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2344
2383
  type: "ticker";
2345
2384
  channel: string;
2346
2385
  timestamp: EpochMilliseconds;
2386
+ /** Newest reflected event time; null means the event horizon is unknown. */
2387
+ eventTimestamp: EpochMilliseconds | null;
2347
2388
  sequence: number;
2348
2389
  payload: {
2349
2390
  instrumentId: PerpsInstrumentId;
@@ -2357,6 +2398,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2357
2398
  };
2358
2399
  }, {
2359
2400
  ts: EpochMilliseconds;
2401
+ ets: EpochMilliseconds | null;
2360
2402
  sq: number;
2361
2403
  ch: string;
2362
2404
  data: {
@@ -2371,6 +2413,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2371
2413
  };
2372
2414
  }>>, z.ZodPipe<z.ZodObject<{
2373
2415
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2416
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
2374
2417
  sq: z.ZodNumber;
2375
2418
  ch: z.ZodString;
2376
2419
  data: z.ZodPipe<z.ZodObject<{
@@ -2418,6 +2461,8 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2418
2461
  type: "statistic";
2419
2462
  channel: string;
2420
2463
  timestamp: EpochMilliseconds;
2464
+ /** Newest reflected event time; null means the event horizon is unknown. */
2465
+ eventTimestamp: EpochMilliseconds | null;
2421
2466
  sequence: number;
2422
2467
  payload: {
2423
2468
  instrumentId: PerpsInstrumentId;
@@ -2435,6 +2480,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2435
2480
  };
2436
2481
  }, {
2437
2482
  ts: EpochMilliseconds;
2483
+ ets: EpochMilliseconds | null;
2438
2484
  sq: number;
2439
2485
  ch: string;
2440
2486
  data: {
@@ -2453,6 +2499,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2453
2499
  };
2454
2500
  }>>, z.ZodPipe<z.ZodObject<{
2455
2501
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2502
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
2456
2503
  sq: z.ZodNumber;
2457
2504
  ch: z.ZodString;
2458
2505
  data: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodNumber], null>, z.ZodTransform<{
@@ -2469,6 +2516,8 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2469
2516
  type: "candle";
2470
2517
  channel: string;
2471
2518
  timestamp: EpochMilliseconds;
2519
+ /** Newest reflected event time; null means the event horizon is unknown. */
2520
+ eventTimestamp: EpochMilliseconds | null;
2472
2521
  sequence: number;
2473
2522
  payload: {
2474
2523
  instrumentId: PerpsInstrumentId;
@@ -2485,6 +2534,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
2485
2534
  };
2486
2535
  }, {
2487
2536
  ts: EpochMilliseconds;
2537
+ ets: EpochMilliseconds | null;
2488
2538
  sq: number;
2489
2539
  ch: string;
2490
2540
  data: {
@@ -2506,6 +2556,7 @@ type PerpsMarketDataEvent = z.infer<typeof PerpsMarketDataEventSchema>;
2506
2556
  */
2507
2557
  declare const PerpsBalanceUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2508
2558
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2559
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
2509
2560
  sq: z.ZodNumber;
2510
2561
  ch: z.ZodLiteral<"balances">;
2511
2562
  data: z.ZodObject<{
@@ -2517,6 +2568,8 @@ declare const PerpsBalanceUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2517
2568
  type: "balance";
2518
2569
  channel: "balances";
2519
2570
  timestamp: number;
2571
+ /** Newest reflected event time; null means the event horizon is unknown. */
2572
+ eventTimestamp: EpochMilliseconds | null;
2520
2573
  sequence: number;
2521
2574
  payload: {
2522
2575
  asset: string;
@@ -2525,6 +2578,7 @@ declare const PerpsBalanceUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2525
2578
  };
2526
2579
  }, {
2527
2580
  ts: EpochMilliseconds;
2581
+ ets: EpochMilliseconds | null;
2528
2582
  sq: number;
2529
2583
  ch: "balances";
2530
2584
  data: {
@@ -2542,6 +2596,7 @@ type PerpsBalanceUpdateEvent = z.infer<typeof PerpsBalanceUpdateEventSchema>;
2542
2596
  */
2543
2597
  declare const PerpsPortfolioUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2544
2598
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2599
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
2545
2600
  sq: z.ZodNumber;
2546
2601
  ch: z.ZodLiteral<"portfolio">;
2547
2602
  data: z.ZodPipe<z.ZodObject<{
@@ -2559,6 +2614,7 @@ declare const PerpsPortfolioUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2559
2614
  unrealized_pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2560
2615
  return_on_equity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2561
2616
  cumulative_funding: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2617
+ adl_index: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
2562
2618
  }, z.core.$strip>, z.ZodTransform<{
2563
2619
  instrumentId: PerpsInstrumentId;
2564
2620
  symbol: string;
@@ -2573,6 +2629,7 @@ declare const PerpsPortfolioUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2573
2629
  unrealizedPnl: DecimalString;
2574
2630
  returnOnEquity: DecimalString;
2575
2631
  cumulativeFunding: DecimalString;
2632
+ adlIndex: 0 | 1 | 2 | 3;
2576
2633
  }, {
2577
2634
  instrument_id: PerpsInstrumentId;
2578
2635
  symbol: string;
@@ -2587,25 +2644,30 @@ declare const PerpsPortfolioUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2587
2644
  unrealized_pnl: DecimalString;
2588
2645
  return_on_equity: DecimalString;
2589
2646
  cumulative_funding: DecimalString;
2647
+ adl_index: 0 | 1 | 2 | 3;
2590
2648
  }>>>;
2591
2649
  margin: z.ZodPipe<z.ZodObject<{
2592
2650
  total_account_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2651
+ available_order_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2593
2652
  total_initial_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2594
2653
  total_maintenance_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2595
2654
  total_position_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2596
2655
  }, z.core.$strip>, z.ZodTransform<{
2597
2656
  totalAccountValue: DecimalString;
2657
+ availableOrderMargin: DecimalString;
2598
2658
  totalInitialMargin: DecimalString;
2599
2659
  totalMaintenanceMargin: DecimalString;
2600
2660
  totalPositionValue: DecimalString;
2601
2661
  }, {
2602
2662
  total_account_value: DecimalString;
2663
+ available_order_margin: DecimalString;
2603
2664
  total_initial_margin: DecimalString;
2604
2665
  total_maintenance_margin: DecimalString;
2605
2666
  total_position_value: DecimalString;
2606
2667
  }>>;
2607
2668
  withdrawable: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2608
2669
  in_liquidation: z.ZodBoolean;
2670
+ fee_tier: z.ZodNumber;
2609
2671
  timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2610
2672
  }, z.core.$strip>, z.ZodTransform<{
2611
2673
  positions: {
@@ -2622,15 +2684,18 @@ declare const PerpsPortfolioUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2622
2684
  unrealizedPnl: DecimalString;
2623
2685
  returnOnEquity: DecimalString;
2624
2686
  cumulativeFunding: DecimalString;
2687
+ adlIndex: 0 | 1 | 2 | 3;
2625
2688
  }[];
2626
2689
  margin: {
2627
2690
  totalAccountValue: DecimalString;
2691
+ availableOrderMargin: DecimalString;
2628
2692
  totalInitialMargin: DecimalString;
2629
2693
  totalMaintenanceMargin: DecimalString;
2630
2694
  totalPositionValue: DecimalString;
2631
2695
  };
2632
2696
  withdrawable: DecimalString;
2633
2697
  inLiquidation: boolean;
2698
+ feeTier: number;
2634
2699
  timestamp: EpochMilliseconds;
2635
2700
  }, {
2636
2701
  positions: {
@@ -2647,21 +2712,26 @@ declare const PerpsPortfolioUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2647
2712
  unrealizedPnl: DecimalString;
2648
2713
  returnOnEquity: DecimalString;
2649
2714
  cumulativeFunding: DecimalString;
2715
+ adlIndex: 0 | 1 | 2 | 3;
2650
2716
  }[];
2651
2717
  margin: {
2652
2718
  totalAccountValue: DecimalString;
2719
+ availableOrderMargin: DecimalString;
2653
2720
  totalInitialMargin: DecimalString;
2654
2721
  totalMaintenanceMargin: DecimalString;
2655
2722
  totalPositionValue: DecimalString;
2656
2723
  };
2657
2724
  withdrawable: DecimalString;
2658
2725
  in_liquidation: boolean;
2726
+ fee_tier: number;
2659
2727
  timestamp: EpochMilliseconds;
2660
2728
  }>>;
2661
2729
  }, z.core.$strip>, z.ZodTransform<{
2662
2730
  type: "portfolio";
2663
2731
  channel: "portfolio";
2664
2732
  timestamp: number;
2733
+ /** Newest reflected event time; null means the event horizon is unknown. */
2734
+ eventTimestamp: EpochMilliseconds | null;
2665
2735
  sequence: number;
2666
2736
  payload: {
2667
2737
  positions: {
@@ -2678,19 +2748,23 @@ declare const PerpsPortfolioUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2678
2748
  unrealizedPnl: DecimalString;
2679
2749
  returnOnEquity: DecimalString;
2680
2750
  cumulativeFunding: DecimalString;
2751
+ adlIndex: 0 | 1 | 2 | 3;
2681
2752
  }[];
2682
2753
  margin: {
2683
2754
  totalAccountValue: DecimalString;
2755
+ availableOrderMargin: DecimalString;
2684
2756
  totalInitialMargin: DecimalString;
2685
2757
  totalMaintenanceMargin: DecimalString;
2686
2758
  totalPositionValue: DecimalString;
2687
2759
  };
2688
2760
  withdrawable: DecimalString;
2689
2761
  inLiquidation: boolean;
2762
+ feeTier: number;
2690
2763
  timestamp: EpochMilliseconds;
2691
2764
  };
2692
2765
  }, {
2693
2766
  ts: EpochMilliseconds;
2767
+ ets: EpochMilliseconds | null;
2694
2768
  sq: number;
2695
2769
  ch: "portfolio";
2696
2770
  data: {
@@ -2708,15 +2782,18 @@ declare const PerpsPortfolioUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2708
2782
  unrealizedPnl: DecimalString;
2709
2783
  returnOnEquity: DecimalString;
2710
2784
  cumulativeFunding: DecimalString;
2785
+ adlIndex: 0 | 1 | 2 | 3;
2711
2786
  }[];
2712
2787
  margin: {
2713
2788
  totalAccountValue: DecimalString;
2789
+ availableOrderMargin: DecimalString;
2714
2790
  totalInitialMargin: DecimalString;
2715
2791
  totalMaintenanceMargin: DecimalString;
2716
2792
  totalPositionValue: DecimalString;
2717
2793
  };
2718
2794
  withdrawable: DecimalString;
2719
2795
  inLiquidation: boolean;
2796
+ feeTier: number;
2720
2797
  timestamp: EpochMilliseconds;
2721
2798
  };
2722
2799
  }>>;
@@ -2729,6 +2806,7 @@ type PerpsPortfolioUpdateEvent = z.infer<typeof PerpsPortfolioUpdateEventSchema>
2729
2806
  */
2730
2807
  declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2731
2808
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2809
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
2732
2810
  sq: z.ZodNumber;
2733
2811
  ch: z.ZodLiteral<"orders">;
2734
2812
  data: z.ZodPipe<z.ZodObject<{
@@ -2860,6 +2938,8 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2860
2938
  type: "order";
2861
2939
  channel: "orders";
2862
2940
  timestamp: number;
2941
+ /** Newest reflected event time; null means the event horizon is unknown. */
2942
+ eventTimestamp: EpochMilliseconds | null;
2863
2943
  sequence: number;
2864
2944
  payload: {
2865
2945
  builder?: {
@@ -2896,6 +2976,7 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2896
2976
  };
2897
2977
  }, {
2898
2978
  ts: EpochMilliseconds;
2979
+ ets: EpochMilliseconds | null;
2899
2980
  sq: number;
2900
2981
  ch: "orders";
2901
2982
  data: {
@@ -2941,6 +3022,7 @@ type PerpsOrderUpdateEvent = z.infer<typeof PerpsOrderUpdateEventSchema>;
2941
3022
  */
2942
3023
  declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2943
3024
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3025
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
2944
3026
  sq: z.ZodNumber;
2945
3027
  ch: z.ZodLiteral<"fills">;
2946
3028
  data: z.ZodArray<z.ZodPipe<z.ZodObject<{
@@ -2970,6 +3052,20 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2970
3052
  pep: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2971
3053
  pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2972
3054
  liq: z.ZodBoolean;
3055
+ adl: z.ZodBoolean;
3056
+ liquidation_details: z.ZodOptional<z.ZodPipe<z.ZodObject<{
3057
+ liquidated_user: z.ZodOptional<z.ZodString>;
3058
+ mark: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
3059
+ method: z.ZodEnum<typeof PerpsLiquidationMethod>;
3060
+ }, z.core.$strip>, z.ZodTransform<{
3061
+ mark: DecimalString;
3062
+ method: PerpsLiquidationMethod;
3063
+ liquidatedUser?: string | undefined;
3064
+ }, {
3065
+ mark: DecimalString;
3066
+ method: PerpsLiquidationMethod;
3067
+ liquidated_user?: string | undefined;
3068
+ }>>>;
2973
3069
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2974
3070
  coid: z.ZodOptional<z.ZodString>;
2975
3071
  }, z.core.$strip>, z.ZodTransform<{
@@ -2978,6 +3074,12 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2978
3074
  previousEntryPrice: DecimalString;
2979
3075
  pnl: DecimalString;
2980
3076
  liquidation: boolean;
3077
+ adl: boolean;
3078
+ liquidationDetails: {
3079
+ mark: DecimalString;
3080
+ method: PerpsLiquidationMethod;
3081
+ liquidatedUser?: string | undefined;
3082
+ } | undefined;
2981
3083
  timestamp: EpochMilliseconds;
2982
3084
  clientOrderId: string | undefined;
2983
3085
  builder?: {
@@ -3010,6 +3112,7 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3010
3112
  pep: DecimalString;
3011
3113
  pnl: DecimalString;
3012
3114
  liq: boolean;
3115
+ adl: boolean;
3013
3116
  ts: EpochMilliseconds;
3014
3117
  builder_fee?: DecimalString | undefined;
3015
3118
  total_fee?: DecimalString | undefined;
@@ -3017,12 +3120,19 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3017
3120
  address: _polymarket_types.EvmAddress;
3018
3121
  feeRate: DecimalString;
3019
3122
  } | undefined;
3123
+ liquidation_details?: {
3124
+ mark: DecimalString;
3125
+ method: PerpsLiquidationMethod;
3126
+ liquidatedUser?: string | undefined;
3127
+ } | undefined;
3020
3128
  coid?: string | undefined;
3021
3129
  }>>>;
3022
3130
  }, z.core.$strip>, z.ZodTransform<{
3023
3131
  type: "fill";
3024
3132
  channel: "fills";
3025
3133
  timestamp: number;
3134
+ /** Newest reflected event time; null means the event horizon is unknown. */
3135
+ eventTimestamp: EpochMilliseconds | null;
3026
3136
  sequence: number;
3027
3137
  payload: {
3028
3138
  feeAsset: string;
@@ -3030,6 +3140,12 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3030
3140
  previousEntryPrice: DecimalString;
3031
3141
  pnl: DecimalString;
3032
3142
  liquidation: boolean;
3143
+ adl: boolean;
3144
+ liquidationDetails: {
3145
+ mark: DecimalString;
3146
+ method: PerpsLiquidationMethod;
3147
+ liquidatedUser?: string | undefined;
3148
+ } | undefined;
3033
3149
  timestamp: EpochMilliseconds;
3034
3150
  clientOrderId: string | undefined;
3035
3151
  builder?: {
@@ -3050,6 +3166,7 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3050
3166
  }[];
3051
3167
  }, {
3052
3168
  ts: EpochMilliseconds;
3169
+ ets: EpochMilliseconds | null;
3053
3170
  sq: number;
3054
3171
  ch: "fills";
3055
3172
  data: {
@@ -3058,6 +3175,12 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3058
3175
  previousEntryPrice: DecimalString;
3059
3176
  pnl: DecimalString;
3060
3177
  liquidation: boolean;
3178
+ adl: boolean;
3179
+ liquidationDetails: {
3180
+ mark: DecimalString;
3181
+ method: PerpsLiquidationMethod;
3182
+ liquidatedUser?: string | undefined;
3183
+ } | undefined;
3061
3184
  timestamp: EpochMilliseconds;
3062
3185
  clientOrderId: string | undefined;
3063
3186
  builder?: {
@@ -3087,6 +3210,7 @@ type PerpsFillUpdateEvent = z.infer<typeof PerpsFillUpdateEventSchema>;
3087
3210
  */
3088
3211
  declare const PerpsBuilderFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3089
3212
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3213
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
3090
3214
  sq: z.ZodNumber;
3091
3215
  ch: z.ZodLiteral<"builderFills">;
3092
3216
  data: z.ZodArray<z.ZodPipe<z.ZodObject<{
@@ -3151,6 +3275,8 @@ declare const PerpsBuilderFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3151
3275
  type: "builderFill";
3152
3276
  channel: "builderFills";
3153
3277
  timestamp: EpochMilliseconds;
3278
+ /** Newest reflected event time; null means the event horizon is unknown. */
3279
+ eventTimestamp: EpochMilliseconds | null;
3154
3280
  sequence: number;
3155
3281
  payload: {
3156
3282
  liquidityRole: PerpsLiquidityRole;
@@ -3174,6 +3300,7 @@ declare const PerpsBuilderFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3174
3300
  }[];
3175
3301
  }, {
3176
3302
  ts: EpochMilliseconds;
3303
+ ets: EpochMilliseconds | null;
3177
3304
  sq: number;
3178
3305
  ch: "builderFills";
3179
3306
  data: {
@@ -3204,6 +3331,7 @@ type PerpsBuilderFillUpdateEvent = z.infer<typeof PerpsBuilderFillUpdateEventSch
3204
3331
  */
3205
3332
  declare const PerpsFundingUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3206
3333
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3334
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
3207
3335
  sq: z.ZodNumber;
3208
3336
  ch: z.ZodLiteral<"funding">;
3209
3337
  data: z.ZodPipe<z.ZodObject<{
@@ -3235,6 +3363,8 @@ declare const PerpsFundingUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3235
3363
  type: "funding";
3236
3364
  channel: "funding";
3237
3365
  timestamp: number;
3366
+ /** Newest reflected event time; null means the event horizon is unknown. */
3367
+ eventTimestamp: EpochMilliseconds | null;
3238
3368
  sequence: number;
3239
3369
  payload: {
3240
3370
  id: PerpsFundingPaymentId;
@@ -3247,6 +3377,7 @@ declare const PerpsFundingUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3247
3377
  };
3248
3378
  }, {
3249
3379
  ts: EpochMilliseconds;
3380
+ ets: EpochMilliseconds | null;
3250
3381
  sq: number;
3251
3382
  ch: "funding";
3252
3383
  data: {
@@ -3268,6 +3399,7 @@ type PerpsFundingUpdateEvent = z.infer<typeof PerpsFundingUpdateEventSchema>;
3268
3399
  */
3269
3400
  declare const PerpsDepositUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3270
3401
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3402
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
3271
3403
  sq: z.ZodNumber;
3272
3404
  ch: z.ZodLiteral<"deposits">;
3273
3405
  data: z.ZodPipe<z.ZodObject<{
@@ -3290,6 +3422,8 @@ declare const PerpsDepositUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3290
3422
  type: "deposit";
3291
3423
  channel: "deposits";
3292
3424
  timestamp: number;
3425
+ /** Newest reflected event time; null means the event horizon is unknown. */
3426
+ eventTimestamp: EpochMilliseconds | null;
3293
3427
  sequence: number;
3294
3428
  payload: {
3295
3429
  hash: _polymarket_types.TxHash | undefined;
@@ -3299,6 +3433,7 @@ declare const PerpsDepositUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3299
3433
  };
3300
3434
  }, {
3301
3435
  ts: EpochMilliseconds;
3436
+ ets: EpochMilliseconds | null;
3302
3437
  sq: number;
3303
3438
  ch: "deposits";
3304
3439
  data: {
@@ -3317,6 +3452,7 @@ type PerpsDepositUpdateEvent = z.infer<typeof PerpsDepositUpdateEventSchema>;
3317
3452
  */
3318
3453
  declare const PerpsWithdrawalUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3319
3454
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3455
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
3320
3456
  sq: z.ZodNumber;
3321
3457
  ch: z.ZodLiteral<"withdrawals">;
3322
3458
  data: z.ZodPipe<z.ZodObject<{
@@ -3348,6 +3484,8 @@ declare const PerpsWithdrawalUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3348
3484
  type: "withdrawal";
3349
3485
  channel: "withdrawals";
3350
3486
  timestamp: number;
3487
+ /** Newest reflected event time; null means the event horizon is unknown. */
3488
+ eventTimestamp: EpochMilliseconds | null;
3351
3489
  sequence: number;
3352
3490
  payload: {
3353
3491
  withdrawalId: PerpsWithdrawalId;
@@ -3360,6 +3498,7 @@ declare const PerpsWithdrawalUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3360
3498
  };
3361
3499
  }, {
3362
3500
  ts: EpochMilliseconds;
3501
+ ets: EpochMilliseconds | null;
3363
3502
  sq: number;
3364
3503
  ch: "withdrawals";
3365
3504
  data: {
@@ -3381,6 +3520,7 @@ type PerpsWithdrawalUpdateEvent = z.infer<typeof PerpsWithdrawalUpdateEventSchem
3381
3520
  */
3382
3521
  declare const PerpsNotificationUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3383
3522
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3523
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
3384
3524
  sq: z.ZodNumber;
3385
3525
  ch: z.ZodLiteral<"notifications">;
3386
3526
  data: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
@@ -3562,6 +3702,8 @@ declare const PerpsNotificationUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3562
3702
  type: "notification";
3563
3703
  channel: "notifications";
3564
3704
  timestamp: number;
3705
+ /** Newest reflected event time; null means the event horizon is unknown. */
3706
+ eventTimestamp: EpochMilliseconds | null;
3565
3707
  sequence: number;
3566
3708
  payload: {
3567
3709
  id: PerpsNotificationId;
@@ -3622,6 +3764,7 @@ declare const PerpsNotificationUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3622
3764
  };
3623
3765
  }, {
3624
3766
  ts: EpochMilliseconds;
3767
+ ets: EpochMilliseconds | null;
3625
3768
  sq: number;
3626
3769
  ch: "notifications";
3627
3770
  data: {
@@ -3696,6 +3839,7 @@ type PerpsNotificationUpdateEvent = z.infer<typeof PerpsNotificationUpdateEventS
3696
3839
  declare const PerpsNotificationsResyncFrameSchema: z.ZodPipe<z.ZodObject<{
3697
3840
  ch: z.ZodLiteral<"notifications">;
3698
3841
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3842
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
3699
3843
  sq: z.ZodNumber;
3700
3844
  type: z.ZodLiteral<"resync">;
3701
3845
  }, z.core.$strip>, z.ZodTransform<{
@@ -3703,10 +3847,13 @@ declare const PerpsNotificationsResyncFrameSchema: z.ZodPipe<z.ZodObject<{
3703
3847
  reason: "server";
3704
3848
  channel: "notifications";
3705
3849
  timestamp: EpochMilliseconds;
3850
+ /** Newest reflected event time; null means the event horizon is unknown. */
3851
+ eventTimestamp: EpochMilliseconds | null;
3706
3852
  sequence: number;
3707
3853
  }, {
3708
3854
  ch: "notifications";
3709
3855
  ts: EpochMilliseconds;
3856
+ ets: EpochMilliseconds | null;
3710
3857
  sq: number;
3711
3858
  type: "resync";
3712
3859
  }>>;
@@ -3715,6 +3862,7 @@ declare const PerpsNotificationsResyncFrameSchema: z.ZodPipe<z.ZodObject<{
3715
3862
  */
3716
3863
  declare const PerpsTpSlUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3717
3864
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3865
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
3718
3866
  sq: z.ZodNumber;
3719
3867
  ch: z.ZodString;
3720
3868
  data: z.ZodPipe<z.ZodObject<{
@@ -3740,6 +3888,8 @@ declare const PerpsTpSlUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3740
3888
  type: "tpsl";
3741
3889
  channel: string;
3742
3890
  timestamp: EpochMilliseconds;
3891
+ /** Newest reflected event time; null means the event horizon is unknown. */
3892
+ eventTimestamp: EpochMilliseconds | null;
3743
3893
  sequence: number;
3744
3894
  payload: {
3745
3895
  orderId: PerpsOrderId;
@@ -3748,6 +3898,7 @@ declare const PerpsTpSlUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3748
3898
  };
3749
3899
  }, {
3750
3900
  ts: EpochMilliseconds;
3901
+ ets: EpochMilliseconds | null;
3751
3902
  sq: number;
3752
3903
  ch: string;
3753
3904
  data: {
@@ -3765,6 +3916,7 @@ type PerpsTpSlUpdateEvent = z.infer<typeof PerpsTpSlUpdateEventSchema>;
3765
3916
  */
3766
3917
  declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
3767
3918
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3919
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
3768
3920
  sq: z.ZodNumber;
3769
3921
  ch: z.ZodLiteral<"balances">;
3770
3922
  data: z.ZodObject<{
@@ -3776,6 +3928,8 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3776
3928
  type: "balance";
3777
3929
  channel: "balances";
3778
3930
  timestamp: number;
3931
+ /** Newest reflected event time; null means the event horizon is unknown. */
3932
+ eventTimestamp: EpochMilliseconds | null;
3779
3933
  sequence: number;
3780
3934
  payload: {
3781
3935
  asset: string;
@@ -3784,6 +3938,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3784
3938
  };
3785
3939
  }, {
3786
3940
  ts: EpochMilliseconds;
3941
+ ets: EpochMilliseconds | null;
3787
3942
  sq: number;
3788
3943
  ch: "balances";
3789
3944
  data: {
@@ -3793,6 +3948,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3793
3948
  };
3794
3949
  }>>, z.ZodPipe<z.ZodObject<{
3795
3950
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3951
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
3796
3952
  sq: z.ZodNumber;
3797
3953
  ch: z.ZodLiteral<"portfolio">;
3798
3954
  data: z.ZodPipe<z.ZodObject<{
@@ -3810,6 +3966,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3810
3966
  unrealized_pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3811
3967
  return_on_equity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3812
3968
  cumulative_funding: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3969
+ adl_index: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
3813
3970
  }, z.core.$strip>, z.ZodTransform<{
3814
3971
  instrumentId: PerpsInstrumentId;
3815
3972
  symbol: string;
@@ -3824,6 +3981,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3824
3981
  unrealizedPnl: DecimalString;
3825
3982
  returnOnEquity: DecimalString;
3826
3983
  cumulativeFunding: DecimalString;
3984
+ adlIndex: 0 | 1 | 2 | 3;
3827
3985
  }, {
3828
3986
  instrument_id: PerpsInstrumentId;
3829
3987
  symbol: string;
@@ -3838,25 +3996,30 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3838
3996
  unrealized_pnl: DecimalString;
3839
3997
  return_on_equity: DecimalString;
3840
3998
  cumulative_funding: DecimalString;
3999
+ adl_index: 0 | 1 | 2 | 3;
3841
4000
  }>>>;
3842
4001
  margin: z.ZodPipe<z.ZodObject<{
3843
4002
  total_account_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
4003
+ available_order_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3844
4004
  total_initial_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3845
4005
  total_maintenance_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3846
4006
  total_position_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3847
4007
  }, z.core.$strip>, z.ZodTransform<{
3848
4008
  totalAccountValue: DecimalString;
4009
+ availableOrderMargin: DecimalString;
3849
4010
  totalInitialMargin: DecimalString;
3850
4011
  totalMaintenanceMargin: DecimalString;
3851
4012
  totalPositionValue: DecimalString;
3852
4013
  }, {
3853
4014
  total_account_value: DecimalString;
4015
+ available_order_margin: DecimalString;
3854
4016
  total_initial_margin: DecimalString;
3855
4017
  total_maintenance_margin: DecimalString;
3856
4018
  total_position_value: DecimalString;
3857
4019
  }>>;
3858
4020
  withdrawable: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3859
4021
  in_liquidation: z.ZodBoolean;
4022
+ fee_tier: z.ZodNumber;
3860
4023
  timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3861
4024
  }, z.core.$strip>, z.ZodTransform<{
3862
4025
  positions: {
@@ -3873,15 +4036,18 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3873
4036
  unrealizedPnl: DecimalString;
3874
4037
  returnOnEquity: DecimalString;
3875
4038
  cumulativeFunding: DecimalString;
4039
+ adlIndex: 0 | 1 | 2 | 3;
3876
4040
  }[];
3877
4041
  margin: {
3878
4042
  totalAccountValue: DecimalString;
4043
+ availableOrderMargin: DecimalString;
3879
4044
  totalInitialMargin: DecimalString;
3880
4045
  totalMaintenanceMargin: DecimalString;
3881
4046
  totalPositionValue: DecimalString;
3882
4047
  };
3883
4048
  withdrawable: DecimalString;
3884
4049
  inLiquidation: boolean;
4050
+ feeTier: number;
3885
4051
  timestamp: EpochMilliseconds;
3886
4052
  }, {
3887
4053
  positions: {
@@ -3898,21 +4064,26 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3898
4064
  unrealizedPnl: DecimalString;
3899
4065
  returnOnEquity: DecimalString;
3900
4066
  cumulativeFunding: DecimalString;
4067
+ adlIndex: 0 | 1 | 2 | 3;
3901
4068
  }[];
3902
4069
  margin: {
3903
4070
  totalAccountValue: DecimalString;
4071
+ availableOrderMargin: DecimalString;
3904
4072
  totalInitialMargin: DecimalString;
3905
4073
  totalMaintenanceMargin: DecimalString;
3906
4074
  totalPositionValue: DecimalString;
3907
4075
  };
3908
4076
  withdrawable: DecimalString;
3909
4077
  in_liquidation: boolean;
4078
+ fee_tier: number;
3910
4079
  timestamp: EpochMilliseconds;
3911
4080
  }>>;
3912
4081
  }, z.core.$strip>, z.ZodTransform<{
3913
4082
  type: "portfolio";
3914
4083
  channel: "portfolio";
3915
4084
  timestamp: number;
4085
+ /** Newest reflected event time; null means the event horizon is unknown. */
4086
+ eventTimestamp: EpochMilliseconds | null;
3916
4087
  sequence: number;
3917
4088
  payload: {
3918
4089
  positions: {
@@ -3929,19 +4100,23 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3929
4100
  unrealizedPnl: DecimalString;
3930
4101
  returnOnEquity: DecimalString;
3931
4102
  cumulativeFunding: DecimalString;
4103
+ adlIndex: 0 | 1 | 2 | 3;
3932
4104
  }[];
3933
4105
  margin: {
3934
4106
  totalAccountValue: DecimalString;
4107
+ availableOrderMargin: DecimalString;
3935
4108
  totalInitialMargin: DecimalString;
3936
4109
  totalMaintenanceMargin: DecimalString;
3937
4110
  totalPositionValue: DecimalString;
3938
4111
  };
3939
4112
  withdrawable: DecimalString;
3940
4113
  inLiquidation: boolean;
4114
+ feeTier: number;
3941
4115
  timestamp: EpochMilliseconds;
3942
4116
  };
3943
4117
  }, {
3944
4118
  ts: EpochMilliseconds;
4119
+ ets: EpochMilliseconds | null;
3945
4120
  sq: number;
3946
4121
  ch: "portfolio";
3947
4122
  data: {
@@ -3959,19 +4134,23 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3959
4134
  unrealizedPnl: DecimalString;
3960
4135
  returnOnEquity: DecimalString;
3961
4136
  cumulativeFunding: DecimalString;
4137
+ adlIndex: 0 | 1 | 2 | 3;
3962
4138
  }[];
3963
4139
  margin: {
3964
4140
  totalAccountValue: DecimalString;
4141
+ availableOrderMargin: DecimalString;
3965
4142
  totalInitialMargin: DecimalString;
3966
4143
  totalMaintenanceMargin: DecimalString;
3967
4144
  totalPositionValue: DecimalString;
3968
4145
  };
3969
4146
  withdrawable: DecimalString;
3970
4147
  inLiquidation: boolean;
4148
+ feeTier: number;
3971
4149
  timestamp: EpochMilliseconds;
3972
4150
  };
3973
4151
  }>>, z.ZodPipe<z.ZodObject<{
3974
4152
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
4153
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
3975
4154
  sq: z.ZodNumber;
3976
4155
  ch: z.ZodLiteral<"orders">;
3977
4156
  data: z.ZodPipe<z.ZodObject<{
@@ -4103,6 +4282,8 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4103
4282
  type: "order";
4104
4283
  channel: "orders";
4105
4284
  timestamp: number;
4285
+ /** Newest reflected event time; null means the event horizon is unknown. */
4286
+ eventTimestamp: EpochMilliseconds | null;
4106
4287
  sequence: number;
4107
4288
  payload: {
4108
4289
  builder?: {
@@ -4139,6 +4320,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4139
4320
  };
4140
4321
  }, {
4141
4322
  ts: EpochMilliseconds;
4323
+ ets: EpochMilliseconds | null;
4142
4324
  sq: number;
4143
4325
  ch: "orders";
4144
4326
  data: {
@@ -4176,6 +4358,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4176
4358
  };
4177
4359
  }>>, z.ZodPipe<z.ZodObject<{
4178
4360
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
4361
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
4179
4362
  sq: z.ZodNumber;
4180
4363
  ch: z.ZodLiteral<"fills">;
4181
4364
  data: z.ZodArray<z.ZodPipe<z.ZodObject<{
@@ -4205,6 +4388,20 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4205
4388
  pep: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
4206
4389
  pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
4207
4390
  liq: z.ZodBoolean;
4391
+ adl: z.ZodBoolean;
4392
+ liquidation_details: z.ZodOptional<z.ZodPipe<z.ZodObject<{
4393
+ liquidated_user: z.ZodOptional<z.ZodString>;
4394
+ mark: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
4395
+ method: z.ZodEnum<typeof PerpsLiquidationMethod>;
4396
+ }, z.core.$strip>, z.ZodTransform<{
4397
+ mark: DecimalString;
4398
+ method: PerpsLiquidationMethod;
4399
+ liquidatedUser?: string | undefined;
4400
+ }, {
4401
+ mark: DecimalString;
4402
+ method: PerpsLiquidationMethod;
4403
+ liquidated_user?: string | undefined;
4404
+ }>>>;
4208
4405
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
4209
4406
  coid: z.ZodOptional<z.ZodString>;
4210
4407
  }, z.core.$strip>, z.ZodTransform<{
@@ -4213,6 +4410,12 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4213
4410
  previousEntryPrice: DecimalString;
4214
4411
  pnl: DecimalString;
4215
4412
  liquidation: boolean;
4413
+ adl: boolean;
4414
+ liquidationDetails: {
4415
+ mark: DecimalString;
4416
+ method: PerpsLiquidationMethod;
4417
+ liquidatedUser?: string | undefined;
4418
+ } | undefined;
4216
4419
  timestamp: EpochMilliseconds;
4217
4420
  clientOrderId: string | undefined;
4218
4421
  builder?: {
@@ -4245,6 +4448,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4245
4448
  pep: DecimalString;
4246
4449
  pnl: DecimalString;
4247
4450
  liq: boolean;
4451
+ adl: boolean;
4248
4452
  ts: EpochMilliseconds;
4249
4453
  builder_fee?: DecimalString | undefined;
4250
4454
  total_fee?: DecimalString | undefined;
@@ -4252,12 +4456,19 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4252
4456
  address: _polymarket_types.EvmAddress;
4253
4457
  feeRate: DecimalString;
4254
4458
  } | undefined;
4459
+ liquidation_details?: {
4460
+ mark: DecimalString;
4461
+ method: PerpsLiquidationMethod;
4462
+ liquidatedUser?: string | undefined;
4463
+ } | undefined;
4255
4464
  coid?: string | undefined;
4256
4465
  }>>>;
4257
4466
  }, z.core.$strip>, z.ZodTransform<{
4258
4467
  type: "fill";
4259
4468
  channel: "fills";
4260
4469
  timestamp: number;
4470
+ /** Newest reflected event time; null means the event horizon is unknown. */
4471
+ eventTimestamp: EpochMilliseconds | null;
4261
4472
  sequence: number;
4262
4473
  payload: {
4263
4474
  feeAsset: string;
@@ -4265,6 +4476,12 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4265
4476
  previousEntryPrice: DecimalString;
4266
4477
  pnl: DecimalString;
4267
4478
  liquidation: boolean;
4479
+ adl: boolean;
4480
+ liquidationDetails: {
4481
+ mark: DecimalString;
4482
+ method: PerpsLiquidationMethod;
4483
+ liquidatedUser?: string | undefined;
4484
+ } | undefined;
4268
4485
  timestamp: EpochMilliseconds;
4269
4486
  clientOrderId: string | undefined;
4270
4487
  builder?: {
@@ -4285,6 +4502,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4285
4502
  }[];
4286
4503
  }, {
4287
4504
  ts: EpochMilliseconds;
4505
+ ets: EpochMilliseconds | null;
4288
4506
  sq: number;
4289
4507
  ch: "fills";
4290
4508
  data: {
@@ -4293,6 +4511,12 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4293
4511
  previousEntryPrice: DecimalString;
4294
4512
  pnl: DecimalString;
4295
4513
  liquidation: boolean;
4514
+ adl: boolean;
4515
+ liquidationDetails: {
4516
+ mark: DecimalString;
4517
+ method: PerpsLiquidationMethod;
4518
+ liquidatedUser?: string | undefined;
4519
+ } | undefined;
4296
4520
  timestamp: EpochMilliseconds;
4297
4521
  clientOrderId: string | undefined;
4298
4522
  builder?: {
@@ -4313,6 +4537,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4313
4537
  }[];
4314
4538
  }>>, z.ZodPipe<z.ZodObject<{
4315
4539
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
4540
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
4316
4541
  sq: z.ZodNumber;
4317
4542
  ch: z.ZodLiteral<"builderFills">;
4318
4543
  data: z.ZodArray<z.ZodPipe<z.ZodObject<{
@@ -4377,6 +4602,8 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4377
4602
  type: "builderFill";
4378
4603
  channel: "builderFills";
4379
4604
  timestamp: EpochMilliseconds;
4605
+ /** Newest reflected event time; null means the event horizon is unknown. */
4606
+ eventTimestamp: EpochMilliseconds | null;
4380
4607
  sequence: number;
4381
4608
  payload: {
4382
4609
  liquidityRole: PerpsLiquidityRole;
@@ -4400,6 +4627,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4400
4627
  }[];
4401
4628
  }, {
4402
4629
  ts: EpochMilliseconds;
4630
+ ets: EpochMilliseconds | null;
4403
4631
  sq: number;
4404
4632
  ch: "builderFills";
4405
4633
  data: {
@@ -4424,6 +4652,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4424
4652
  }[];
4425
4653
  }>>, z.ZodPipe<z.ZodObject<{
4426
4654
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
4655
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
4427
4656
  sq: z.ZodNumber;
4428
4657
  ch: z.ZodLiteral<"funding">;
4429
4658
  data: z.ZodPipe<z.ZodObject<{
@@ -4455,6 +4684,8 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4455
4684
  type: "funding";
4456
4685
  channel: "funding";
4457
4686
  timestamp: number;
4687
+ /** Newest reflected event time; null means the event horizon is unknown. */
4688
+ eventTimestamp: EpochMilliseconds | null;
4458
4689
  sequence: number;
4459
4690
  payload: {
4460
4691
  id: PerpsFundingPaymentId;
@@ -4467,6 +4698,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4467
4698
  };
4468
4699
  }, {
4469
4700
  ts: EpochMilliseconds;
4701
+ ets: EpochMilliseconds | null;
4470
4702
  sq: number;
4471
4703
  ch: "funding";
4472
4704
  data: {
@@ -4480,6 +4712,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4480
4712
  };
4481
4713
  }>>, z.ZodPipe<z.ZodObject<{
4482
4714
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
4715
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
4483
4716
  sq: z.ZodNumber;
4484
4717
  ch: z.ZodLiteral<"deposits">;
4485
4718
  data: z.ZodPipe<z.ZodObject<{
@@ -4502,6 +4735,8 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4502
4735
  type: "deposit";
4503
4736
  channel: "deposits";
4504
4737
  timestamp: number;
4738
+ /** Newest reflected event time; null means the event horizon is unknown. */
4739
+ eventTimestamp: EpochMilliseconds | null;
4505
4740
  sequence: number;
4506
4741
  payload: {
4507
4742
  hash: _polymarket_types.TxHash | undefined;
@@ -4511,6 +4746,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4511
4746
  };
4512
4747
  }, {
4513
4748
  ts: EpochMilliseconds;
4749
+ ets: EpochMilliseconds | null;
4514
4750
  sq: number;
4515
4751
  ch: "deposits";
4516
4752
  data: {
@@ -4521,6 +4757,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4521
4757
  };
4522
4758
  }>>, z.ZodPipe<z.ZodObject<{
4523
4759
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
4760
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
4524
4761
  sq: z.ZodNumber;
4525
4762
  ch: z.ZodLiteral<"withdrawals">;
4526
4763
  data: z.ZodPipe<z.ZodObject<{
@@ -4552,6 +4789,8 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4552
4789
  type: "withdrawal";
4553
4790
  channel: "withdrawals";
4554
4791
  timestamp: number;
4792
+ /** Newest reflected event time; null means the event horizon is unknown. */
4793
+ eventTimestamp: EpochMilliseconds | null;
4555
4794
  sequence: number;
4556
4795
  payload: {
4557
4796
  withdrawalId: PerpsWithdrawalId;
@@ -4564,6 +4803,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4564
4803
  };
4565
4804
  }, {
4566
4805
  ts: EpochMilliseconds;
4806
+ ets: EpochMilliseconds | null;
4567
4807
  sq: number;
4568
4808
  ch: "withdrawals";
4569
4809
  data: {
@@ -4577,6 +4817,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4577
4817
  };
4578
4818
  }>>, z.ZodPipe<z.ZodObject<{
4579
4819
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
4820
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
4580
4821
  sq: z.ZodNumber;
4581
4822
  ch: z.ZodLiteral<"notifications">;
4582
4823
  data: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
@@ -4758,6 +4999,8 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4758
4999
  type: "notification";
4759
5000
  channel: "notifications";
4760
5001
  timestamp: number;
5002
+ /** Newest reflected event time; null means the event horizon is unknown. */
5003
+ eventTimestamp: EpochMilliseconds | null;
4761
5004
  sequence: number;
4762
5005
  payload: {
4763
5006
  id: PerpsNotificationId;
@@ -4818,6 +5061,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4818
5061
  };
4819
5062
  }, {
4820
5063
  ts: EpochMilliseconds;
5064
+ ets: EpochMilliseconds | null;
4821
5065
  sq: number;
4822
5066
  ch: "notifications";
4823
5067
  data: {
@@ -4879,6 +5123,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4879
5123
  };
4880
5124
  }>>, z.ZodPipe<z.ZodObject<{
4881
5125
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
5126
+ ets: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodTransform<EpochMilliseconds | null, EpochMilliseconds>>;
4882
5127
  sq: z.ZodNumber;
4883
5128
  ch: z.ZodString;
4884
5129
  data: z.ZodPipe<z.ZodObject<{
@@ -4904,6 +5149,8 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4904
5149
  type: "tpsl";
4905
5150
  channel: string;
4906
5151
  timestamp: EpochMilliseconds;
5152
+ /** Newest reflected event time; null means the event horizon is unknown. */
5153
+ eventTimestamp: EpochMilliseconds | null;
4907
5154
  sequence: number;
4908
5155
  payload: {
4909
5156
  orderId: PerpsOrderId;
@@ -4912,6 +5159,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
4912
5159
  };
4913
5160
  }, {
4914
5161
  ts: EpochMilliseconds;
5162
+ ets: EpochMilliseconds | null;
4915
5163
  sq: number;
4916
5164
  ch: string;
4917
5165
  data: {
@@ -4935,6 +5183,8 @@ type PerpsSessionUpdateEvent = z.infer<typeof PerpsSessionUpdateEventSchema>;
4935
5183
  type PerpsResyncEvent = {
4936
5184
  type: 'resync';
4937
5185
  reason: 'reconnect' | 'sequence_gap';
5186
+ /** Local recovery has no attested event horizon. */
5187
+ eventTimestamp?: never;
4938
5188
  channel?: string;
4939
5189
  previousSequence?: number;
4940
5190
  sequence?: number;
@@ -4975,6 +5225,15 @@ declare enum KnownPriceSource {
4975
5225
  * {@link KnownPriceSource}; newly introduced sources remain available as strings.
4976
5226
  */
4977
5227
  type PriceSource = KnownPriceSource | (string & {});
5228
+ /**
5229
+ * Market state of the instrument priced by an equity provider.
5230
+ * Unknown means the provider cannot determine the state; omission means not stated.
5231
+ */
5232
+ declare enum EquityMarketStatus {
5233
+ Open = "open",
5234
+ Closed = "closed",
5235
+ Unknown = "unknown"
5236
+ }
4978
5237
  declare enum PolyboltChannel {
4979
5238
  Crypto = "price.crypto",
4980
5239
  Twap = "price.crypto.twap",
@@ -5172,7 +5431,7 @@ declare const EquityPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
5172
5431
  dropped: z.ZodOptional<z.ZodNumber>;
5173
5432
  topic: z.ZodLiteral<"prices.equity">;
5174
5433
  type: z.ZodLiteral<"update">;
5175
- payload: z.ZodPipe<z.ZodObject<{
5434
+ payload: z.ZodIntersection<z.ZodPipe<z.ZodObject<{
5176
5435
  symbol: z.ZodString;
5177
5436
  source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
5178
5437
  timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
@@ -5195,14 +5454,20 @@ declare const EquityPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
5195
5454
  full_accuracy_value: DecimalString;
5196
5455
  received_at?: EpochMilliseconds | undefined;
5197
5456
  is_carried_forward?: boolean | undefined;
5198
- }>>;
5457
+ }>>, z.ZodPipe<z.ZodObject<{
5458
+ market_status: z.ZodOptional<z.ZodEnum<typeof EquityMarketStatus>>;
5459
+ }, z.core.$strip>, z.ZodTransform<{
5460
+ marketStatus?: EquityMarketStatus;
5461
+ }, {
5462
+ market_status?: EquityMarketStatus | undefined;
5463
+ }>>>;
5199
5464
  }, z.core.$strip>, z.ZodObject<{
5200
5465
  timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
5201
5466
  seq: z.ZodOptional<z.ZodNumber>;
5202
5467
  dropped: z.ZodOptional<z.ZodNumber>;
5203
5468
  topic: z.ZodLiteral<"prices.equity">;
5204
5469
  type: z.ZodLiteral<"subscribe">;
5205
- payload: z.ZodObject<{
5470
+ payload: z.ZodIntersection<z.ZodObject<{
5206
5471
  symbol: z.ZodString;
5207
5472
  source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
5208
5473
  data: z.ZodArray<z.ZodPipe<z.ZodObject<{
@@ -5217,11 +5482,23 @@ declare const EquityPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
5217
5482
  value: DecimalString;
5218
5483
  full_accuracy_value: DecimalString;
5219
5484
  }>>>;
5220
- }, z.core.$strip>;
5485
+ }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
5486
+ market_status: z.ZodOptional<z.ZodEnum<typeof EquityMarketStatus>>;
5487
+ }, z.core.$strip>, z.ZodTransform<{
5488
+ marketStatus?: EquityMarketStatus;
5489
+ }, {
5490
+ market_status?: EquityMarketStatus | undefined;
5491
+ }>>>;
5221
5492
  }, z.core.$strip>]>;
5222
5493
  /**
5223
5494
  * An equity price event.
5224
5495
  *
5496
+ * `payload.marketStatus` describes this provider's instrument. Absence means not
5497
+ * stated, never open. Status-only updates repeat the price timestamp with
5498
+ * `isCarriedForward: true`; do not deduplicate updates by timestamp alone.
5499
+ * Snapshots carry the current status beside `source`, including a closing price
5500
+ * older than two minutes while the status is closed or unknown.
5501
+ *
5225
5502
  * `seq` is scoped to one channel on one WebSocket connection and resets after
5226
5503
  * reconnecting. When an SDK subscription spans multiple connections, sequence
5227
5504
  * values from those connections may interleave.
@@ -5233,7 +5510,7 @@ declare const EquityTwapPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
5233
5510
  dropped: z.ZodOptional<z.ZodNumber>;
5234
5511
  topic: z.ZodLiteral<"prices.equity.twap">;
5235
5512
  type: z.ZodLiteral<"update">;
5236
- payload: z.ZodPipe<z.ZodObject<{
5513
+ payload: z.ZodIntersection<z.ZodPipe<z.ZodObject<{
5237
5514
  symbol: z.ZodString;
5238
5515
  source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
5239
5516
  timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
@@ -5253,14 +5530,20 @@ declare const EquityTwapPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
5253
5530
  value: DecimalString;
5254
5531
  full_accuracy_value: DecimalString;
5255
5532
  window_seconds: 60;
5256
- }>>;
5533
+ }>>, z.ZodPipe<z.ZodObject<{
5534
+ market_status: z.ZodOptional<z.ZodEnum<typeof EquityMarketStatus>>;
5535
+ }, z.core.$strip>, z.ZodTransform<{
5536
+ marketStatus?: EquityMarketStatus;
5537
+ }, {
5538
+ market_status?: EquityMarketStatus | undefined;
5539
+ }>>>;
5257
5540
  }, z.core.$strip>, z.ZodObject<{
5258
5541
  timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
5259
5542
  seq: z.ZodOptional<z.ZodNumber>;
5260
5543
  dropped: z.ZodOptional<z.ZodNumber>;
5261
5544
  topic: z.ZodLiteral<"prices.equity.twap">;
5262
5545
  type: z.ZodLiteral<"subscribe">;
5263
- payload: z.ZodPipe<z.ZodObject<{
5546
+ payload: z.ZodIntersection<z.ZodPipe<z.ZodObject<{
5264
5547
  symbol: z.ZodString;
5265
5548
  source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
5266
5549
  data: z.ZodArray<z.ZodPipe<z.ZodObject<{
@@ -5292,11 +5575,21 @@ declare const EquityTwapPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
5292
5575
  value: DecimalString;
5293
5576
  }[];
5294
5577
  window_seconds: 60;
5295
- }>>;
5578
+ }>>, z.ZodPipe<z.ZodObject<{
5579
+ market_status: z.ZodOptional<z.ZodEnum<typeof EquityMarketStatus>>;
5580
+ }, z.core.$strip>, z.ZodTransform<{
5581
+ marketStatus?: EquityMarketStatus;
5582
+ }, {
5583
+ market_status?: EquityMarketStatus | undefined;
5584
+ }>>>;
5296
5585
  }, z.core.$strip>]>;
5297
5586
  /**
5298
5587
  * An equity TWAP event, denominated in the symbol's quote currency.
5299
5588
  *
5589
+ * `payload.marketStatus` has the same meaning as on equity prices and changes
5590
+ * only with a new TWAP price. Absence means not stated. Snapshots carry the
5591
+ * current status beside `source` and may include an older closing price.
5592
+ *
5300
5593
  * `seq` is scoped to one channel on one WebSocket connection and resets after
5301
5594
  * reconnecting. When an SDK subscription spans multiple connections, sequence
5302
5595
  * values from those connections may interleave.
@@ -7712,4 +8005,4 @@ declare const SportsResultEventSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
7712
8005
  }>>;
7713
8006
  type SportsEvent = z.infer<typeof SportsResultEventSchema>;
7714
8007
 
7715
- export { type CommentCreatedEvent, CommentCreatedEventSchema, type CommentRemovedEvent, CommentRemovedEventSchema, type CommentRemovedPayload, type CommentsEvent, CommentsEventSchema, type CryptoPriceEvent, CryptoPriceEventSchema, type CryptoPriceSnapshotEvent, type CryptoPricesBinanceEvent, CryptoPricesBinanceEventSchema, type CryptoPricesBinanceTopic, type CryptoPricesChainlinkEvent, CryptoPricesChainlinkEventSchema, type CryptoPricesChainlinkTopic, type CryptoPricesChainlinkTwapEvent, CryptoPricesChainlinkTwapEventSchema, type CryptoPricesChainlinkTwapSixtyEvent, CryptoPricesChainlinkTwapSixtyEventSchema, type CryptoPricesChainlinkTwapThirtyEvent, CryptoPricesChainlinkTwapThirtyEventSchema, type CryptoPricesChainlinkTwapTopic, type CryptoPricesChainlinkTwapWindowSeconds, type CryptoPricesEvent, CryptoPricesEventSchema, type CryptoPricesTopic, type CryptoTwapPriceEvent, CryptoTwapPriceEventSchema, type CryptoTwapPriceSnapshotEvent, type CustomMarketEvent, CustomMarketEventSchema, type EquityPriceEvent, EquityPriceEventSchema, type EquityPriceSnapshotPoint, type EquityPriceSubscribePayload, type EquityPriceUpdatePayload, type EquityPricesEvent, EquityPricesEventSchema, type EquityPricesSubscribeEvent, EquityPricesSubscribeEventSchema, type EquityPricesTopic, type EquityPricesUpdateEvent, EquityPricesUpdateEventSchema, type EquityTwapPriceEvent, EquityTwapPriceEventSchema, type EquityTwapPriceSnapshotEvent, KnownPriceSource, type MarketBestBidAskEvent, MarketBestBidAskEventSchema, type MarketBookEvent, MarketBookEventSchema, type MarketEvent, type MarketEventMessage, MarketEventSchema, type MarketLastTradePriceEvent, MarketLastTradePriceEventSchema, type MarketPriceChangeEvent, MarketPriceChangeEventSchema, type MarketResolvedEvent, MarketResolvedEventSchema, type MarketTickSizeChangeEvent, MarketTickSizeChangeEventSchema, type NewMarketEvent, NewMarketEventSchema, type OrderBookLevel, type PerpsBalanceUpdateEvent, PerpsBalanceUpdateEventSchema, type PerpsBboEvent, PerpsBboEventSchema, type PerpsBookEvent, PerpsBookEventSchema, type PerpsBuilderFillUpdateEvent, PerpsBuilderFillUpdateEventSchema, type PerpsCandleEvent, PerpsCandleEventSchema, type PerpsDepositUpdateEvent, PerpsDepositUpdateEventSchema, type PerpsFillUpdateEvent, PerpsFillUpdateEventSchema, type PerpsFundingUpdateEvent, PerpsFundingUpdateEventSchema, type PerpsMarketDataEvent, PerpsMarketDataEventSchema, type PerpsNotificationUpdateEvent, PerpsNotificationUpdateEventSchema, PerpsNotificationsResyncFrameSchema, type PerpsOrderUpdateEvent, PerpsOrderUpdateEventSchema, type PerpsPortfolioUpdateEvent, PerpsPortfolioUpdateEventSchema, type PerpsResyncEvent, type PerpsSessionEvent, type PerpsSessionUpdateEvent, PerpsSessionUpdateEventSchema, type PerpsStatisticEvent, PerpsStatisticEventSchema, type PerpsTickerEvent, PerpsTickerEventSchema, type PerpsTpSlUpdateEvent, PerpsTpSlUpdateEventSchema, type PerpsTradeEvent, PerpsTradeEventSchema, type PerpsWithdrawalUpdateEvent, PerpsWithdrawalUpdateEventSchema, type PolyboltAck, PolyboltAckOp, PolyboltAckSchema, PolyboltChannel, type PolyboltEnvelope, PolyboltEnvelopeSchema, type PolyboltFilter, type PolyboltSubscription, type PriceChange, type PriceEvent, PriceProvider, type PriceSource, type PriceUpdatePayload, type ReactionCreatedEvent, ReactionCreatedEventSchema, type ReactionRemovedEvent, ReactionRemovedEventSchema, type RealtimeErrorCode, type RealtimeEvent, RealtimeEventSchema, RealtimeKnownErrorCode, type SportsEvent, SportsResultEventSchema, type StandardMarketEvent, StandardMarketEventSchema, type TradeMakerOrder, TradeStatus, type UserEvent, UserEventSchema, type UserOrderEvent, UserOrderEventSchema, UserOrderEventType, UserOrderStatus, type UserTradeEvent, UserTradeEventSchema };
8008
+ export { type CanceledWithReasonStatus, type CommentCreatedEvent, CommentCreatedEventSchema, type CommentRemovedEvent, CommentRemovedEventSchema, type CommentRemovedPayload, type CommentsEvent, CommentsEventSchema, type CryptoPriceEvent, CryptoPriceEventSchema, type CryptoPriceSnapshotEvent, type CryptoPricesBinanceEvent, CryptoPricesBinanceEventSchema, type CryptoPricesBinanceTopic, type CryptoPricesChainlinkEvent, CryptoPricesChainlinkEventSchema, type CryptoPricesChainlinkTopic, type CryptoPricesChainlinkTwapEvent, CryptoPricesChainlinkTwapEventSchema, type CryptoPricesChainlinkTwapSixtyEvent, CryptoPricesChainlinkTwapSixtyEventSchema, type CryptoPricesChainlinkTwapThirtyEvent, CryptoPricesChainlinkTwapThirtyEventSchema, type CryptoPricesChainlinkTwapTopic, type CryptoPricesChainlinkTwapWindowSeconds, type CryptoPricesEvent, CryptoPricesEventSchema, type CryptoPricesTopic, type CryptoTwapPriceEvent, CryptoTwapPriceEventSchema, type CryptoTwapPriceSnapshotEvent, type CustomMarketEvent, CustomMarketEventSchema, EquityMarketStatus, type EquityPriceEvent, EquityPriceEventSchema, type EquityPriceSnapshotPoint, type EquityPriceSubscribePayload, type EquityPriceUpdatePayload, type EquityPricesEvent, EquityPricesEventSchema, type EquityPricesSubscribeEvent, EquityPricesSubscribeEventSchema, type EquityPricesTopic, type EquityPricesUpdateEvent, EquityPricesUpdateEventSchema, type EquityTwapPriceEvent, EquityTwapPriceEventSchema, type EquityTwapPriceSnapshotEvent, KnownPriceSource, type MarketBestBidAskEvent, MarketBestBidAskEventSchema, type MarketBookEvent, MarketBookEventSchema, type MarketEvent, type MarketEventMessage, MarketEventSchema, type MarketLastTradePriceEvent, MarketLastTradePriceEventSchema, type MarketPriceChangeEvent, MarketPriceChangeEventSchema, type MarketResolvedEvent, MarketResolvedEventSchema, type MarketTickSizeChangeEvent, MarketTickSizeChangeEventSchema, type NewMarketEvent, NewMarketEventSchema, type OrderBookLevel, type PerpsBalanceUpdateEvent, PerpsBalanceUpdateEventSchema, type PerpsBboEvent, PerpsBboEventSchema, type PerpsBookEvent, PerpsBookEventSchema, type PerpsBuilderFillUpdateEvent, PerpsBuilderFillUpdateEventSchema, type PerpsCandleEvent, PerpsCandleEventSchema, type PerpsDepositUpdateEvent, PerpsDepositUpdateEventSchema, type PerpsFillUpdateEvent, PerpsFillUpdateEventSchema, type PerpsFundingUpdateEvent, PerpsFundingUpdateEventSchema, type PerpsMarketDataEvent, PerpsMarketDataEventSchema, type PerpsNotificationUpdateEvent, PerpsNotificationUpdateEventSchema, PerpsNotificationsResyncFrameSchema, type PerpsOrderUpdateEvent, PerpsOrderUpdateEventSchema, type PerpsPortfolioUpdateEvent, PerpsPortfolioUpdateEventSchema, type PerpsResyncEvent, type PerpsSessionEvent, type PerpsSessionUpdateEvent, PerpsSessionUpdateEventSchema, type PerpsStatisticEvent, PerpsStatisticEventSchema, type PerpsTickerEvent, PerpsTickerEventSchema, type PerpsTpSlUpdateEvent, PerpsTpSlUpdateEventSchema, type PerpsTradeEvent, PerpsTradeEventSchema, type PerpsWithdrawalUpdateEvent, PerpsWithdrawalUpdateEventSchema, type PolyboltAck, PolyboltAckOp, PolyboltAckSchema, PolyboltChannel, type PolyboltEnvelope, PolyboltEnvelopeSchema, type PolyboltFilter, type PolyboltSubscription, type PriceChange, type PriceEvent, PriceProvider, type PriceSource, type PriceUpdatePayload, type ReactionCreatedEvent, ReactionCreatedEventSchema, type ReactionRemovedEvent, ReactionRemovedEventSchema, type RealtimeErrorCode, type RealtimeEvent, RealtimeEventSchema, RealtimeKnownErrorCode, type SportsEvent, SportsResultEventSchema, type StandardMarketEvent, StandardMarketEventSchema, type TradeMakerOrder, TradeStatus, type UserEvent, UserEventSchema, type UserOrderEvent, UserOrderEventSchema, UserOrderEventType, UserOrderStatus, type UserTradeEvent, UserTradeEventSchema };