@polymarket/bindings 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-JPPG656Y.js +2 -0
- package/dist/chunk-JPPG656Y.js.map +1 -0
- package/dist/chunk-YXNKEMRF.js +2 -0
- package/dist/chunk-YXNKEMRF.js.map +1 -0
- package/dist/chunk-ZMJTXTXA.js +2 -0
- package/dist/chunk-ZMJTXTXA.js.map +1 -0
- package/dist/clob/index.d.ts +489 -8
- package/dist/clob/index.js +1 -1
- package/dist/clob/index.js.map +1 -1
- package/dist/combos/index.d.ts +1 -1
- package/dist/combos/index.js +1 -1
- package/dist/combos/index.js.map +1 -1
- package/dist/{comment-CKJIqOZS.d.ts → comment-tQ-L48Di.d.ts} +2 -2
- package/dist/data/index.d.ts +446 -10
- package/dist/data/index.js +1 -1
- package/dist/data/index.js.map +1 -1
- package/dist/gamma/index.d.ts +79 -4
- package/dist/gamma/index.js +1 -1
- package/dist/gamma/index.js.map +1 -1
- package/dist/index.d.ts +108 -213
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{orders-BMW5PN-Q.d.ts → orders-SIFuRgWc.d.ts} +608 -35
- package/dist/perps/index.d.ts +995 -4
- package/dist/perps/index.js +1 -1
- package/dist/perps/index.js.map +1 -1
- package/dist/relayer/index.d.ts +1 -1
- package/dist/relayer/index.js +1 -1
- package/dist/shared-QrXQ5O6x.d.ts +223 -0
- package/dist/subscriptions/index.d.ts +668 -78
- package/dist/subscriptions/index.js +1 -1
- package/dist/subscriptions/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-2FRDSBWY.js +0 -2
- package/dist/chunk-2FRDSBWY.js.map +0 -1
- package/dist/chunk-3IZ4N7C2.js +0 -2
- package/dist/chunk-3IZ4N7C2.js.map +0 -1
- package/dist/chunk-DAWT25YZ.js +0 -2
- package/dist/chunk-DAWT25YZ.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DecimalString, BaseUnits, EpochMilliseconds, OrderSide } from './
|
|
1
|
+
import { y as DecimalString, B as BaseUnits, H as EpochMilliseconds, af as OrderSide } from './shared-QrXQ5O6x.js';
|
|
2
2
|
import * as _polymarket_types from '@polymarket/types';
|
|
3
3
|
import { EvmAddress, PrivateKey, TxHash } from '@polymarket/types';
|
|
4
4
|
import { z } from 'zod';
|
|
@@ -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,12 +2547,44 @@ 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;
|
|
2108
2557
|
feeRate: DecimalString;
|
|
2109
2558
|
} | undefined;
|
|
2110
2559
|
}>>;
|
|
2560
|
+
/**
|
|
2561
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2562
|
+
*/
|
|
2563
|
+
declare enum PerpsLiquidationMethod {
|
|
2564
|
+
Market = "market",
|
|
2565
|
+
Backstop = "backstop"
|
|
2566
|
+
}
|
|
2567
|
+
/**
|
|
2568
|
+
* Liquidation command context, distinct from the fill's accounting price.
|
|
2569
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2570
|
+
*/
|
|
2571
|
+
declare const PerpsLiquidationDetailsSchema: z.ZodPipe<z.ZodObject<{
|
|
2572
|
+
liquidated_user: z.ZodOptional<z.ZodString>;
|
|
2573
|
+
mark: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2574
|
+
method: z.ZodEnum<typeof PerpsLiquidationMethod>;
|
|
2575
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2576
|
+
mark: DecimalString;
|
|
2577
|
+
method: PerpsLiquidationMethod;
|
|
2578
|
+
liquidatedUser?: string | undefined;
|
|
2579
|
+
}, {
|
|
2580
|
+
mark: DecimalString;
|
|
2581
|
+
method: PerpsLiquidationMethod;
|
|
2582
|
+
liquidated_user?: string | undefined;
|
|
2583
|
+
}>>;
|
|
2584
|
+
/**
|
|
2585
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2586
|
+
*/
|
|
2587
|
+
type PerpsLiquidationDetails = z.infer<typeof PerpsLiquidationDetailsSchema>;
|
|
2111
2588
|
/**
|
|
2112
2589
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2113
2590
|
*/
|
|
@@ -2116,6 +2593,7 @@ declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2116
2593
|
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2117
2594
|
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2118
2595
|
side: z.ZodEnum<typeof PerpsSide>;
|
|
2596
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
2119
2597
|
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2120
2598
|
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2121
2599
|
taker: z.ZodBoolean;
|
|
@@ -2137,6 +2615,20 @@ declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2137
2615
|
previous_entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2138
2616
|
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2139
2617
|
liquidation: z.ZodBoolean;
|
|
2618
|
+
adl: z.ZodBoolean;
|
|
2619
|
+
liquidation_details: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2620
|
+
liquidated_user: z.ZodOptional<z.ZodString>;
|
|
2621
|
+
mark: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2622
|
+
method: z.ZodEnum<typeof PerpsLiquidationMethod>;
|
|
2623
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2624
|
+
mark: DecimalString;
|
|
2625
|
+
method: PerpsLiquidationMethod;
|
|
2626
|
+
liquidatedUser?: string | undefined;
|
|
2627
|
+
}, {
|
|
2628
|
+
mark: DecimalString;
|
|
2629
|
+
method: PerpsLiquidationMethod;
|
|
2630
|
+
liquidated_user?: string | undefined;
|
|
2631
|
+
}>>>;
|
|
2140
2632
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2141
2633
|
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
|
|
2142
2634
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -2145,6 +2637,14 @@ declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2145
2637
|
previousEntryPrice: DecimalString;
|
|
2146
2638
|
pnl: DecimalString;
|
|
2147
2639
|
liquidation: boolean;
|
|
2640
|
+
/** Whether this fill came from auto-deleveraging. */
|
|
2641
|
+
adl: boolean;
|
|
2642
|
+
/** Present for backstop liquidations; ordinary order-book liquidations omit it. */
|
|
2643
|
+
liquidationDetails: {
|
|
2644
|
+
mark: DecimalString;
|
|
2645
|
+
method: PerpsLiquidationMethod;
|
|
2646
|
+
liquidatedUser?: string | undefined;
|
|
2647
|
+
} | undefined;
|
|
2148
2648
|
timestamp: EpochMilliseconds;
|
|
2149
2649
|
hash: _polymarket_types.TxHash | undefined;
|
|
2150
2650
|
builder?: {
|
|
@@ -2155,6 +2655,8 @@ declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2155
2655
|
orderId: PerpsOrderId;
|
|
2156
2656
|
instrumentId: PerpsInstrumentId;
|
|
2157
2657
|
side: PerpsSide;
|
|
2658
|
+
/** True for a position close at instrument settlement; false on older responses. */
|
|
2659
|
+
settlement: boolean;
|
|
2158
2660
|
price: DecimalString;
|
|
2159
2661
|
quantity: DecimalString;
|
|
2160
2662
|
taker: boolean;
|
|
@@ -2169,6 +2671,7 @@ declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2169
2671
|
order_id: PerpsOrderId;
|
|
2170
2672
|
instrument_id: PerpsInstrumentId;
|
|
2171
2673
|
side: PerpsSide;
|
|
2674
|
+
settlement: boolean;
|
|
2172
2675
|
price: DecimalString;
|
|
2173
2676
|
quantity: DecimalString;
|
|
2174
2677
|
taker: boolean;
|
|
@@ -2178,6 +2681,7 @@ declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2178
2681
|
previous_entry_price: DecimalString;
|
|
2179
2682
|
pnl: DecimalString;
|
|
2180
2683
|
liquidation: boolean;
|
|
2684
|
+
adl: boolean;
|
|
2181
2685
|
timestamp: EpochMilliseconds;
|
|
2182
2686
|
builder_fee?: DecimalString | undefined;
|
|
2183
2687
|
total_fee?: DecimalString | undefined;
|
|
@@ -2185,6 +2689,11 @@ declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2185
2689
|
address: _polymarket_types.EvmAddress;
|
|
2186
2690
|
feeRate: DecimalString;
|
|
2187
2691
|
} | undefined;
|
|
2692
|
+
liquidation_details?: {
|
|
2693
|
+
mark: DecimalString;
|
|
2694
|
+
method: PerpsLiquidationMethod;
|
|
2695
|
+
liquidatedUser?: string | undefined;
|
|
2696
|
+
} | undefined;
|
|
2188
2697
|
hash?: _polymarket_types.TxHash | undefined;
|
|
2189
2698
|
}>>;
|
|
2190
2699
|
/**
|
|
@@ -2200,6 +2709,7 @@ declare const ListPerpsFillsResponseSchema: z.ZodObject<{
|
|
|
2200
2709
|
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2201
2710
|
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2202
2711
|
side: z.ZodEnum<typeof PerpsSide>;
|
|
2712
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
2203
2713
|
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2204
2714
|
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2205
2715
|
taker: z.ZodBoolean;
|
|
@@ -2221,6 +2731,20 @@ declare const ListPerpsFillsResponseSchema: z.ZodObject<{
|
|
|
2221
2731
|
previous_entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2222
2732
|
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2223
2733
|
liquidation: z.ZodBoolean;
|
|
2734
|
+
adl: z.ZodBoolean;
|
|
2735
|
+
liquidation_details: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2736
|
+
liquidated_user: z.ZodOptional<z.ZodString>;
|
|
2737
|
+
mark: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2738
|
+
method: z.ZodEnum<typeof PerpsLiquidationMethod>;
|
|
2739
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2740
|
+
mark: DecimalString;
|
|
2741
|
+
method: PerpsLiquidationMethod;
|
|
2742
|
+
liquidatedUser?: string | undefined;
|
|
2743
|
+
}, {
|
|
2744
|
+
mark: DecimalString;
|
|
2745
|
+
method: PerpsLiquidationMethod;
|
|
2746
|
+
liquidated_user?: string | undefined;
|
|
2747
|
+
}>>>;
|
|
2224
2748
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2225
2749
|
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
|
|
2226
2750
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -2229,6 +2753,14 @@ declare const ListPerpsFillsResponseSchema: z.ZodObject<{
|
|
|
2229
2753
|
previousEntryPrice: DecimalString;
|
|
2230
2754
|
pnl: DecimalString;
|
|
2231
2755
|
liquidation: boolean;
|
|
2756
|
+
/** Whether this fill came from auto-deleveraging. */
|
|
2757
|
+
adl: boolean;
|
|
2758
|
+
/** Present for backstop liquidations; ordinary order-book liquidations omit it. */
|
|
2759
|
+
liquidationDetails: {
|
|
2760
|
+
mark: DecimalString;
|
|
2761
|
+
method: PerpsLiquidationMethod;
|
|
2762
|
+
liquidatedUser?: string | undefined;
|
|
2763
|
+
} | undefined;
|
|
2232
2764
|
timestamp: EpochMilliseconds;
|
|
2233
2765
|
hash: _polymarket_types.TxHash | undefined;
|
|
2234
2766
|
builder?: {
|
|
@@ -2239,6 +2771,8 @@ declare const ListPerpsFillsResponseSchema: z.ZodObject<{
|
|
|
2239
2771
|
orderId: PerpsOrderId;
|
|
2240
2772
|
instrumentId: PerpsInstrumentId;
|
|
2241
2773
|
side: PerpsSide;
|
|
2774
|
+
/** True for a position close at instrument settlement; false on older responses. */
|
|
2775
|
+
settlement: boolean;
|
|
2242
2776
|
price: DecimalString;
|
|
2243
2777
|
quantity: DecimalString;
|
|
2244
2778
|
taker: boolean;
|
|
@@ -2253,6 +2787,7 @@ declare const ListPerpsFillsResponseSchema: z.ZodObject<{
|
|
|
2253
2787
|
order_id: PerpsOrderId;
|
|
2254
2788
|
instrument_id: PerpsInstrumentId;
|
|
2255
2789
|
side: PerpsSide;
|
|
2790
|
+
settlement: boolean;
|
|
2256
2791
|
price: DecimalString;
|
|
2257
2792
|
quantity: DecimalString;
|
|
2258
2793
|
taker: boolean;
|
|
@@ -2262,6 +2797,7 @@ declare const ListPerpsFillsResponseSchema: z.ZodObject<{
|
|
|
2262
2797
|
previous_entry_price: DecimalString;
|
|
2263
2798
|
pnl: DecimalString;
|
|
2264
2799
|
liquidation: boolean;
|
|
2800
|
+
adl: boolean;
|
|
2265
2801
|
timestamp: EpochMilliseconds;
|
|
2266
2802
|
builder_fee?: DecimalString | undefined;
|
|
2267
2803
|
total_fee?: DecimalString | undefined;
|
|
@@ -2269,6 +2805,11 @@ declare const ListPerpsFillsResponseSchema: z.ZodObject<{
|
|
|
2269
2805
|
address: _polymarket_types.EvmAddress;
|
|
2270
2806
|
feeRate: DecimalString;
|
|
2271
2807
|
} | undefined;
|
|
2808
|
+
liquidation_details?: {
|
|
2809
|
+
mark: DecimalString;
|
|
2810
|
+
method: PerpsLiquidationMethod;
|
|
2811
|
+
liquidatedUser?: string | undefined;
|
|
2812
|
+
} | undefined;
|
|
2272
2813
|
hash?: _polymarket_types.TxHash | undefined;
|
|
2273
2814
|
}>>>;
|
|
2274
2815
|
more: z.ZodBoolean;
|
|
@@ -2281,6 +2822,7 @@ declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2281
2822
|
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2282
2823
|
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2283
2824
|
side: z.ZodEnum<typeof PerpsSide>;
|
|
2825
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
2284
2826
|
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2285
2827
|
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2286
2828
|
taker: z.ZodBoolean;
|
|
@@ -2302,6 +2844,20 @@ declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2302
2844
|
pep: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2303
2845
|
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2304
2846
|
liq: z.ZodBoolean;
|
|
2847
|
+
adl: z.ZodBoolean;
|
|
2848
|
+
liquidation_details: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2849
|
+
liquidated_user: z.ZodOptional<z.ZodString>;
|
|
2850
|
+
mark: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2851
|
+
method: z.ZodEnum<typeof PerpsLiquidationMethod>;
|
|
2852
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2853
|
+
mark: DecimalString;
|
|
2854
|
+
method: PerpsLiquidationMethod;
|
|
2855
|
+
liquidatedUser?: string | undefined;
|
|
2856
|
+
}, {
|
|
2857
|
+
mark: DecimalString;
|
|
2858
|
+
method: PerpsLiquidationMethod;
|
|
2859
|
+
liquidated_user?: string | undefined;
|
|
2860
|
+
}>>>;
|
|
2305
2861
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2306
2862
|
coid: z.ZodOptional<z.ZodString>;
|
|
2307
2863
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -2310,6 +2866,14 @@ declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2310
2866
|
previousEntryPrice: DecimalString;
|
|
2311
2867
|
pnl: DecimalString;
|
|
2312
2868
|
liquidation: boolean;
|
|
2869
|
+
/** Whether this fill came from auto-deleveraging. */
|
|
2870
|
+
adl: boolean;
|
|
2871
|
+
/** Present for backstop liquidations; ordinary order-book liquidations omit it. */
|
|
2872
|
+
liquidationDetails: {
|
|
2873
|
+
mark: DecimalString;
|
|
2874
|
+
method: PerpsLiquidationMethod;
|
|
2875
|
+
liquidatedUser?: string | undefined;
|
|
2876
|
+
} | undefined;
|
|
2313
2877
|
timestamp: EpochMilliseconds;
|
|
2314
2878
|
clientOrderId: string | undefined;
|
|
2315
2879
|
builder?: {
|
|
@@ -2320,6 +2884,8 @@ declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2320
2884
|
orderId: PerpsOrderId;
|
|
2321
2885
|
instrumentId: PerpsInstrumentId;
|
|
2322
2886
|
side: PerpsSide;
|
|
2887
|
+
/** True for a position close at instrument settlement; false on older responses. */
|
|
2888
|
+
settlement: boolean;
|
|
2323
2889
|
price: DecimalString;
|
|
2324
2890
|
quantity: DecimalString;
|
|
2325
2891
|
taker: boolean;
|
|
@@ -2334,6 +2900,7 @@ declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2334
2900
|
oid: PerpsOrderId;
|
|
2335
2901
|
iid: PerpsInstrumentId;
|
|
2336
2902
|
side: PerpsSide;
|
|
2903
|
+
settlement: boolean;
|
|
2337
2904
|
p: DecimalString;
|
|
2338
2905
|
qty: DecimalString;
|
|
2339
2906
|
taker: boolean;
|
|
@@ -2343,6 +2910,7 @@ declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2343
2910
|
pep: DecimalString;
|
|
2344
2911
|
pnl: DecimalString;
|
|
2345
2912
|
liq: boolean;
|
|
2913
|
+
adl: boolean;
|
|
2346
2914
|
ts: EpochMilliseconds;
|
|
2347
2915
|
builder_fee?: DecimalString | undefined;
|
|
2348
2916
|
total_fee?: DecimalString | undefined;
|
|
@@ -2350,7 +2918,12 @@ declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2350
2918
|
address: _polymarket_types.EvmAddress;
|
|
2351
2919
|
feeRate: DecimalString;
|
|
2352
2920
|
} | undefined;
|
|
2921
|
+
liquidation_details?: {
|
|
2922
|
+
mark: DecimalString;
|
|
2923
|
+
method: PerpsLiquidationMethod;
|
|
2924
|
+
liquidatedUser?: string | undefined;
|
|
2925
|
+
} | undefined;
|
|
2353
2926
|
coid?: string | undefined;
|
|
2354
2927
|
}>>;
|
|
2355
2928
|
|
|
2356
|
-
export {
|
|
2929
|
+
export { PerpsChaseAcceptedSchema as $, type PerpsBuilderEarning as A, type PerpsBuilderEarningId as B, CreatePerpsChaseResponseSchema as C, PerpsBuilderEarningIdSchema as D, PerpsBuilderEarningSchema as E, FetchPerpsBuilderApprovalsResponseSchema as F, type PerpsBuilderEarningsAsset as G, PerpsBuilderEarningsAssetSchema as H, type PerpsBuilderEarningsSnapshot as I, PerpsBuilderEarningsSnapshotSchema as J, type PerpsBuilderEarningsSummary as K, ListPerpsBuilderEarningsResponseSchema as L, MarkPerpsNotificationsReadResponseSchema as M, PerpsBuilderEarningsSummarySchema as N, type PerpsBuilderStatus as O, type PerpsInstrumentId as P, PerpsBuilderStatusSchema as Q, type PerpsBuilderTerms as R, PerpsBuilderTermsSchema as S, type PerpsCancelAllOrdersResponse as T, PerpsCancelAllOrdersResponseSchema as U, type PerpsCancelOrderErrorCode as V, PerpsCancelOrderErrorCodeSchema as W, type PerpsCancelOrderResult as X, PerpsCancelOrderResultSchema as Y, type PerpsChase as Z, type PerpsChaseAccepted as _, type PerpsEntityId as a, PerpsPositionLiquidatedNotificationSchema as a$, type PerpsChaseId as a0, PerpsChaseIdSchema as a1, PerpsChaseSchema as a2, PerpsClientOrderIdSchema as a3, type PerpsCommandAck as a4, PerpsCommandAckSchema as a5, PerpsCommandStatusSchema as a6, type PerpsCredentials as a7, PerpsDataResponseSchema as a8, type PerpsDecimal as a9, PerpsMarginType as aA, PerpsMarginTypeSchema as aB, type PerpsNotification as aC, type PerpsNotificationEntry as aD, PerpsNotificationEntrySchema as aE, type PerpsNotificationId as aF, PerpsNotificationIdSchema as aG, PerpsNotificationOrderType as aH, PerpsNotificationOrderTypeSchema as aI, PerpsNotificationSchema as aJ, PerpsNotificationType as aK, PerpsNotificationTypeSchema as aL, type PerpsOrder as aM, PerpsOrderIdSchema as aN, PerpsOrderSchema as aO, PerpsOrderStatus 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_, type PerpsDecimalInput as aa, PerpsDecimalInputSchema as ab, type PerpsDepositAmount as ac, PerpsDepositStatusSchema as ad, PerpsEntityIdSchema as ae, type PerpsFundingInterval as af, PerpsFundingIntervalSchema as ag, PerpsFundingPaymentIdSchema as ah, PerpsInstrumentCategorySchema as ai, PerpsInstrumentIdSchema as aj, PerpsInstrumentTypeSchema as ak, PerpsInternalTransferDirectionSchema as al, PerpsInternalTransferIdSchema as am, type PerpsInternalTransferType as an, PerpsInternalTransferTypeSchema as ao, PerpsKlineInterval as ap, PerpsKlineIntervalSchema as aq, PerpsKnownCancelOrderErrorCode as ar, type PerpsLimitOrderCanceledNotification as as, PerpsLimitOrderCanceledNotificationSchema as at, type PerpsLiquidationDetails as au, PerpsLiquidationDetailsSchema as av, PerpsLiquidationMethod as aw, type PerpsLiquidationWarningNotification as ax, PerpsLiquidationWarningNotificationSchema as ay, PerpsLiquidityRole as az, type PerpsFundingPaymentId as b, type PerpsPostOrderAck as b0, PerpsPostOrderAckSchema as b1, PerpsSideSchema as b2, PerpsSortDirection as b3, PerpsSortDirectionSchema as b4, PerpsTimeInForce as b5, PerpsTimeInForceSchema as b6, PerpsTpSlKind as b7, PerpsTpSlKindSchema as b8, type PerpsTpSlOrderFields as b9, PerpsTpSlOrderFieldsSchema as ba, PerpsTpSlScope as bb, PerpsTpSlScopeSchema as bc, PerpsTradeIdSchema as bd, type PerpsTxHash as be, PerpsTxHashSchema as bf, type PerpsUpdateLeverageBatchResult as bg, PerpsUpdateLeverageBatchResultSchema as bh, type PerpsUpdateLeverageRejection as bi, PerpsUpdateLeverageRejectionSchema as bj, type PerpsUpdateLeverageResult as bk, PerpsUpdateLeverageResultSchema as bl, type PerpsWithdrawalAmount as bm, PerpsWithdrawalIdSchema as bn, type PerpsWithdrawalStatus as bo, PerpsWithdrawalStatusSchema as bp, decimalString as bq, perpsBaseUnits as br, perpsDecimal as bs, 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, type PerpsClientOrderId as m, type PerpsOrderId as n, FetchPerpsChasesResponseSchema as o, FetchPerpsOpenOrdersResponseSchema as p, FetchPerpsOrdersResponseSchema as q, FetchPerpsUnreadNotificationsCountResponseSchema as r, ListPerpsFillsResponseSchema as s, ListPerpsNotificationsResponseSchema as t, type PerpsAccountFill as u, PerpsAccountFillSchema as v, PerpsAccountFillUpdateSchema as w, PerpsAssetSchema as x, type PerpsBuilderApproval as y, PerpsBuilderApprovalSchema as z };
|