@polymarket/bindings 0.12.0 → 0.13.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.
@@ -130,6 +130,7 @@ declare enum PerpsSide {
130
130
  */
131
131
  declare enum PerpsTimeInForce {
132
132
  GTC = "gtc",
133
+ GTD = "gtd",
133
134
  IOC = "ioc",
134
135
  FOK = "fok"
135
136
  }
@@ -720,6 +721,156 @@ declare const PerpsBuilderEarningsSummarySchema: z.ZodPipe<z.ZodObject<{
720
721
  /** @experimental This API may change in a breaking way in any release, including patch releases. */
721
722
  type PerpsBuilderEarningsSummary = z.infer<typeof PerpsBuilderEarningsSummarySchema>;
722
723
 
724
+ /** @experimental This API may change in a breaking way in any release, including patch releases. */
725
+ type PerpsChaseId = number & {
726
+ readonly __tag: 'PerpsChaseId';
727
+ };
728
+ /** @experimental This API may change in a breaking way in any release, including patch releases. */
729
+ declare const PerpsChaseIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>;
730
+ /** @experimental This API may change in a breaking way in any release, including patch releases. */
731
+ declare const PerpsChaseSchema: z.ZodPipe<z.ZodObject<{
732
+ chid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>;
733
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
734
+ buy: z.ZodBoolean;
735
+ qty: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
736
+ fill: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
737
+ lim: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
738
+ max_dist: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
739
+ max_dist_bps: z.ZodNumber;
740
+ po: z.ZodBoolean;
741
+ ro: z.ZodBoolean;
742
+ reference_price: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
743
+ reprices: z.ZodNumber;
744
+ post_only_rejections: z.ZodNumber;
745
+ cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
746
+ coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
747
+ oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
748
+ }, z.core.$strip>, z.ZodTransform<{
749
+ orderId?: PerpsOrderId | undefined;
750
+ clientOrderId?: PerpsClientOrderId | undefined;
751
+ chaseId: PerpsChaseId;
752
+ instrumentId: PerpsInstrumentId;
753
+ side: OrderSide;
754
+ quantity: DecimalString;
755
+ filledQuantity: DecimalString;
756
+ limitPrice: DecimalString;
757
+ maxDistance: DecimalString;
758
+ maxDistanceBps: number;
759
+ postOnly: boolean;
760
+ reduceOnly: boolean;
761
+ referencePrice: DecimalString;
762
+ reprices: number;
763
+ postOnlyRejections: number;
764
+ createdAt: EpochMilliseconds;
765
+ }, {
766
+ chid: PerpsChaseId;
767
+ iid: PerpsInstrumentId;
768
+ buy: boolean;
769
+ qty: DecimalString;
770
+ fill: DecimalString;
771
+ lim: DecimalString;
772
+ max_dist: DecimalString;
773
+ max_dist_bps: number;
774
+ po: boolean;
775
+ ro: boolean;
776
+ reference_price: DecimalString;
777
+ reprices: number;
778
+ post_only_rejections: number;
779
+ cts: EpochMilliseconds;
780
+ coid?: PerpsClientOrderId | undefined;
781
+ oid?: PerpsOrderId | undefined;
782
+ }>>;
783
+ /** A running chase. Zero bounds are unset; reference price is zero until a child first rests or fills.
784
+ * @experimental This API may change in a breaking way in any release, including patch releases.
785
+ */
786
+ type PerpsChase = z.infer<typeof PerpsChaseSchema>;
787
+ /** @experimental This API may change in a breaking way in any release, including patch releases. */
788
+ declare const PerpsChaseAcceptedSchema: z.ZodPipe<z.ZodObject<{
789
+ status: z.ZodLiteral<"ok">;
790
+ chid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>;
791
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
792
+ }, z.core.$strip>, z.ZodTransform<{
793
+ chaseId: PerpsChaseId;
794
+ timestamp: EpochMilliseconds;
795
+ }, {
796
+ status: "ok";
797
+ chid: PerpsChaseId;
798
+ ts: EpochMilliseconds;
799
+ }>>;
800
+ /** Acceptance does not guarantee a child has rested or any quantity will fill.
801
+ * @experimental This API may change in a breaking way in any release, including patch releases.
802
+ */
803
+ type PerpsChaseAccepted = z.infer<typeof PerpsChaseAcceptedSchema>;
804
+ /** @experimental This API may change in a breaking way in any release, including patch releases. */
805
+ declare const FetchPerpsChasesResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
806
+ chid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>;
807
+ iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
808
+ buy: z.ZodBoolean;
809
+ qty: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
810
+ fill: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
811
+ lim: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
812
+ max_dist: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
813
+ max_dist_bps: z.ZodNumber;
814
+ po: z.ZodBoolean;
815
+ ro: z.ZodBoolean;
816
+ reference_price: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
817
+ reprices: z.ZodNumber;
818
+ post_only_rejections: z.ZodNumber;
819
+ cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
820
+ coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
821
+ oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
822
+ }, z.core.$strip>, z.ZodTransform<{
823
+ orderId?: PerpsOrderId | undefined;
824
+ clientOrderId?: PerpsClientOrderId | undefined;
825
+ chaseId: PerpsChaseId;
826
+ instrumentId: PerpsInstrumentId;
827
+ side: OrderSide;
828
+ quantity: DecimalString;
829
+ filledQuantity: DecimalString;
830
+ limitPrice: DecimalString;
831
+ maxDistance: DecimalString;
832
+ maxDistanceBps: number;
833
+ postOnly: boolean;
834
+ reduceOnly: boolean;
835
+ referencePrice: DecimalString;
836
+ reprices: number;
837
+ postOnlyRejections: number;
838
+ createdAt: EpochMilliseconds;
839
+ }, {
840
+ chid: PerpsChaseId;
841
+ iid: PerpsInstrumentId;
842
+ buy: boolean;
843
+ qty: DecimalString;
844
+ fill: DecimalString;
845
+ lim: DecimalString;
846
+ max_dist: DecimalString;
847
+ max_dist_bps: number;
848
+ po: boolean;
849
+ ro: boolean;
850
+ reference_price: DecimalString;
851
+ reprices: number;
852
+ post_only_rejections: number;
853
+ cts: EpochMilliseconds;
854
+ coid?: PerpsClientOrderId | undefined;
855
+ oid?: PerpsOrderId | undefined;
856
+ }>>>;
857
+ /** @experimental This API may change in a breaking way in any release, including patch releases. */
858
+ declare const CreatePerpsChaseResponseSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
859
+ status: z.ZodLiteral<"ok">;
860
+ chid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>;
861
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
862
+ }, z.core.$strip>, z.ZodTransform<{
863
+ chaseId: PerpsChaseId;
864
+ timestamp: EpochMilliseconds;
865
+ }, {
866
+ status: "ok";
867
+ chid: PerpsChaseId;
868
+ ts: EpochMilliseconds;
869
+ }>>, z.ZodObject<{
870
+ status: z.ZodLiteral<"err">;
871
+ error: z.ZodString;
872
+ }, z.core.$strip>]>;
873
+
723
874
  /**
724
875
  * @experimental This API may change in a breaking way in any release, including patch releases.
725
876
  */
@@ -730,7 +881,9 @@ declare enum PerpsNotificationType {
730
881
  PositionClosed = "position_closed",
731
882
  LimitOrderCanceled = "limit_order_canceled",
732
883
  LiquidationWarning = "liquidation_warning",
733
- PositionLiquidated = "position_liquidated"
884
+ PositionLiquidated = "position_liquidated",
885
+ /** @experimental This API may change in a breaking way in any release, including patch releases. */
886
+ PositionDeleveraged = "position_deleveraged"
734
887
  }
735
888
  /**
736
889
  * @experimental This API may change in a breaking way in any release, including patch releases.
@@ -953,6 +1106,45 @@ declare const PerpsPositionLiquidatedNotificationSchema: z.ZodPipe<z.ZodObject<{
953
1106
  * @experimental This API may change in a breaking way in any release, including patch releases.
954
1107
  */
955
1108
  type PerpsPositionLiquidatedNotification = z.infer<typeof PerpsPositionLiquidatedNotificationSchema>;
1109
+ /**
1110
+ * A profitable position was reduced or closed by auto-deleveraging.
1111
+ *
1112
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1113
+ */
1114
+ declare const PerpsPositionDeleveragedNotificationSchema: z.ZodPipe<z.ZodObject<{
1115
+ id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
1116
+ type: z.ZodLiteral<PerpsNotificationType.PositionDeleveraged>;
1117
+ instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
1118
+ side: z.ZodEnum<typeof PerpsSide>;
1119
+ size_closed: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1120
+ price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1121
+ pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1122
+ margin_type: z.ZodEnum<typeof PerpsMarginType>;
1123
+ }, z.core.$strip>, z.ZodTransform<{
1124
+ id: PerpsNotificationId;
1125
+ type: PerpsNotificationType.PositionDeleveraged;
1126
+ instrumentId: PerpsInstrumentId;
1127
+ side: PerpsSide;
1128
+ sizeClosed: DecimalString;
1129
+ price: DecimalString;
1130
+ pnl: DecimalString;
1131
+ marginType: PerpsMarginType;
1132
+ }, {
1133
+ id: PerpsNotificationId;
1134
+ type: PerpsNotificationType.PositionDeleveraged;
1135
+ instrument_id: PerpsInstrumentId;
1136
+ side: PerpsSide;
1137
+ size_closed: DecimalString;
1138
+ price: DecimalString;
1139
+ pnl: DecimalString;
1140
+ margin_type: PerpsMarginType;
1141
+ }>>;
1142
+ /**
1143
+ * A profitable position was reduced or closed by auto-deleveraging.
1144
+ *
1145
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1146
+ */
1147
+ type PerpsPositionDeleveragedNotification = z.infer<typeof PerpsPositionDeleveragedNotificationSchema>;
956
1148
  /**
957
1149
  * @experimental This API may change in a breaking way in any release, including patch releases.
958
1150
  */
@@ -1103,6 +1295,33 @@ declare const PerpsNotificationSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
1103
1295
  pnl: DecimalString | null;
1104
1296
  margin_type: PerpsMarginType;
1105
1297
  via_backstop: boolean;
1298
+ }>>, z.ZodPipe<z.ZodObject<{
1299
+ id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
1300
+ type: z.ZodLiteral<PerpsNotificationType.PositionDeleveraged>;
1301
+ instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
1302
+ side: z.ZodEnum<typeof PerpsSide>;
1303
+ size_closed: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1304
+ price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1305
+ pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1306
+ margin_type: z.ZodEnum<typeof PerpsMarginType>;
1307
+ }, z.core.$strip>, z.ZodTransform<{
1308
+ id: PerpsNotificationId;
1309
+ type: PerpsNotificationType.PositionDeleveraged;
1310
+ instrumentId: PerpsInstrumentId;
1311
+ side: PerpsSide;
1312
+ sizeClosed: DecimalString;
1313
+ price: DecimalString;
1314
+ pnl: DecimalString;
1315
+ marginType: PerpsMarginType;
1316
+ }, {
1317
+ id: PerpsNotificationId;
1318
+ type: PerpsNotificationType.PositionDeleveraged;
1319
+ instrument_id: PerpsInstrumentId;
1320
+ side: PerpsSide;
1321
+ size_closed: DecimalString;
1322
+ price: DecimalString;
1323
+ pnl: DecimalString;
1324
+ margin_type: PerpsMarginType;
1106
1325
  }>>], "type">;
1107
1326
  /**
1108
1327
  * @experimental This API may change in a breaking way in any release, including patch releases.
@@ -1259,6 +1478,33 @@ declare const PerpsNotificationEntrySchema: z.ZodPipe<z.ZodObject<{
1259
1478
  pnl: DecimalString | null;
1260
1479
  margin_type: PerpsMarginType;
1261
1480
  via_backstop: boolean;
1481
+ }>>, z.ZodPipe<z.ZodObject<{
1482
+ id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
1483
+ type: z.ZodLiteral<PerpsNotificationType.PositionDeleveraged>;
1484
+ instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
1485
+ side: z.ZodEnum<typeof PerpsSide>;
1486
+ size_closed: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1487
+ price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1488
+ pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
1489
+ margin_type: z.ZodEnum<typeof PerpsMarginType>;
1490
+ }, z.core.$strip>, z.ZodTransform<{
1491
+ id: PerpsNotificationId;
1492
+ type: PerpsNotificationType.PositionDeleveraged;
1493
+ instrumentId: PerpsInstrumentId;
1494
+ side: PerpsSide;
1495
+ sizeClosed: DecimalString;
1496
+ price: DecimalString;
1497
+ pnl: DecimalString;
1498
+ marginType: PerpsMarginType;
1499
+ }, {
1500
+ id: PerpsNotificationId;
1501
+ type: PerpsNotificationType.PositionDeleveraged;
1502
+ instrument_id: PerpsInstrumentId;
1503
+ side: PerpsSide;
1504
+ size_closed: DecimalString;
1505
+ price: DecimalString;
1506
+ pnl: DecimalString;
1507
+ margin_type: PerpsMarginType;
1262
1508
  }>>], "type">;
1263
1509
  read_at: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>;
1264
1510
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
@@ -1310,6 +1556,15 @@ declare const PerpsNotificationEntrySchema: z.ZodPipe<z.ZodObject<{
1310
1556
  pnl: DecimalString | null;
1311
1557
  marginType: PerpsMarginType;
1312
1558
  viaBackstop: boolean;
1559
+ } | {
1560
+ id: PerpsNotificationId;
1561
+ type: PerpsNotificationType.PositionDeleveraged;
1562
+ instrumentId: PerpsInstrumentId;
1563
+ side: PerpsSide;
1564
+ sizeClosed: DecimalString;
1565
+ price: DecimalString;
1566
+ pnl: DecimalString;
1567
+ marginType: PerpsMarginType;
1313
1568
  };
1314
1569
  readAt: EpochMilliseconds | null;
1315
1570
  timestamp: EpochMilliseconds;
@@ -1361,6 +1616,15 @@ declare const PerpsNotificationEntrySchema: z.ZodPipe<z.ZodObject<{
1361
1616
  pnl: DecimalString | null;
1362
1617
  marginType: PerpsMarginType;
1363
1618
  viaBackstop: boolean;
1619
+ } | {
1620
+ id: PerpsNotificationId;
1621
+ type: PerpsNotificationType.PositionDeleveraged;
1622
+ instrumentId: PerpsInstrumentId;
1623
+ side: PerpsSide;
1624
+ sizeClosed: DecimalString;
1625
+ price: DecimalString;
1626
+ pnl: DecimalString;
1627
+ marginType: PerpsMarginType;
1364
1628
  };
1365
1629
  read_at: EpochMilliseconds | null;
1366
1630
  ts: EpochMilliseconds;
@@ -1425,6 +1689,15 @@ declare const ListPerpsNotificationsResponseSchema: z.ZodObject<{
1425
1689
  pnl: DecimalString | null;
1426
1690
  marginType: PerpsMarginType;
1427
1691
  viaBackstop: boolean;
1692
+ } | {
1693
+ id: PerpsNotificationId;
1694
+ type: PerpsNotificationType.PositionDeleveraged;
1695
+ instrumentId: PerpsInstrumentId;
1696
+ side: PerpsSide;
1697
+ sizeClosed: DecimalString;
1698
+ price: DecimalString;
1699
+ pnl: DecimalString;
1700
+ marginType: PerpsMarginType;
1428
1701
  };
1429
1702
  readAt: EpochMilliseconds | null;
1430
1703
  timestamp: EpochMilliseconds;
@@ -1473,9 +1746,18 @@ declare enum PerpsOrderStatus {
1473
1746
  ZeroQuantity = "zero_quantity",
1474
1747
  DuplicateOrder = "duplicate_order",
1475
1748
  OrderNotFound = "order_not_found",
1749
+ OrderAlreadyTerminal = "order_already_terminal",
1476
1750
  ReduceOnlyInvalid = "reduce_only_invalid",
1477
1751
  ReduceOnlyExpired = "reduce_only_expired",
1478
1752
  OrderExpired = "order_expired",
1753
+ SweepCapExceeded = "sweep_cap_exceeded",
1754
+ RestingOrderLimitExceeded = "resting_order_limit_exceeded",
1755
+ BelowMinNotional = "below_min_notional",
1756
+ InstrumentDisabled = "instrument_disabled",
1757
+ InstrumentCloseOnly = "instrument_close_only",
1758
+ InstrumentSettled = "instrument_settled",
1759
+ InsufficientMarginAtFill = "insufficient_margin_at_fill",
1760
+ MarkPriceUnavailable = "mark_price_unavailable",
1479
1761
  Untriggered = "untriggered",
1480
1762
  Armed = "armed",
1481
1763
  Triggered = "triggered",
@@ -1495,6 +1777,10 @@ declare const PerpsTpSlOrderFieldsSchema: z.ZodPipe<z.ZodObject<{
1495
1777
  parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
1496
1778
  armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
1497
1779
  slip_bps: z.ZodOptional<z.ZodNumber>;
1780
+ trail_bps: z.ZodOptional<z.ZodNumber>;
1781
+ act: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
1782
+ trail_anchor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
1783
+ trail_active: z.ZodOptional<z.ZodBoolean>;
1498
1784
  }, z.core.$strip>, z.ZodTransform<{
1499
1785
  kind: PerpsTpSlKind;
1500
1786
  scope: PerpsTpSlScope;
@@ -1502,6 +1788,10 @@ declare const PerpsTpSlOrderFieldsSchema: z.ZodPipe<z.ZodObject<{
1502
1788
  parentOrderId: PerpsOrderId | undefined;
1503
1789
  armedQuantity: DecimalString | undefined;
1504
1790
  slippageBps: number | undefined;
1791
+ trailingBps: number | undefined;
1792
+ activationPrice: DecimalString | undefined;
1793
+ trailingAnchor: DecimalString | undefined;
1794
+ trailingActive: boolean | undefined;
1505
1795
  }, {
1506
1796
  kind: PerpsTpSlKind;
1507
1797
  scope: PerpsTpSlScope;
@@ -1509,6 +1799,10 @@ declare const PerpsTpSlOrderFieldsSchema: z.ZodPipe<z.ZodObject<{
1509
1799
  parent_oid?: PerpsOrderId | undefined;
1510
1800
  armed_qty?: DecimalString | undefined;
1511
1801
  slip_bps?: number | undefined;
1802
+ trail_bps?: number | undefined;
1803
+ act?: DecimalString | undefined;
1804
+ trail_anchor?: DecimalString | undefined;
1805
+ trail_active?: boolean | undefined;
1512
1806
  }>>;
1513
1807
  /**
1514
1808
  * @experimental This API may change in a breaking way in any release, including patch releases.
@@ -1684,6 +1978,69 @@ declare const PerpsUpdateLeverageResultSchema: z.ZodPipe<z.ZodObject<{
1684
1978
  * @experimental This API may change in a breaking way in any release, including patch releases.
1685
1979
  */
1686
1980
  type PerpsUpdateLeverageResult = z.infer<typeof PerpsUpdateLeverageResultSchema>;
1981
+ /**
1982
+ * A rejected item in a batch Perps leverage update.
1983
+ *
1984
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1985
+ */
1986
+ declare const PerpsUpdateLeverageRejectionSchema: z.ZodPipe<z.ZodObject<{
1987
+ status: z.ZodLiteral<"err">;
1988
+ instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
1989
+ error: z.ZodOptional<z.ZodString>;
1990
+ }, z.core.$strip>, z.ZodTransform<{
1991
+ status: "err";
1992
+ instrumentId: PerpsInstrumentId;
1993
+ error: string;
1994
+ }, {
1995
+ status: "err";
1996
+ instrument_id: PerpsInstrumentId;
1997
+ error?: string | undefined;
1998
+ }>>;
1999
+ /**
2000
+ * A rejected item in a batch Perps leverage update.
2001
+ *
2002
+ * @experimental This API may change in a breaking way in any release, including patch releases.
2003
+ */
2004
+ type PerpsUpdateLeverageRejection = z.infer<typeof PerpsUpdateLeverageRejectionSchema>;
2005
+ /**
2006
+ * The result for one item in a batch Perps leverage update.
2007
+ *
2008
+ * @experimental This API may change in a breaking way in any release, including patch releases.
2009
+ */
2010
+ declare const PerpsUpdateLeverageBatchResultSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
2011
+ status: z.ZodLiteral<"ok">;
2012
+ instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
2013
+ leverage: z.ZodNumber;
2014
+ cross: z.ZodBoolean;
2015
+ }, z.core.$strip>, z.ZodTransform<{
2016
+ status: "ok";
2017
+ instrumentId: PerpsInstrumentId;
2018
+ leverage: number;
2019
+ crossMargin: boolean;
2020
+ }, {
2021
+ status: "ok";
2022
+ instrument_id: PerpsInstrumentId;
2023
+ leverage: number;
2024
+ cross: boolean;
2025
+ }>>, z.ZodPipe<z.ZodObject<{
2026
+ status: z.ZodLiteral<"err">;
2027
+ instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
2028
+ error: z.ZodOptional<z.ZodString>;
2029
+ }, z.core.$strip>, z.ZodTransform<{
2030
+ status: "err";
2031
+ instrumentId: PerpsInstrumentId;
2032
+ error: string;
2033
+ }, {
2034
+ status: "err";
2035
+ instrument_id: PerpsInstrumentId;
2036
+ error?: string | undefined;
2037
+ }>>]>;
2038
+ /**
2039
+ * The result for one item in a batch Perps leverage update.
2040
+ *
2041
+ * @experimental This API may change in a breaking way in any release, including patch releases.
2042
+ */
2043
+ type PerpsUpdateLeverageBatchResult = z.infer<typeof PerpsUpdateLeverageBatchResultSchema>;
1687
2044
  /**
1688
2045
  * @experimental This API may change in a breaking way in any release, including patch releases.
1689
2046
  */
@@ -1702,6 +2059,7 @@ declare const PerpsOrderSchema: z.ZodPipe<z.ZodObject<{
1702
2059
  created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1703
2060
  updated_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1704
2061
  client_order_id: z.ZodOptional<z.ZodString>;
2062
+ chid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>>;
1705
2063
  tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
1706
2064
  kind: z.ZodEnum<typeof PerpsTpSlKind>;
1707
2065
  scope: z.ZodEnum<typeof PerpsTpSlScope>;
@@ -1709,6 +2067,10 @@ declare const PerpsOrderSchema: z.ZodPipe<z.ZodObject<{
1709
2067
  parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
1710
2068
  armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
1711
2069
  slip_bps: z.ZodOptional<z.ZodNumber>;
2070
+ trail_bps: z.ZodOptional<z.ZodNumber>;
2071
+ act: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2072
+ trail_anchor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2073
+ trail_active: z.ZodOptional<z.ZodBoolean>;
1712
2074
  }, z.core.$strip>, z.ZodTransform<{
1713
2075
  kind: PerpsTpSlKind;
1714
2076
  scope: PerpsTpSlScope;
@@ -1716,6 +2078,10 @@ declare const PerpsOrderSchema: z.ZodPipe<z.ZodObject<{
1716
2078
  parentOrderId: PerpsOrderId | undefined;
1717
2079
  armedQuantity: DecimalString | undefined;
1718
2080
  slippageBps: number | undefined;
2081
+ trailingBps: number | undefined;
2082
+ activationPrice: DecimalString | undefined;
2083
+ trailingAnchor: DecimalString | undefined;
2084
+ trailingActive: boolean | undefined;
1719
2085
  }, {
1720
2086
  kind: PerpsTpSlKind;
1721
2087
  scope: PerpsTpSlScope;
@@ -1723,6 +2089,10 @@ declare const PerpsOrderSchema: z.ZodPipe<z.ZodObject<{
1723
2089
  parent_oid?: PerpsOrderId | undefined;
1724
2090
  armed_qty?: DecimalString | undefined;
1725
2091
  slip_bps?: number | undefined;
2092
+ trail_bps?: number | undefined;
2093
+ act?: DecimalString | undefined;
2094
+ trail_anchor?: DecimalString | undefined;
2095
+ trail_active?: boolean | undefined;
1726
2096
  }>>>>;
1727
2097
  builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
1728
2098
  address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
@@ -1739,6 +2109,19 @@ declare const PerpsOrderSchema: z.ZodPipe<z.ZodObject<{
1739
2109
  address: _polymarket_types.EvmAddress;
1740
2110
  feeRate: DecimalString;
1741
2111
  } | undefined;
2112
+ tpSl: {
2113
+ kind: PerpsTpSlKind;
2114
+ scope: PerpsTpSlScope;
2115
+ triggerPrice: DecimalString;
2116
+ parentOrderId: PerpsOrderId | undefined;
2117
+ armedQuantity: DecimalString | undefined;
2118
+ slippageBps: number | undefined;
2119
+ trailingBps: number | undefined;
2120
+ activationPrice: DecimalString | undefined;
2121
+ trailingAnchor: DecimalString | undefined;
2122
+ trailingActive: boolean | undefined;
2123
+ } | undefined;
2124
+ chaseId?: PerpsChaseId | undefined;
1742
2125
  id: PerpsOrderId;
1743
2126
  instrumentId: PerpsInstrumentId;
1744
2127
  side: OrderSide;
@@ -1753,14 +2136,6 @@ declare const PerpsOrderSchema: z.ZodPipe<z.ZodObject<{
1753
2136
  createdTimestamp: EpochMilliseconds;
1754
2137
  updatedTimestamp: EpochMilliseconds;
1755
2138
  clientOrderId: string | undefined;
1756
- tpSl: {
1757
- kind: PerpsTpSlKind;
1758
- scope: PerpsTpSlScope;
1759
- triggerPrice: DecimalString;
1760
- parentOrderId: PerpsOrderId | undefined;
1761
- armedQuantity: DecimalString | undefined;
1762
- slippageBps: number | undefined;
1763
- } | undefined;
1764
2139
  }, {
1765
2140
  order_id: PerpsOrderId;
1766
2141
  instrument_id: PerpsInstrumentId;
@@ -1776,6 +2151,7 @@ declare const PerpsOrderSchema: z.ZodPipe<z.ZodObject<{
1776
2151
  created_timestamp: EpochMilliseconds;
1777
2152
  updated_timestamp: EpochMilliseconds;
1778
2153
  client_order_id?: string | undefined;
2154
+ chid?: PerpsChaseId | undefined;
1779
2155
  tpsl?: {
1780
2156
  kind: PerpsTpSlKind;
1781
2157
  scope: PerpsTpSlScope;
@@ -1783,6 +2159,10 @@ declare const PerpsOrderSchema: z.ZodPipe<z.ZodObject<{
1783
2159
  parentOrderId: PerpsOrderId | undefined;
1784
2160
  armedQuantity: DecimalString | undefined;
1785
2161
  slippageBps: number | undefined;
2162
+ trailingBps: number | undefined;
2163
+ activationPrice: DecimalString | undefined;
2164
+ trailingAnchor: DecimalString | undefined;
2165
+ trailingActive: boolean | undefined;
1786
2166
  } | null | undefined;
1787
2167
  builder?: {
1788
2168
  address: _polymarket_types.EvmAddress;
@@ -1811,6 +2191,7 @@ declare const FetchPerpsOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
1811
2191
  created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1812
2192
  updated_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1813
2193
  client_order_id: z.ZodOptional<z.ZodString>;
2194
+ chid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>>;
1814
2195
  tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
1815
2196
  kind: z.ZodEnum<typeof PerpsTpSlKind>;
1816
2197
  scope: z.ZodEnum<typeof PerpsTpSlScope>;
@@ -1818,6 +2199,10 @@ declare const FetchPerpsOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
1818
2199
  parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
1819
2200
  armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
1820
2201
  slip_bps: z.ZodOptional<z.ZodNumber>;
2202
+ trail_bps: z.ZodOptional<z.ZodNumber>;
2203
+ act: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2204
+ trail_anchor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2205
+ trail_active: z.ZodOptional<z.ZodBoolean>;
1821
2206
  }, z.core.$strip>, z.ZodTransform<{
1822
2207
  kind: PerpsTpSlKind;
1823
2208
  scope: PerpsTpSlScope;
@@ -1825,6 +2210,10 @@ declare const FetchPerpsOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
1825
2210
  parentOrderId: PerpsOrderId | undefined;
1826
2211
  armedQuantity: DecimalString | undefined;
1827
2212
  slippageBps: number | undefined;
2213
+ trailingBps: number | undefined;
2214
+ activationPrice: DecimalString | undefined;
2215
+ trailingAnchor: DecimalString | undefined;
2216
+ trailingActive: boolean | undefined;
1828
2217
  }, {
1829
2218
  kind: PerpsTpSlKind;
1830
2219
  scope: PerpsTpSlScope;
@@ -1832,6 +2221,10 @@ declare const FetchPerpsOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
1832
2221
  parent_oid?: PerpsOrderId | undefined;
1833
2222
  armed_qty?: DecimalString | undefined;
1834
2223
  slip_bps?: number | undefined;
2224
+ trail_bps?: number | undefined;
2225
+ act?: DecimalString | undefined;
2226
+ trail_anchor?: DecimalString | undefined;
2227
+ trail_active?: boolean | undefined;
1835
2228
  }>>>>;
1836
2229
  builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
1837
2230
  address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
@@ -1848,6 +2241,19 @@ declare const FetchPerpsOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
1848
2241
  address: _polymarket_types.EvmAddress;
1849
2242
  feeRate: DecimalString;
1850
2243
  } | undefined;
2244
+ tpSl: {
2245
+ kind: PerpsTpSlKind;
2246
+ scope: PerpsTpSlScope;
2247
+ triggerPrice: DecimalString;
2248
+ parentOrderId: PerpsOrderId | undefined;
2249
+ armedQuantity: DecimalString | undefined;
2250
+ slippageBps: number | undefined;
2251
+ trailingBps: number | undefined;
2252
+ activationPrice: DecimalString | undefined;
2253
+ trailingAnchor: DecimalString | undefined;
2254
+ trailingActive: boolean | undefined;
2255
+ } | undefined;
2256
+ chaseId?: PerpsChaseId | undefined;
1851
2257
  id: PerpsOrderId;
1852
2258
  instrumentId: PerpsInstrumentId;
1853
2259
  side: OrderSide;
@@ -1862,14 +2268,6 @@ declare const FetchPerpsOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
1862
2268
  createdTimestamp: EpochMilliseconds;
1863
2269
  updatedTimestamp: EpochMilliseconds;
1864
2270
  clientOrderId: string | undefined;
1865
- tpSl: {
1866
- kind: PerpsTpSlKind;
1867
- scope: PerpsTpSlScope;
1868
- triggerPrice: DecimalString;
1869
- parentOrderId: PerpsOrderId | undefined;
1870
- armedQuantity: DecimalString | undefined;
1871
- slippageBps: number | undefined;
1872
- } | undefined;
1873
2271
  }, {
1874
2272
  order_id: PerpsOrderId;
1875
2273
  instrument_id: PerpsInstrumentId;
@@ -1885,6 +2283,7 @@ declare const FetchPerpsOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
1885
2283
  created_timestamp: EpochMilliseconds;
1886
2284
  updated_timestamp: EpochMilliseconds;
1887
2285
  client_order_id?: string | undefined;
2286
+ chid?: PerpsChaseId | undefined;
1888
2287
  tpsl?: {
1889
2288
  kind: PerpsTpSlKind;
1890
2289
  scope: PerpsTpSlScope;
@@ -1892,6 +2291,10 @@ declare const FetchPerpsOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
1892
2291
  parentOrderId: PerpsOrderId | undefined;
1893
2292
  armedQuantity: DecimalString | undefined;
1894
2293
  slippageBps: number | undefined;
2294
+ trailingBps: number | undefined;
2295
+ activationPrice: DecimalString | undefined;
2296
+ trailingAnchor: DecimalString | undefined;
2297
+ trailingActive: boolean | undefined;
1895
2298
  } | null | undefined;
1896
2299
  builder?: {
1897
2300
  address: _polymarket_types.EvmAddress;
@@ -1916,6 +2319,7 @@ declare const FetchPerpsOpenOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObje
1916
2319
  created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1917
2320
  updated_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
1918
2321
  client_order_id: z.ZodOptional<z.ZodString>;
2322
+ chid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>>;
1919
2323
  tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
1920
2324
  kind: z.ZodEnum<typeof PerpsTpSlKind>;
1921
2325
  scope: z.ZodEnum<typeof PerpsTpSlScope>;
@@ -1923,6 +2327,10 @@ declare const FetchPerpsOpenOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObje
1923
2327
  parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
1924
2328
  armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
1925
2329
  slip_bps: z.ZodOptional<z.ZodNumber>;
2330
+ trail_bps: z.ZodOptional<z.ZodNumber>;
2331
+ act: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2332
+ trail_anchor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2333
+ trail_active: z.ZodOptional<z.ZodBoolean>;
1926
2334
  }, z.core.$strip>, z.ZodTransform<{
1927
2335
  kind: PerpsTpSlKind;
1928
2336
  scope: PerpsTpSlScope;
@@ -1930,6 +2338,10 @@ declare const FetchPerpsOpenOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObje
1930
2338
  parentOrderId: PerpsOrderId | undefined;
1931
2339
  armedQuantity: DecimalString | undefined;
1932
2340
  slippageBps: number | undefined;
2341
+ trailingBps: number | undefined;
2342
+ activationPrice: DecimalString | undefined;
2343
+ trailingAnchor: DecimalString | undefined;
2344
+ trailingActive: boolean | undefined;
1933
2345
  }, {
1934
2346
  kind: PerpsTpSlKind;
1935
2347
  scope: PerpsTpSlScope;
@@ -1937,6 +2349,10 @@ declare const FetchPerpsOpenOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObje
1937
2349
  parent_oid?: PerpsOrderId | undefined;
1938
2350
  armed_qty?: DecimalString | undefined;
1939
2351
  slip_bps?: number | undefined;
2352
+ trail_bps?: number | undefined;
2353
+ act?: DecimalString | undefined;
2354
+ trail_anchor?: DecimalString | undefined;
2355
+ trail_active?: boolean | undefined;
1940
2356
  }>>>>;
1941
2357
  builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
1942
2358
  address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
@@ -1953,6 +2369,19 @@ declare const FetchPerpsOpenOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObje
1953
2369
  address: _polymarket_types.EvmAddress;
1954
2370
  feeRate: DecimalString;
1955
2371
  } | undefined;
2372
+ tpSl: {
2373
+ kind: PerpsTpSlKind;
2374
+ scope: PerpsTpSlScope;
2375
+ triggerPrice: DecimalString;
2376
+ parentOrderId: PerpsOrderId | undefined;
2377
+ armedQuantity: DecimalString | undefined;
2378
+ slippageBps: number | undefined;
2379
+ trailingBps: number | undefined;
2380
+ activationPrice: DecimalString | undefined;
2381
+ trailingAnchor: DecimalString | undefined;
2382
+ trailingActive: boolean | undefined;
2383
+ } | undefined;
2384
+ chaseId?: PerpsChaseId | undefined;
1956
2385
  id: PerpsOrderId;
1957
2386
  instrumentId: PerpsInstrumentId;
1958
2387
  side: OrderSide;
@@ -1967,14 +2396,6 @@ declare const FetchPerpsOpenOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObje
1967
2396
  createdTimestamp: EpochMilliseconds;
1968
2397
  updatedTimestamp: EpochMilliseconds;
1969
2398
  clientOrderId: string | undefined;
1970
- tpSl: {
1971
- kind: PerpsTpSlKind;
1972
- scope: PerpsTpSlScope;
1973
- triggerPrice: DecimalString;
1974
- parentOrderId: PerpsOrderId | undefined;
1975
- armedQuantity: DecimalString | undefined;
1976
- slippageBps: number | undefined;
1977
- } | undefined;
1978
2399
  }, {
1979
2400
  order_id: PerpsOrderId;
1980
2401
  instrument_id: PerpsInstrumentId;
@@ -1990,6 +2411,7 @@ declare const FetchPerpsOpenOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObje
1990
2411
  created_timestamp: EpochMilliseconds;
1991
2412
  updated_timestamp: EpochMilliseconds;
1992
2413
  client_order_id?: string | undefined;
2414
+ chid?: PerpsChaseId | undefined;
1993
2415
  tpsl?: {
1994
2416
  kind: PerpsTpSlKind;
1995
2417
  scope: PerpsTpSlScope;
@@ -1997,6 +2419,10 @@ declare const FetchPerpsOpenOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObje
1997
2419
  parentOrderId: PerpsOrderId | undefined;
1998
2420
  armedQuantity: DecimalString | undefined;
1999
2421
  slippageBps: number | undefined;
2422
+ trailingBps: number | undefined;
2423
+ activationPrice: DecimalString | undefined;
2424
+ trailingAnchor: DecimalString | undefined;
2425
+ trailingActive: boolean | undefined;
2000
2426
  } | null | undefined;
2001
2427
  builder?: {
2002
2428
  address: _polymarket_types.EvmAddress;
@@ -2021,6 +2447,7 @@ declare const PerpsOrderUpdateSchema: z.ZodPipe<z.ZodObject<{
2021
2447
  cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2022
2448
  uts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2023
2449
  coid: z.ZodOptional<z.ZodString>;
2450
+ chid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>>;
2024
2451
  tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
2025
2452
  kind: z.ZodEnum<typeof PerpsTpSlKind>;
2026
2453
  scope: z.ZodEnum<typeof PerpsTpSlScope>;
@@ -2028,6 +2455,10 @@ declare const PerpsOrderUpdateSchema: z.ZodPipe<z.ZodObject<{
2028
2455
  parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
2029
2456
  armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2030
2457
  slip_bps: z.ZodOptional<z.ZodNumber>;
2458
+ trail_bps: z.ZodOptional<z.ZodNumber>;
2459
+ act: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2460
+ trail_anchor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2461
+ trail_active: z.ZodOptional<z.ZodBoolean>;
2031
2462
  }, z.core.$strip>, z.ZodTransform<{
2032
2463
  kind: PerpsTpSlKind;
2033
2464
  scope: PerpsTpSlScope;
@@ -2035,6 +2466,10 @@ declare const PerpsOrderUpdateSchema: z.ZodPipe<z.ZodObject<{
2035
2466
  parentOrderId: PerpsOrderId | undefined;
2036
2467
  armedQuantity: DecimalString | undefined;
2037
2468
  slippageBps: number | undefined;
2469
+ trailingBps: number | undefined;
2470
+ activationPrice: DecimalString | undefined;
2471
+ trailingAnchor: DecimalString | undefined;
2472
+ trailingActive: boolean | undefined;
2038
2473
  }, {
2039
2474
  kind: PerpsTpSlKind;
2040
2475
  scope: PerpsTpSlScope;
@@ -2042,6 +2477,10 @@ declare const PerpsOrderUpdateSchema: z.ZodPipe<z.ZodObject<{
2042
2477
  parent_oid?: PerpsOrderId | undefined;
2043
2478
  armed_qty?: DecimalString | undefined;
2044
2479
  slip_bps?: number | undefined;
2480
+ trail_bps?: number | undefined;
2481
+ act?: DecimalString | undefined;
2482
+ trail_anchor?: DecimalString | undefined;
2483
+ trail_active?: boolean | undefined;
2045
2484
  }>>>>;
2046
2485
  builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
2047
2486
  address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
@@ -2058,6 +2497,19 @@ declare const PerpsOrderUpdateSchema: z.ZodPipe<z.ZodObject<{
2058
2497
  address: _polymarket_types.EvmAddress;
2059
2498
  feeRate: DecimalString;
2060
2499
  } | undefined;
2500
+ tpSl: {
2501
+ kind: PerpsTpSlKind;
2502
+ scope: PerpsTpSlScope;
2503
+ triggerPrice: DecimalString;
2504
+ parentOrderId: PerpsOrderId | undefined;
2505
+ armedQuantity: DecimalString | undefined;
2506
+ slippageBps: number | undefined;
2507
+ trailingBps: number | undefined;
2508
+ activationPrice: DecimalString | undefined;
2509
+ trailingAnchor: DecimalString | undefined;
2510
+ trailingActive: boolean | undefined;
2511
+ } | undefined;
2512
+ chaseId?: PerpsChaseId | undefined;
2061
2513
  id: PerpsOrderId;
2062
2514
  instrumentId: PerpsInstrumentId;
2063
2515
  side: OrderSide;
@@ -2072,14 +2524,6 @@ declare const PerpsOrderUpdateSchema: z.ZodPipe<z.ZodObject<{
2072
2524
  createdTimestamp: EpochMilliseconds;
2073
2525
  updatedTimestamp: EpochMilliseconds;
2074
2526
  clientOrderId: string | undefined;
2075
- tpSl: {
2076
- kind: PerpsTpSlKind;
2077
- scope: PerpsTpSlScope;
2078
- triggerPrice: DecimalString;
2079
- parentOrderId: PerpsOrderId | undefined;
2080
- armedQuantity: DecimalString | undefined;
2081
- slippageBps: number | undefined;
2082
- } | undefined;
2083
2527
  }, {
2084
2528
  oid: PerpsOrderId;
2085
2529
  iid: PerpsInstrumentId;
@@ -2095,6 +2539,7 @@ declare const PerpsOrderUpdateSchema: z.ZodPipe<z.ZodObject<{
2095
2539
  cts: EpochMilliseconds;
2096
2540
  uts: EpochMilliseconds;
2097
2541
  coid?: string | undefined;
2542
+ chid?: PerpsChaseId | undefined;
2098
2543
  tpsl?: {
2099
2544
  kind: PerpsTpSlKind;
2100
2545
  scope: PerpsTpSlScope;
@@ -2102,6 +2547,10 @@ declare const PerpsOrderUpdateSchema: z.ZodPipe<z.ZodObject<{
2102
2547
  parentOrderId: PerpsOrderId | undefined;
2103
2548
  armedQuantity: DecimalString | undefined;
2104
2549
  slippageBps: number | undefined;
2550
+ trailingBps: number | undefined;
2551
+ activationPrice: DecimalString | undefined;
2552
+ trailingAnchor: DecimalString | undefined;
2553
+ trailingActive: boolean | undefined;
2105
2554
  } | null | undefined;
2106
2555
  builder?: {
2107
2556
  address: _polymarket_types.EvmAddress;
@@ -2116,6 +2565,7 @@ declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
2116
2565
  order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
2117
2566
  instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
2118
2567
  side: z.ZodEnum<typeof PerpsSide>;
2568
+ settlement: z.ZodDefault<z.ZodBoolean>;
2119
2569
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2120
2570
  quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2121
2571
  taker: z.ZodBoolean;
@@ -2155,6 +2605,8 @@ declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
2155
2605
  orderId: PerpsOrderId;
2156
2606
  instrumentId: PerpsInstrumentId;
2157
2607
  side: PerpsSide;
2608
+ /** True for a position close at instrument settlement; false on older responses. */
2609
+ settlement: boolean;
2158
2610
  price: DecimalString;
2159
2611
  quantity: DecimalString;
2160
2612
  taker: boolean;
@@ -2169,6 +2621,7 @@ declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
2169
2621
  order_id: PerpsOrderId;
2170
2622
  instrument_id: PerpsInstrumentId;
2171
2623
  side: PerpsSide;
2624
+ settlement: boolean;
2172
2625
  price: DecimalString;
2173
2626
  quantity: DecimalString;
2174
2627
  taker: boolean;
@@ -2200,6 +2653,7 @@ declare const ListPerpsFillsResponseSchema: z.ZodObject<{
2200
2653
  order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
2201
2654
  instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
2202
2655
  side: z.ZodEnum<typeof PerpsSide>;
2656
+ settlement: z.ZodDefault<z.ZodBoolean>;
2203
2657
  price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2204
2658
  quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2205
2659
  taker: z.ZodBoolean;
@@ -2239,6 +2693,8 @@ declare const ListPerpsFillsResponseSchema: z.ZodObject<{
2239
2693
  orderId: PerpsOrderId;
2240
2694
  instrumentId: PerpsInstrumentId;
2241
2695
  side: PerpsSide;
2696
+ /** True for a position close at instrument settlement; false on older responses. */
2697
+ settlement: boolean;
2242
2698
  price: DecimalString;
2243
2699
  quantity: DecimalString;
2244
2700
  taker: boolean;
@@ -2253,6 +2709,7 @@ declare const ListPerpsFillsResponseSchema: z.ZodObject<{
2253
2709
  order_id: PerpsOrderId;
2254
2710
  instrument_id: PerpsInstrumentId;
2255
2711
  side: PerpsSide;
2712
+ settlement: boolean;
2256
2713
  price: DecimalString;
2257
2714
  quantity: DecimalString;
2258
2715
  taker: boolean;
@@ -2281,6 +2738,7 @@ declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
2281
2738
  oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
2282
2739
  iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
2283
2740
  side: z.ZodEnum<typeof PerpsSide>;
2741
+ settlement: z.ZodDefault<z.ZodBoolean>;
2284
2742
  p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2285
2743
  qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2286
2744
  taker: z.ZodBoolean;
@@ -2320,6 +2778,8 @@ declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
2320
2778
  orderId: PerpsOrderId;
2321
2779
  instrumentId: PerpsInstrumentId;
2322
2780
  side: PerpsSide;
2781
+ /** True for a position close at instrument settlement; false on older responses. */
2782
+ settlement: boolean;
2323
2783
  price: DecimalString;
2324
2784
  quantity: DecimalString;
2325
2785
  taker: boolean;
@@ -2334,6 +2794,7 @@ declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
2334
2794
  oid: PerpsOrderId;
2335
2795
  iid: PerpsInstrumentId;
2336
2796
  side: PerpsSide;
2797
+ settlement: boolean;
2337
2798
  p: DecimalString;
2338
2799
  qty: DecimalString;
2339
2800
  taker: boolean;
@@ -2353,4 +2814,4 @@ declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
2353
2814
  coid?: string | undefined;
2354
2815
  }>>;
2355
2816
 
2356
- export { PerpsDataResponseSchema as $, PerpsBuilderEarningSchema as A, type PerpsBuilderEarningsAsset as B, PerpsBuilderEarningsAssetSchema as C, type PerpsBuilderEarningsSnapshot as D, PerpsBuilderEarningsSnapshotSchema as E, FetchPerpsBuilderApprovalsResponseSchema as F, type PerpsBuilderEarningsSummary as G, PerpsBuilderEarningsSummarySchema as H, type PerpsBuilderStatus as I, PerpsBuilderStatusSchema as J, type PerpsBuilderTerms as K, ListPerpsBuilderEarningsResponseSchema as L, MarkPerpsNotificationsReadResponseSchema as M, PerpsBuilderTermsSchema as N, type PerpsCancelAllOrdersResponse as O, type PerpsInstrumentId as P, PerpsCancelAllOrdersResponseSchema as Q, type PerpsCancelOrderErrorCode as R, PerpsCancelOrderErrorCodeSchema as S, type PerpsCancelOrderResult as T, PerpsCancelOrderResultSchema as U, type PerpsClientOrderId as V, PerpsClientOrderIdSchema as W, type PerpsCommandAck as X, PerpsCommandAckSchema as Y, PerpsCommandStatusSchema as Z, type PerpsCredentials as _, type PerpsEntityId as a, PerpsTpSlScopeSchema as a$, type PerpsDecimal as a0, type PerpsDecimalInput as a1, PerpsDecimalInputSchema as a2, type PerpsDepositAmount as a3, PerpsDepositStatusSchema as a4, PerpsEntityIdSchema as a5, type PerpsFundingInterval as a6, PerpsFundingIntervalSchema as a7, PerpsFundingPaymentIdSchema as a8, PerpsInstrumentCategorySchema as a9, type PerpsOrder as aA, type PerpsOrderId as aB, PerpsOrderIdSchema as aC, PerpsOrderSchema as aD, PerpsOrderStatus as aE, PerpsOrderStatusSchema as aF, PerpsOrderUpdateSchema as aG, PerpsPnlInterval as aH, PerpsPnlIntervalSchema as aI, type PerpsPositionChangeNotification as aJ, PerpsPositionChangeNotificationSchema as aK, type PerpsPositionClosedNotification as aL, PerpsPositionClosedNotificationSchema as aM, type PerpsPositionLiquidatedNotification as aN, PerpsPositionLiquidatedNotificationSchema as aO, type PerpsPostOrderAck as aP, PerpsPostOrderAckSchema as aQ, PerpsSideSchema as aR, PerpsSortDirection as aS, PerpsSortDirectionSchema as aT, PerpsTimeInForce as aU, PerpsTimeInForceSchema as aV, PerpsTpSlKind as aW, PerpsTpSlKindSchema as aX, type PerpsTpSlOrderFields as aY, PerpsTpSlOrderFieldsSchema as aZ, PerpsTpSlScope as a_, PerpsInstrumentIdSchema as aa, PerpsInstrumentTypeSchema as ab, PerpsInternalTransferDirectionSchema as ac, PerpsInternalTransferIdSchema as ad, type PerpsInternalTransferType as ae, PerpsInternalTransferTypeSchema as af, PerpsKlineInterval as ag, PerpsKlineIntervalSchema as ah, PerpsKnownCancelOrderErrorCode as ai, type PerpsLimitOrderCanceledNotification as aj, PerpsLimitOrderCanceledNotificationSchema as ak, type PerpsLiquidationWarningNotification as al, PerpsLiquidationWarningNotificationSchema as am, PerpsLiquidityRole as an, PerpsMarginType as ao, PerpsMarginTypeSchema as ap, type PerpsNotification as aq, type PerpsNotificationEntry as ar, PerpsNotificationEntrySchema as as, type PerpsNotificationId as at, PerpsNotificationIdSchema as au, PerpsNotificationOrderType as av, PerpsNotificationOrderTypeSchema as aw, PerpsNotificationSchema as ax, PerpsNotificationType as ay, PerpsNotificationTypeSchema as az, type PerpsFundingPaymentId as b, PerpsTradeIdSchema as b0, type PerpsTxHash as b1, PerpsTxHashSchema as b2, type PerpsUpdateLeverageResult as b3, PerpsUpdateLeverageResultSchema as b4, type PerpsWithdrawalAmount as b5, PerpsWithdrawalIdSchema as b6, type PerpsWithdrawalStatus as b7, PerpsWithdrawalStatusSchema as b8, decimalString as b9, perpsBaseUnits as ba, perpsDecimal as bb, PerpsDepositStatus as c, type PerpsInternalTransferId as d, PerpsKnownInternalTransferType as e, PerpsInternalTransferDirection as f, type PerpsWithdrawalId as g, PerpsKnownWithdrawalStatus as h, PerpsInstrumentType as i, PerpsInstrumentCategory as j, type PerpsTradeId as k, PerpsSide as l, FetchPerpsOpenOrdersResponseSchema as m, FetchPerpsOrdersResponseSchema as n, FetchPerpsUnreadNotificationsCountResponseSchema as o, ListPerpsFillsResponseSchema as p, ListPerpsNotificationsResponseSchema as q, type PerpsAccountFill as r, PerpsAccountFillSchema as s, PerpsAccountFillUpdateSchema as t, PerpsAssetSchema as u, type PerpsBuilderApproval as v, PerpsBuilderApprovalSchema as w, type PerpsBuilderEarning as x, type PerpsBuilderEarningId as y, PerpsBuilderEarningIdSchema as z };
2817
+ export { PerpsBuilderStatusSchema as $, FetchPerpsChasesResponseSchema as A, FetchPerpsOpenOrdersResponseSchema as B, CreatePerpsChaseResponseSchema as C, FetchPerpsOrdersResponseSchema as D, FetchPerpsUnreadNotificationsCountResponseSchema as E, FetchPerpsBuilderApprovalsResponseSchema as F, ListPerpsFillsResponseSchema as G, ListPerpsNotificationsResponseSchema as H, type PerpsAccountFill as I, PerpsAccountFillSchema as J, PerpsAccountFillUpdateSchema as K, ListPerpsBuilderEarningsResponseSchema as L, MarkPerpsNotificationsReadResponseSchema as M, PerpsAssetSchema as N, type PerpsBuilderApproval as O, type PerpsInstrumentId as P, PerpsBuilderApprovalSchema as Q, type PerpsBuilderEarning as R, PerpsBuilderEarningIdSchema as S, PerpsBuilderEarningSchema as T, type PerpsBuilderEarningsAsset as U, PerpsBuilderEarningsAssetSchema as V, type PerpsBuilderEarningsSnapshot as W, PerpsBuilderEarningsSnapshotSchema as X, type PerpsBuilderEarningsSummary as Y, PerpsBuilderEarningsSummarySchema as Z, type PerpsBuilderStatus as _, type PerpsBuilderEarningId as a, PerpsPositionLiquidatedNotificationSchema as a$, type PerpsBuilderTerms as a0, PerpsBuilderTermsSchema as a1, type PerpsCancelAllOrdersResponse as a2, PerpsCancelAllOrdersResponseSchema as a3, type PerpsCancelOrderErrorCode as a4, PerpsCancelOrderErrorCodeSchema as a5, type PerpsCancelOrderResult as a6, PerpsCancelOrderResultSchema as a7, type PerpsChase as a8, type PerpsChaseAccepted as a9, PerpsKnownCancelOrderErrorCode as aA, type PerpsLimitOrderCanceledNotification as aB, PerpsLimitOrderCanceledNotificationSchema as aC, type PerpsLiquidationWarningNotification as aD, PerpsLiquidationWarningNotificationSchema as aE, PerpsMarginTypeSchema as aF, type PerpsNotification as aG, type PerpsNotificationEntry as aH, PerpsNotificationEntrySchema as aI, PerpsNotificationIdSchema as aJ, PerpsNotificationOrderTypeSchema as aK, PerpsNotificationSchema as aL, PerpsNotificationTypeSchema as aM, type PerpsOrder as aN, PerpsOrderIdSchema as aO, PerpsOrderSchema as aP, PerpsOrderStatusSchema as aQ, PerpsOrderUpdateSchema as aR, PerpsPnlInterval as aS, PerpsPnlIntervalSchema as aT, type PerpsPositionChangeNotification as aU, PerpsPositionChangeNotificationSchema as aV, type PerpsPositionClosedNotification as aW, PerpsPositionClosedNotificationSchema as aX, type PerpsPositionDeleveragedNotification as aY, PerpsPositionDeleveragedNotificationSchema as aZ, type PerpsPositionLiquidatedNotification as a_, PerpsChaseAcceptedSchema as aa, PerpsChaseIdSchema as ab, PerpsChaseSchema as ac, PerpsClientOrderIdSchema as ad, type PerpsCommandAck as ae, PerpsCommandAckSchema as af, PerpsCommandStatusSchema as ag, type PerpsCredentials as ah, PerpsDataResponseSchema as ai, type PerpsDecimal as aj, type PerpsDecimalInput as ak, PerpsDecimalInputSchema as al, type PerpsDepositAmount as am, PerpsDepositStatusSchema as an, PerpsEntityIdSchema as ao, type PerpsFundingInterval as ap, PerpsFundingIntervalSchema as aq, PerpsFundingPaymentIdSchema as ar, PerpsInstrumentCategorySchema as as, PerpsInstrumentIdSchema as at, PerpsInstrumentTypeSchema as au, PerpsInternalTransferDirectionSchema as av, PerpsInternalTransferIdSchema as aw, type PerpsInternalTransferType as ax, PerpsInternalTransferTypeSchema as ay, PerpsKlineIntervalSchema as az, type PerpsTradeId as b, type PerpsPostOrderAck as b0, PerpsPostOrderAckSchema as b1, PerpsSideSchema as b2, PerpsSortDirection as b3, PerpsSortDirectionSchema as b4, PerpsTimeInForceSchema as b5, PerpsTpSlKindSchema as b6, type PerpsTpSlOrderFields as b7, PerpsTpSlOrderFieldsSchema as b8, PerpsTpSlScopeSchema as b9, PerpsTradeIdSchema as ba, type PerpsTxHash as bb, PerpsTxHashSchema as bc, type PerpsUpdateLeverageBatchResult as bd, PerpsUpdateLeverageBatchResultSchema as be, type PerpsUpdateLeverageRejection as bf, PerpsUpdateLeverageRejectionSchema as bg, type PerpsUpdateLeverageResult as bh, PerpsUpdateLeverageResultSchema as bi, type PerpsWithdrawalAmount as bj, PerpsWithdrawalIdSchema as bk, type PerpsWithdrawalStatus as bl, PerpsWithdrawalStatusSchema as bm, decimalString as bn, perpsBaseUnits as bo, perpsDecimal as bp, type PerpsOrderId as c, type PerpsClientOrderId as d, PerpsLiquidityRole as e, PerpsKlineInterval as f, PerpsDepositStatus as g, PerpsSide as h, type PerpsFundingPaymentId as i, type PerpsNotificationId as j, PerpsNotificationType as k, PerpsNotificationOrderType as l, PerpsMarginType as m, PerpsTimeInForce as n, PerpsOrderStatus as o, type PerpsChaseId as p, PerpsTpSlKind as q, PerpsTpSlScope as r, type PerpsWithdrawalId as s, PerpsKnownWithdrawalStatus as t, type PerpsEntityId as u, type PerpsInternalTransferId as v, PerpsKnownInternalTransferType as w, PerpsInternalTransferDirection as x, PerpsInstrumentType as y, PerpsInstrumentCategory as z };