@polymarket/bindings 0.1.0-beta.1 → 0.1.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,8 @@
1
- import { TokenId, DecimalString, EpochMilliseconds, ConditionId, IsoDateTimeString, OrderSide, OrderType, CommentId, CommentParentEntityType, EventId, SeriesId, ImageOptimizationId, BaseUnits } from '../index.js';
1
+ import { TokenId, DecimalString, EpochMilliseconds, CtfConditionId, IsoDateTimeString, OrderSide, OrderType, BaseUnits, CommentId, CommentParentEntityType, EventId, SeriesId, ImageOptimizationId } from '../index.js';
2
2
  import { z } from 'zod';
3
+ import { P as PerpsInstrumentId, Q as PerpsKlineInterval, b as PerpsDepositStatus, i as PerpsTradeId, T as PerpsOrderId, j as PerpsSide, a2 as PerpsTimeInForce, W as PerpsOrderStatus, a4 as PerpsTpSlKind, a8 as PerpsTpSlScope, c as PerpsWithdrawalId, d as PerpsWithdrawalStatus } from '../orders-Uj0Gkvd4.js';
4
+ import * as _polymarket_types from '@polymarket/types';
3
5
  import { R as ReactionType } from '../comment-C-jBbhp7.js';
4
- import '@polymarket/types';
5
6
 
6
7
  declare enum TradeStatus {
7
8
  Matched = "TRADE_STATUS_MATCHED",
@@ -284,7 +285,7 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
284
285
  }, z.core.$strip>>>;
285
286
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
286
287
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
287
- condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
288
+ condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>;
288
289
  active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
289
290
  clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
290
291
  sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -307,7 +308,7 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
307
308
  title?: string | null | undefined;
308
309
  description?: string | null | undefined;
309
310
  } | null | undefined;
310
- conditionId: ConditionId | null | undefined;
311
+ conditionId: CtfConditionId | null | undefined;
311
312
  clobTokenIds: string[] | null | undefined;
312
313
  sportsMarketType: string | null | undefined;
313
314
  gameStartTime: IsoDateTimeString | null | undefined;
@@ -345,7 +346,7 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
345
346
  } | null | undefined;
346
347
  timestamp?: EpochMilliseconds | null | undefined;
347
348
  tags?: string[] | null | undefined;
348
- condition_id?: ConditionId | null | undefined;
349
+ condition_id?: CtfConditionId | null | undefined;
349
350
  active?: boolean | null | undefined;
350
351
  clob_token_ids?: string[] | null | undefined;
351
352
  sports_market_type?: string | null | undefined;
@@ -865,7 +866,7 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
865
866
  }, z.core.$strip>>>;
866
867
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
867
868
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
868
- condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
869
+ condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>;
869
870
  active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
870
871
  clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
871
872
  sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -888,7 +889,7 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
888
889
  title?: string | null | undefined;
889
890
  description?: string | null | undefined;
890
891
  } | null | undefined;
891
- conditionId: ConditionId | null | undefined;
892
+ conditionId: CtfConditionId | null | undefined;
892
893
  clobTokenIds: string[] | null | undefined;
893
894
  sportsMarketType: string | null | undefined;
894
895
  gameStartTime: IsoDateTimeString | null | undefined;
@@ -926,7 +927,7 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
926
927
  } | null | undefined;
927
928
  timestamp?: EpochMilliseconds | null | undefined;
928
929
  tags?: string[] | null | undefined;
929
- condition_id?: ConditionId | null | undefined;
930
+ condition_id?: CtfConditionId | null | undefined;
930
931
  active?: boolean | null | undefined;
931
932
  clob_token_ids?: string[] | null | undefined;
932
933
  sports_market_type?: string | null | undefined;
@@ -1207,7 +1208,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1207
1208
  }, z.core.$strip>>>;
1208
1209
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
1209
1210
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1210
- condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
1211
+ condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>;
1211
1212
  active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1212
1213
  clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1213
1214
  sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1230,7 +1231,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1230
1231
  title?: string | null | undefined;
1231
1232
  description?: string | null | undefined;
1232
1233
  } | null | undefined;
1233
- conditionId: ConditionId | null | undefined;
1234
+ conditionId: CtfConditionId | null | undefined;
1234
1235
  clobTokenIds: string[] | null | undefined;
1235
1236
  sportsMarketType: string | null | undefined;
1236
1237
  gameStartTime: IsoDateTimeString | null | undefined;
@@ -1268,7 +1269,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1268
1269
  } | null | undefined;
1269
1270
  timestamp?: EpochMilliseconds | null | undefined;
1270
1271
  tags?: string[] | null | undefined;
1271
- condition_id?: ConditionId | null | undefined;
1272
+ condition_id?: CtfConditionId | null | undefined;
1272
1273
  active?: boolean | null | undefined;
1273
1274
  clob_token_ids?: string[] | null | undefined;
1274
1275
  sports_market_type?: string | null | undefined;
@@ -1526,6 +1527,2033 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
1526
1527
  }>>], "event_type">;
1527
1528
  type UserEvent = z.infer<typeof UserEventSchema>;
1528
1529
 
1530
+ declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
1531
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1532
+ sq: z.ZodNumber;
1533
+ ch: z.ZodString;
1534
+ data: z.ZodPipe<z.ZodObject<{
1535
+ tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
1536
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
1537
+ side: z.ZodEnum<typeof PerpsSide>;
1538
+ p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1539
+ qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1540
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1541
+ hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
1542
+ }, z.core.$strip>, z.ZodTransform<{
1543
+ tradeId: PerpsTradeId;
1544
+ instrumentId: PerpsInstrumentId;
1545
+ side: PerpsSide;
1546
+ price: DecimalString;
1547
+ quantity: DecimalString;
1548
+ timestamp: EpochMilliseconds;
1549
+ hash: _polymarket_types.TxHash | undefined;
1550
+ }, {
1551
+ tid: PerpsTradeId;
1552
+ iid: PerpsInstrumentId;
1553
+ side: PerpsSide;
1554
+ p: DecimalString;
1555
+ qty: DecimalString;
1556
+ ts: EpochMilliseconds;
1557
+ hash?: _polymarket_types.TxHash | undefined;
1558
+ }>>;
1559
+ }, z.core.$strip>, z.ZodTransform<{
1560
+ topic: "perps.trades";
1561
+ type: "trade";
1562
+ channel: string;
1563
+ timestamp: EpochMilliseconds;
1564
+ sequence: number;
1565
+ payload: {
1566
+ tradeId: PerpsTradeId;
1567
+ instrumentId: PerpsInstrumentId;
1568
+ side: PerpsSide;
1569
+ price: DecimalString;
1570
+ quantity: DecimalString;
1571
+ timestamp: EpochMilliseconds;
1572
+ hash: _polymarket_types.TxHash | undefined;
1573
+ };
1574
+ }, {
1575
+ ts: EpochMilliseconds;
1576
+ sq: number;
1577
+ ch: string;
1578
+ data: {
1579
+ tradeId: PerpsTradeId;
1580
+ instrumentId: PerpsInstrumentId;
1581
+ side: PerpsSide;
1582
+ price: DecimalString;
1583
+ quantity: DecimalString;
1584
+ timestamp: EpochMilliseconds;
1585
+ hash: _polymarket_types.TxHash | undefined;
1586
+ };
1587
+ }>>;
1588
+ type PerpsTradeEvent = z.infer<typeof PerpsTradeEventSchema>;
1589
+ declare const PerpsBboEventSchema: z.ZodPipe<z.ZodObject<{
1590
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1591
+ sq: z.ZodNumber;
1592
+ ch: z.ZodString;
1593
+ data: z.ZodPipe<z.ZodObject<{
1594
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
1595
+ bp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1596
+ bq: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1597
+ ap: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1598
+ aq: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1599
+ }, z.core.$strip>, z.ZodTransform<{
1600
+ instrumentId: PerpsInstrumentId;
1601
+ bidPrice: DecimalString;
1602
+ bidQuantity: DecimalString;
1603
+ askPrice: DecimalString;
1604
+ askQuantity: DecimalString;
1605
+ }, {
1606
+ iid: PerpsInstrumentId;
1607
+ bp: DecimalString;
1608
+ bq: DecimalString;
1609
+ ap: DecimalString;
1610
+ aq: DecimalString;
1611
+ }>>;
1612
+ }, z.core.$strip>, z.ZodTransform<{
1613
+ topic: "perps.bbo";
1614
+ type: "bbo";
1615
+ channel: string;
1616
+ timestamp: EpochMilliseconds;
1617
+ sequence: number;
1618
+ payload: {
1619
+ instrumentId: PerpsInstrumentId;
1620
+ bidPrice: DecimalString;
1621
+ bidQuantity: DecimalString;
1622
+ askPrice: DecimalString;
1623
+ askQuantity: DecimalString;
1624
+ };
1625
+ }, {
1626
+ ts: EpochMilliseconds;
1627
+ sq: number;
1628
+ ch: string;
1629
+ data: {
1630
+ instrumentId: PerpsInstrumentId;
1631
+ bidPrice: DecimalString;
1632
+ bidQuantity: DecimalString;
1633
+ askPrice: DecimalString;
1634
+ askQuantity: DecimalString;
1635
+ };
1636
+ }>>;
1637
+ type PerpsBboEvent = z.infer<typeof PerpsBboEventSchema>;
1638
+ declare const PerpsBookEventSchema: z.ZodPipe<z.ZodObject<{
1639
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1640
+ sq: z.ZodNumber;
1641
+ ch: z.ZodString;
1642
+ data: z.ZodPipe<z.ZodObject<{
1643
+ b: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
1644
+ price: DecimalString;
1645
+ quantity: DecimalString;
1646
+ }, [DecimalString, DecimalString]>>>;
1647
+ a: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
1648
+ price: DecimalString;
1649
+ quantity: DecimalString;
1650
+ }, [DecimalString, DecimalString]>>>;
1651
+ }, z.core.$strip>, z.ZodTransform<{
1652
+ bids: {
1653
+ price: DecimalString;
1654
+ quantity: DecimalString;
1655
+ }[];
1656
+ asks: {
1657
+ price: DecimalString;
1658
+ quantity: DecimalString;
1659
+ }[];
1660
+ }, {
1661
+ b: {
1662
+ price: DecimalString;
1663
+ quantity: DecimalString;
1664
+ }[];
1665
+ a: {
1666
+ price: DecimalString;
1667
+ quantity: DecimalString;
1668
+ }[];
1669
+ }>>;
1670
+ }, z.core.$strip>, z.ZodTransform<{
1671
+ topic: "perps.book";
1672
+ type: "book";
1673
+ channel: string;
1674
+ timestamp: EpochMilliseconds;
1675
+ sequence: number;
1676
+ payload: {
1677
+ bids: {
1678
+ price: DecimalString;
1679
+ quantity: DecimalString;
1680
+ }[];
1681
+ asks: {
1682
+ price: DecimalString;
1683
+ quantity: DecimalString;
1684
+ }[];
1685
+ instrumentId: PerpsInstrumentId;
1686
+ };
1687
+ }, {
1688
+ ts: EpochMilliseconds;
1689
+ sq: number;
1690
+ ch: string;
1691
+ data: {
1692
+ bids: {
1693
+ price: DecimalString;
1694
+ quantity: DecimalString;
1695
+ }[];
1696
+ asks: {
1697
+ price: DecimalString;
1698
+ quantity: DecimalString;
1699
+ }[];
1700
+ };
1701
+ }>>;
1702
+ type PerpsBookEvent = z.infer<typeof PerpsBookEventSchema>;
1703
+ declare const PerpsTickerEventSchema: z.ZodPipe<z.ZodObject<{
1704
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1705
+ sq: z.ZodNumber;
1706
+ ch: z.ZodString;
1707
+ data: z.ZodPipe<z.ZodObject<{
1708
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
1709
+ idx: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1710
+ mark: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1711
+ last: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1712
+ mid: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1713
+ oi: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1714
+ fr: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1715
+ nxf: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1716
+ }, z.core.$strip>, z.ZodTransform<{
1717
+ instrumentId: PerpsInstrumentId;
1718
+ indexPrice: DecimalString;
1719
+ markPrice: DecimalString;
1720
+ lastPrice: DecimalString;
1721
+ midPrice: DecimalString;
1722
+ openInterest: DecimalString;
1723
+ fundingRate: DecimalString;
1724
+ nextFunding: EpochMilliseconds;
1725
+ }, {
1726
+ iid: PerpsInstrumentId;
1727
+ idx: DecimalString;
1728
+ mark: DecimalString;
1729
+ last: DecimalString;
1730
+ mid: DecimalString;
1731
+ oi: DecimalString;
1732
+ fr: DecimalString;
1733
+ nxf: EpochMilliseconds;
1734
+ }>>;
1735
+ }, z.core.$strip>, z.ZodTransform<{
1736
+ topic: "perps.tickers";
1737
+ type: "ticker";
1738
+ channel: string;
1739
+ timestamp: EpochMilliseconds;
1740
+ sequence: number;
1741
+ payload: {
1742
+ instrumentId: PerpsInstrumentId;
1743
+ indexPrice: DecimalString;
1744
+ markPrice: DecimalString;
1745
+ lastPrice: DecimalString;
1746
+ midPrice: DecimalString;
1747
+ openInterest: DecimalString;
1748
+ fundingRate: DecimalString;
1749
+ nextFunding: EpochMilliseconds;
1750
+ };
1751
+ }, {
1752
+ ts: EpochMilliseconds;
1753
+ sq: number;
1754
+ ch: string;
1755
+ data: {
1756
+ instrumentId: PerpsInstrumentId;
1757
+ indexPrice: DecimalString;
1758
+ markPrice: DecimalString;
1759
+ lastPrice: DecimalString;
1760
+ midPrice: DecimalString;
1761
+ openInterest: DecimalString;
1762
+ fundingRate: DecimalString;
1763
+ nextFunding: EpochMilliseconds;
1764
+ };
1765
+ }>>;
1766
+ type PerpsTickerEvent = z.infer<typeof PerpsTickerEventSchema>;
1767
+ declare const PerpsStatisticEventSchema: z.ZodPipe<z.ZodObject<{
1768
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1769
+ sq: z.ZodNumber;
1770
+ ch: z.ZodString;
1771
+ data: z.ZodPipe<z.ZodObject<{
1772
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
1773
+ vol: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1774
+ open: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1775
+ klines: 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<{
1776
+ timestamp: EpochMilliseconds;
1777
+ open: DecimalString;
1778
+ high: DecimalString;
1779
+ low: DecimalString;
1780
+ close: DecimalString;
1781
+ volume: DecimalString;
1782
+ trades: number;
1783
+ }, [EpochMilliseconds, DecimalString, DecimalString, DecimalString, DecimalString, DecimalString, number]>>>;
1784
+ }, z.core.$strip>, z.ZodTransform<{
1785
+ instrumentId: PerpsInstrumentId;
1786
+ volume: DecimalString;
1787
+ openPrice: DecimalString;
1788
+ klines: {
1789
+ timestamp: EpochMilliseconds;
1790
+ open: DecimalString;
1791
+ high: DecimalString;
1792
+ low: DecimalString;
1793
+ close: DecimalString;
1794
+ volume: DecimalString;
1795
+ trades: number;
1796
+ }[];
1797
+ }, {
1798
+ iid: PerpsInstrumentId;
1799
+ vol: DecimalString;
1800
+ open: DecimalString;
1801
+ klines: {
1802
+ timestamp: EpochMilliseconds;
1803
+ open: DecimalString;
1804
+ high: DecimalString;
1805
+ low: DecimalString;
1806
+ close: DecimalString;
1807
+ volume: DecimalString;
1808
+ trades: number;
1809
+ }[];
1810
+ }>>;
1811
+ }, z.core.$strip>, z.ZodTransform<{
1812
+ topic: "perps.statistics";
1813
+ type: "statistic";
1814
+ channel: string;
1815
+ timestamp: EpochMilliseconds;
1816
+ sequence: number;
1817
+ payload: {
1818
+ instrumentId: PerpsInstrumentId;
1819
+ volume: DecimalString;
1820
+ openPrice: DecimalString;
1821
+ klines: {
1822
+ timestamp: EpochMilliseconds;
1823
+ open: DecimalString;
1824
+ high: DecimalString;
1825
+ low: DecimalString;
1826
+ close: DecimalString;
1827
+ volume: DecimalString;
1828
+ trades: number;
1829
+ }[];
1830
+ };
1831
+ }, {
1832
+ ts: EpochMilliseconds;
1833
+ sq: number;
1834
+ ch: string;
1835
+ data: {
1836
+ instrumentId: PerpsInstrumentId;
1837
+ volume: DecimalString;
1838
+ openPrice: DecimalString;
1839
+ klines: {
1840
+ timestamp: EpochMilliseconds;
1841
+ open: DecimalString;
1842
+ high: DecimalString;
1843
+ low: DecimalString;
1844
+ close: DecimalString;
1845
+ volume: DecimalString;
1846
+ trades: number;
1847
+ }[];
1848
+ };
1849
+ }>>;
1850
+ type PerpsStatisticEvent = z.infer<typeof PerpsStatisticEventSchema>;
1851
+ declare const PerpsCandleEventSchema: z.ZodPipe<z.ZodObject<{
1852
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1853
+ sq: z.ZodNumber;
1854
+ ch: z.ZodString;
1855
+ 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<{
1856
+ timestamp: EpochMilliseconds;
1857
+ open: DecimalString;
1858
+ high: DecimalString;
1859
+ low: DecimalString;
1860
+ close: DecimalString;
1861
+ volume: DecimalString;
1862
+ trades: number;
1863
+ }, [EpochMilliseconds, DecimalString, DecimalString, DecimalString, DecimalString, DecimalString, number]>>>;
1864
+ }, z.core.$strip>, z.ZodTransform<{
1865
+ topic: "perps.candles";
1866
+ type: "candle";
1867
+ channel: string;
1868
+ timestamp: EpochMilliseconds;
1869
+ sequence: number;
1870
+ payload: {
1871
+ instrumentId: PerpsInstrumentId;
1872
+ interval: PerpsKlineInterval.OneMinute | PerpsKlineInterval.FiveMinutes | PerpsKlineInterval.FifteenMinutes | PerpsKlineInterval.OneHour | PerpsKlineInterval.FourHours | PerpsKlineInterval.OneDay | PerpsKlineInterval.OneWeek;
1873
+ candles: {
1874
+ timestamp: EpochMilliseconds;
1875
+ open: DecimalString;
1876
+ high: DecimalString;
1877
+ low: DecimalString;
1878
+ close: DecimalString;
1879
+ volume: DecimalString;
1880
+ trades: number;
1881
+ }[];
1882
+ };
1883
+ }, {
1884
+ ts: EpochMilliseconds;
1885
+ sq: number;
1886
+ ch: string;
1887
+ data: {
1888
+ timestamp: EpochMilliseconds;
1889
+ open: DecimalString;
1890
+ high: DecimalString;
1891
+ low: DecimalString;
1892
+ close: DecimalString;
1893
+ volume: DecimalString;
1894
+ trades: number;
1895
+ }[];
1896
+ }>>;
1897
+ type PerpsCandleEvent = z.infer<typeof PerpsCandleEventSchema>;
1898
+ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
1899
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1900
+ sq: z.ZodNumber;
1901
+ ch: z.ZodString;
1902
+ data: z.ZodPipe<z.ZodObject<{
1903
+ tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
1904
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
1905
+ side: z.ZodEnum<typeof PerpsSide>;
1906
+ p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1907
+ qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1908
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1909
+ hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
1910
+ }, z.core.$strip>, z.ZodTransform<{
1911
+ tradeId: PerpsTradeId;
1912
+ instrumentId: PerpsInstrumentId;
1913
+ side: PerpsSide;
1914
+ price: DecimalString;
1915
+ quantity: DecimalString;
1916
+ timestamp: EpochMilliseconds;
1917
+ hash: _polymarket_types.TxHash | undefined;
1918
+ }, {
1919
+ tid: PerpsTradeId;
1920
+ iid: PerpsInstrumentId;
1921
+ side: PerpsSide;
1922
+ p: DecimalString;
1923
+ qty: DecimalString;
1924
+ ts: EpochMilliseconds;
1925
+ hash?: _polymarket_types.TxHash | undefined;
1926
+ }>>;
1927
+ }, z.core.$strip>, z.ZodTransform<{
1928
+ topic: "perps.trades";
1929
+ type: "trade";
1930
+ channel: string;
1931
+ timestamp: EpochMilliseconds;
1932
+ sequence: number;
1933
+ payload: {
1934
+ tradeId: PerpsTradeId;
1935
+ instrumentId: PerpsInstrumentId;
1936
+ side: PerpsSide;
1937
+ price: DecimalString;
1938
+ quantity: DecimalString;
1939
+ timestamp: EpochMilliseconds;
1940
+ hash: _polymarket_types.TxHash | undefined;
1941
+ };
1942
+ }, {
1943
+ ts: EpochMilliseconds;
1944
+ sq: number;
1945
+ ch: string;
1946
+ data: {
1947
+ tradeId: PerpsTradeId;
1948
+ instrumentId: PerpsInstrumentId;
1949
+ side: PerpsSide;
1950
+ price: DecimalString;
1951
+ quantity: DecimalString;
1952
+ timestamp: EpochMilliseconds;
1953
+ hash: _polymarket_types.TxHash | undefined;
1954
+ };
1955
+ }>>, z.ZodPipe<z.ZodObject<{
1956
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1957
+ sq: z.ZodNumber;
1958
+ ch: z.ZodString;
1959
+ data: z.ZodPipe<z.ZodObject<{
1960
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
1961
+ bp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1962
+ bq: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1963
+ ap: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1964
+ aq: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1965
+ }, z.core.$strip>, z.ZodTransform<{
1966
+ instrumentId: PerpsInstrumentId;
1967
+ bidPrice: DecimalString;
1968
+ bidQuantity: DecimalString;
1969
+ askPrice: DecimalString;
1970
+ askQuantity: DecimalString;
1971
+ }, {
1972
+ iid: PerpsInstrumentId;
1973
+ bp: DecimalString;
1974
+ bq: DecimalString;
1975
+ ap: DecimalString;
1976
+ aq: DecimalString;
1977
+ }>>;
1978
+ }, z.core.$strip>, z.ZodTransform<{
1979
+ topic: "perps.bbo";
1980
+ type: "bbo";
1981
+ channel: string;
1982
+ timestamp: EpochMilliseconds;
1983
+ sequence: number;
1984
+ payload: {
1985
+ instrumentId: PerpsInstrumentId;
1986
+ bidPrice: DecimalString;
1987
+ bidQuantity: DecimalString;
1988
+ askPrice: DecimalString;
1989
+ askQuantity: DecimalString;
1990
+ };
1991
+ }, {
1992
+ ts: EpochMilliseconds;
1993
+ sq: number;
1994
+ ch: string;
1995
+ data: {
1996
+ instrumentId: PerpsInstrumentId;
1997
+ bidPrice: DecimalString;
1998
+ bidQuantity: DecimalString;
1999
+ askPrice: DecimalString;
2000
+ askQuantity: DecimalString;
2001
+ };
2002
+ }>>, z.ZodPipe<z.ZodObject<{
2003
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2004
+ sq: z.ZodNumber;
2005
+ ch: z.ZodString;
2006
+ data: z.ZodPipe<z.ZodObject<{
2007
+ b: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
2008
+ price: DecimalString;
2009
+ quantity: DecimalString;
2010
+ }, [DecimalString, DecimalString]>>>;
2011
+ a: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
2012
+ price: DecimalString;
2013
+ quantity: DecimalString;
2014
+ }, [DecimalString, DecimalString]>>>;
2015
+ }, z.core.$strip>, z.ZodTransform<{
2016
+ bids: {
2017
+ price: DecimalString;
2018
+ quantity: DecimalString;
2019
+ }[];
2020
+ asks: {
2021
+ price: DecimalString;
2022
+ quantity: DecimalString;
2023
+ }[];
2024
+ }, {
2025
+ b: {
2026
+ price: DecimalString;
2027
+ quantity: DecimalString;
2028
+ }[];
2029
+ a: {
2030
+ price: DecimalString;
2031
+ quantity: DecimalString;
2032
+ }[];
2033
+ }>>;
2034
+ }, z.core.$strip>, z.ZodTransform<{
2035
+ topic: "perps.book";
2036
+ type: "book";
2037
+ channel: string;
2038
+ timestamp: EpochMilliseconds;
2039
+ sequence: number;
2040
+ payload: {
2041
+ bids: {
2042
+ price: DecimalString;
2043
+ quantity: DecimalString;
2044
+ }[];
2045
+ asks: {
2046
+ price: DecimalString;
2047
+ quantity: DecimalString;
2048
+ }[];
2049
+ instrumentId: PerpsInstrumentId;
2050
+ };
2051
+ }, {
2052
+ ts: EpochMilliseconds;
2053
+ sq: number;
2054
+ ch: string;
2055
+ data: {
2056
+ bids: {
2057
+ price: DecimalString;
2058
+ quantity: DecimalString;
2059
+ }[];
2060
+ asks: {
2061
+ price: DecimalString;
2062
+ quantity: DecimalString;
2063
+ }[];
2064
+ };
2065
+ }>>, z.ZodPipe<z.ZodObject<{
2066
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2067
+ sq: z.ZodNumber;
2068
+ ch: z.ZodString;
2069
+ data: z.ZodPipe<z.ZodObject<{
2070
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
2071
+ idx: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2072
+ mark: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2073
+ last: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2074
+ mid: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2075
+ oi: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2076
+ fr: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2077
+ nxf: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2078
+ }, z.core.$strip>, z.ZodTransform<{
2079
+ instrumentId: PerpsInstrumentId;
2080
+ indexPrice: DecimalString;
2081
+ markPrice: DecimalString;
2082
+ lastPrice: DecimalString;
2083
+ midPrice: DecimalString;
2084
+ openInterest: DecimalString;
2085
+ fundingRate: DecimalString;
2086
+ nextFunding: EpochMilliseconds;
2087
+ }, {
2088
+ iid: PerpsInstrumentId;
2089
+ idx: DecimalString;
2090
+ mark: DecimalString;
2091
+ last: DecimalString;
2092
+ mid: DecimalString;
2093
+ oi: DecimalString;
2094
+ fr: DecimalString;
2095
+ nxf: EpochMilliseconds;
2096
+ }>>;
2097
+ }, z.core.$strip>, z.ZodTransform<{
2098
+ topic: "perps.tickers";
2099
+ type: "ticker";
2100
+ channel: string;
2101
+ timestamp: EpochMilliseconds;
2102
+ sequence: number;
2103
+ payload: {
2104
+ instrumentId: PerpsInstrumentId;
2105
+ indexPrice: DecimalString;
2106
+ markPrice: DecimalString;
2107
+ lastPrice: DecimalString;
2108
+ midPrice: DecimalString;
2109
+ openInterest: DecimalString;
2110
+ fundingRate: DecimalString;
2111
+ nextFunding: EpochMilliseconds;
2112
+ };
2113
+ }, {
2114
+ ts: EpochMilliseconds;
2115
+ sq: number;
2116
+ ch: string;
2117
+ data: {
2118
+ instrumentId: PerpsInstrumentId;
2119
+ indexPrice: DecimalString;
2120
+ markPrice: DecimalString;
2121
+ lastPrice: DecimalString;
2122
+ midPrice: DecimalString;
2123
+ openInterest: DecimalString;
2124
+ fundingRate: DecimalString;
2125
+ nextFunding: EpochMilliseconds;
2126
+ };
2127
+ }>>, z.ZodPipe<z.ZodObject<{
2128
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2129
+ sq: z.ZodNumber;
2130
+ ch: z.ZodString;
2131
+ data: z.ZodPipe<z.ZodObject<{
2132
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
2133
+ vol: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2134
+ open: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2135
+ klines: 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<{
2136
+ timestamp: EpochMilliseconds;
2137
+ open: DecimalString;
2138
+ high: DecimalString;
2139
+ low: DecimalString;
2140
+ close: DecimalString;
2141
+ volume: DecimalString;
2142
+ trades: number;
2143
+ }, [EpochMilliseconds, DecimalString, DecimalString, DecimalString, DecimalString, DecimalString, number]>>>;
2144
+ }, z.core.$strip>, z.ZodTransform<{
2145
+ instrumentId: PerpsInstrumentId;
2146
+ volume: DecimalString;
2147
+ openPrice: DecimalString;
2148
+ klines: {
2149
+ timestamp: EpochMilliseconds;
2150
+ open: DecimalString;
2151
+ high: DecimalString;
2152
+ low: DecimalString;
2153
+ close: DecimalString;
2154
+ volume: DecimalString;
2155
+ trades: number;
2156
+ }[];
2157
+ }, {
2158
+ iid: PerpsInstrumentId;
2159
+ vol: DecimalString;
2160
+ open: DecimalString;
2161
+ klines: {
2162
+ timestamp: EpochMilliseconds;
2163
+ open: DecimalString;
2164
+ high: DecimalString;
2165
+ low: DecimalString;
2166
+ close: DecimalString;
2167
+ volume: DecimalString;
2168
+ trades: number;
2169
+ }[];
2170
+ }>>;
2171
+ }, z.core.$strip>, z.ZodTransform<{
2172
+ topic: "perps.statistics";
2173
+ type: "statistic";
2174
+ channel: string;
2175
+ timestamp: EpochMilliseconds;
2176
+ sequence: number;
2177
+ payload: {
2178
+ instrumentId: PerpsInstrumentId;
2179
+ volume: DecimalString;
2180
+ openPrice: DecimalString;
2181
+ klines: {
2182
+ timestamp: EpochMilliseconds;
2183
+ open: DecimalString;
2184
+ high: DecimalString;
2185
+ low: DecimalString;
2186
+ close: DecimalString;
2187
+ volume: DecimalString;
2188
+ trades: number;
2189
+ }[];
2190
+ };
2191
+ }, {
2192
+ ts: EpochMilliseconds;
2193
+ sq: number;
2194
+ ch: string;
2195
+ data: {
2196
+ instrumentId: PerpsInstrumentId;
2197
+ volume: DecimalString;
2198
+ openPrice: DecimalString;
2199
+ klines: {
2200
+ timestamp: EpochMilliseconds;
2201
+ open: DecimalString;
2202
+ high: DecimalString;
2203
+ low: DecimalString;
2204
+ close: DecimalString;
2205
+ volume: DecimalString;
2206
+ trades: number;
2207
+ }[];
2208
+ };
2209
+ }>>, z.ZodPipe<z.ZodObject<{
2210
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2211
+ sq: z.ZodNumber;
2212
+ ch: z.ZodString;
2213
+ 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<{
2214
+ timestamp: EpochMilliseconds;
2215
+ open: DecimalString;
2216
+ high: DecimalString;
2217
+ low: DecimalString;
2218
+ close: DecimalString;
2219
+ volume: DecimalString;
2220
+ trades: number;
2221
+ }, [EpochMilliseconds, DecimalString, DecimalString, DecimalString, DecimalString, DecimalString, number]>>>;
2222
+ }, z.core.$strip>, z.ZodTransform<{
2223
+ topic: "perps.candles";
2224
+ type: "candle";
2225
+ channel: string;
2226
+ timestamp: EpochMilliseconds;
2227
+ sequence: number;
2228
+ payload: {
2229
+ instrumentId: PerpsInstrumentId;
2230
+ interval: PerpsKlineInterval.OneMinute | PerpsKlineInterval.FiveMinutes | PerpsKlineInterval.FifteenMinutes | PerpsKlineInterval.OneHour | PerpsKlineInterval.FourHours | PerpsKlineInterval.OneDay | PerpsKlineInterval.OneWeek;
2231
+ candles: {
2232
+ timestamp: EpochMilliseconds;
2233
+ open: DecimalString;
2234
+ high: DecimalString;
2235
+ low: DecimalString;
2236
+ close: DecimalString;
2237
+ volume: DecimalString;
2238
+ trades: number;
2239
+ }[];
2240
+ };
2241
+ }, {
2242
+ ts: EpochMilliseconds;
2243
+ sq: number;
2244
+ ch: string;
2245
+ data: {
2246
+ timestamp: EpochMilliseconds;
2247
+ open: DecimalString;
2248
+ high: DecimalString;
2249
+ low: DecimalString;
2250
+ close: DecimalString;
2251
+ volume: DecimalString;
2252
+ trades: number;
2253
+ }[];
2254
+ }>>]>;
2255
+ type PerpsMarketDataEvent = z.infer<typeof PerpsMarketDataEventSchema>;
2256
+ declare const PerpsBalanceUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2257
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2258
+ sq: z.ZodNumber;
2259
+ ch: z.ZodLiteral<"balances">;
2260
+ data: z.ZodObject<{
2261
+ asset: z.ZodString;
2262
+ balance: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2263
+ value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2264
+ }, z.core.$strip>;
2265
+ }, z.core.$strip>, z.ZodTransform<{
2266
+ type: "balance";
2267
+ channel: "balances";
2268
+ timestamp: number;
2269
+ sequence: number;
2270
+ payload: {
2271
+ asset: string;
2272
+ balance: DecimalString;
2273
+ value: DecimalString;
2274
+ };
2275
+ }, {
2276
+ ts: EpochMilliseconds;
2277
+ sq: number;
2278
+ ch: "balances";
2279
+ data: {
2280
+ asset: string;
2281
+ balance: DecimalString;
2282
+ value: DecimalString;
2283
+ };
2284
+ }>>;
2285
+ type PerpsBalanceUpdateEvent = z.infer<typeof PerpsBalanceUpdateEventSchema>;
2286
+ declare const PerpsPortfolioUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2287
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2288
+ sq: z.ZodNumber;
2289
+ ch: z.ZodLiteral<"portfolio">;
2290
+ data: z.ZodPipe<z.ZodObject<{
2291
+ positions: z.ZodArray<z.ZodPipe<z.ZodObject<{
2292
+ instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
2293
+ symbol: z.ZodString;
2294
+ size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2295
+ entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2296
+ leverage: z.ZodNumber;
2297
+ cross: z.ZodBoolean;
2298
+ initial_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2299
+ maintenance_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2300
+ position_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2301
+ liquidation_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2302
+ unrealized_pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2303
+ return_on_equity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2304
+ cumulative_funding: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2305
+ }, z.core.$strip>, z.ZodTransform<{
2306
+ instrumentId: PerpsInstrumentId;
2307
+ symbol: string;
2308
+ size: DecimalString;
2309
+ entryPrice: DecimalString;
2310
+ leverage: number;
2311
+ cross: boolean;
2312
+ initialMargin: DecimalString;
2313
+ maintenanceMargin: DecimalString;
2314
+ positionValue: DecimalString;
2315
+ liquidationPrice: DecimalString;
2316
+ unrealizedPnl: DecimalString;
2317
+ returnOnEquity: DecimalString;
2318
+ cumulativeFunding: DecimalString;
2319
+ }, {
2320
+ instrument_id: PerpsInstrumentId;
2321
+ symbol: string;
2322
+ size: DecimalString;
2323
+ entry_price: DecimalString;
2324
+ leverage: number;
2325
+ cross: boolean;
2326
+ initial_margin: DecimalString;
2327
+ maintenance_margin: DecimalString;
2328
+ position_value: DecimalString;
2329
+ liquidation_price: DecimalString;
2330
+ unrealized_pnl: DecimalString;
2331
+ return_on_equity: DecimalString;
2332
+ cumulative_funding: DecimalString;
2333
+ }>>>;
2334
+ margin: z.ZodPipe<z.ZodObject<{
2335
+ total_account_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2336
+ total_initial_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2337
+ total_maintenance_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2338
+ total_position_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2339
+ }, z.core.$strip>, z.ZodTransform<{
2340
+ totalAccountValue: DecimalString;
2341
+ totalInitialMargin: DecimalString;
2342
+ totalMaintenanceMargin: DecimalString;
2343
+ totalPositionValue: DecimalString;
2344
+ }, {
2345
+ total_account_value: DecimalString;
2346
+ total_initial_margin: DecimalString;
2347
+ total_maintenance_margin: DecimalString;
2348
+ total_position_value: DecimalString;
2349
+ }>>;
2350
+ withdrawable: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2351
+ in_liquidation: z.ZodBoolean;
2352
+ timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2353
+ }, z.core.$strip>, z.ZodTransform<{
2354
+ positions: {
2355
+ instrumentId: PerpsInstrumentId;
2356
+ symbol: string;
2357
+ size: DecimalString;
2358
+ entryPrice: DecimalString;
2359
+ leverage: number;
2360
+ cross: boolean;
2361
+ initialMargin: DecimalString;
2362
+ maintenanceMargin: DecimalString;
2363
+ positionValue: DecimalString;
2364
+ liquidationPrice: DecimalString;
2365
+ unrealizedPnl: DecimalString;
2366
+ returnOnEquity: DecimalString;
2367
+ cumulativeFunding: DecimalString;
2368
+ }[];
2369
+ margin: {
2370
+ totalAccountValue: DecimalString;
2371
+ totalInitialMargin: DecimalString;
2372
+ totalMaintenanceMargin: DecimalString;
2373
+ totalPositionValue: DecimalString;
2374
+ };
2375
+ withdrawable: DecimalString;
2376
+ inLiquidation: boolean;
2377
+ timestamp: EpochMilliseconds;
2378
+ }, {
2379
+ positions: {
2380
+ instrumentId: PerpsInstrumentId;
2381
+ symbol: string;
2382
+ size: DecimalString;
2383
+ entryPrice: DecimalString;
2384
+ leverage: number;
2385
+ cross: boolean;
2386
+ initialMargin: DecimalString;
2387
+ maintenanceMargin: DecimalString;
2388
+ positionValue: DecimalString;
2389
+ liquidationPrice: DecimalString;
2390
+ unrealizedPnl: DecimalString;
2391
+ returnOnEquity: DecimalString;
2392
+ cumulativeFunding: DecimalString;
2393
+ }[];
2394
+ margin: {
2395
+ totalAccountValue: DecimalString;
2396
+ totalInitialMargin: DecimalString;
2397
+ totalMaintenanceMargin: DecimalString;
2398
+ totalPositionValue: DecimalString;
2399
+ };
2400
+ withdrawable: DecimalString;
2401
+ in_liquidation: boolean;
2402
+ timestamp: EpochMilliseconds;
2403
+ }>>;
2404
+ }, z.core.$strip>, z.ZodTransform<{
2405
+ type: "portfolio";
2406
+ channel: "portfolio";
2407
+ timestamp: number;
2408
+ sequence: number;
2409
+ payload: {
2410
+ positions: {
2411
+ instrumentId: PerpsInstrumentId;
2412
+ symbol: string;
2413
+ size: DecimalString;
2414
+ entryPrice: DecimalString;
2415
+ leverage: number;
2416
+ cross: boolean;
2417
+ initialMargin: DecimalString;
2418
+ maintenanceMargin: DecimalString;
2419
+ positionValue: DecimalString;
2420
+ liquidationPrice: DecimalString;
2421
+ unrealizedPnl: DecimalString;
2422
+ returnOnEquity: DecimalString;
2423
+ cumulativeFunding: DecimalString;
2424
+ }[];
2425
+ margin: {
2426
+ totalAccountValue: DecimalString;
2427
+ totalInitialMargin: DecimalString;
2428
+ totalMaintenanceMargin: DecimalString;
2429
+ totalPositionValue: DecimalString;
2430
+ };
2431
+ withdrawable: DecimalString;
2432
+ inLiquidation: boolean;
2433
+ timestamp: EpochMilliseconds;
2434
+ };
2435
+ }, {
2436
+ ts: EpochMilliseconds;
2437
+ sq: number;
2438
+ ch: "portfolio";
2439
+ data: {
2440
+ positions: {
2441
+ instrumentId: PerpsInstrumentId;
2442
+ symbol: string;
2443
+ size: DecimalString;
2444
+ entryPrice: DecimalString;
2445
+ leverage: number;
2446
+ cross: boolean;
2447
+ initialMargin: DecimalString;
2448
+ maintenanceMargin: DecimalString;
2449
+ positionValue: DecimalString;
2450
+ liquidationPrice: DecimalString;
2451
+ unrealizedPnl: DecimalString;
2452
+ returnOnEquity: DecimalString;
2453
+ cumulativeFunding: DecimalString;
2454
+ }[];
2455
+ margin: {
2456
+ totalAccountValue: DecimalString;
2457
+ totalInitialMargin: DecimalString;
2458
+ totalMaintenanceMargin: DecimalString;
2459
+ totalPositionValue: DecimalString;
2460
+ };
2461
+ withdrawable: DecimalString;
2462
+ inLiquidation: boolean;
2463
+ timestamp: EpochMilliseconds;
2464
+ };
2465
+ }>>;
2466
+ type PerpsPortfolioUpdateEvent = z.infer<typeof PerpsPortfolioUpdateEventSchema>;
2467
+ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2468
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2469
+ sq: z.ZodNumber;
2470
+ ch: z.ZodLiteral<"orders">;
2471
+ data: z.ZodPipe<z.ZodObject<{
2472
+ oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
2473
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
2474
+ buy: z.ZodBoolean;
2475
+ p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2476
+ qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2477
+ tif: z.ZodEnum<typeof PerpsTimeInForce>;
2478
+ po: z.ZodBoolean;
2479
+ ro: z.ZodBoolean;
2480
+ status: z.ZodEnum<typeof PerpsOrderStatus>;
2481
+ rest: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2482
+ fill: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2483
+ cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2484
+ uts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2485
+ coid: z.ZodOptional<z.ZodString>;
2486
+ tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
2487
+ kind: z.ZodEnum<typeof PerpsTpSlKind>;
2488
+ scope: z.ZodEnum<typeof PerpsTpSlScope>;
2489
+ trp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2490
+ parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
2491
+ armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2492
+ slip_bps: z.ZodOptional<z.ZodNumber>;
2493
+ }, z.core.$strip>, z.ZodTransform<{
2494
+ kind: PerpsTpSlKind;
2495
+ scope: PerpsTpSlScope;
2496
+ triggerPrice: DecimalString;
2497
+ parentOrderId: PerpsOrderId | undefined;
2498
+ armedQuantity: DecimalString | undefined;
2499
+ slippageBps: number | undefined;
2500
+ }, {
2501
+ kind: PerpsTpSlKind;
2502
+ scope: PerpsTpSlScope;
2503
+ trp: DecimalString;
2504
+ parent_oid?: PerpsOrderId | undefined;
2505
+ armed_qty?: DecimalString | undefined;
2506
+ slip_bps?: number | undefined;
2507
+ }>>>>;
2508
+ }, z.core.$strip>, z.ZodTransform<{
2509
+ id: PerpsOrderId;
2510
+ instrumentId: PerpsInstrumentId;
2511
+ side: OrderSide;
2512
+ price: DecimalString;
2513
+ quantity: DecimalString;
2514
+ timeInForce: PerpsTimeInForce;
2515
+ postOnly: boolean;
2516
+ reduceOnly: boolean;
2517
+ status: PerpsOrderStatus;
2518
+ restingQuantity: DecimalString;
2519
+ filledQuantity: DecimalString;
2520
+ createdTimestamp: EpochMilliseconds;
2521
+ updatedTimestamp: EpochMilliseconds;
2522
+ clientOrderId: string | undefined;
2523
+ tpSl: {
2524
+ kind: PerpsTpSlKind;
2525
+ scope: PerpsTpSlScope;
2526
+ triggerPrice: DecimalString;
2527
+ parentOrderId: PerpsOrderId | undefined;
2528
+ armedQuantity: DecimalString | undefined;
2529
+ slippageBps: number | undefined;
2530
+ } | undefined;
2531
+ }, {
2532
+ oid: PerpsOrderId;
2533
+ iid: PerpsInstrumentId;
2534
+ buy: boolean;
2535
+ p: DecimalString;
2536
+ qty: DecimalString;
2537
+ tif: PerpsTimeInForce;
2538
+ po: boolean;
2539
+ ro: boolean;
2540
+ status: PerpsOrderStatus;
2541
+ rest: DecimalString;
2542
+ fill: DecimalString;
2543
+ cts: EpochMilliseconds;
2544
+ uts: EpochMilliseconds;
2545
+ coid?: string | undefined;
2546
+ tpsl?: {
2547
+ kind: PerpsTpSlKind;
2548
+ scope: PerpsTpSlScope;
2549
+ triggerPrice: DecimalString;
2550
+ parentOrderId: PerpsOrderId | undefined;
2551
+ armedQuantity: DecimalString | undefined;
2552
+ slippageBps: number | undefined;
2553
+ } | null | undefined;
2554
+ }>>;
2555
+ }, z.core.$strip>, z.ZodTransform<{
2556
+ type: "order";
2557
+ channel: "orders";
2558
+ timestamp: number;
2559
+ sequence: number;
2560
+ payload: {
2561
+ id: PerpsOrderId;
2562
+ instrumentId: PerpsInstrumentId;
2563
+ side: OrderSide;
2564
+ price: DecimalString;
2565
+ quantity: DecimalString;
2566
+ timeInForce: PerpsTimeInForce;
2567
+ postOnly: boolean;
2568
+ reduceOnly: boolean;
2569
+ status: PerpsOrderStatus;
2570
+ restingQuantity: DecimalString;
2571
+ filledQuantity: DecimalString;
2572
+ createdTimestamp: EpochMilliseconds;
2573
+ updatedTimestamp: EpochMilliseconds;
2574
+ clientOrderId: string | undefined;
2575
+ tpSl: {
2576
+ kind: PerpsTpSlKind;
2577
+ scope: PerpsTpSlScope;
2578
+ triggerPrice: DecimalString;
2579
+ parentOrderId: PerpsOrderId | undefined;
2580
+ armedQuantity: DecimalString | undefined;
2581
+ slippageBps: number | undefined;
2582
+ } | undefined;
2583
+ };
2584
+ }, {
2585
+ ts: EpochMilliseconds;
2586
+ sq: number;
2587
+ ch: "orders";
2588
+ data: {
2589
+ id: PerpsOrderId;
2590
+ instrumentId: PerpsInstrumentId;
2591
+ side: OrderSide;
2592
+ price: DecimalString;
2593
+ quantity: DecimalString;
2594
+ timeInForce: PerpsTimeInForce;
2595
+ postOnly: boolean;
2596
+ reduceOnly: boolean;
2597
+ status: PerpsOrderStatus;
2598
+ restingQuantity: DecimalString;
2599
+ filledQuantity: DecimalString;
2600
+ createdTimestamp: EpochMilliseconds;
2601
+ updatedTimestamp: EpochMilliseconds;
2602
+ clientOrderId: string | undefined;
2603
+ tpSl: {
2604
+ kind: PerpsTpSlKind;
2605
+ scope: PerpsTpSlScope;
2606
+ triggerPrice: DecimalString;
2607
+ parentOrderId: PerpsOrderId | undefined;
2608
+ armedQuantity: DecimalString | undefined;
2609
+ slippageBps: number | undefined;
2610
+ } | undefined;
2611
+ };
2612
+ }>>;
2613
+ type PerpsOrderUpdateEvent = z.infer<typeof PerpsOrderUpdateEventSchema>;
2614
+ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2615
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2616
+ sq: z.ZodNumber;
2617
+ ch: z.ZodLiteral<"fills">;
2618
+ data: z.ZodPipe<z.ZodObject<{
2619
+ tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
2620
+ oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
2621
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
2622
+ side: z.ZodEnum<typeof PerpsSide>;
2623
+ p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2624
+ qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2625
+ taker: z.ZodBoolean;
2626
+ fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2627
+ fea: z.ZodString;
2628
+ psz: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2629
+ pep: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2630
+ pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2631
+ liq: z.ZodBoolean;
2632
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2633
+ coid: z.ZodOptional<z.ZodString>;
2634
+ }, z.core.$strip>, z.ZodTransform<{
2635
+ tradeId: PerpsTradeId;
2636
+ orderId: PerpsOrderId;
2637
+ instrumentId: PerpsInstrumentId;
2638
+ side: PerpsSide;
2639
+ price: DecimalString;
2640
+ quantity: DecimalString;
2641
+ taker: boolean;
2642
+ fee: DecimalString;
2643
+ feeAsset: string;
2644
+ previousSize: DecimalString;
2645
+ previousEntryPrice: DecimalString;
2646
+ pnl: DecimalString;
2647
+ liquidation: boolean;
2648
+ timestamp: EpochMilliseconds;
2649
+ clientOrderId: string | undefined;
2650
+ }, {
2651
+ tid: PerpsTradeId;
2652
+ oid: PerpsOrderId;
2653
+ iid: PerpsInstrumentId;
2654
+ side: PerpsSide;
2655
+ p: DecimalString;
2656
+ qty: DecimalString;
2657
+ taker: boolean;
2658
+ fee: DecimalString;
2659
+ fea: string;
2660
+ psz: DecimalString;
2661
+ pep: DecimalString;
2662
+ pnl: DecimalString;
2663
+ liq: boolean;
2664
+ ts: EpochMilliseconds;
2665
+ coid?: string | undefined;
2666
+ }>>;
2667
+ }, z.core.$strip>, z.ZodTransform<{
2668
+ type: "fill";
2669
+ channel: "fills";
2670
+ timestamp: number;
2671
+ sequence: number;
2672
+ payload: {
2673
+ tradeId: PerpsTradeId;
2674
+ orderId: PerpsOrderId;
2675
+ instrumentId: PerpsInstrumentId;
2676
+ side: PerpsSide;
2677
+ price: DecimalString;
2678
+ quantity: DecimalString;
2679
+ taker: boolean;
2680
+ fee: DecimalString;
2681
+ feeAsset: string;
2682
+ previousSize: DecimalString;
2683
+ previousEntryPrice: DecimalString;
2684
+ pnl: DecimalString;
2685
+ liquidation: boolean;
2686
+ timestamp: EpochMilliseconds;
2687
+ clientOrderId: string | undefined;
2688
+ };
2689
+ }, {
2690
+ ts: EpochMilliseconds;
2691
+ sq: number;
2692
+ ch: "fills";
2693
+ data: {
2694
+ tradeId: PerpsTradeId;
2695
+ orderId: PerpsOrderId;
2696
+ instrumentId: PerpsInstrumentId;
2697
+ side: PerpsSide;
2698
+ price: DecimalString;
2699
+ quantity: DecimalString;
2700
+ taker: boolean;
2701
+ fee: DecimalString;
2702
+ feeAsset: string;
2703
+ previousSize: DecimalString;
2704
+ previousEntryPrice: DecimalString;
2705
+ pnl: DecimalString;
2706
+ liquidation: boolean;
2707
+ timestamp: EpochMilliseconds;
2708
+ clientOrderId: string | undefined;
2709
+ };
2710
+ }>>;
2711
+ type PerpsFillUpdateEvent = z.infer<typeof PerpsFillUpdateEventSchema>;
2712
+ declare const PerpsFundingUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2713
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2714
+ sq: z.ZodNumber;
2715
+ ch: z.ZodLiteral<"funding">;
2716
+ data: z.ZodPipe<z.ZodObject<{
2717
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
2718
+ sz: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2719
+ fr: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2720
+ fund: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2721
+ fua: z.ZodString;
2722
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2723
+ }, z.core.$strip>, z.ZodTransform<{
2724
+ instrumentId: PerpsInstrumentId;
2725
+ size: DecimalString;
2726
+ fundingRate: DecimalString;
2727
+ fundingAsset: string;
2728
+ funding: DecimalString;
2729
+ timestamp: EpochMilliseconds;
2730
+ }, {
2731
+ iid: PerpsInstrumentId;
2732
+ sz: DecimalString;
2733
+ fr: DecimalString;
2734
+ fund: DecimalString;
2735
+ fua: string;
2736
+ ts: EpochMilliseconds;
2737
+ }>>;
2738
+ }, z.core.$strip>, z.ZodTransform<{
2739
+ type: "funding";
2740
+ channel: "funding";
2741
+ timestamp: number;
2742
+ sequence: number;
2743
+ payload: {
2744
+ instrumentId: PerpsInstrumentId;
2745
+ size: DecimalString;
2746
+ fundingRate: DecimalString;
2747
+ fundingAsset: string;
2748
+ funding: DecimalString;
2749
+ timestamp: EpochMilliseconds;
2750
+ };
2751
+ }, {
2752
+ ts: EpochMilliseconds;
2753
+ sq: number;
2754
+ ch: "funding";
2755
+ data: {
2756
+ instrumentId: PerpsInstrumentId;
2757
+ size: DecimalString;
2758
+ fundingRate: DecimalString;
2759
+ fundingAsset: string;
2760
+ funding: DecimalString;
2761
+ timestamp: EpochMilliseconds;
2762
+ };
2763
+ }>>;
2764
+ type PerpsFundingUpdateEvent = z.infer<typeof PerpsFundingUpdateEventSchema>;
2765
+ declare const PerpsDepositUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2766
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2767
+ sq: z.ZodNumber;
2768
+ ch: z.ZodLiteral<"deposits">;
2769
+ data: z.ZodPipe<z.ZodObject<{
2770
+ hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
2771
+ asset: z.ZodString;
2772
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
2773
+ status: z.ZodEnum<typeof PerpsDepositStatus>;
2774
+ }, z.core.$strip>, z.ZodTransform<{
2775
+ hash: _polymarket_types.TxHash | undefined;
2776
+ asset: string;
2777
+ amount: BaseUnits;
2778
+ status: PerpsDepositStatus;
2779
+ }, {
2780
+ asset: string;
2781
+ amount: BaseUnits;
2782
+ status: PerpsDepositStatus;
2783
+ hash?: _polymarket_types.TxHash | undefined;
2784
+ }>>;
2785
+ }, z.core.$strip>, z.ZodTransform<{
2786
+ type: "deposit";
2787
+ channel: "deposits";
2788
+ timestamp: number;
2789
+ sequence: number;
2790
+ payload: {
2791
+ hash: _polymarket_types.TxHash | undefined;
2792
+ asset: string;
2793
+ amount: BaseUnits;
2794
+ status: PerpsDepositStatus;
2795
+ };
2796
+ }, {
2797
+ ts: EpochMilliseconds;
2798
+ sq: number;
2799
+ ch: "deposits";
2800
+ data: {
2801
+ hash: _polymarket_types.TxHash | undefined;
2802
+ asset: string;
2803
+ amount: BaseUnits;
2804
+ status: PerpsDepositStatus;
2805
+ };
2806
+ }>>;
2807
+ type PerpsDepositUpdateEvent = z.infer<typeof PerpsDepositUpdateEventSchema>;
2808
+ declare const PerpsWithdrawalUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2809
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2810
+ sq: z.ZodNumber;
2811
+ ch: z.ZodLiteral<"withdrawals">;
2812
+ data: z.ZodPipe<z.ZodObject<{
2813
+ withdraw_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsWithdrawalId, number>>;
2814
+ asset: z.ZodString;
2815
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
2816
+ fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2817
+ status: z.ZodEnum<typeof PerpsWithdrawalStatus>;
2818
+ to: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
2819
+ hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
2820
+ }, z.core.$strip>, z.ZodTransform<{
2821
+ withdrawalId: PerpsWithdrawalId;
2822
+ asset: string;
2823
+ amount: BaseUnits;
2824
+ fee: DecimalString;
2825
+ status: PerpsWithdrawalStatus;
2826
+ to: _polymarket_types.EvmAddress;
2827
+ hash: _polymarket_types.TxHash | undefined;
2828
+ }, {
2829
+ withdraw_id: PerpsWithdrawalId;
2830
+ asset: string;
2831
+ amount: BaseUnits;
2832
+ fee: DecimalString;
2833
+ status: PerpsWithdrawalStatus;
2834
+ to: _polymarket_types.EvmAddress;
2835
+ hash?: _polymarket_types.TxHash | undefined;
2836
+ }>>;
2837
+ }, z.core.$strip>, z.ZodTransform<{
2838
+ type: "withdrawal";
2839
+ channel: "withdrawals";
2840
+ timestamp: number;
2841
+ sequence: number;
2842
+ payload: {
2843
+ withdrawalId: PerpsWithdrawalId;
2844
+ asset: string;
2845
+ amount: BaseUnits;
2846
+ fee: DecimalString;
2847
+ status: PerpsWithdrawalStatus;
2848
+ to: _polymarket_types.EvmAddress;
2849
+ hash: _polymarket_types.TxHash | undefined;
2850
+ };
2851
+ }, {
2852
+ ts: EpochMilliseconds;
2853
+ sq: number;
2854
+ ch: "withdrawals";
2855
+ data: {
2856
+ withdrawalId: PerpsWithdrawalId;
2857
+ asset: string;
2858
+ amount: BaseUnits;
2859
+ fee: DecimalString;
2860
+ status: PerpsWithdrawalStatus;
2861
+ to: _polymarket_types.EvmAddress;
2862
+ hash: _polymarket_types.TxHash | undefined;
2863
+ };
2864
+ }>>;
2865
+ type PerpsWithdrawalUpdateEvent = z.infer<typeof PerpsWithdrawalUpdateEventSchema>;
2866
+ declare const PerpsTpSlUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2867
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2868
+ sq: z.ZodNumber;
2869
+ ch: z.ZodString;
2870
+ data: z.ZodPipe<z.ZodObject<{
2871
+ oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
2872
+ st: z.ZodEnum<{
2873
+ cancelled: "cancelled";
2874
+ untriggered: "untriggered";
2875
+ armed: "armed";
2876
+ expired: "expired";
2877
+ }>;
2878
+ reason: z.ZodOptional<z.ZodString>;
2879
+ }, z.core.$strip>, z.ZodTransform<{
2880
+ orderId: PerpsOrderId;
2881
+ status: "cancelled" | "untriggered" | "armed" | "expired";
2882
+ reason: string | undefined;
2883
+ }, {
2884
+ oid: PerpsOrderId;
2885
+ st: "cancelled" | "untriggered" | "armed" | "expired";
2886
+ reason?: string | undefined;
2887
+ }>>;
2888
+ }, z.core.$strip>, z.ZodTransform<{
2889
+ type: "tpsl";
2890
+ channel: string;
2891
+ timestamp: EpochMilliseconds;
2892
+ sequence: number;
2893
+ payload: {
2894
+ orderId: PerpsOrderId;
2895
+ status: "cancelled" | "untriggered" | "armed" | "expired";
2896
+ reason: string | undefined;
2897
+ };
2898
+ }, {
2899
+ ts: EpochMilliseconds;
2900
+ sq: number;
2901
+ ch: string;
2902
+ data: {
2903
+ orderId: PerpsOrderId;
2904
+ status: "cancelled" | "untriggered" | "armed" | "expired";
2905
+ reason: string | undefined;
2906
+ };
2907
+ }>>;
2908
+ type PerpsTpSlUpdateEvent = z.infer<typeof PerpsTpSlUpdateEventSchema>;
2909
+ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
2910
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2911
+ sq: z.ZodNumber;
2912
+ ch: z.ZodLiteral<"balances">;
2913
+ data: z.ZodObject<{
2914
+ asset: z.ZodString;
2915
+ balance: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2916
+ value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2917
+ }, z.core.$strip>;
2918
+ }, z.core.$strip>, z.ZodTransform<{
2919
+ type: "balance";
2920
+ channel: "balances";
2921
+ timestamp: number;
2922
+ sequence: number;
2923
+ payload: {
2924
+ asset: string;
2925
+ balance: DecimalString;
2926
+ value: DecimalString;
2927
+ };
2928
+ }, {
2929
+ ts: EpochMilliseconds;
2930
+ sq: number;
2931
+ ch: "balances";
2932
+ data: {
2933
+ asset: string;
2934
+ balance: DecimalString;
2935
+ value: DecimalString;
2936
+ };
2937
+ }>>, z.ZodPipe<z.ZodObject<{
2938
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2939
+ sq: z.ZodNumber;
2940
+ ch: z.ZodLiteral<"portfolio">;
2941
+ data: z.ZodPipe<z.ZodObject<{
2942
+ positions: z.ZodArray<z.ZodPipe<z.ZodObject<{
2943
+ instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
2944
+ symbol: z.ZodString;
2945
+ size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2946
+ entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2947
+ leverage: z.ZodNumber;
2948
+ cross: z.ZodBoolean;
2949
+ initial_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2950
+ maintenance_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2951
+ position_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2952
+ liquidation_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2953
+ unrealized_pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2954
+ return_on_equity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2955
+ cumulative_funding: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2956
+ }, z.core.$strip>, z.ZodTransform<{
2957
+ instrumentId: PerpsInstrumentId;
2958
+ symbol: string;
2959
+ size: DecimalString;
2960
+ entryPrice: DecimalString;
2961
+ leverage: number;
2962
+ cross: boolean;
2963
+ initialMargin: DecimalString;
2964
+ maintenanceMargin: DecimalString;
2965
+ positionValue: DecimalString;
2966
+ liquidationPrice: DecimalString;
2967
+ unrealizedPnl: DecimalString;
2968
+ returnOnEquity: DecimalString;
2969
+ cumulativeFunding: DecimalString;
2970
+ }, {
2971
+ instrument_id: PerpsInstrumentId;
2972
+ symbol: string;
2973
+ size: DecimalString;
2974
+ entry_price: DecimalString;
2975
+ leverage: number;
2976
+ cross: boolean;
2977
+ initial_margin: DecimalString;
2978
+ maintenance_margin: DecimalString;
2979
+ position_value: DecimalString;
2980
+ liquidation_price: DecimalString;
2981
+ unrealized_pnl: DecimalString;
2982
+ return_on_equity: DecimalString;
2983
+ cumulative_funding: DecimalString;
2984
+ }>>>;
2985
+ margin: z.ZodPipe<z.ZodObject<{
2986
+ total_account_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2987
+ total_initial_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2988
+ total_maintenance_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2989
+ total_position_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2990
+ }, z.core.$strip>, z.ZodTransform<{
2991
+ totalAccountValue: DecimalString;
2992
+ totalInitialMargin: DecimalString;
2993
+ totalMaintenanceMargin: DecimalString;
2994
+ totalPositionValue: DecimalString;
2995
+ }, {
2996
+ total_account_value: DecimalString;
2997
+ total_initial_margin: DecimalString;
2998
+ total_maintenance_margin: DecimalString;
2999
+ total_position_value: DecimalString;
3000
+ }>>;
3001
+ withdrawable: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3002
+ in_liquidation: z.ZodBoolean;
3003
+ timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3004
+ }, z.core.$strip>, z.ZodTransform<{
3005
+ positions: {
3006
+ instrumentId: PerpsInstrumentId;
3007
+ symbol: string;
3008
+ size: DecimalString;
3009
+ entryPrice: DecimalString;
3010
+ leverage: number;
3011
+ cross: boolean;
3012
+ initialMargin: DecimalString;
3013
+ maintenanceMargin: DecimalString;
3014
+ positionValue: DecimalString;
3015
+ liquidationPrice: DecimalString;
3016
+ unrealizedPnl: DecimalString;
3017
+ returnOnEquity: DecimalString;
3018
+ cumulativeFunding: DecimalString;
3019
+ }[];
3020
+ margin: {
3021
+ totalAccountValue: DecimalString;
3022
+ totalInitialMargin: DecimalString;
3023
+ totalMaintenanceMargin: DecimalString;
3024
+ totalPositionValue: DecimalString;
3025
+ };
3026
+ withdrawable: DecimalString;
3027
+ inLiquidation: boolean;
3028
+ timestamp: EpochMilliseconds;
3029
+ }, {
3030
+ positions: {
3031
+ instrumentId: PerpsInstrumentId;
3032
+ symbol: string;
3033
+ size: DecimalString;
3034
+ entryPrice: DecimalString;
3035
+ leverage: number;
3036
+ cross: boolean;
3037
+ initialMargin: DecimalString;
3038
+ maintenanceMargin: DecimalString;
3039
+ positionValue: DecimalString;
3040
+ liquidationPrice: DecimalString;
3041
+ unrealizedPnl: DecimalString;
3042
+ returnOnEquity: DecimalString;
3043
+ cumulativeFunding: DecimalString;
3044
+ }[];
3045
+ margin: {
3046
+ totalAccountValue: DecimalString;
3047
+ totalInitialMargin: DecimalString;
3048
+ totalMaintenanceMargin: DecimalString;
3049
+ totalPositionValue: DecimalString;
3050
+ };
3051
+ withdrawable: DecimalString;
3052
+ in_liquidation: boolean;
3053
+ timestamp: EpochMilliseconds;
3054
+ }>>;
3055
+ }, z.core.$strip>, z.ZodTransform<{
3056
+ type: "portfolio";
3057
+ channel: "portfolio";
3058
+ timestamp: number;
3059
+ sequence: number;
3060
+ payload: {
3061
+ positions: {
3062
+ instrumentId: PerpsInstrumentId;
3063
+ symbol: string;
3064
+ size: DecimalString;
3065
+ entryPrice: DecimalString;
3066
+ leverage: number;
3067
+ cross: boolean;
3068
+ initialMargin: DecimalString;
3069
+ maintenanceMargin: DecimalString;
3070
+ positionValue: DecimalString;
3071
+ liquidationPrice: DecimalString;
3072
+ unrealizedPnl: DecimalString;
3073
+ returnOnEquity: DecimalString;
3074
+ cumulativeFunding: DecimalString;
3075
+ }[];
3076
+ margin: {
3077
+ totalAccountValue: DecimalString;
3078
+ totalInitialMargin: DecimalString;
3079
+ totalMaintenanceMargin: DecimalString;
3080
+ totalPositionValue: DecimalString;
3081
+ };
3082
+ withdrawable: DecimalString;
3083
+ inLiquidation: boolean;
3084
+ timestamp: EpochMilliseconds;
3085
+ };
3086
+ }, {
3087
+ ts: EpochMilliseconds;
3088
+ sq: number;
3089
+ ch: "portfolio";
3090
+ data: {
3091
+ positions: {
3092
+ instrumentId: PerpsInstrumentId;
3093
+ symbol: string;
3094
+ size: DecimalString;
3095
+ entryPrice: DecimalString;
3096
+ leverage: number;
3097
+ cross: boolean;
3098
+ initialMargin: DecimalString;
3099
+ maintenanceMargin: DecimalString;
3100
+ positionValue: DecimalString;
3101
+ liquidationPrice: DecimalString;
3102
+ unrealizedPnl: DecimalString;
3103
+ returnOnEquity: DecimalString;
3104
+ cumulativeFunding: DecimalString;
3105
+ }[];
3106
+ margin: {
3107
+ totalAccountValue: DecimalString;
3108
+ totalInitialMargin: DecimalString;
3109
+ totalMaintenanceMargin: DecimalString;
3110
+ totalPositionValue: DecimalString;
3111
+ };
3112
+ withdrawable: DecimalString;
3113
+ inLiquidation: boolean;
3114
+ timestamp: EpochMilliseconds;
3115
+ };
3116
+ }>>, z.ZodPipe<z.ZodObject<{
3117
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3118
+ sq: z.ZodNumber;
3119
+ ch: z.ZodLiteral<"orders">;
3120
+ data: z.ZodPipe<z.ZodObject<{
3121
+ oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
3122
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
3123
+ buy: z.ZodBoolean;
3124
+ p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3125
+ qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3126
+ tif: z.ZodEnum<typeof PerpsTimeInForce>;
3127
+ po: z.ZodBoolean;
3128
+ ro: z.ZodBoolean;
3129
+ status: z.ZodEnum<typeof PerpsOrderStatus>;
3130
+ rest: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3131
+ fill: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3132
+ cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3133
+ uts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3134
+ coid: z.ZodOptional<z.ZodString>;
3135
+ tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
3136
+ kind: z.ZodEnum<typeof PerpsTpSlKind>;
3137
+ scope: z.ZodEnum<typeof PerpsTpSlScope>;
3138
+ trp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3139
+ parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
3140
+ armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
3141
+ slip_bps: z.ZodOptional<z.ZodNumber>;
3142
+ }, z.core.$strip>, z.ZodTransform<{
3143
+ kind: PerpsTpSlKind;
3144
+ scope: PerpsTpSlScope;
3145
+ triggerPrice: DecimalString;
3146
+ parentOrderId: PerpsOrderId | undefined;
3147
+ armedQuantity: DecimalString | undefined;
3148
+ slippageBps: number | undefined;
3149
+ }, {
3150
+ kind: PerpsTpSlKind;
3151
+ scope: PerpsTpSlScope;
3152
+ trp: DecimalString;
3153
+ parent_oid?: PerpsOrderId | undefined;
3154
+ armed_qty?: DecimalString | undefined;
3155
+ slip_bps?: number | undefined;
3156
+ }>>>>;
3157
+ }, z.core.$strip>, z.ZodTransform<{
3158
+ id: PerpsOrderId;
3159
+ instrumentId: PerpsInstrumentId;
3160
+ side: OrderSide;
3161
+ price: DecimalString;
3162
+ quantity: DecimalString;
3163
+ timeInForce: PerpsTimeInForce;
3164
+ postOnly: boolean;
3165
+ reduceOnly: boolean;
3166
+ status: PerpsOrderStatus;
3167
+ restingQuantity: DecimalString;
3168
+ filledQuantity: DecimalString;
3169
+ createdTimestamp: EpochMilliseconds;
3170
+ updatedTimestamp: EpochMilliseconds;
3171
+ clientOrderId: string | undefined;
3172
+ tpSl: {
3173
+ kind: PerpsTpSlKind;
3174
+ scope: PerpsTpSlScope;
3175
+ triggerPrice: DecimalString;
3176
+ parentOrderId: PerpsOrderId | undefined;
3177
+ armedQuantity: DecimalString | undefined;
3178
+ slippageBps: number | undefined;
3179
+ } | undefined;
3180
+ }, {
3181
+ oid: PerpsOrderId;
3182
+ iid: PerpsInstrumentId;
3183
+ buy: boolean;
3184
+ p: DecimalString;
3185
+ qty: DecimalString;
3186
+ tif: PerpsTimeInForce;
3187
+ po: boolean;
3188
+ ro: boolean;
3189
+ status: PerpsOrderStatus;
3190
+ rest: DecimalString;
3191
+ fill: DecimalString;
3192
+ cts: EpochMilliseconds;
3193
+ uts: EpochMilliseconds;
3194
+ coid?: string | undefined;
3195
+ tpsl?: {
3196
+ kind: PerpsTpSlKind;
3197
+ scope: PerpsTpSlScope;
3198
+ triggerPrice: DecimalString;
3199
+ parentOrderId: PerpsOrderId | undefined;
3200
+ armedQuantity: DecimalString | undefined;
3201
+ slippageBps: number | undefined;
3202
+ } | null | undefined;
3203
+ }>>;
3204
+ }, z.core.$strip>, z.ZodTransform<{
3205
+ type: "order";
3206
+ channel: "orders";
3207
+ timestamp: number;
3208
+ sequence: number;
3209
+ payload: {
3210
+ id: PerpsOrderId;
3211
+ instrumentId: PerpsInstrumentId;
3212
+ side: OrderSide;
3213
+ price: DecimalString;
3214
+ quantity: DecimalString;
3215
+ timeInForce: PerpsTimeInForce;
3216
+ postOnly: boolean;
3217
+ reduceOnly: boolean;
3218
+ status: PerpsOrderStatus;
3219
+ restingQuantity: DecimalString;
3220
+ filledQuantity: DecimalString;
3221
+ createdTimestamp: EpochMilliseconds;
3222
+ updatedTimestamp: EpochMilliseconds;
3223
+ clientOrderId: string | undefined;
3224
+ tpSl: {
3225
+ kind: PerpsTpSlKind;
3226
+ scope: PerpsTpSlScope;
3227
+ triggerPrice: DecimalString;
3228
+ parentOrderId: PerpsOrderId | undefined;
3229
+ armedQuantity: DecimalString | undefined;
3230
+ slippageBps: number | undefined;
3231
+ } | undefined;
3232
+ };
3233
+ }, {
3234
+ ts: EpochMilliseconds;
3235
+ sq: number;
3236
+ ch: "orders";
3237
+ data: {
3238
+ id: PerpsOrderId;
3239
+ instrumentId: PerpsInstrumentId;
3240
+ side: OrderSide;
3241
+ price: DecimalString;
3242
+ quantity: DecimalString;
3243
+ timeInForce: PerpsTimeInForce;
3244
+ postOnly: boolean;
3245
+ reduceOnly: boolean;
3246
+ status: PerpsOrderStatus;
3247
+ restingQuantity: DecimalString;
3248
+ filledQuantity: DecimalString;
3249
+ createdTimestamp: EpochMilliseconds;
3250
+ updatedTimestamp: EpochMilliseconds;
3251
+ clientOrderId: string | undefined;
3252
+ tpSl: {
3253
+ kind: PerpsTpSlKind;
3254
+ scope: PerpsTpSlScope;
3255
+ triggerPrice: DecimalString;
3256
+ parentOrderId: PerpsOrderId | undefined;
3257
+ armedQuantity: DecimalString | undefined;
3258
+ slippageBps: number | undefined;
3259
+ } | undefined;
3260
+ };
3261
+ }>>, z.ZodPipe<z.ZodObject<{
3262
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3263
+ sq: z.ZodNumber;
3264
+ ch: z.ZodLiteral<"fills">;
3265
+ data: z.ZodPipe<z.ZodObject<{
3266
+ tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
3267
+ oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
3268
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
3269
+ side: z.ZodEnum<typeof PerpsSide>;
3270
+ p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3271
+ qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3272
+ taker: z.ZodBoolean;
3273
+ fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3274
+ fea: z.ZodString;
3275
+ psz: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3276
+ pep: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3277
+ pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3278
+ liq: z.ZodBoolean;
3279
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3280
+ coid: z.ZodOptional<z.ZodString>;
3281
+ }, z.core.$strip>, z.ZodTransform<{
3282
+ tradeId: PerpsTradeId;
3283
+ orderId: PerpsOrderId;
3284
+ instrumentId: PerpsInstrumentId;
3285
+ side: PerpsSide;
3286
+ price: DecimalString;
3287
+ quantity: DecimalString;
3288
+ taker: boolean;
3289
+ fee: DecimalString;
3290
+ feeAsset: string;
3291
+ previousSize: DecimalString;
3292
+ previousEntryPrice: DecimalString;
3293
+ pnl: DecimalString;
3294
+ liquidation: boolean;
3295
+ timestamp: EpochMilliseconds;
3296
+ clientOrderId: string | undefined;
3297
+ }, {
3298
+ tid: PerpsTradeId;
3299
+ oid: PerpsOrderId;
3300
+ iid: PerpsInstrumentId;
3301
+ side: PerpsSide;
3302
+ p: DecimalString;
3303
+ qty: DecimalString;
3304
+ taker: boolean;
3305
+ fee: DecimalString;
3306
+ fea: string;
3307
+ psz: DecimalString;
3308
+ pep: DecimalString;
3309
+ pnl: DecimalString;
3310
+ liq: boolean;
3311
+ ts: EpochMilliseconds;
3312
+ coid?: string | undefined;
3313
+ }>>;
3314
+ }, z.core.$strip>, z.ZodTransform<{
3315
+ type: "fill";
3316
+ channel: "fills";
3317
+ timestamp: number;
3318
+ sequence: number;
3319
+ payload: {
3320
+ tradeId: PerpsTradeId;
3321
+ orderId: PerpsOrderId;
3322
+ instrumentId: PerpsInstrumentId;
3323
+ side: PerpsSide;
3324
+ price: DecimalString;
3325
+ quantity: DecimalString;
3326
+ taker: boolean;
3327
+ fee: DecimalString;
3328
+ feeAsset: string;
3329
+ previousSize: DecimalString;
3330
+ previousEntryPrice: DecimalString;
3331
+ pnl: DecimalString;
3332
+ liquidation: boolean;
3333
+ timestamp: EpochMilliseconds;
3334
+ clientOrderId: string | undefined;
3335
+ };
3336
+ }, {
3337
+ ts: EpochMilliseconds;
3338
+ sq: number;
3339
+ ch: "fills";
3340
+ data: {
3341
+ tradeId: PerpsTradeId;
3342
+ orderId: PerpsOrderId;
3343
+ instrumentId: PerpsInstrumentId;
3344
+ side: PerpsSide;
3345
+ price: DecimalString;
3346
+ quantity: DecimalString;
3347
+ taker: boolean;
3348
+ fee: DecimalString;
3349
+ feeAsset: string;
3350
+ previousSize: DecimalString;
3351
+ previousEntryPrice: DecimalString;
3352
+ pnl: DecimalString;
3353
+ liquidation: boolean;
3354
+ timestamp: EpochMilliseconds;
3355
+ clientOrderId: string | undefined;
3356
+ };
3357
+ }>>, z.ZodPipe<z.ZodObject<{
3358
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3359
+ sq: z.ZodNumber;
3360
+ ch: z.ZodLiteral<"funding">;
3361
+ data: z.ZodPipe<z.ZodObject<{
3362
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
3363
+ sz: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3364
+ fr: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3365
+ fund: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3366
+ fua: z.ZodString;
3367
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3368
+ }, z.core.$strip>, z.ZodTransform<{
3369
+ instrumentId: PerpsInstrumentId;
3370
+ size: DecimalString;
3371
+ fundingRate: DecimalString;
3372
+ fundingAsset: string;
3373
+ funding: DecimalString;
3374
+ timestamp: EpochMilliseconds;
3375
+ }, {
3376
+ iid: PerpsInstrumentId;
3377
+ sz: DecimalString;
3378
+ fr: DecimalString;
3379
+ fund: DecimalString;
3380
+ fua: string;
3381
+ ts: EpochMilliseconds;
3382
+ }>>;
3383
+ }, z.core.$strip>, z.ZodTransform<{
3384
+ type: "funding";
3385
+ channel: "funding";
3386
+ timestamp: number;
3387
+ sequence: number;
3388
+ payload: {
3389
+ instrumentId: PerpsInstrumentId;
3390
+ size: DecimalString;
3391
+ fundingRate: DecimalString;
3392
+ fundingAsset: string;
3393
+ funding: DecimalString;
3394
+ timestamp: EpochMilliseconds;
3395
+ };
3396
+ }, {
3397
+ ts: EpochMilliseconds;
3398
+ sq: number;
3399
+ ch: "funding";
3400
+ data: {
3401
+ instrumentId: PerpsInstrumentId;
3402
+ size: DecimalString;
3403
+ fundingRate: DecimalString;
3404
+ fundingAsset: string;
3405
+ funding: DecimalString;
3406
+ timestamp: EpochMilliseconds;
3407
+ };
3408
+ }>>, z.ZodPipe<z.ZodObject<{
3409
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3410
+ sq: z.ZodNumber;
3411
+ ch: z.ZodLiteral<"deposits">;
3412
+ data: z.ZodPipe<z.ZodObject<{
3413
+ hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
3414
+ asset: z.ZodString;
3415
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
3416
+ status: z.ZodEnum<typeof PerpsDepositStatus>;
3417
+ }, z.core.$strip>, z.ZodTransform<{
3418
+ hash: _polymarket_types.TxHash | undefined;
3419
+ asset: string;
3420
+ amount: BaseUnits;
3421
+ status: PerpsDepositStatus;
3422
+ }, {
3423
+ asset: string;
3424
+ amount: BaseUnits;
3425
+ status: PerpsDepositStatus;
3426
+ hash?: _polymarket_types.TxHash | undefined;
3427
+ }>>;
3428
+ }, z.core.$strip>, z.ZodTransform<{
3429
+ type: "deposit";
3430
+ channel: "deposits";
3431
+ timestamp: number;
3432
+ sequence: number;
3433
+ payload: {
3434
+ hash: _polymarket_types.TxHash | undefined;
3435
+ asset: string;
3436
+ amount: BaseUnits;
3437
+ status: PerpsDepositStatus;
3438
+ };
3439
+ }, {
3440
+ ts: EpochMilliseconds;
3441
+ sq: number;
3442
+ ch: "deposits";
3443
+ data: {
3444
+ hash: _polymarket_types.TxHash | undefined;
3445
+ asset: string;
3446
+ amount: BaseUnits;
3447
+ status: PerpsDepositStatus;
3448
+ };
3449
+ }>>, z.ZodPipe<z.ZodObject<{
3450
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3451
+ sq: z.ZodNumber;
3452
+ ch: z.ZodLiteral<"withdrawals">;
3453
+ data: z.ZodPipe<z.ZodObject<{
3454
+ withdraw_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsWithdrawalId, number>>;
3455
+ asset: z.ZodString;
3456
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
3457
+ fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3458
+ status: z.ZodEnum<typeof PerpsWithdrawalStatus>;
3459
+ to: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
3460
+ hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
3461
+ }, z.core.$strip>, z.ZodTransform<{
3462
+ withdrawalId: PerpsWithdrawalId;
3463
+ asset: string;
3464
+ amount: BaseUnits;
3465
+ fee: DecimalString;
3466
+ status: PerpsWithdrawalStatus;
3467
+ to: _polymarket_types.EvmAddress;
3468
+ hash: _polymarket_types.TxHash | undefined;
3469
+ }, {
3470
+ withdraw_id: PerpsWithdrawalId;
3471
+ asset: string;
3472
+ amount: BaseUnits;
3473
+ fee: DecimalString;
3474
+ status: PerpsWithdrawalStatus;
3475
+ to: _polymarket_types.EvmAddress;
3476
+ hash?: _polymarket_types.TxHash | undefined;
3477
+ }>>;
3478
+ }, z.core.$strip>, z.ZodTransform<{
3479
+ type: "withdrawal";
3480
+ channel: "withdrawals";
3481
+ timestamp: number;
3482
+ sequence: number;
3483
+ payload: {
3484
+ withdrawalId: PerpsWithdrawalId;
3485
+ asset: string;
3486
+ amount: BaseUnits;
3487
+ fee: DecimalString;
3488
+ status: PerpsWithdrawalStatus;
3489
+ to: _polymarket_types.EvmAddress;
3490
+ hash: _polymarket_types.TxHash | undefined;
3491
+ };
3492
+ }, {
3493
+ ts: EpochMilliseconds;
3494
+ sq: number;
3495
+ ch: "withdrawals";
3496
+ data: {
3497
+ withdrawalId: PerpsWithdrawalId;
3498
+ asset: string;
3499
+ amount: BaseUnits;
3500
+ fee: DecimalString;
3501
+ status: PerpsWithdrawalStatus;
3502
+ to: _polymarket_types.EvmAddress;
3503
+ hash: _polymarket_types.TxHash | undefined;
3504
+ };
3505
+ }>>, z.ZodPipe<z.ZodObject<{
3506
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3507
+ sq: z.ZodNumber;
3508
+ ch: z.ZodString;
3509
+ data: z.ZodPipe<z.ZodObject<{
3510
+ oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
3511
+ st: z.ZodEnum<{
3512
+ cancelled: "cancelled";
3513
+ untriggered: "untriggered";
3514
+ armed: "armed";
3515
+ expired: "expired";
3516
+ }>;
3517
+ reason: z.ZodOptional<z.ZodString>;
3518
+ }, z.core.$strip>, z.ZodTransform<{
3519
+ orderId: PerpsOrderId;
3520
+ status: "cancelled" | "untriggered" | "armed" | "expired";
3521
+ reason: string | undefined;
3522
+ }, {
3523
+ oid: PerpsOrderId;
3524
+ st: "cancelled" | "untriggered" | "armed" | "expired";
3525
+ reason?: string | undefined;
3526
+ }>>;
3527
+ }, z.core.$strip>, z.ZodTransform<{
3528
+ type: "tpsl";
3529
+ channel: string;
3530
+ timestamp: EpochMilliseconds;
3531
+ sequence: number;
3532
+ payload: {
3533
+ orderId: PerpsOrderId;
3534
+ status: "cancelled" | "untriggered" | "armed" | "expired";
3535
+ reason: string | undefined;
3536
+ };
3537
+ }, {
3538
+ ts: EpochMilliseconds;
3539
+ sq: number;
3540
+ ch: string;
3541
+ data: {
3542
+ orderId: PerpsOrderId;
3543
+ status: "cancelled" | "untriggered" | "armed" | "expired";
3544
+ reason: string | undefined;
3545
+ };
3546
+ }>>]>;
3547
+ type PerpsSessionUpdateEvent = z.infer<typeof PerpsSessionUpdateEventSchema>;
3548
+ type PerpsResyncEvent = {
3549
+ type: 'resync';
3550
+ reason: 'reconnect' | 'sequence_gap';
3551
+ channel?: string;
3552
+ previousSequence?: number;
3553
+ sequence?: number;
3554
+ };
3555
+ type PerpsSessionEvent = PerpsSessionUpdateEvent | PerpsResyncEvent;
3556
+
1529
3557
  declare const CommentRemovedPayloadSchema: z.ZodObject<{
1530
3558
  id: z.ZodString;
1531
3559
  body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -3746,4 +5774,4 @@ declare const SportsResultEventSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
3746
5774
  }>>;
3747
5775
  type SportsEvent = z.infer<typeof SportsResultEventSchema>;
3748
5776
 
3749
- export { type CommentCreatedEvent, CommentCreatedEventSchema, type CommentRemovedEvent, CommentRemovedEventSchema, type CommentRemovedPayload, type CommentsEvent, CommentsEventSchema, type CryptoPricesBinanceEvent, CryptoPricesBinanceEventSchema, type CryptoPricesBinanceTopic, type CryptoPricesChainlinkEvent, CryptoPricesChainlinkEventSchema, type CryptoPricesChainlinkTopic, type CryptoPricesEvent, CryptoPricesEventSchema, type CryptoPricesTopic, type CustomMarketEvent, CustomMarketEventSchema, type EquityPriceSnapshotPoint, type EquityPriceSubscribePayload, type EquityPriceUpdatePayload, type EquityPricesEvent, EquityPricesEventSchema, type EquityPricesSubscribeEvent, EquityPricesSubscribeEventSchema, type EquityPricesTopic, type EquityPricesUpdateEvent, EquityPricesUpdateEventSchema, 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 PriceChange, type PriceUpdatePayload, type ReactionCreatedEvent, ReactionCreatedEventSchema, type ReactionRemovedEvent, ReactionRemovedEventSchema, type RealtimeEvent, RealtimeEventSchema, type SportsEvent, SportsResultEventSchema, type StandardMarketEvent, StandardMarketEventSchema, type TradeMakerOrder, TradeStatus, type UserEvent, UserEventSchema, type UserOrderEvent, UserOrderEventSchema, UserOrderEventType, UserOrderStatus, type UserTradeEvent, UserTradeEventSchema };
5777
+ export { type CommentCreatedEvent, CommentCreatedEventSchema, type CommentRemovedEvent, CommentRemovedEventSchema, type CommentRemovedPayload, type CommentsEvent, CommentsEventSchema, type CryptoPricesBinanceEvent, CryptoPricesBinanceEventSchema, type CryptoPricesBinanceTopic, type CryptoPricesChainlinkEvent, CryptoPricesChainlinkEventSchema, type CryptoPricesChainlinkTopic, type CryptoPricesEvent, CryptoPricesEventSchema, type CryptoPricesTopic, type CustomMarketEvent, CustomMarketEventSchema, type EquityPriceSnapshotPoint, type EquityPriceSubscribePayload, type EquityPriceUpdatePayload, type EquityPricesEvent, EquityPricesEventSchema, type EquityPricesSubscribeEvent, EquityPricesSubscribeEventSchema, type EquityPricesTopic, type EquityPricesUpdateEvent, EquityPricesUpdateEventSchema, 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 PerpsCandleEvent, PerpsCandleEventSchema, type PerpsDepositUpdateEvent, PerpsDepositUpdateEventSchema, type PerpsFillUpdateEvent, PerpsFillUpdateEventSchema, type PerpsFundingUpdateEvent, PerpsFundingUpdateEventSchema, type PerpsMarketDataEvent, PerpsMarketDataEventSchema, 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 PriceChange, type PriceUpdatePayload, type ReactionCreatedEvent, ReactionCreatedEventSchema, type ReactionRemovedEvent, ReactionRemovedEventSchema, type RealtimeEvent, RealtimeEventSchema, type SportsEvent, SportsResultEventSchema, type StandardMarketEvent, StandardMarketEventSchema, type TradeMakerOrder, TradeStatus, type UserEvent, UserEventSchema, type UserOrderEvent, UserOrderEventSchema, UserOrderEventType, UserOrderStatus, type UserTradeEvent, UserTradeEventSchema };