@pear-protocol/types 1.30.1 → 1.32.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 (45) hide show
  1. package/dist/baskets/recommended/entities.d.ts +36 -0
  2. package/dist/baskets/recommended/entities.js +22 -0
  3. package/dist/baskets/recommended/index.d.ts +2 -0
  4. package/dist/baskets/recommended/index.js +2 -0
  5. package/dist/baskets/recommended/responses.d.ts +28 -0
  6. package/dist/baskets/recommended/responses.js +8 -0
  7. package/dist/{saved-baskets → baskets/saved}/entities.d.ts +3 -0
  8. package/dist/{saved-baskets → baskets/saved}/entities.js +6 -3
  9. package/dist/{saved-baskets → baskets/saved}/payloads.d.ts +4 -0
  10. package/dist/{saved-baskets → baskets/saved}/payloads.js +1 -1
  11. package/dist/{saved-baskets → baskets/saved}/responses.d.ts +6 -0
  12. package/dist/bundle.d.ts +2 -1
  13. package/dist/bundle.js +2 -1
  14. package/dist/common/refinement.d.ts +9 -0
  15. package/dist/common/refinement.js +9 -1
  16. package/dist/common/trade-legs.d.ts +2 -0
  17. package/dist/common/trade-legs.js +7 -3
  18. package/dist/execution/entities.d.ts +13 -0
  19. package/dist/execution/entities.js +2 -0
  20. package/dist/execution/responses.d.ts +8 -0
  21. package/dist/ladder/entities.d.ts +549 -0
  22. package/dist/ladder/payloads.d.ts +4 -0
  23. package/dist/ladder/responses.d.ts +2039 -392
  24. package/dist/notification/entities.d.ts +176 -3
  25. package/dist/notification/entities.js +31 -0
  26. package/dist/notification/responses.d.ts +86 -0
  27. package/dist/schedule/entities.d.ts +3 -0
  28. package/dist/schedule/entities.js +2 -0
  29. package/dist/schedule/payloads.d.ts +2 -0
  30. package/dist/schedule/payloads.js +6 -29
  31. package/dist/schedule/responses.d.ts +2 -0
  32. package/dist/schedule/twap-config.d.ts +41 -0
  33. package/dist/schedule/twap-config.js +29 -0
  34. package/dist/statistics/entities.js +23 -10
  35. package/dist/trade/payloads.d.ts +8 -0
  36. package/dist/trade/responses.d.ts +20 -0
  37. package/dist/trigger/entities/index.d.ts +1707 -54
  38. package/dist/trigger/entities/index.js +55 -2
  39. package/dist/trigger/payloads/index.d.ts +898 -91
  40. package/dist/trigger/payloads/index.js +68 -5
  41. package/dist/trigger/responses.d.ts +1151 -53
  42. package/package.json +1 -1
  43. /package/dist/{saved-baskets → baskets/saved}/index.d.ts +0 -0
  44. /package/dist/{saved-baskets → baskets/saved}/index.js +0 -0
  45. /package/dist/{saved-baskets → baskets/saved}/responses.js +0 -0
@@ -271,6 +271,7 @@ export declare const TriggerMarketOpen: z.ZodObject<{
271
271
  type: z.ZodLiteral<"MARKET">;
272
272
  legs: z.ZodTuple<[z.ZodObject<{
273
273
  symbol: z.ZodString;
274
+ id: z.ZodOptional<z.ZodString>;
274
275
  side: z.ZodEnum<{
275
276
  BUY: "BUY";
276
277
  SELL: "SELL";
@@ -282,6 +283,7 @@ export declare const TriggerMarketOpen: z.ZodObject<{
282
283
  amount: z.ZodString;
283
284
  }, z.core.$strip>], z.ZodObject<{
284
285
  symbol: z.ZodString;
286
+ id: z.ZodOptional<z.ZodString>;
285
287
  side: z.ZodEnum<{
286
288
  BUY: "BUY";
287
289
  SELL: "SELL";
@@ -520,6 +522,7 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
520
522
  initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
521
523
  }, z.core.$strip>;
522
524
  legs: z.ZodTuple<[z.ZodObject<{
525
+ id: z.ZodOptional<z.ZodString>;
523
526
  symbol: z.ZodString;
524
527
  side: z.ZodEnum<{
525
528
  BUY: "BUY";
@@ -532,6 +535,7 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
532
535
  amount: z.ZodString;
533
536
  reduceOnly: z.ZodBoolean;
534
537
  }, z.core.$strip>], z.ZodObject<{
538
+ id: z.ZodOptional<z.ZodString>;
535
539
  symbol: z.ZodString;
536
540
  side: z.ZodEnum<{
537
541
  BUY: "BUY";
@@ -1018,6 +1022,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1018
1022
  type: z.ZodLiteral<"MARKET">;
1019
1023
  legs: z.ZodTuple<[z.ZodObject<{
1020
1024
  symbol: z.ZodString;
1025
+ id: z.ZodOptional<z.ZodString>;
1021
1026
  side: z.ZodEnum<{
1022
1027
  BUY: "BUY";
1023
1028
  SELL: "SELL";
@@ -1029,6 +1034,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1029
1034
  amount: z.ZodString;
1030
1035
  }, z.core.$strip>], z.ZodObject<{
1031
1036
  symbol: z.ZodString;
1037
+ id: z.ZodOptional<z.ZodString>;
1032
1038
  side: z.ZodEnum<{
1033
1039
  BUY: "BUY";
1034
1040
  SELL: "SELL";
@@ -1266,6 +1272,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1266
1272
  initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
1267
1273
  }, z.core.$strip>;
1268
1274
  legs: z.ZodTuple<[z.ZodObject<{
1275
+ id: z.ZodOptional<z.ZodString>;
1269
1276
  symbol: z.ZodString;
1270
1277
  side: z.ZodEnum<{
1271
1278
  BUY: "BUY";
@@ -1278,6 +1285,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1278
1285
  amount: z.ZodString;
1279
1286
  reduceOnly: z.ZodBoolean;
1280
1287
  }, z.core.$strip>], z.ZodObject<{
1288
+ id: z.ZodOptional<z.ZodString>;
1281
1289
  symbol: z.ZodString;
1282
1290
  side: z.ZodEnum<{
1283
1291
  BUY: "BUY";
@@ -1589,6 +1597,1099 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1589
1597
  stopBreachedAt: z.ZodOptional<z.ZodNumber>;
1590
1598
  }, z.core.$strip>>;
1591
1599
  }, z.core.$strip>], "intent">;
1600
+ export declare const TriggerTWAPAdjust: z.ZodObject<{
1601
+ id: z.ZodUUID;
1602
+ tradeAccountId: z.ZodUUID;
1603
+ connector: z.ZodEnum<{
1604
+ hyperliquid: "hyperliquid";
1605
+ binance: "binance";
1606
+ bybit: "bybit";
1607
+ okx: "okx";
1608
+ lighter: "lighter";
1609
+ }>;
1610
+ status: z.ZodEnum<{
1611
+ CANCELLED: "CANCELLED";
1612
+ ACTIVE: "ACTIVE";
1613
+ TRIGGERED: "TRIGGERED";
1614
+ }>;
1615
+ ladderId: z.ZodOptional<z.ZodUUID>;
1616
+ ladderIndex: z.ZodOptional<z.ZodNumber>;
1617
+ parentTriggerId: z.ZodOptional<z.ZodUUID>;
1618
+ triggeredAt: z.ZodOptional<z.ZodString>;
1619
+ cancelledAt: z.ZodOptional<z.ZodString>;
1620
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
1621
+ USER: "USER";
1622
+ POSITION_CLOSED: "POSITION_CLOSED";
1623
+ SYSTEM: "SYSTEM";
1624
+ POSITION_NETTED: "POSITION_NETTED";
1625
+ POSITION_REVERSED: "POSITION_REVERSED";
1626
+ }>>;
1627
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1628
+ id: z.ZodUUID;
1629
+ cloid: z.ZodOptional<z.ZodString>;
1630
+ exchangeFillId: z.ZodOptional<z.ZodString>;
1631
+ status: z.ZodEnum<{
1632
+ PROVISIONAL: "PROVISIONAL";
1633
+ CONFIRMED: "CONFIRMED";
1634
+ RECONCILED: "RECONCILED";
1635
+ }>;
1636
+ tradeAccountId: z.ZodUUID;
1637
+ symbol: z.ZodString;
1638
+ positionId: z.ZodUUID;
1639
+ connector: z.ZodEnum<{
1640
+ hyperliquid: "hyperliquid";
1641
+ binance: "binance";
1642
+ bybit: "bybit";
1643
+ okx: "okx";
1644
+ lighter: "lighter";
1645
+ }>;
1646
+ side: z.ZodEnum<{
1647
+ BUY: "BUY";
1648
+ SELL: "SELL";
1649
+ }>;
1650
+ reduceOnly: z.ZodBoolean;
1651
+ isExternal: z.ZodBoolean;
1652
+ synthetic: z.ZodBoolean;
1653
+ quantity: z.ZodString;
1654
+ price: z.ZodString;
1655
+ usd: z.ZodString;
1656
+ tradeFee: z.ZodOptional<z.ZodString>;
1657
+ pearFee: z.ZodOptional<z.ZodString>;
1658
+ timestamp: z.ZodString;
1659
+ original: z.ZodOptional<z.ZodObject<{
1660
+ exchangeFillId: z.ZodString;
1661
+ quantity: z.ZodString;
1662
+ }, z.core.$strip>>;
1663
+ }, z.core.$strip>>>;
1664
+ bracketType: z.ZodEnum<{
1665
+ STOP_LOSS: "STOP_LOSS";
1666
+ TAKE_PROFIT: "TAKE_PROFIT";
1667
+ NONE: "NONE";
1668
+ }>;
1669
+ semanticBracketType: z.ZodOptional<z.ZodEnum<{
1670
+ STOP_LOSS: "STOP_LOSS";
1671
+ TAKE_PROFIT: "TAKE_PROFIT";
1672
+ NONE: "NONE";
1673
+ }>>;
1674
+ createdAt: z.ZodString;
1675
+ updatedAt: z.ZodString;
1676
+ intent: z.ZodLiteral<"ADJUST">;
1677
+ type: z.ZodLiteral<"TWAP">;
1678
+ scheduleId: z.ZodOptional<z.ZodUUID>;
1679
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1680
+ type: z.ZodLiteral<"ratio">;
1681
+ data: z.ZodObject<{
1682
+ priceSource: z.ZodEnum<{
1683
+ mid: "mid";
1684
+ mark: "mark";
1685
+ }>;
1686
+ symbol_a: z.ZodString;
1687
+ symbol_b: z.ZodString;
1688
+ track: z.ZodEnum<{
1689
+ PEAK: "PEAK";
1690
+ TROUGH: "TROUGH";
1691
+ }>;
1692
+ threshold: z.ZodNumber;
1693
+ }, z.core.$strip>;
1694
+ }, z.core.$strip>, z.ZodObject<{
1695
+ type: z.ZodLiteral<"price">;
1696
+ data: z.ZodObject<{
1697
+ priceSource: z.ZodEnum<{
1698
+ mid: "mid";
1699
+ mark: "mark";
1700
+ }>;
1701
+ symbol: z.ZodString;
1702
+ track: z.ZodEnum<{
1703
+ PEAK: "PEAK";
1704
+ TROUGH: "TROUGH";
1705
+ }>;
1706
+ threshold: z.ZodNumber;
1707
+ }, z.core.$strip>;
1708
+ }, z.core.$strip>, z.ZodObject<{
1709
+ type: z.ZodLiteral<"weighted_ratio">;
1710
+ data: z.ZodObject<{
1711
+ priceSource: z.ZodEnum<{
1712
+ mid: "mid";
1713
+ mark: "mark";
1714
+ }>;
1715
+ basket: z.ZodArray<z.ZodObject<{
1716
+ symbol: z.ZodString;
1717
+ side: z.ZodEnum<{
1718
+ BUY: "BUY";
1719
+ SELL: "SELL";
1720
+ }>;
1721
+ weight: z.ZodNumber;
1722
+ }, z.core.$strip>>;
1723
+ track: z.ZodEnum<{
1724
+ PEAK: "PEAK";
1725
+ TROUGH: "TROUGH";
1726
+ }>;
1727
+ threshold: z.ZodNumber;
1728
+ }, z.core.$strip>;
1729
+ }, z.core.$strip>, z.ZodObject<{
1730
+ type: z.ZodLiteral<"notional">;
1731
+ data: z.ZodObject<{
1732
+ priceSource: z.ZodEnum<{
1733
+ mid: "mid";
1734
+ mark: "mark";
1735
+ }>;
1736
+ track: z.ZodEnum<{
1737
+ PEAK: "PEAK";
1738
+ TROUGH: "TROUGH";
1739
+ }>;
1740
+ threshold: z.ZodNumber;
1741
+ }, z.core.$strip>;
1742
+ }, z.core.$strip>, z.ZodObject<{
1743
+ type: z.ZodLiteral<"upnl">;
1744
+ data: z.ZodObject<{
1745
+ priceSource: z.ZodEnum<{
1746
+ mid: "mid";
1747
+ mark: "mark";
1748
+ }>;
1749
+ track: z.ZodEnum<{
1750
+ PEAK: "PEAK";
1751
+ TROUGH: "TROUGH";
1752
+ }>;
1753
+ threshold: z.ZodNumber;
1754
+ }, z.core.$strip>;
1755
+ }, z.core.$strip>, z.ZodObject<{
1756
+ type: z.ZodLiteral<"upnl_bps">;
1757
+ data: z.ZodObject<{
1758
+ priceSource: z.ZodEnum<{
1759
+ mid: "mid";
1760
+ mark: "mark";
1761
+ }>;
1762
+ track: z.ZodEnum<{
1763
+ PEAK: "PEAK";
1764
+ TROUGH: "TROUGH";
1765
+ }>;
1766
+ threshold: z.ZodNumber;
1767
+ }, z.core.$strip>;
1768
+ }, z.core.$strip>, z.ZodObject<{
1769
+ type: z.ZodLiteral<"funding_rate">;
1770
+ data: z.ZodObject<{
1771
+ connector: z.ZodEnum<{
1772
+ hyperliquid: "hyperliquid";
1773
+ binance: "binance";
1774
+ bybit: "bybit";
1775
+ okx: "okx";
1776
+ lighter: "lighter";
1777
+ }>;
1778
+ symbol: z.ZodString;
1779
+ track: z.ZodEnum<{
1780
+ PEAK: "PEAK";
1781
+ TROUGH: "TROUGH";
1782
+ }>;
1783
+ threshold: z.ZodNumber;
1784
+ }, z.core.$strip>;
1785
+ }, z.core.$strip>, z.ZodObject<{
1786
+ type: z.ZodLiteral<"prediction_market">;
1787
+ data: z.ZodObject<{
1788
+ source: z.ZodEnum<{
1789
+ kalshi: "kalshi";
1790
+ polymarket: "polymarket";
1791
+ }>;
1792
+ marketKey: z.ZodString;
1793
+ track: z.ZodEnum<{
1794
+ PEAK: "PEAK";
1795
+ TROUGH: "TROUGH";
1796
+ }>;
1797
+ threshold: z.ZodNumber;
1798
+ }, z.core.$strip>;
1799
+ }, z.core.$strip>, z.ZodObject<{
1800
+ type: z.ZodLiteral<"btc_dominance">;
1801
+ data: z.ZodObject<{
1802
+ source: z.ZodLiteral<"coingecko">;
1803
+ track: z.ZodEnum<{
1804
+ PEAK: "PEAK";
1805
+ TROUGH: "TROUGH";
1806
+ }>;
1807
+ threshold: z.ZodNumber;
1808
+ }, z.core.$strip>;
1809
+ }, z.core.$strip>], "type">;
1810
+ context: z.ZodObject<{
1811
+ type: z.ZodLiteral<"TWAP">;
1812
+ durationSec: z.ZodInt;
1813
+ sliceIntervalSec: z.ZodInt;
1814
+ randomization: z.ZodObject<{
1815
+ timingJitterBps: z.ZodInt;
1816
+ sizeJitterBps: z.ZodInt;
1817
+ }, z.core.$strip>;
1818
+ position: z.ZodObject<{
1819
+ id: z.ZodUUID;
1820
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
1821
+ }, z.core.$strip>;
1822
+ legs: z.ZodTuple<[z.ZodObject<{
1823
+ id: z.ZodOptional<z.ZodString>;
1824
+ symbol: z.ZodString;
1825
+ side: z.ZodEnum<{
1826
+ BUY: "BUY";
1827
+ SELL: "SELL";
1828
+ }>;
1829
+ weight: z.ZodNumber;
1830
+ }, z.core.$strict>], z.ZodObject<{
1831
+ id: z.ZodOptional<z.ZodString>;
1832
+ symbol: z.ZodString;
1833
+ side: z.ZodEnum<{
1834
+ BUY: "BUY";
1835
+ SELL: "SELL";
1836
+ }>;
1837
+ weight: z.ZodNumber;
1838
+ }, z.core.$strict>>;
1839
+ targetNotional: z.ZodString;
1840
+ }, z.core.$strip>;
1841
+ trailing: z.ZodOptional<z.ZodObject<{
1842
+ mode: z.ZodEnum<{
1843
+ RELATIVE_BPS: "RELATIVE_BPS";
1844
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
1845
+ }>;
1846
+ deltaValue: z.ZodNumber;
1847
+ activationValue: z.ZodOptional<z.ZodNumber>;
1848
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
1849
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
1850
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
1851
+ }, z.core.$strip>>;
1852
+ }, z.core.$strip>;
1853
+ export declare const TriggerTWAPClose: z.ZodObject<{
1854
+ id: z.ZodUUID;
1855
+ tradeAccountId: z.ZodUUID;
1856
+ connector: z.ZodEnum<{
1857
+ hyperliquid: "hyperliquid";
1858
+ binance: "binance";
1859
+ bybit: "bybit";
1860
+ okx: "okx";
1861
+ lighter: "lighter";
1862
+ }>;
1863
+ status: z.ZodEnum<{
1864
+ CANCELLED: "CANCELLED";
1865
+ ACTIVE: "ACTIVE";
1866
+ TRIGGERED: "TRIGGERED";
1867
+ }>;
1868
+ ladderId: z.ZodOptional<z.ZodUUID>;
1869
+ ladderIndex: z.ZodOptional<z.ZodNumber>;
1870
+ parentTriggerId: z.ZodOptional<z.ZodUUID>;
1871
+ triggeredAt: z.ZodOptional<z.ZodString>;
1872
+ cancelledAt: z.ZodOptional<z.ZodString>;
1873
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
1874
+ USER: "USER";
1875
+ POSITION_CLOSED: "POSITION_CLOSED";
1876
+ SYSTEM: "SYSTEM";
1877
+ POSITION_NETTED: "POSITION_NETTED";
1878
+ POSITION_REVERSED: "POSITION_REVERSED";
1879
+ }>>;
1880
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1881
+ id: z.ZodUUID;
1882
+ cloid: z.ZodOptional<z.ZodString>;
1883
+ exchangeFillId: z.ZodOptional<z.ZodString>;
1884
+ status: z.ZodEnum<{
1885
+ PROVISIONAL: "PROVISIONAL";
1886
+ CONFIRMED: "CONFIRMED";
1887
+ RECONCILED: "RECONCILED";
1888
+ }>;
1889
+ tradeAccountId: z.ZodUUID;
1890
+ symbol: z.ZodString;
1891
+ positionId: z.ZodUUID;
1892
+ connector: z.ZodEnum<{
1893
+ hyperliquid: "hyperliquid";
1894
+ binance: "binance";
1895
+ bybit: "bybit";
1896
+ okx: "okx";
1897
+ lighter: "lighter";
1898
+ }>;
1899
+ side: z.ZodEnum<{
1900
+ BUY: "BUY";
1901
+ SELL: "SELL";
1902
+ }>;
1903
+ reduceOnly: z.ZodBoolean;
1904
+ isExternal: z.ZodBoolean;
1905
+ synthetic: z.ZodBoolean;
1906
+ quantity: z.ZodString;
1907
+ price: z.ZodString;
1908
+ usd: z.ZodString;
1909
+ tradeFee: z.ZodOptional<z.ZodString>;
1910
+ pearFee: z.ZodOptional<z.ZodString>;
1911
+ timestamp: z.ZodString;
1912
+ original: z.ZodOptional<z.ZodObject<{
1913
+ exchangeFillId: z.ZodString;
1914
+ quantity: z.ZodString;
1915
+ }, z.core.$strip>>;
1916
+ }, z.core.$strip>>>;
1917
+ bracketType: z.ZodEnum<{
1918
+ STOP_LOSS: "STOP_LOSS";
1919
+ TAKE_PROFIT: "TAKE_PROFIT";
1920
+ NONE: "NONE";
1921
+ }>;
1922
+ semanticBracketType: z.ZodOptional<z.ZodEnum<{
1923
+ STOP_LOSS: "STOP_LOSS";
1924
+ TAKE_PROFIT: "TAKE_PROFIT";
1925
+ NONE: "NONE";
1926
+ }>>;
1927
+ createdAt: z.ZodString;
1928
+ updatedAt: z.ZodString;
1929
+ intent: z.ZodLiteral<"CLOSE">;
1930
+ type: z.ZodLiteral<"TWAP">;
1931
+ scheduleId: z.ZodOptional<z.ZodUUID>;
1932
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1933
+ type: z.ZodLiteral<"ratio">;
1934
+ data: z.ZodObject<{
1935
+ priceSource: z.ZodEnum<{
1936
+ mid: "mid";
1937
+ mark: "mark";
1938
+ }>;
1939
+ symbol_a: z.ZodString;
1940
+ symbol_b: z.ZodString;
1941
+ track: z.ZodEnum<{
1942
+ PEAK: "PEAK";
1943
+ TROUGH: "TROUGH";
1944
+ }>;
1945
+ threshold: z.ZodNumber;
1946
+ }, z.core.$strip>;
1947
+ }, z.core.$strip>, z.ZodObject<{
1948
+ type: z.ZodLiteral<"price">;
1949
+ data: z.ZodObject<{
1950
+ priceSource: z.ZodEnum<{
1951
+ mid: "mid";
1952
+ mark: "mark";
1953
+ }>;
1954
+ symbol: z.ZodString;
1955
+ track: z.ZodEnum<{
1956
+ PEAK: "PEAK";
1957
+ TROUGH: "TROUGH";
1958
+ }>;
1959
+ threshold: z.ZodNumber;
1960
+ }, z.core.$strip>;
1961
+ }, z.core.$strip>, z.ZodObject<{
1962
+ type: z.ZodLiteral<"weighted_ratio">;
1963
+ data: z.ZodObject<{
1964
+ priceSource: z.ZodEnum<{
1965
+ mid: "mid";
1966
+ mark: "mark";
1967
+ }>;
1968
+ basket: z.ZodArray<z.ZodObject<{
1969
+ symbol: z.ZodString;
1970
+ side: z.ZodEnum<{
1971
+ BUY: "BUY";
1972
+ SELL: "SELL";
1973
+ }>;
1974
+ weight: z.ZodNumber;
1975
+ }, z.core.$strip>>;
1976
+ track: z.ZodEnum<{
1977
+ PEAK: "PEAK";
1978
+ TROUGH: "TROUGH";
1979
+ }>;
1980
+ threshold: z.ZodNumber;
1981
+ }, z.core.$strip>;
1982
+ }, z.core.$strip>, z.ZodObject<{
1983
+ type: z.ZodLiteral<"notional">;
1984
+ data: z.ZodObject<{
1985
+ priceSource: z.ZodEnum<{
1986
+ mid: "mid";
1987
+ mark: "mark";
1988
+ }>;
1989
+ track: z.ZodEnum<{
1990
+ PEAK: "PEAK";
1991
+ TROUGH: "TROUGH";
1992
+ }>;
1993
+ threshold: z.ZodNumber;
1994
+ }, z.core.$strip>;
1995
+ }, z.core.$strip>, z.ZodObject<{
1996
+ type: z.ZodLiteral<"upnl">;
1997
+ data: z.ZodObject<{
1998
+ priceSource: z.ZodEnum<{
1999
+ mid: "mid";
2000
+ mark: "mark";
2001
+ }>;
2002
+ track: z.ZodEnum<{
2003
+ PEAK: "PEAK";
2004
+ TROUGH: "TROUGH";
2005
+ }>;
2006
+ threshold: z.ZodNumber;
2007
+ }, z.core.$strip>;
2008
+ }, z.core.$strip>, z.ZodObject<{
2009
+ type: z.ZodLiteral<"upnl_bps">;
2010
+ data: z.ZodObject<{
2011
+ priceSource: z.ZodEnum<{
2012
+ mid: "mid";
2013
+ mark: "mark";
2014
+ }>;
2015
+ track: z.ZodEnum<{
2016
+ PEAK: "PEAK";
2017
+ TROUGH: "TROUGH";
2018
+ }>;
2019
+ threshold: z.ZodNumber;
2020
+ }, z.core.$strip>;
2021
+ }, z.core.$strip>, z.ZodObject<{
2022
+ type: z.ZodLiteral<"ratio_trailing">;
2023
+ data: z.ZodObject<{
2024
+ priceSource: z.ZodEnum<{
2025
+ mid: "mid";
2026
+ mark: "mark";
2027
+ }>;
2028
+ symbol_a: z.ZodString;
2029
+ symbol_b: z.ZodString;
2030
+ }, z.core.$strip>;
2031
+ }, z.core.$strip>, z.ZodObject<{
2032
+ type: z.ZodLiteral<"price_trailing">;
2033
+ data: z.ZodObject<{
2034
+ priceSource: z.ZodEnum<{
2035
+ mid: "mid";
2036
+ mark: "mark";
2037
+ }>;
2038
+ symbol: z.ZodString;
2039
+ }, z.core.$strip>;
2040
+ }, z.core.$strip>, z.ZodObject<{
2041
+ type: z.ZodLiteral<"weighted_ratio_trailing">;
2042
+ data: z.ZodObject<{
2043
+ priceSource: z.ZodEnum<{
2044
+ mid: "mid";
2045
+ mark: "mark";
2046
+ }>;
2047
+ basket: z.ZodArray<z.ZodObject<{
2048
+ symbol: z.ZodString;
2049
+ side: z.ZodEnum<{
2050
+ BUY: "BUY";
2051
+ SELL: "SELL";
2052
+ }>;
2053
+ weight: z.ZodNumber;
2054
+ }, z.core.$strip>>;
2055
+ }, z.core.$strip>;
2056
+ }, z.core.$strip>, z.ZodObject<{
2057
+ type: z.ZodLiteral<"notional_trailing">;
2058
+ data: z.ZodObject<{
2059
+ priceSource: z.ZodEnum<{
2060
+ mid: "mid";
2061
+ mark: "mark";
2062
+ }>;
2063
+ }, z.core.$strip>;
2064
+ }, z.core.$strip>, z.ZodObject<{
2065
+ type: z.ZodLiteral<"upnl_trailing">;
2066
+ data: z.ZodObject<{
2067
+ priceSource: z.ZodEnum<{
2068
+ mid: "mid";
2069
+ mark: "mark";
2070
+ }>;
2071
+ }, z.core.$strip>;
2072
+ }, z.core.$strip>, z.ZodObject<{
2073
+ type: z.ZodLiteral<"upnl_bps_trailing">;
2074
+ data: z.ZodObject<{
2075
+ priceSource: z.ZodEnum<{
2076
+ mid: "mid";
2077
+ mark: "mark";
2078
+ }>;
2079
+ }, z.core.$strip>;
2080
+ }, z.core.$strip>, z.ZodObject<{
2081
+ type: z.ZodLiteral<"funding_rate">;
2082
+ data: z.ZodObject<{
2083
+ connector: z.ZodEnum<{
2084
+ hyperliquid: "hyperliquid";
2085
+ binance: "binance";
2086
+ bybit: "bybit";
2087
+ okx: "okx";
2088
+ lighter: "lighter";
2089
+ }>;
2090
+ symbol: z.ZodString;
2091
+ track: z.ZodEnum<{
2092
+ PEAK: "PEAK";
2093
+ TROUGH: "TROUGH";
2094
+ }>;
2095
+ threshold: z.ZodNumber;
2096
+ }, z.core.$strip>;
2097
+ }, z.core.$strip>, z.ZodObject<{
2098
+ type: z.ZodLiteral<"prediction_market">;
2099
+ data: z.ZodObject<{
2100
+ source: z.ZodEnum<{
2101
+ kalshi: "kalshi";
2102
+ polymarket: "polymarket";
2103
+ }>;
2104
+ marketKey: z.ZodString;
2105
+ track: z.ZodEnum<{
2106
+ PEAK: "PEAK";
2107
+ TROUGH: "TROUGH";
2108
+ }>;
2109
+ threshold: z.ZodNumber;
2110
+ }, z.core.$strip>;
2111
+ }, z.core.$strip>, z.ZodObject<{
2112
+ type: z.ZodLiteral<"btc_dominance">;
2113
+ data: z.ZodObject<{
2114
+ source: z.ZodLiteral<"coingecko">;
2115
+ track: z.ZodEnum<{
2116
+ PEAK: "PEAK";
2117
+ TROUGH: "TROUGH";
2118
+ }>;
2119
+ threshold: z.ZodNumber;
2120
+ }, z.core.$strip>;
2121
+ }, z.core.$strip>], "type">;
2122
+ context: z.ZodObject<{
2123
+ type: z.ZodLiteral<"TWAP">;
2124
+ durationSec: z.ZodInt;
2125
+ sliceIntervalSec: z.ZodInt;
2126
+ randomization: z.ZodObject<{
2127
+ timingJitterBps: z.ZodInt;
2128
+ sizeJitterBps: z.ZodInt;
2129
+ }, z.core.$strip>;
2130
+ position: z.ZodObject<{
2131
+ id: z.ZodUUID;
2132
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
2133
+ }, z.core.$strip>;
2134
+ }, z.core.$strip>;
2135
+ trailing: z.ZodOptional<z.ZodObject<{
2136
+ mode: z.ZodEnum<{
2137
+ RELATIVE_BPS: "RELATIVE_BPS";
2138
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
2139
+ }>;
2140
+ deltaValue: z.ZodNumber;
2141
+ activationValue: z.ZodOptional<z.ZodNumber>;
2142
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
2143
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
2144
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
2145
+ }, z.core.$strip>>;
2146
+ }, z.core.$strip>;
2147
+ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2148
+ id: z.ZodUUID;
2149
+ tradeAccountId: z.ZodUUID;
2150
+ connector: z.ZodEnum<{
2151
+ hyperliquid: "hyperliquid";
2152
+ binance: "binance";
2153
+ bybit: "bybit";
2154
+ okx: "okx";
2155
+ lighter: "lighter";
2156
+ }>;
2157
+ status: z.ZodEnum<{
2158
+ CANCELLED: "CANCELLED";
2159
+ ACTIVE: "ACTIVE";
2160
+ TRIGGERED: "TRIGGERED";
2161
+ }>;
2162
+ ladderId: z.ZodOptional<z.ZodUUID>;
2163
+ ladderIndex: z.ZodOptional<z.ZodNumber>;
2164
+ parentTriggerId: z.ZodOptional<z.ZodUUID>;
2165
+ triggeredAt: z.ZodOptional<z.ZodString>;
2166
+ cancelledAt: z.ZodOptional<z.ZodString>;
2167
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
2168
+ USER: "USER";
2169
+ POSITION_CLOSED: "POSITION_CLOSED";
2170
+ SYSTEM: "SYSTEM";
2171
+ POSITION_NETTED: "POSITION_NETTED";
2172
+ POSITION_REVERSED: "POSITION_REVERSED";
2173
+ }>>;
2174
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
2175
+ id: z.ZodUUID;
2176
+ cloid: z.ZodOptional<z.ZodString>;
2177
+ exchangeFillId: z.ZodOptional<z.ZodString>;
2178
+ status: z.ZodEnum<{
2179
+ PROVISIONAL: "PROVISIONAL";
2180
+ CONFIRMED: "CONFIRMED";
2181
+ RECONCILED: "RECONCILED";
2182
+ }>;
2183
+ tradeAccountId: z.ZodUUID;
2184
+ symbol: z.ZodString;
2185
+ positionId: z.ZodUUID;
2186
+ connector: z.ZodEnum<{
2187
+ hyperliquid: "hyperliquid";
2188
+ binance: "binance";
2189
+ bybit: "bybit";
2190
+ okx: "okx";
2191
+ lighter: "lighter";
2192
+ }>;
2193
+ side: z.ZodEnum<{
2194
+ BUY: "BUY";
2195
+ SELL: "SELL";
2196
+ }>;
2197
+ reduceOnly: z.ZodBoolean;
2198
+ isExternal: z.ZodBoolean;
2199
+ synthetic: z.ZodBoolean;
2200
+ quantity: z.ZodString;
2201
+ price: z.ZodString;
2202
+ usd: z.ZodString;
2203
+ tradeFee: z.ZodOptional<z.ZodString>;
2204
+ pearFee: z.ZodOptional<z.ZodString>;
2205
+ timestamp: z.ZodString;
2206
+ original: z.ZodOptional<z.ZodObject<{
2207
+ exchangeFillId: z.ZodString;
2208
+ quantity: z.ZodString;
2209
+ }, z.core.$strip>>;
2210
+ }, z.core.$strip>>>;
2211
+ bracketType: z.ZodEnum<{
2212
+ STOP_LOSS: "STOP_LOSS";
2213
+ TAKE_PROFIT: "TAKE_PROFIT";
2214
+ NONE: "NONE";
2215
+ }>;
2216
+ semanticBracketType: z.ZodOptional<z.ZodEnum<{
2217
+ STOP_LOSS: "STOP_LOSS";
2218
+ TAKE_PROFIT: "TAKE_PROFIT";
2219
+ NONE: "NONE";
2220
+ }>>;
2221
+ createdAt: z.ZodString;
2222
+ updatedAt: z.ZodString;
2223
+ intent: z.ZodLiteral<"ADJUST">;
2224
+ type: z.ZodLiteral<"TWAP">;
2225
+ scheduleId: z.ZodOptional<z.ZodUUID>;
2226
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2227
+ type: z.ZodLiteral<"ratio">;
2228
+ data: z.ZodObject<{
2229
+ priceSource: z.ZodEnum<{
2230
+ mid: "mid";
2231
+ mark: "mark";
2232
+ }>;
2233
+ symbol_a: z.ZodString;
2234
+ symbol_b: z.ZodString;
2235
+ track: z.ZodEnum<{
2236
+ PEAK: "PEAK";
2237
+ TROUGH: "TROUGH";
2238
+ }>;
2239
+ threshold: z.ZodNumber;
2240
+ }, z.core.$strip>;
2241
+ }, z.core.$strip>, z.ZodObject<{
2242
+ type: z.ZodLiteral<"price">;
2243
+ data: z.ZodObject<{
2244
+ priceSource: z.ZodEnum<{
2245
+ mid: "mid";
2246
+ mark: "mark";
2247
+ }>;
2248
+ symbol: z.ZodString;
2249
+ track: z.ZodEnum<{
2250
+ PEAK: "PEAK";
2251
+ TROUGH: "TROUGH";
2252
+ }>;
2253
+ threshold: z.ZodNumber;
2254
+ }, z.core.$strip>;
2255
+ }, z.core.$strip>, z.ZodObject<{
2256
+ type: z.ZodLiteral<"weighted_ratio">;
2257
+ data: z.ZodObject<{
2258
+ priceSource: z.ZodEnum<{
2259
+ mid: "mid";
2260
+ mark: "mark";
2261
+ }>;
2262
+ basket: z.ZodArray<z.ZodObject<{
2263
+ symbol: z.ZodString;
2264
+ side: z.ZodEnum<{
2265
+ BUY: "BUY";
2266
+ SELL: "SELL";
2267
+ }>;
2268
+ weight: z.ZodNumber;
2269
+ }, z.core.$strip>>;
2270
+ track: z.ZodEnum<{
2271
+ PEAK: "PEAK";
2272
+ TROUGH: "TROUGH";
2273
+ }>;
2274
+ threshold: z.ZodNumber;
2275
+ }, z.core.$strip>;
2276
+ }, z.core.$strip>, z.ZodObject<{
2277
+ type: z.ZodLiteral<"notional">;
2278
+ data: z.ZodObject<{
2279
+ priceSource: z.ZodEnum<{
2280
+ mid: "mid";
2281
+ mark: "mark";
2282
+ }>;
2283
+ track: z.ZodEnum<{
2284
+ PEAK: "PEAK";
2285
+ TROUGH: "TROUGH";
2286
+ }>;
2287
+ threshold: z.ZodNumber;
2288
+ }, z.core.$strip>;
2289
+ }, z.core.$strip>, z.ZodObject<{
2290
+ type: z.ZodLiteral<"upnl">;
2291
+ data: z.ZodObject<{
2292
+ priceSource: z.ZodEnum<{
2293
+ mid: "mid";
2294
+ mark: "mark";
2295
+ }>;
2296
+ track: z.ZodEnum<{
2297
+ PEAK: "PEAK";
2298
+ TROUGH: "TROUGH";
2299
+ }>;
2300
+ threshold: z.ZodNumber;
2301
+ }, z.core.$strip>;
2302
+ }, z.core.$strip>, z.ZodObject<{
2303
+ type: z.ZodLiteral<"upnl_bps">;
2304
+ data: z.ZodObject<{
2305
+ priceSource: z.ZodEnum<{
2306
+ mid: "mid";
2307
+ mark: "mark";
2308
+ }>;
2309
+ track: z.ZodEnum<{
2310
+ PEAK: "PEAK";
2311
+ TROUGH: "TROUGH";
2312
+ }>;
2313
+ threshold: z.ZodNumber;
2314
+ }, z.core.$strip>;
2315
+ }, z.core.$strip>, z.ZodObject<{
2316
+ type: z.ZodLiteral<"funding_rate">;
2317
+ data: z.ZodObject<{
2318
+ connector: z.ZodEnum<{
2319
+ hyperliquid: "hyperliquid";
2320
+ binance: "binance";
2321
+ bybit: "bybit";
2322
+ okx: "okx";
2323
+ lighter: "lighter";
2324
+ }>;
2325
+ symbol: z.ZodString;
2326
+ track: z.ZodEnum<{
2327
+ PEAK: "PEAK";
2328
+ TROUGH: "TROUGH";
2329
+ }>;
2330
+ threshold: z.ZodNumber;
2331
+ }, z.core.$strip>;
2332
+ }, z.core.$strip>, z.ZodObject<{
2333
+ type: z.ZodLiteral<"prediction_market">;
2334
+ data: z.ZodObject<{
2335
+ source: z.ZodEnum<{
2336
+ kalshi: "kalshi";
2337
+ polymarket: "polymarket";
2338
+ }>;
2339
+ marketKey: z.ZodString;
2340
+ track: z.ZodEnum<{
2341
+ PEAK: "PEAK";
2342
+ TROUGH: "TROUGH";
2343
+ }>;
2344
+ threshold: z.ZodNumber;
2345
+ }, z.core.$strip>;
2346
+ }, z.core.$strip>, z.ZodObject<{
2347
+ type: z.ZodLiteral<"btc_dominance">;
2348
+ data: z.ZodObject<{
2349
+ source: z.ZodLiteral<"coingecko">;
2350
+ track: z.ZodEnum<{
2351
+ PEAK: "PEAK";
2352
+ TROUGH: "TROUGH";
2353
+ }>;
2354
+ threshold: z.ZodNumber;
2355
+ }, z.core.$strip>;
2356
+ }, z.core.$strip>], "type">;
2357
+ context: z.ZodObject<{
2358
+ type: z.ZodLiteral<"TWAP">;
2359
+ durationSec: z.ZodInt;
2360
+ sliceIntervalSec: z.ZodInt;
2361
+ randomization: z.ZodObject<{
2362
+ timingJitterBps: z.ZodInt;
2363
+ sizeJitterBps: z.ZodInt;
2364
+ }, z.core.$strip>;
2365
+ position: z.ZodObject<{
2366
+ id: z.ZodUUID;
2367
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
2368
+ }, z.core.$strip>;
2369
+ legs: z.ZodTuple<[z.ZodObject<{
2370
+ id: z.ZodOptional<z.ZodString>;
2371
+ symbol: z.ZodString;
2372
+ side: z.ZodEnum<{
2373
+ BUY: "BUY";
2374
+ SELL: "SELL";
2375
+ }>;
2376
+ weight: z.ZodNumber;
2377
+ }, z.core.$strict>], z.ZodObject<{
2378
+ id: z.ZodOptional<z.ZodString>;
2379
+ symbol: z.ZodString;
2380
+ side: z.ZodEnum<{
2381
+ BUY: "BUY";
2382
+ SELL: "SELL";
2383
+ }>;
2384
+ weight: z.ZodNumber;
2385
+ }, z.core.$strict>>;
2386
+ targetNotional: z.ZodString;
2387
+ }, z.core.$strip>;
2388
+ trailing: z.ZodOptional<z.ZodObject<{
2389
+ mode: z.ZodEnum<{
2390
+ RELATIVE_BPS: "RELATIVE_BPS";
2391
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
2392
+ }>;
2393
+ deltaValue: z.ZodNumber;
2394
+ activationValue: z.ZodOptional<z.ZodNumber>;
2395
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
2396
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
2397
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
2398
+ }, z.core.$strip>>;
2399
+ }, z.core.$strip>, z.ZodObject<{
2400
+ id: z.ZodUUID;
2401
+ tradeAccountId: z.ZodUUID;
2402
+ connector: z.ZodEnum<{
2403
+ hyperliquid: "hyperliquid";
2404
+ binance: "binance";
2405
+ bybit: "bybit";
2406
+ okx: "okx";
2407
+ lighter: "lighter";
2408
+ }>;
2409
+ status: z.ZodEnum<{
2410
+ CANCELLED: "CANCELLED";
2411
+ ACTIVE: "ACTIVE";
2412
+ TRIGGERED: "TRIGGERED";
2413
+ }>;
2414
+ ladderId: z.ZodOptional<z.ZodUUID>;
2415
+ ladderIndex: z.ZodOptional<z.ZodNumber>;
2416
+ parentTriggerId: z.ZodOptional<z.ZodUUID>;
2417
+ triggeredAt: z.ZodOptional<z.ZodString>;
2418
+ cancelledAt: z.ZodOptional<z.ZodString>;
2419
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
2420
+ USER: "USER";
2421
+ POSITION_CLOSED: "POSITION_CLOSED";
2422
+ SYSTEM: "SYSTEM";
2423
+ POSITION_NETTED: "POSITION_NETTED";
2424
+ POSITION_REVERSED: "POSITION_REVERSED";
2425
+ }>>;
2426
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
2427
+ id: z.ZodUUID;
2428
+ cloid: z.ZodOptional<z.ZodString>;
2429
+ exchangeFillId: z.ZodOptional<z.ZodString>;
2430
+ status: z.ZodEnum<{
2431
+ PROVISIONAL: "PROVISIONAL";
2432
+ CONFIRMED: "CONFIRMED";
2433
+ RECONCILED: "RECONCILED";
2434
+ }>;
2435
+ tradeAccountId: z.ZodUUID;
2436
+ symbol: z.ZodString;
2437
+ positionId: z.ZodUUID;
2438
+ connector: z.ZodEnum<{
2439
+ hyperliquid: "hyperliquid";
2440
+ binance: "binance";
2441
+ bybit: "bybit";
2442
+ okx: "okx";
2443
+ lighter: "lighter";
2444
+ }>;
2445
+ side: z.ZodEnum<{
2446
+ BUY: "BUY";
2447
+ SELL: "SELL";
2448
+ }>;
2449
+ reduceOnly: z.ZodBoolean;
2450
+ isExternal: z.ZodBoolean;
2451
+ synthetic: z.ZodBoolean;
2452
+ quantity: z.ZodString;
2453
+ price: z.ZodString;
2454
+ usd: z.ZodString;
2455
+ tradeFee: z.ZodOptional<z.ZodString>;
2456
+ pearFee: z.ZodOptional<z.ZodString>;
2457
+ timestamp: z.ZodString;
2458
+ original: z.ZodOptional<z.ZodObject<{
2459
+ exchangeFillId: z.ZodString;
2460
+ quantity: z.ZodString;
2461
+ }, z.core.$strip>>;
2462
+ }, z.core.$strip>>>;
2463
+ bracketType: z.ZodEnum<{
2464
+ STOP_LOSS: "STOP_LOSS";
2465
+ TAKE_PROFIT: "TAKE_PROFIT";
2466
+ NONE: "NONE";
2467
+ }>;
2468
+ semanticBracketType: z.ZodOptional<z.ZodEnum<{
2469
+ STOP_LOSS: "STOP_LOSS";
2470
+ TAKE_PROFIT: "TAKE_PROFIT";
2471
+ NONE: "NONE";
2472
+ }>>;
2473
+ createdAt: z.ZodString;
2474
+ updatedAt: z.ZodString;
2475
+ intent: z.ZodLiteral<"CLOSE">;
2476
+ type: z.ZodLiteral<"TWAP">;
2477
+ scheduleId: z.ZodOptional<z.ZodUUID>;
2478
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2479
+ type: z.ZodLiteral<"ratio">;
2480
+ data: z.ZodObject<{
2481
+ priceSource: z.ZodEnum<{
2482
+ mid: "mid";
2483
+ mark: "mark";
2484
+ }>;
2485
+ symbol_a: z.ZodString;
2486
+ symbol_b: z.ZodString;
2487
+ track: z.ZodEnum<{
2488
+ PEAK: "PEAK";
2489
+ TROUGH: "TROUGH";
2490
+ }>;
2491
+ threshold: z.ZodNumber;
2492
+ }, z.core.$strip>;
2493
+ }, z.core.$strip>, z.ZodObject<{
2494
+ type: z.ZodLiteral<"price">;
2495
+ data: z.ZodObject<{
2496
+ priceSource: z.ZodEnum<{
2497
+ mid: "mid";
2498
+ mark: "mark";
2499
+ }>;
2500
+ symbol: z.ZodString;
2501
+ track: z.ZodEnum<{
2502
+ PEAK: "PEAK";
2503
+ TROUGH: "TROUGH";
2504
+ }>;
2505
+ threshold: z.ZodNumber;
2506
+ }, z.core.$strip>;
2507
+ }, z.core.$strip>, z.ZodObject<{
2508
+ type: z.ZodLiteral<"weighted_ratio">;
2509
+ data: z.ZodObject<{
2510
+ priceSource: z.ZodEnum<{
2511
+ mid: "mid";
2512
+ mark: "mark";
2513
+ }>;
2514
+ basket: z.ZodArray<z.ZodObject<{
2515
+ symbol: z.ZodString;
2516
+ side: z.ZodEnum<{
2517
+ BUY: "BUY";
2518
+ SELL: "SELL";
2519
+ }>;
2520
+ weight: z.ZodNumber;
2521
+ }, z.core.$strip>>;
2522
+ track: z.ZodEnum<{
2523
+ PEAK: "PEAK";
2524
+ TROUGH: "TROUGH";
2525
+ }>;
2526
+ threshold: z.ZodNumber;
2527
+ }, z.core.$strip>;
2528
+ }, z.core.$strip>, z.ZodObject<{
2529
+ type: z.ZodLiteral<"notional">;
2530
+ data: z.ZodObject<{
2531
+ priceSource: z.ZodEnum<{
2532
+ mid: "mid";
2533
+ mark: "mark";
2534
+ }>;
2535
+ track: z.ZodEnum<{
2536
+ PEAK: "PEAK";
2537
+ TROUGH: "TROUGH";
2538
+ }>;
2539
+ threshold: z.ZodNumber;
2540
+ }, z.core.$strip>;
2541
+ }, z.core.$strip>, z.ZodObject<{
2542
+ type: z.ZodLiteral<"upnl">;
2543
+ data: z.ZodObject<{
2544
+ priceSource: z.ZodEnum<{
2545
+ mid: "mid";
2546
+ mark: "mark";
2547
+ }>;
2548
+ track: z.ZodEnum<{
2549
+ PEAK: "PEAK";
2550
+ TROUGH: "TROUGH";
2551
+ }>;
2552
+ threshold: z.ZodNumber;
2553
+ }, z.core.$strip>;
2554
+ }, z.core.$strip>, z.ZodObject<{
2555
+ type: z.ZodLiteral<"upnl_bps">;
2556
+ data: z.ZodObject<{
2557
+ priceSource: z.ZodEnum<{
2558
+ mid: "mid";
2559
+ mark: "mark";
2560
+ }>;
2561
+ track: z.ZodEnum<{
2562
+ PEAK: "PEAK";
2563
+ TROUGH: "TROUGH";
2564
+ }>;
2565
+ threshold: z.ZodNumber;
2566
+ }, z.core.$strip>;
2567
+ }, z.core.$strip>, z.ZodObject<{
2568
+ type: z.ZodLiteral<"ratio_trailing">;
2569
+ data: z.ZodObject<{
2570
+ priceSource: z.ZodEnum<{
2571
+ mid: "mid";
2572
+ mark: "mark";
2573
+ }>;
2574
+ symbol_a: z.ZodString;
2575
+ symbol_b: z.ZodString;
2576
+ }, z.core.$strip>;
2577
+ }, z.core.$strip>, z.ZodObject<{
2578
+ type: z.ZodLiteral<"price_trailing">;
2579
+ data: z.ZodObject<{
2580
+ priceSource: z.ZodEnum<{
2581
+ mid: "mid";
2582
+ mark: "mark";
2583
+ }>;
2584
+ symbol: z.ZodString;
2585
+ }, z.core.$strip>;
2586
+ }, z.core.$strip>, z.ZodObject<{
2587
+ type: z.ZodLiteral<"weighted_ratio_trailing">;
2588
+ data: z.ZodObject<{
2589
+ priceSource: z.ZodEnum<{
2590
+ mid: "mid";
2591
+ mark: "mark";
2592
+ }>;
2593
+ basket: z.ZodArray<z.ZodObject<{
2594
+ symbol: z.ZodString;
2595
+ side: z.ZodEnum<{
2596
+ BUY: "BUY";
2597
+ SELL: "SELL";
2598
+ }>;
2599
+ weight: z.ZodNumber;
2600
+ }, z.core.$strip>>;
2601
+ }, z.core.$strip>;
2602
+ }, z.core.$strip>, z.ZodObject<{
2603
+ type: z.ZodLiteral<"notional_trailing">;
2604
+ data: z.ZodObject<{
2605
+ priceSource: z.ZodEnum<{
2606
+ mid: "mid";
2607
+ mark: "mark";
2608
+ }>;
2609
+ }, z.core.$strip>;
2610
+ }, z.core.$strip>, z.ZodObject<{
2611
+ type: z.ZodLiteral<"upnl_trailing">;
2612
+ data: z.ZodObject<{
2613
+ priceSource: z.ZodEnum<{
2614
+ mid: "mid";
2615
+ mark: "mark";
2616
+ }>;
2617
+ }, z.core.$strip>;
2618
+ }, z.core.$strip>, z.ZodObject<{
2619
+ type: z.ZodLiteral<"upnl_bps_trailing">;
2620
+ data: z.ZodObject<{
2621
+ priceSource: z.ZodEnum<{
2622
+ mid: "mid";
2623
+ mark: "mark";
2624
+ }>;
2625
+ }, z.core.$strip>;
2626
+ }, z.core.$strip>, z.ZodObject<{
2627
+ type: z.ZodLiteral<"funding_rate">;
2628
+ data: z.ZodObject<{
2629
+ connector: z.ZodEnum<{
2630
+ hyperliquid: "hyperliquid";
2631
+ binance: "binance";
2632
+ bybit: "bybit";
2633
+ okx: "okx";
2634
+ lighter: "lighter";
2635
+ }>;
2636
+ symbol: z.ZodString;
2637
+ track: z.ZodEnum<{
2638
+ PEAK: "PEAK";
2639
+ TROUGH: "TROUGH";
2640
+ }>;
2641
+ threshold: z.ZodNumber;
2642
+ }, z.core.$strip>;
2643
+ }, z.core.$strip>, z.ZodObject<{
2644
+ type: z.ZodLiteral<"prediction_market">;
2645
+ data: z.ZodObject<{
2646
+ source: z.ZodEnum<{
2647
+ kalshi: "kalshi";
2648
+ polymarket: "polymarket";
2649
+ }>;
2650
+ marketKey: z.ZodString;
2651
+ track: z.ZodEnum<{
2652
+ PEAK: "PEAK";
2653
+ TROUGH: "TROUGH";
2654
+ }>;
2655
+ threshold: z.ZodNumber;
2656
+ }, z.core.$strip>;
2657
+ }, z.core.$strip>, z.ZodObject<{
2658
+ type: z.ZodLiteral<"btc_dominance">;
2659
+ data: z.ZodObject<{
2660
+ source: z.ZodLiteral<"coingecko">;
2661
+ track: z.ZodEnum<{
2662
+ PEAK: "PEAK";
2663
+ TROUGH: "TROUGH";
2664
+ }>;
2665
+ threshold: z.ZodNumber;
2666
+ }, z.core.$strip>;
2667
+ }, z.core.$strip>], "type">;
2668
+ context: z.ZodObject<{
2669
+ type: z.ZodLiteral<"TWAP">;
2670
+ durationSec: z.ZodInt;
2671
+ sliceIntervalSec: z.ZodInt;
2672
+ randomization: z.ZodObject<{
2673
+ timingJitterBps: z.ZodInt;
2674
+ sizeJitterBps: z.ZodInt;
2675
+ }, z.core.$strip>;
2676
+ position: z.ZodObject<{
2677
+ id: z.ZodUUID;
2678
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
2679
+ }, z.core.$strip>;
2680
+ }, z.core.$strip>;
2681
+ trailing: z.ZodOptional<z.ZodObject<{
2682
+ mode: z.ZodEnum<{
2683
+ RELATIVE_BPS: "RELATIVE_BPS";
2684
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
2685
+ }>;
2686
+ deltaValue: z.ZodNumber;
2687
+ activationValue: z.ZodOptional<z.ZodNumber>;
2688
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
2689
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
2690
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
2691
+ }, z.core.$strip>>;
2692
+ }, z.core.$strip>], "intent">;
1592
2693
  export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
1593
2694
  id: z.ZodUUID;
1594
2695
  tradeAccountId: z.ZodUUID;
@@ -1665,7 +2766,469 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1665
2766
  }>>;
1666
2767
  createdAt: z.ZodString;
1667
2768
  updatedAt: z.ZodString;
1668
- intent: z.ZodLiteral<"OPEN">;
2769
+ intent: z.ZodLiteral<"OPEN">;
2770
+ type: z.ZodLiteral<"MARKET">;
2771
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2772
+ type: z.ZodLiteral<"ratio">;
2773
+ data: z.ZodObject<{
2774
+ priceSource: z.ZodEnum<{
2775
+ mid: "mid";
2776
+ mark: "mark";
2777
+ }>;
2778
+ symbol_a: z.ZodString;
2779
+ symbol_b: z.ZodString;
2780
+ track: z.ZodEnum<{
2781
+ PEAK: "PEAK";
2782
+ TROUGH: "TROUGH";
2783
+ }>;
2784
+ threshold: z.ZodNumber;
2785
+ }, z.core.$strip>;
2786
+ }, z.core.$strip>, z.ZodObject<{
2787
+ type: z.ZodLiteral<"price">;
2788
+ data: z.ZodObject<{
2789
+ priceSource: z.ZodEnum<{
2790
+ mid: "mid";
2791
+ mark: "mark";
2792
+ }>;
2793
+ symbol: z.ZodString;
2794
+ track: z.ZodEnum<{
2795
+ PEAK: "PEAK";
2796
+ TROUGH: "TROUGH";
2797
+ }>;
2798
+ threshold: z.ZodNumber;
2799
+ }, z.core.$strip>;
2800
+ }, z.core.$strip>, z.ZodObject<{
2801
+ type: z.ZodLiteral<"weighted_ratio">;
2802
+ data: z.ZodObject<{
2803
+ priceSource: z.ZodEnum<{
2804
+ mid: "mid";
2805
+ mark: "mark";
2806
+ }>;
2807
+ basket: z.ZodArray<z.ZodObject<{
2808
+ symbol: z.ZodString;
2809
+ side: z.ZodEnum<{
2810
+ BUY: "BUY";
2811
+ SELL: "SELL";
2812
+ }>;
2813
+ weight: z.ZodNumber;
2814
+ }, z.core.$strip>>;
2815
+ track: z.ZodEnum<{
2816
+ PEAK: "PEAK";
2817
+ TROUGH: "TROUGH";
2818
+ }>;
2819
+ threshold: z.ZodNumber;
2820
+ }, z.core.$strip>;
2821
+ }, z.core.$strip>, z.ZodObject<{
2822
+ type: z.ZodLiteral<"funding_rate">;
2823
+ data: z.ZodObject<{
2824
+ connector: z.ZodEnum<{
2825
+ hyperliquid: "hyperliquid";
2826
+ binance: "binance";
2827
+ bybit: "bybit";
2828
+ okx: "okx";
2829
+ lighter: "lighter";
2830
+ }>;
2831
+ symbol: z.ZodString;
2832
+ track: z.ZodEnum<{
2833
+ PEAK: "PEAK";
2834
+ TROUGH: "TROUGH";
2835
+ }>;
2836
+ threshold: z.ZodNumber;
2837
+ }, z.core.$strip>;
2838
+ }, z.core.$strip>, z.ZodObject<{
2839
+ type: z.ZodLiteral<"prediction_market">;
2840
+ data: z.ZodObject<{
2841
+ source: z.ZodEnum<{
2842
+ kalshi: "kalshi";
2843
+ polymarket: "polymarket";
2844
+ }>;
2845
+ marketKey: z.ZodString;
2846
+ track: z.ZodEnum<{
2847
+ PEAK: "PEAK";
2848
+ TROUGH: "TROUGH";
2849
+ }>;
2850
+ threshold: z.ZodNumber;
2851
+ }, z.core.$strip>;
2852
+ }, z.core.$strip>, z.ZodObject<{
2853
+ type: z.ZodLiteral<"btc_dominance">;
2854
+ data: z.ZodObject<{
2855
+ source: z.ZodLiteral<"coingecko">;
2856
+ track: z.ZodEnum<{
2857
+ PEAK: "PEAK";
2858
+ TROUGH: "TROUGH";
2859
+ }>;
2860
+ threshold: z.ZodNumber;
2861
+ }, z.core.$strip>;
2862
+ }, z.core.$strip>], "type">;
2863
+ context: z.ZodObject<{
2864
+ type: z.ZodLiteral<"MARKET">;
2865
+ legs: z.ZodTuple<[z.ZodObject<{
2866
+ symbol: z.ZodString;
2867
+ id: z.ZodOptional<z.ZodString>;
2868
+ side: z.ZodEnum<{
2869
+ BUY: "BUY";
2870
+ SELL: "SELL";
2871
+ }>;
2872
+ mode: z.ZodEnum<{
2873
+ QUANTITY: "QUANTITY";
2874
+ USD: "USD";
2875
+ }>;
2876
+ amount: z.ZodString;
2877
+ }, z.core.$strip>], z.ZodObject<{
2878
+ symbol: z.ZodString;
2879
+ id: z.ZodOptional<z.ZodString>;
2880
+ side: z.ZodEnum<{
2881
+ BUY: "BUY";
2882
+ SELL: "SELL";
2883
+ }>;
2884
+ mode: z.ZodEnum<{
2885
+ QUANTITY: "QUANTITY";
2886
+ USD: "USD";
2887
+ }>;
2888
+ amount: z.ZodString;
2889
+ }, z.core.$strip>>;
2890
+ attachedTriggers: z.ZodArray<z.ZodObject<{
2891
+ kind: z.ZodEnum<{
2892
+ STATIC: "STATIC";
2893
+ TRAILING: "TRAILING";
2894
+ }>;
2895
+ bracketType: z.ZodEnum<{
2896
+ STOP_LOSS: "STOP_LOSS";
2897
+ TAKE_PROFIT: "TAKE_PROFIT";
2898
+ }>;
2899
+ }, z.core.$strip>>;
2900
+ }, z.core.$strip>;
2901
+ }, z.core.$strip>, z.ZodObject<{
2902
+ id: z.ZodUUID;
2903
+ tradeAccountId: z.ZodUUID;
2904
+ connector: z.ZodEnum<{
2905
+ hyperliquid: "hyperliquid";
2906
+ binance: "binance";
2907
+ bybit: "bybit";
2908
+ okx: "okx";
2909
+ lighter: "lighter";
2910
+ }>;
2911
+ status: z.ZodEnum<{
2912
+ CANCELLED: "CANCELLED";
2913
+ ACTIVE: "ACTIVE";
2914
+ TRIGGERED: "TRIGGERED";
2915
+ }>;
2916
+ ladderId: z.ZodOptional<z.ZodUUID>;
2917
+ ladderIndex: z.ZodOptional<z.ZodNumber>;
2918
+ parentTriggerId: z.ZodOptional<z.ZodUUID>;
2919
+ triggeredAt: z.ZodOptional<z.ZodString>;
2920
+ cancelledAt: z.ZodOptional<z.ZodString>;
2921
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
2922
+ USER: "USER";
2923
+ POSITION_CLOSED: "POSITION_CLOSED";
2924
+ SYSTEM: "SYSTEM";
2925
+ POSITION_NETTED: "POSITION_NETTED";
2926
+ POSITION_REVERSED: "POSITION_REVERSED";
2927
+ }>>;
2928
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
2929
+ id: z.ZodUUID;
2930
+ cloid: z.ZodOptional<z.ZodString>;
2931
+ exchangeFillId: z.ZodOptional<z.ZodString>;
2932
+ status: z.ZodEnum<{
2933
+ PROVISIONAL: "PROVISIONAL";
2934
+ CONFIRMED: "CONFIRMED";
2935
+ RECONCILED: "RECONCILED";
2936
+ }>;
2937
+ tradeAccountId: z.ZodUUID;
2938
+ symbol: z.ZodString;
2939
+ positionId: z.ZodUUID;
2940
+ connector: z.ZodEnum<{
2941
+ hyperliquid: "hyperliquid";
2942
+ binance: "binance";
2943
+ bybit: "bybit";
2944
+ okx: "okx";
2945
+ lighter: "lighter";
2946
+ }>;
2947
+ side: z.ZodEnum<{
2948
+ BUY: "BUY";
2949
+ SELL: "SELL";
2950
+ }>;
2951
+ reduceOnly: z.ZodBoolean;
2952
+ isExternal: z.ZodBoolean;
2953
+ synthetic: z.ZodBoolean;
2954
+ quantity: z.ZodString;
2955
+ price: z.ZodString;
2956
+ usd: z.ZodString;
2957
+ tradeFee: z.ZodOptional<z.ZodString>;
2958
+ pearFee: z.ZodOptional<z.ZodString>;
2959
+ timestamp: z.ZodString;
2960
+ original: z.ZodOptional<z.ZodObject<{
2961
+ exchangeFillId: z.ZodString;
2962
+ quantity: z.ZodString;
2963
+ }, z.core.$strip>>;
2964
+ }, z.core.$strip>>>;
2965
+ bracketType: z.ZodEnum<{
2966
+ STOP_LOSS: "STOP_LOSS";
2967
+ TAKE_PROFIT: "TAKE_PROFIT";
2968
+ NONE: "NONE";
2969
+ }>;
2970
+ semanticBracketType: z.ZodOptional<z.ZodEnum<{
2971
+ STOP_LOSS: "STOP_LOSS";
2972
+ TAKE_PROFIT: "TAKE_PROFIT";
2973
+ NONE: "NONE";
2974
+ }>>;
2975
+ createdAt: z.ZodString;
2976
+ updatedAt: z.ZodString;
2977
+ intent: z.ZodLiteral<"ADJUST">;
2978
+ type: z.ZodLiteral<"MARKET">;
2979
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2980
+ type: z.ZodLiteral<"ratio">;
2981
+ data: z.ZodObject<{
2982
+ priceSource: z.ZodEnum<{
2983
+ mid: "mid";
2984
+ mark: "mark";
2985
+ }>;
2986
+ symbol_a: z.ZodString;
2987
+ symbol_b: z.ZodString;
2988
+ track: z.ZodEnum<{
2989
+ PEAK: "PEAK";
2990
+ TROUGH: "TROUGH";
2991
+ }>;
2992
+ threshold: z.ZodNumber;
2993
+ }, z.core.$strip>;
2994
+ }, z.core.$strip>, z.ZodObject<{
2995
+ type: z.ZodLiteral<"price">;
2996
+ data: z.ZodObject<{
2997
+ priceSource: z.ZodEnum<{
2998
+ mid: "mid";
2999
+ mark: "mark";
3000
+ }>;
3001
+ symbol: z.ZodString;
3002
+ track: z.ZodEnum<{
3003
+ PEAK: "PEAK";
3004
+ TROUGH: "TROUGH";
3005
+ }>;
3006
+ threshold: z.ZodNumber;
3007
+ }, z.core.$strip>;
3008
+ }, z.core.$strip>, z.ZodObject<{
3009
+ type: z.ZodLiteral<"weighted_ratio">;
3010
+ data: z.ZodObject<{
3011
+ priceSource: z.ZodEnum<{
3012
+ mid: "mid";
3013
+ mark: "mark";
3014
+ }>;
3015
+ basket: z.ZodArray<z.ZodObject<{
3016
+ symbol: z.ZodString;
3017
+ side: z.ZodEnum<{
3018
+ BUY: "BUY";
3019
+ SELL: "SELL";
3020
+ }>;
3021
+ weight: z.ZodNumber;
3022
+ }, z.core.$strip>>;
3023
+ track: z.ZodEnum<{
3024
+ PEAK: "PEAK";
3025
+ TROUGH: "TROUGH";
3026
+ }>;
3027
+ threshold: z.ZodNumber;
3028
+ }, z.core.$strip>;
3029
+ }, z.core.$strip>, z.ZodObject<{
3030
+ type: z.ZodLiteral<"notional">;
3031
+ data: z.ZodObject<{
3032
+ priceSource: z.ZodEnum<{
3033
+ mid: "mid";
3034
+ mark: "mark";
3035
+ }>;
3036
+ track: z.ZodEnum<{
3037
+ PEAK: "PEAK";
3038
+ TROUGH: "TROUGH";
3039
+ }>;
3040
+ threshold: z.ZodNumber;
3041
+ }, z.core.$strip>;
3042
+ }, z.core.$strip>, z.ZodObject<{
3043
+ type: z.ZodLiteral<"upnl">;
3044
+ data: z.ZodObject<{
3045
+ priceSource: z.ZodEnum<{
3046
+ mid: "mid";
3047
+ mark: "mark";
3048
+ }>;
3049
+ track: z.ZodEnum<{
3050
+ PEAK: "PEAK";
3051
+ TROUGH: "TROUGH";
3052
+ }>;
3053
+ threshold: z.ZodNumber;
3054
+ }, z.core.$strip>;
3055
+ }, z.core.$strip>, z.ZodObject<{
3056
+ type: z.ZodLiteral<"upnl_bps">;
3057
+ data: z.ZodObject<{
3058
+ priceSource: z.ZodEnum<{
3059
+ mid: "mid";
3060
+ mark: "mark";
3061
+ }>;
3062
+ track: z.ZodEnum<{
3063
+ PEAK: "PEAK";
3064
+ TROUGH: "TROUGH";
3065
+ }>;
3066
+ threshold: z.ZodNumber;
3067
+ }, z.core.$strip>;
3068
+ }, z.core.$strip>, z.ZodObject<{
3069
+ type: z.ZodLiteral<"funding_rate">;
3070
+ data: z.ZodObject<{
3071
+ connector: z.ZodEnum<{
3072
+ hyperliquid: "hyperliquid";
3073
+ binance: "binance";
3074
+ bybit: "bybit";
3075
+ okx: "okx";
3076
+ lighter: "lighter";
3077
+ }>;
3078
+ symbol: z.ZodString;
3079
+ track: z.ZodEnum<{
3080
+ PEAK: "PEAK";
3081
+ TROUGH: "TROUGH";
3082
+ }>;
3083
+ threshold: z.ZodNumber;
3084
+ }, z.core.$strip>;
3085
+ }, z.core.$strip>, z.ZodObject<{
3086
+ type: z.ZodLiteral<"prediction_market">;
3087
+ data: z.ZodObject<{
3088
+ source: z.ZodEnum<{
3089
+ kalshi: "kalshi";
3090
+ polymarket: "polymarket";
3091
+ }>;
3092
+ marketKey: z.ZodString;
3093
+ track: z.ZodEnum<{
3094
+ PEAK: "PEAK";
3095
+ TROUGH: "TROUGH";
3096
+ }>;
3097
+ threshold: z.ZodNumber;
3098
+ }, z.core.$strip>;
3099
+ }, z.core.$strip>, z.ZodObject<{
3100
+ type: z.ZodLiteral<"btc_dominance">;
3101
+ data: z.ZodObject<{
3102
+ source: z.ZodLiteral<"coingecko">;
3103
+ track: z.ZodEnum<{
3104
+ PEAK: "PEAK";
3105
+ TROUGH: "TROUGH";
3106
+ }>;
3107
+ threshold: z.ZodNumber;
3108
+ }, z.core.$strip>;
3109
+ }, z.core.$strip>], "type">;
3110
+ context: z.ZodObject<{
3111
+ type: z.ZodLiteral<"MARKET">;
3112
+ position: z.ZodObject<{
3113
+ id: z.ZodUUID;
3114
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
3115
+ }, z.core.$strip>;
3116
+ legs: z.ZodTuple<[z.ZodObject<{
3117
+ id: z.ZodOptional<z.ZodString>;
3118
+ symbol: z.ZodString;
3119
+ side: z.ZodEnum<{
3120
+ BUY: "BUY";
3121
+ SELL: "SELL";
3122
+ }>;
3123
+ mode: z.ZodEnum<{
3124
+ QUANTITY: "QUANTITY";
3125
+ USD: "USD";
3126
+ }>;
3127
+ amount: z.ZodString;
3128
+ reduceOnly: z.ZodBoolean;
3129
+ }, z.core.$strip>], z.ZodObject<{
3130
+ id: z.ZodOptional<z.ZodString>;
3131
+ symbol: z.ZodString;
3132
+ side: z.ZodEnum<{
3133
+ BUY: "BUY";
3134
+ SELL: "SELL";
3135
+ }>;
3136
+ mode: z.ZodEnum<{
3137
+ QUANTITY: "QUANTITY";
3138
+ USD: "USD";
3139
+ }>;
3140
+ amount: z.ZodString;
3141
+ reduceOnly: z.ZodBoolean;
3142
+ }, z.core.$strip>>;
3143
+ }, z.core.$strip>;
3144
+ trailing: z.ZodOptional<z.ZodObject<{
3145
+ mode: z.ZodEnum<{
3146
+ RELATIVE_BPS: "RELATIVE_BPS";
3147
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
3148
+ }>;
3149
+ deltaValue: z.ZodNumber;
3150
+ activationValue: z.ZodOptional<z.ZodNumber>;
3151
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
3152
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
3153
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
3154
+ }, z.core.$strip>>;
3155
+ }, z.core.$strip>, z.ZodObject<{
3156
+ id: z.ZodUUID;
3157
+ tradeAccountId: z.ZodUUID;
3158
+ connector: z.ZodEnum<{
3159
+ hyperliquid: "hyperliquid";
3160
+ binance: "binance";
3161
+ bybit: "bybit";
3162
+ okx: "okx";
3163
+ lighter: "lighter";
3164
+ }>;
3165
+ status: z.ZodEnum<{
3166
+ CANCELLED: "CANCELLED";
3167
+ ACTIVE: "ACTIVE";
3168
+ TRIGGERED: "TRIGGERED";
3169
+ }>;
3170
+ ladderId: z.ZodOptional<z.ZodUUID>;
3171
+ ladderIndex: z.ZodOptional<z.ZodNumber>;
3172
+ parentTriggerId: z.ZodOptional<z.ZodUUID>;
3173
+ triggeredAt: z.ZodOptional<z.ZodString>;
3174
+ cancelledAt: z.ZodOptional<z.ZodString>;
3175
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
3176
+ USER: "USER";
3177
+ POSITION_CLOSED: "POSITION_CLOSED";
3178
+ SYSTEM: "SYSTEM";
3179
+ POSITION_NETTED: "POSITION_NETTED";
3180
+ POSITION_REVERSED: "POSITION_REVERSED";
3181
+ }>>;
3182
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
3183
+ id: z.ZodUUID;
3184
+ cloid: z.ZodOptional<z.ZodString>;
3185
+ exchangeFillId: z.ZodOptional<z.ZodString>;
3186
+ status: z.ZodEnum<{
3187
+ PROVISIONAL: "PROVISIONAL";
3188
+ CONFIRMED: "CONFIRMED";
3189
+ RECONCILED: "RECONCILED";
3190
+ }>;
3191
+ tradeAccountId: z.ZodUUID;
3192
+ symbol: z.ZodString;
3193
+ positionId: z.ZodUUID;
3194
+ connector: z.ZodEnum<{
3195
+ hyperliquid: "hyperliquid";
3196
+ binance: "binance";
3197
+ bybit: "bybit";
3198
+ okx: "okx";
3199
+ lighter: "lighter";
3200
+ }>;
3201
+ side: z.ZodEnum<{
3202
+ BUY: "BUY";
3203
+ SELL: "SELL";
3204
+ }>;
3205
+ reduceOnly: z.ZodBoolean;
3206
+ isExternal: z.ZodBoolean;
3207
+ synthetic: z.ZodBoolean;
3208
+ quantity: z.ZodString;
3209
+ price: z.ZodString;
3210
+ usd: z.ZodString;
3211
+ tradeFee: z.ZodOptional<z.ZodString>;
3212
+ pearFee: z.ZodOptional<z.ZodString>;
3213
+ timestamp: z.ZodString;
3214
+ original: z.ZodOptional<z.ZodObject<{
3215
+ exchangeFillId: z.ZodString;
3216
+ quantity: z.ZodString;
3217
+ }, z.core.$strip>>;
3218
+ }, z.core.$strip>>>;
3219
+ bracketType: z.ZodEnum<{
3220
+ STOP_LOSS: "STOP_LOSS";
3221
+ TAKE_PROFIT: "TAKE_PROFIT";
3222
+ NONE: "NONE";
3223
+ }>;
3224
+ semanticBracketType: z.ZodOptional<z.ZodEnum<{
3225
+ STOP_LOSS: "STOP_LOSS";
3226
+ TAKE_PROFIT: "TAKE_PROFIT";
3227
+ NONE: "NONE";
3228
+ }>>;
3229
+ createdAt: z.ZodString;
3230
+ updatedAt: z.ZodString;
3231
+ intent: z.ZodLiteral<"CLOSE">;
1669
3232
  type: z.ZodLiteral<"MARKET">;
1670
3233
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1671
3234
  type: z.ZodLiteral<"ratio">;
@@ -1717,6 +3280,104 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1717
3280
  }>;
1718
3281
  threshold: z.ZodNumber;
1719
3282
  }, z.core.$strip>;
3283
+ }, z.core.$strip>, z.ZodObject<{
3284
+ type: z.ZodLiteral<"notional">;
3285
+ data: z.ZodObject<{
3286
+ priceSource: z.ZodEnum<{
3287
+ mid: "mid";
3288
+ mark: "mark";
3289
+ }>;
3290
+ track: z.ZodEnum<{
3291
+ PEAK: "PEAK";
3292
+ TROUGH: "TROUGH";
3293
+ }>;
3294
+ threshold: z.ZodNumber;
3295
+ }, z.core.$strip>;
3296
+ }, z.core.$strip>, z.ZodObject<{
3297
+ type: z.ZodLiteral<"upnl">;
3298
+ data: z.ZodObject<{
3299
+ priceSource: z.ZodEnum<{
3300
+ mid: "mid";
3301
+ mark: "mark";
3302
+ }>;
3303
+ track: z.ZodEnum<{
3304
+ PEAK: "PEAK";
3305
+ TROUGH: "TROUGH";
3306
+ }>;
3307
+ threshold: z.ZodNumber;
3308
+ }, z.core.$strip>;
3309
+ }, z.core.$strip>, z.ZodObject<{
3310
+ type: z.ZodLiteral<"upnl_bps">;
3311
+ data: z.ZodObject<{
3312
+ priceSource: z.ZodEnum<{
3313
+ mid: "mid";
3314
+ mark: "mark";
3315
+ }>;
3316
+ track: z.ZodEnum<{
3317
+ PEAK: "PEAK";
3318
+ TROUGH: "TROUGH";
3319
+ }>;
3320
+ threshold: z.ZodNumber;
3321
+ }, z.core.$strip>;
3322
+ }, z.core.$strip>, z.ZodObject<{
3323
+ type: z.ZodLiteral<"ratio_trailing">;
3324
+ data: z.ZodObject<{
3325
+ priceSource: z.ZodEnum<{
3326
+ mid: "mid";
3327
+ mark: "mark";
3328
+ }>;
3329
+ symbol_a: z.ZodString;
3330
+ symbol_b: z.ZodString;
3331
+ }, z.core.$strip>;
3332
+ }, z.core.$strip>, z.ZodObject<{
3333
+ type: z.ZodLiteral<"price_trailing">;
3334
+ data: z.ZodObject<{
3335
+ priceSource: z.ZodEnum<{
3336
+ mid: "mid";
3337
+ mark: "mark";
3338
+ }>;
3339
+ symbol: z.ZodString;
3340
+ }, z.core.$strip>;
3341
+ }, z.core.$strip>, z.ZodObject<{
3342
+ type: z.ZodLiteral<"weighted_ratio_trailing">;
3343
+ data: z.ZodObject<{
3344
+ priceSource: z.ZodEnum<{
3345
+ mid: "mid";
3346
+ mark: "mark";
3347
+ }>;
3348
+ basket: z.ZodArray<z.ZodObject<{
3349
+ symbol: z.ZodString;
3350
+ side: z.ZodEnum<{
3351
+ BUY: "BUY";
3352
+ SELL: "SELL";
3353
+ }>;
3354
+ weight: z.ZodNumber;
3355
+ }, z.core.$strip>>;
3356
+ }, z.core.$strip>;
3357
+ }, z.core.$strip>, z.ZodObject<{
3358
+ type: z.ZodLiteral<"notional_trailing">;
3359
+ data: z.ZodObject<{
3360
+ priceSource: z.ZodEnum<{
3361
+ mid: "mid";
3362
+ mark: "mark";
3363
+ }>;
3364
+ }, z.core.$strip>;
3365
+ }, z.core.$strip>, z.ZodObject<{
3366
+ type: z.ZodLiteral<"upnl_trailing">;
3367
+ data: z.ZodObject<{
3368
+ priceSource: z.ZodEnum<{
3369
+ mid: "mid";
3370
+ mark: "mark";
3371
+ }>;
3372
+ }, z.core.$strip>;
3373
+ }, z.core.$strip>, z.ZodObject<{
3374
+ type: z.ZodLiteral<"upnl_bps_trailing">;
3375
+ data: z.ZodObject<{
3376
+ priceSource: z.ZodEnum<{
3377
+ mid: "mid";
3378
+ mark: "mark";
3379
+ }>;
3380
+ }, z.core.$strip>;
1720
3381
  }, z.core.$strip>, z.ZodObject<{
1721
3382
  type: z.ZodLiteral<"funding_rate">;
1722
3383
  data: z.ZodObject<{
@@ -1761,41 +3422,23 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1761
3422
  }, z.core.$strip>], "type">;
1762
3423
  context: z.ZodObject<{
1763
3424
  type: z.ZodLiteral<"MARKET">;
1764
- legs: z.ZodTuple<[z.ZodObject<{
1765
- symbol: z.ZodString;
1766
- side: z.ZodEnum<{
1767
- BUY: "BUY";
1768
- SELL: "SELL";
1769
- }>;
1770
- mode: z.ZodEnum<{
1771
- QUANTITY: "QUANTITY";
1772
- USD: "USD";
1773
- }>;
1774
- amount: z.ZodString;
1775
- }, z.core.$strip>], z.ZodObject<{
1776
- symbol: z.ZodString;
1777
- side: z.ZodEnum<{
1778
- BUY: "BUY";
1779
- SELL: "SELL";
1780
- }>;
1781
- mode: z.ZodEnum<{
1782
- QUANTITY: "QUANTITY";
1783
- USD: "USD";
1784
- }>;
1785
- amount: z.ZodString;
1786
- }, z.core.$strip>>;
1787
- attachedTriggers: z.ZodArray<z.ZodObject<{
1788
- kind: z.ZodEnum<{
1789
- STATIC: "STATIC";
1790
- TRAILING: "TRAILING";
1791
- }>;
1792
- bracketType: z.ZodEnum<{
1793
- STOP_LOSS: "STOP_LOSS";
1794
- TAKE_PROFIT: "TAKE_PROFIT";
1795
- }>;
1796
- }, z.core.$strip>>;
3425
+ position: z.ZodObject<{
3426
+ id: z.ZodUUID;
3427
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
3428
+ }, z.core.$strip>;
1797
3429
  }, z.core.$strip>;
1798
- }, z.core.$strip>, z.ZodObject<{
3430
+ trailing: z.ZodOptional<z.ZodObject<{
3431
+ mode: z.ZodEnum<{
3432
+ RELATIVE_BPS: "RELATIVE_BPS";
3433
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
3434
+ }>;
3435
+ deltaValue: z.ZodNumber;
3436
+ activationValue: z.ZodOptional<z.ZodNumber>;
3437
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
3438
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
3439
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
3440
+ }, z.core.$strip>>;
3441
+ }, z.core.$strip>], "intent">, z.ZodDiscriminatedUnion<[z.ZodObject<{
1799
3442
  id: z.ZodUUID;
1800
3443
  tradeAccountId: z.ZodUUID;
1801
3444
  connector: z.ZodEnum<{
@@ -1872,7 +3515,8 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1872
3515
  createdAt: z.ZodString;
1873
3516
  updatedAt: z.ZodString;
1874
3517
  intent: z.ZodLiteral<"ADJUST">;
1875
- type: z.ZodLiteral<"MARKET">;
3518
+ type: z.ZodLiteral<"TWAP">;
3519
+ scheduleId: z.ZodOptional<z.ZodUUID>;
1876
3520
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1877
3521
  type: z.ZodLiteral<"ratio">;
1878
3522
  data: z.ZodObject<{
@@ -2005,36 +3649,35 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
2005
3649
  }, z.core.$strip>;
2006
3650
  }, z.core.$strip>], "type">;
2007
3651
  context: z.ZodObject<{
2008
- type: z.ZodLiteral<"MARKET">;
3652
+ type: z.ZodLiteral<"TWAP">;
3653
+ durationSec: z.ZodInt;
3654
+ sliceIntervalSec: z.ZodInt;
3655
+ randomization: z.ZodObject<{
3656
+ timingJitterBps: z.ZodInt;
3657
+ sizeJitterBps: z.ZodInt;
3658
+ }, z.core.$strip>;
2009
3659
  position: z.ZodObject<{
2010
3660
  id: z.ZodUUID;
2011
3661
  initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
2012
3662
  }, z.core.$strip>;
2013
3663
  legs: z.ZodTuple<[z.ZodObject<{
3664
+ id: z.ZodOptional<z.ZodString>;
2014
3665
  symbol: z.ZodString;
2015
3666
  side: z.ZodEnum<{
2016
3667
  BUY: "BUY";
2017
3668
  SELL: "SELL";
2018
3669
  }>;
2019
- mode: z.ZodEnum<{
2020
- QUANTITY: "QUANTITY";
2021
- USD: "USD";
2022
- }>;
2023
- amount: z.ZodString;
2024
- reduceOnly: z.ZodBoolean;
2025
- }, z.core.$strip>], z.ZodObject<{
3670
+ weight: z.ZodNumber;
3671
+ }, z.core.$strict>], z.ZodObject<{
3672
+ id: z.ZodOptional<z.ZodString>;
2026
3673
  symbol: z.ZodString;
2027
3674
  side: z.ZodEnum<{
2028
3675
  BUY: "BUY";
2029
3676
  SELL: "SELL";
2030
3677
  }>;
2031
- mode: z.ZodEnum<{
2032
- QUANTITY: "QUANTITY";
2033
- USD: "USD";
2034
- }>;
2035
- amount: z.ZodString;
2036
- reduceOnly: z.ZodBoolean;
2037
- }, z.core.$strip>>;
3678
+ weight: z.ZodNumber;
3679
+ }, z.core.$strict>>;
3680
+ targetNotional: z.ZodString;
2038
3681
  }, z.core.$strip>;
2039
3682
  trailing: z.ZodOptional<z.ZodObject<{
2040
3683
  mode: z.ZodEnum<{
@@ -2124,7 +3767,8 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
2124
3767
  createdAt: z.ZodString;
2125
3768
  updatedAt: z.ZodString;
2126
3769
  intent: z.ZodLiteral<"CLOSE">;
2127
- type: z.ZodLiteral<"MARKET">;
3770
+ type: z.ZodLiteral<"TWAP">;
3771
+ scheduleId: z.ZodOptional<z.ZodUUID>;
2128
3772
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2129
3773
  type: z.ZodLiteral<"ratio">;
2130
3774
  data: z.ZodObject<{
@@ -2316,7 +3960,13 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
2316
3960
  }, z.core.$strip>;
2317
3961
  }, z.core.$strip>], "type">;
2318
3962
  context: z.ZodObject<{
2319
- type: z.ZodLiteral<"MARKET">;
3963
+ type: z.ZodLiteral<"TWAP">;
3964
+ durationSec: z.ZodInt;
3965
+ sliceIntervalSec: z.ZodInt;
3966
+ randomization: z.ZodObject<{
3967
+ timingJitterBps: z.ZodInt;
3968
+ sizeJitterBps: z.ZodInt;
3969
+ }, z.core.$strip>;
2320
3970
  position: z.ZodObject<{
2321
3971
  id: z.ZodUUID;
2322
3972
  initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
@@ -2339,5 +3989,8 @@ export type TriggerMarketOpenAttachedTrigger = z.output<typeof TriggerMarketOpen
2339
3989
  export type TriggerMarketOpen = z.output<typeof TriggerMarketOpen>;
2340
3990
  export type TriggerMarketAdjust = z.output<typeof TriggerMarketAdjust>;
2341
3991
  export type TriggerMarketClose = z.output<typeof TriggerMarketClose>;
2342
- export type Trigger = z.output<typeof TriggerMarket>;
3992
+ export type TriggerTWAPAdjust = z.output<typeof TriggerTWAPAdjust>;
3993
+ export type TriggerTWAPClose = z.output<typeof TriggerTWAPClose>;
3994
+ export type TriggerTWAP = z.output<typeof TriggerTWAP>;
3995
+ export type Trigger = z.output<typeof Trigger>;
2343
3996
  export {};